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

Unified Diff: chrome/browser/invalidation/invalidation_service_factory.cc

Issue 221963003: Reduce dependency of TiclInvalidationService on Profile (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Pass scoped_refptr as const reference. Created 6 years, 8 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/invalidation/invalidation_service_factory.cc
diff --git a/chrome/browser/invalidation/invalidation_service_factory.cc b/chrome/browser/invalidation/invalidation_service_factory.cc
index ef34d2ecf1087f70f7c7aa701a73cb1ce620e16a..a40ea012fd471f742b62744737f9eecd1f5389a1 100644
--- a/chrome/browser/invalidation/invalidation_service_factory.cc
+++ b/chrome/browser/invalidation/invalidation_service_factory.cc
@@ -4,6 +4,7 @@
#include "chrome/browser/invalidation/invalidation_service_factory.h"
+#include "base/memory/scoped_ptr.h"
#include "base/prefs/pref_registry.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/invalidation/fake_invalidation_service.h"
@@ -22,6 +23,8 @@
#include "components/signin/core/browser/profile_oauth2_token_service.h"
#include "components/signin/core/browser/signin_manager.h"
#include "components/user_prefs/pref_registry_syncable.h"
+#include "net/url_request/url_request_context_getter.h"
dcheng 2014/04/11 19:54:00 Do we actually need this include? It looks like it
bartfab (slow) 2014/04/14 09:20:08 Removed.
+#include "sync/notifier/invalidation_state_tracker.h"
#if defined(OS_ANDROID)
#include "chrome/browser/invalidation/invalidation_controller_android.h"
@@ -115,8 +118,12 @@ KeyedService* InvalidationServiceFactory::BuildServiceInstanceFor(
LoginUIServiceFactory::GetForProfile(profile)));
}
- TiclInvalidationService* service =
- new TiclInvalidationService(auth_provider.Pass(), profile);
+ TiclInvalidationService* service = new TiclInvalidationService(
+ auth_provider.Pass(),
+ profile->GetRequestContext(),
+ scoped_ptr<syncer::InvalidationStateTracker>(
+ new InvalidatorStorage(profile->GetPrefs())),
+ profile);
service->Init();
return service;
#endif

Powered by Google App Engine
This is Rietveld 408576698