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

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

Issue 1176253002: Fix IsPrecachingAllowed() to check Sync instead of Data Saver. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Tweaks per bengr. Created 5 years, 6 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 | « chrome/browser/precache/precache_manager_factory.h ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/precache/precache_manager_factory.cc
diff --git a/components/precache/content/precache_manager_factory.cc b/chrome/browser/precache/precache_manager_factory.cc
similarity index 70%
rename from components/precache/content/precache_manager_factory.cc
rename to chrome/browser/precache/precache_manager_factory.cc
index cafece95d810f021423cc9695d2aaaf8a35f71ed..f037d45dfc2025d443334495c10e16f8c731d480 100644
--- a/components/precache/content/precache_manager_factory.cc
+++ b/chrome/browser/precache/precache_manager_factory.cc
@@ -2,8 +2,9 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "components/precache/content/precache_manager_factory.h"
+#include "chrome/browser/precache/precache_manager_factory.h"
+#include "chrome/browser/sync/profile_sync_service_factory.h"
#include "components/keyed_service/content/browser_context_dependency_manager.h"
#include "components/precache/content/precache_manager.h"
#include "content/public/browser/browser_context.h"
@@ -24,13 +25,19 @@ PrecacheManagerFactory* PrecacheManagerFactory::GetInstance() {
PrecacheManagerFactory::PrecacheManagerFactory()
: BrowserContextKeyedServiceFactory(
- "PrecacheManager", BrowserContextDependencyManager::GetInstance()) {}
+ "PrecacheManager",
+ BrowserContextDependencyManager::GetInstance()) {
+}
-PrecacheManagerFactory::~PrecacheManagerFactory() {}
+PrecacheManagerFactory::~PrecacheManagerFactory() {
+}
KeyedService* PrecacheManagerFactory::BuildServiceInstanceFor(
content::BrowserContext* browser_context) const {
- return new PrecacheManager(browser_context);
+ return new PrecacheManager(
+ browser_context,
+ ProfileSyncServiceFactory::GetSyncServiceForBrowserContext(
+ browser_context));
}
} // namespace precache
« no previous file with comments | « chrome/browser/precache/precache_manager_factory.h ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698