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

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

Issue 2857063002: Add a way to send the resource percentage signal to the RC. (Closed)
Patch Set: Turn off other metrics which might require tab helpers when background loading Created 3 years, 7 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "chrome/browser/offline_pages/offliner_user_data.h"
6 #include "base/logging.h" // TODO: remove before checkin.
Dmitry Titov 2017/05/18 02:28:10 TODO
Pete Williamson 2017/05/24 01:01:50 Done.
7
8 namespace offline_pages {
9
10 void OfflinerUserData::AddToWebContents(content::WebContents* webcontents,
11 Offliner* offliner) {
12 DCHECK(offliner);
13 webcontents->SetUserData(UserDataKey(), std::unique_ptr<OfflinerUserData>(
14 new OfflinerUserData(offliner)));
15 }
16
17 // static
18 Offliner* OfflinerUserData::OfflinerFromWebContents(
19 content::WebContents* webcontents) {
20 OfflinerUserData* data = OfflinerUserData::FromWebContents(webcontents);
21 if (data)
22 return data->offliner();
23
24 return nullptr;
25 }
26
27 } // namespace offline_pages
28
29 DEFINE_WEB_CONTENTS_USER_DATA_KEY(offline_pages::OfflinerUserData);
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698