Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(152)

Side by Side Diff: chrome/browser/offline_pages/offliner_user_data.h

Issue 2903383003: Get network resource usage from ChromeResourceDispatcherHostDelegate (Closed)
Patch Set: CR feedback per FGorski Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_OFFLINE_PAGES_OFFLINER_USER_DATA_H_ 5 #ifndef CHROME_BROWSER_OFFLINE_PAGES_OFFLINER_USER_DATA_H_
6 #define CHROME_BROWSER_OFFLINE_PAGES_OFFLINER_USER_DATA_H_ 6 #define CHROME_BROWSER_OFFLINE_PAGES_OFFLINER_USER_DATA_H_
7 7
8 #include "chrome/browser/offline_pages/background_loader_offliner.h" 8 #include "chrome/browser/offline_pages/background_loader_offliner.h"
9 #include "chrome/browser/offline_pages/resource_loading_observer.h" 9 #include "chrome/browser/offline_pages/resource_loading_observer.h"
10 #include "components/offline_pages/features/features.h"
11 #include "content/public/browser/web_contents_user_data.h" 10 #include "content/public/browser/web_contents_user_data.h"
12 11
13 namespace offline_pages { 12 namespace offline_pages {
14 13
15 class OfflinerUserData : public content::WebContentsUserData<OfflinerUserData> { 14 class OfflinerUserData : public content::WebContentsUserData<OfflinerUserData> {
16 public: 15 public:
17 static void AddToWebContents(content::WebContents* webcontents, 16 static void AddToWebContents(content::WebContents* webcontents,
18 BackgroundLoaderOffliner* offliner); 17 BackgroundLoaderOffliner* offliner);
19 18
20 static BackgroundLoaderOffliner* OfflinerFromWebContents( 19 static BackgroundLoaderOffliner* OfflinerFromWebContents(
(...skipping 11 matching lines...) Expand all
32 // The offliner that the WebContents is attached to. The offliner owns the 31 // The offliner that the WebContents is attached to. The offliner owns the
33 // Delegate which owns the WebContents that this data is attached to. 32 // Delegate which owns the WebContents that this data is attached to.
34 // Therefore, its lifetime should exceed that of the WebContents, so this 33 // Therefore, its lifetime should exceed that of the WebContents, so this
35 // should always be non-null. 34 // should always be non-null.
36 BackgroundLoaderOffliner* offliner_; 35 BackgroundLoaderOffliner* offliner_;
37 }; 36 };
38 37
39 } // namespace offline_pages 38 } // namespace offline_pages
40 39
41 #endif // CHROME_BROWSER_OFFLINE_PAGES_OFFLINER_USER_DATA_H_ 40 #endif // CHROME_BROWSER_OFFLINE_PAGES_OFFLINER_USER_DATA_H_
OLDNEW
« no previous file with comments | « chrome/browser/offline_pages/background_loader_offliner.cc ('k') | chrome/browser/offline_pages/offliner_user_data.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698