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

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: CR Feedback per Dimich, BMcQuade, and CSHarrison 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
7 namespace offline_pages {
8
9 void OfflinerUserData::AddToWebContents(content::WebContents* webcontents,
10 Offliner* offliner) {
11 DCHECK(offliner);
12 webcontents->SetUserData(UserDataKey(), std::unique_ptr<OfflinerUserData>(
13 new OfflinerUserData(offliner)));
Dmitry Titov 2017/05/24 23:09:34 formatting... git cl format?
14 }
15
16 // static
17 Offliner* OfflinerUserData::OfflinerFromWebContents(
18 content::WebContents* webcontents) {
19 OfflinerUserData* data = OfflinerUserData::FromWebContents(webcontents);
20 if (data)
21 return data->offliner();
22
23 return nullptr;
24 }
25
26 } // namespace offline_pages
27
28 DEFINE_WEB_CONTENTS_USER_DATA_KEY(offline_pages::OfflinerUserData);
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698