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

Unified Diff: chrome/browser/precache/precache_manager_factory.cc

Issue 1961153003: Add pause/resume functionality to precache (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Cleaned up PrecacheFetcher constructor 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 | components/components_tests.gyp » ('j') | components/precache/content/precache_manager.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/precache/precache_manager_factory.cc
diff --git a/chrome/browser/precache/precache_manager_factory.cc b/chrome/browser/precache/precache_manager_factory.cc
index a5f2b8c9af26f3692c3dcaff046b1ba97e67b5cf..8cb0e384595a7b2cfd2ccceff4f8d6adf4d8467f 100644
--- a/chrome/browser/precache/precache_manager_factory.cc
+++ b/chrome/browser/precache/precache_manager_factory.cc
@@ -4,12 +4,15 @@
#include "chrome/browser/precache/precache_manager_factory.h"
+#include <memory>
+
#include "chrome/browser/history/history_service_factory.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/sync/profile_sync_service_factory.h"
#include "components/keyed_service/content/browser_context_dependency_manager.h"
#include "components/keyed_service/core/service_access_type.h"
#include "components/precache/content/precache_manager.h"
+#include "components/precache/core/precache_database.h"
#include "content/public/browser/browser_context.h"
namespace precache {
@@ -37,13 +40,19 @@ PrecacheManagerFactory::~PrecacheManagerFactory() {
KeyedService* PrecacheManagerFactory::BuildServiceInstanceFor(
content::BrowserContext* browser_context) const {
+ std::unique_ptr<PrecacheDatabase> precache_database(
+ new PrecacheDatabase());
+ base::FilePath db_path(browser_context->GetPath().Append(
+ base::FilePath(FILE_PATH_LITERAL("PrecacheDatabase"))));
return new PrecacheManager(
browser_context,
ProfileSyncServiceFactory::GetSyncServiceForBrowserContext(
browser_context),
HistoryServiceFactory::GetForProfile(
Profile::FromBrowserContext(browser_context),
- ServiceAccessType::IMPLICIT_ACCESS));
+ ServiceAccessType::IMPLICIT_ACCESS),
+ std::move(precache_database),
+ db_path);
}
} // namespace precache
« no previous file with comments | « no previous file | components/components_tests.gyp » ('j') | components/precache/content/precache_manager.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698