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

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

Issue 1969463002: Add a save page request to the request queue (and test it). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: More CR feedback from FGorski 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/android/offline_pages/request_coordinator_factory_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/android/offline_pages/request_coordinator_factory.cc
diff --git a/chrome/browser/android/offline_pages/request_coordinator_factory.cc b/chrome/browser/android/offline_pages/request_coordinator_factory.cc
index a9c8e45280cca7f290382245cd24fa78737abc20..645ce5202b09f6fd57eb3cbe88053ddb0fcc9770 100644
--- a/chrome/browser/android/offline_pages/request_coordinator_factory.cc
+++ b/chrome/browser/android/offline_pages/request_coordinator_factory.cc
@@ -12,6 +12,9 @@
#include "components/offline_pages/background/offliner_factory.h"
#include "components/offline_pages/background/offliner_policy.h"
#include "components/offline_pages/background/request_coordinator.h"
+#include "components/offline_pages/background/request_queue.h"
+#include "components/offline_pages/background/request_queue_in_memory_store.h"
+#include "components/offline_pages/background/request_queue_store.h"
namespace offline_pages {
@@ -37,10 +40,13 @@ KeyedService* RequestCoordinatorFactory::BuildServiceInstanceFor(
std::unique_ptr<OfflinerPolicy> policy(new OfflinerPolicy());
std::unique_ptr<OfflinerFactory> prerendererOffliner(
new PrerenderingOfflinerFactory(context));
+ std::unique_ptr<RequestQueueInMemoryStore> store(
+ new RequestQueueInMemoryStore());
+ std::unique_ptr<RequestQueue> queue(new RequestQueue(std::move(store)));
// TODO(petewil) Add support for server based offliner when it is ready.
- return new RequestCoordinator(std::move(policy),
- std::move(prerendererOffliner));
+ return new RequestCoordinator(
+ std::move(policy), std::move(prerendererOffliner), std::move(queue));
}
content::BrowserContext* RequestCoordinatorFactory::GetBrowserContextToUse(
« no previous file with comments | « no previous file | chrome/browser/android/offline_pages/request_coordinator_factory_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698