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

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

Issue 2522073002: [OfflinePages] RequestCoordinatorFactory return null for incognito (Closed)
Patch Set: Merge 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
1 // Copyright 2016 The Chromium Authors. All rights reserved. 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 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/android/offline_pages/prerendering_offliner_factory.h" 5 #include "chrome/browser/android/offline_pages/prerendering_offliner_factory.h"
6 6
7 #include "chrome/browser/android/offline_pages/offline_page_model_factory.h" 7 #include "chrome/browser/android/offline_pages/offline_page_model_factory.h"
8 #include "chrome/browser/android/offline_pages/prerendering_offliner.h" 8 #include "chrome/browser/android/offline_pages/prerendering_offliner.h"
9 9
10 namespace offline_pages { 10 namespace offline_pages {
(...skipping 16 matching lines...) Expand all
27 // TODO(petewil): Think about whether there might be any threading 27 // TODO(petewil): Think about whether there might be any threading
28 // issues. This should always happen on the same thread, but make sure. 28 // issues. This should always happen on the same thread, but make sure.
29 29
30 // Build a prerendering offliner if we don't already have one cached. 30 // Build a prerendering offliner if we don't already have one cached.
31 if (offliner_ == nullptr) { 31 if (offliner_ == nullptr) {
32 // TODO(petewil): Create a PrerenderManager, use for 2nd arg below. 32 // TODO(petewil): Create a PrerenderManager, use for 2nd arg below.
33 33
34 // Get a pointer to the (unowned) offline page model. 34 // Get a pointer to the (unowned) offline page model.
35 OfflinePageModel* model = 35 OfflinePageModel* model =
36 OfflinePageModelFactory::GetInstance()->GetForBrowserContext(context_); 36 OfflinePageModelFactory::GetInstance()->GetForBrowserContext(context_);
37 37 // Ensure we do have a model for saving a page if we prerender it.
38 DCHECK(model) << "No OfflinePageModel for offliner";
38 offliner_ = new PrerenderingOffliner(context_, policy, model); 39 offliner_ = new PrerenderingOffliner(context_, policy, model);
39 } 40 }
40 41
41 return offliner_; 42 return offliner_;
42 } 43 }
43 44
44 } // namespace offline_pages 45 } // namespace offline_pages
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698