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

Unified Diff: chrome/browser/android/offline_pages/background_loader_offliner_factory.h

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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/android/offline_pages/background_loader_offliner_factory.h
diff --git a/chrome/browser/android/offline_pages/background_loader_offliner_factory.h b/chrome/browser/android/offline_pages/background_loader_offliner_factory.h
new file mode 100644
index 0000000000000000000000000000000000000000..c43097d0fcadb0c3054b31f982c7d894b7fdfb4a
--- /dev/null
+++ b/chrome/browser/android/offline_pages/background_loader_offliner_factory.h
@@ -0,0 +1,40 @@
+// 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.
+
+#ifndef CHROME_BROWSER_ANDROID_OFFLINE_PAGES_BACKGROUND_LOADER_OFFLINER_FACTORY_H_
+#define CHROME_BROWSER_ANDROID_OFFLINE_PAGES_BACKGROUND_LOADER_OFFLINER_FACTORY_H_
+
+#include "base/macros.h"
+#include "components/offline_pages/core/background/offliner_factory.h"
+
+namespace content {
+class BrowserContext;
+} // namespace content
+
+namespace offline_pages {
+
+class OfflinerPolicy;
+class Offliner;
+class BackgroundLoaderOffliner;
+
+class BackgroundLoaderOfflinerFactory : public OfflinerFactory {
+ public:
+ explicit BackgroundLoaderOfflinerFactory(content::BrowserContext* context);
+ ~BackgroundLoaderOfflinerFactory() override;
+
+ Offliner* GetOffliner(const OfflinerPolicy* policy) override;
+
+ private:
+ // Offliner owned by the factory.
+ BackgroundLoaderOffliner* offliner_;
Dmitry Titov 2016/12/17 02:55:20 Please take a look at my comment on Pete's patch t
chili 2016/12/21 18:01:48 Per discussion, will resolve this in followup
+
+ // Unowned pointer, expected to stay valid for the lifetime of the factory.
+ content::BrowserContext* context_;
+
+ DISALLOW_COPY_AND_ASSIGN(BackgroundLoaderOfflinerFactory);
+};
+
+} // namespace offline_pages
+
+#endif // CHROME_BROWSER_ANDROID_OFFLINE_PAGES_BACKGROUND_LOADER_OFFLINER_FACTORY_H_

Powered by Google App Engine
This is Rietveld 408576698