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

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

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
« no previous file with comments | « chrome/browser/offline_pages/offliner_user_data.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #include "chrome/browser/offline_pages/offliner_user_data.h" 5 #include "chrome/browser/offline_pages/offliner_user_data.h"
6 6
7 class ResourceTrackerObserver;
8
9 namespace offline_pages { 7 namespace offline_pages {
10 8
11 void OfflinerUserData::AddToWebContents(content::WebContents* webcontents, 9 void OfflinerUserData::AddToWebContents(content::WebContents* webcontents,
12 BackgroundLoaderOffliner* offliner) { 10 BackgroundLoaderOffliner* offliner) {
13 DCHECK(offliner); 11 DCHECK(offliner);
14 webcontents->SetUserData(UserDataKey(), std::unique_ptr<OfflinerUserData>( 12 webcontents->SetUserData(UserDataKey(), std::unique_ptr<OfflinerUserData>(
15 new OfflinerUserData(offliner))); 13 new OfflinerUserData(offliner)));
16 } 14 }
17 15
18 // static - gets the data pointer as a BackgroundLoaderOffliner 16 // static - gets the data pointer as a BackgroundLoaderOffliner
(...skipping 13 matching lines...) Expand all
32 OfflinerUserData* data = OfflinerUserData::FromWebContents(webcontents); 30 OfflinerUserData* data = OfflinerUserData::FromWebContents(webcontents);
33 if (data) 31 if (data)
34 return data->offliner(); 32 return data->offliner();
35 33
36 return nullptr; 34 return nullptr;
37 } 35 }
38 36
39 } // namespace offline_pages 37 } // namespace offline_pages
40 38
41 DEFINE_WEB_CONTENTS_USER_DATA_KEY(offline_pages::OfflinerUserData); 39 DEFINE_WEB_CONTENTS_USER_DATA_KEY(offline_pages::OfflinerUserData);
OLDNEW
« no previous file with comments | « chrome/browser/offline_pages/offliner_user_data.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698