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

Unified Diff: chrome/browser/ui/auto_login_prompter.cc

Issue 9169096: Remove a bunch of GetProfileSyncService callers to use the new factory. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix tests + compile Created 8 years, 11 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/ui/auto_login_prompter.cc
diff --git a/chrome/browser/ui/auto_login_prompter.cc b/chrome/browser/ui/auto_login_prompter.cc
index 6ba83a7e178e4af76795835b4133ecab2536249c..3f7747f96cb1dc22ade9f436944ce1bc8e25ef15 100644
--- a/chrome/browser/ui/auto_login_prompter.cc
+++ b/chrome/browser/ui/auto_login_prompter.cc
@@ -12,8 +12,10 @@
#include "chrome/browser/prefs/pref_service.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/signin/signin_manager.h"
+#include "chrome/browser/signin/signin_manager_factory.h"
#include "chrome/browser/signin/token_service.h"
#include "chrome/browser/sync/profile_sync_service.h"
+#include "chrome/browser/sync/profile_sync_service_factory.h"
#include "chrome/browser/tab_contents/tab_util.h"
#include "chrome/browser/ui/auto_login_info_bar_delegate.h"
#include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h"
@@ -112,10 +114,13 @@ void AutoLoginPrompter::ShowInfoBarUIThread(const std::string& account,
// In an incognito window, there may not be a profile sync service and/or
// signin manager.
- if (!profile->HasProfileSyncService())
+ if (!ProfileSyncServiceFactory::GetInstance()->HasProfileSyncService(
+ profile)) {
return;
+ }
- SigninManager* signin_manager = profile->GetProfileSyncService()->signin();
+ SigninManager* signin_manager =
+ SigninManagerFactory::GetInstance()->GetForProfile(profile);
if (!signin_manager)
return;

Powered by Google App Engine
This is Rietveld 408576698