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

Side by Side Diff: components/offline_pages/background/prerenderer_offliner_factory.cc

Issue 1929223002: Add skeletons for the factories to create the request coordinator and (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Manual merge of changes in the base changelist. Created 4 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 2016 The Chromium Authors. All rights reserved.
fgorski 2016/04/29 04:16:46 again this should be in c/b/a/op/
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 "components/offline_pages/background/prerenderer_offliner_factory.h"
6
7 #include "components/offline_pages/background/prerenderer_offliner.h"
8
9 namespace offline_pages {
10
11 class OfflinerPolicy;
12
13 PrerendererOfflinerFactory::PrerendererOfflinerFactory() {
14 offliner_ = nullptr;
15 }
16
17 PrerendererOfflinerFactory::~PrerendererOfflinerFactory() {
18 delete offliner_;
19 }
20
21 // static
22 PrerendererOffliner* PrerendererOfflinerFactory::GetInstance(
23 OfflinerPolicy* policy) {
24 // TODO(petewil): Think about whether there might be any threading
25 // issues. This should always happen on the same thread, but make sure.
26 if (offliner_ == nullptr) {
27 offliner_ = new PrerendererOffliner(policy);
28 }
29 return offliner_;
30 }
31
32 } // namespace offline_pages
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698