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

Side by Side Diff: chrome/browser/android/offline_pages/background_loader_offliner_factory.cc

Issue 2544533003: [OfflinePages] Hook the background loader offliner to the request coordinator based on finch flag s… (Closed)
Patch Set: sort includes Created 4 years 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 2016 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/android/offline_pages/background_loader_offliner_factor y.h"
6
7 #include "chrome/browser/android/offline_pages/background_loader_offliner.h"
8 #include "chrome/browser/android/offline_pages/offline_page_model_factory.h"
9
10 namespace offline_pages {
11
12 class OfflinerPolicy;
13
14 BackgroundLoaderOfflinerFactory::BackgroundLoaderOfflinerFactory(
15 content::BrowserContext* context) {
16 offliner_ = nullptr;
17 context_ = context;
18 }
19
20 BackgroundLoaderOfflinerFactory::~BackgroundLoaderOfflinerFactory() {
21 delete offliner_;
22 }
23
24 Offliner* BackgroundLoaderOfflinerFactory::GetOffliner(
Pete Williamson 2016/12/17 01:26:26 A test for this method would be good. (It's OK to
chili 2016/12/21 18:01:48 Per discussion, I may be removing the factory alto
25 const OfflinerPolicy* policy) {
26 if (offliner_ == nullptr) {
27 OfflinePageModel* model =
28 OfflinePageModelFactory::GetInstance()->GetForBrowserContext(context_);
29
30 offliner_ = new BackgroundLoaderOffliner(context_, policy, model);
31 }
32
33 return offliner_;
34 }
35
36 } // namespace offline_pages
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698