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

Unified Diff: chrome/browser/android/offline_pages/prerendering_offliner_factory.cc

Issue 2609713002: [Offline pages] Completely remove offliner factory. (Closed)
Patch Set: rebase update Created 3 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/android/offline_pages/prerendering_offliner_factory.cc
diff --git a/chrome/browser/android/offline_pages/prerendering_offliner_factory.cc b/chrome/browser/android/offline_pages/prerendering_offliner_factory.cc
deleted file mode 100644
index a3af00c54d437d388ce6a4ae6c78274c9fe0b396..0000000000000000000000000000000000000000
--- a/chrome/browser/android/offline_pages/prerendering_offliner_factory.cc
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2016 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "chrome/browser/android/offline_pages/prerendering_offliner_factory.h"
-
-#include "chrome/browser/android/offline_pages/offline_page_model_factory.h"
-#include "chrome/browser/android/offline_pages/prerendering_offliner.h"
-
-namespace offline_pages {
-
-class OfflinerPolicy;
-
-PrerenderingOfflinerFactory::PrerenderingOfflinerFactory(
- content::BrowserContext* context) {
- offliner_ = nullptr;
- context_ = context;
-}
-
-PrerenderingOfflinerFactory::~PrerenderingOfflinerFactory() {
- delete offliner_;
-}
-
-// static
-Offliner* PrerenderingOfflinerFactory::GetOffliner(
- const OfflinerPolicy* policy) {
- // TODO(petewil): Think about whether there might be any threading
- // issues. This should always happen on the same thread, but make sure.
-
- // Build a prerendering offliner if we don't already have one cached.
- if (offliner_ == nullptr) {
- // TODO(petewil): Create a PrerenderManager, use for 2nd arg below.
-
- // Get a pointer to the (unowned) offline page model.
- OfflinePageModel* model =
- OfflinePageModelFactory::GetInstance()->GetForBrowserContext(context_);
- // Ensure we do have a model for saving a page if we prerender it.
- DCHECK(model) << "No OfflinePageModel for offliner";
- offliner_ = new PrerenderingOffliner(context_, policy, model);
- }
-
- return offliner_;
-}
-
-} // namespace offline_pages

Powered by Google App Engine
This is Rietveld 408576698