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

Side by Side Diff: chrome/browser/signin/signin_manager_factory.cc

Issue 566933005: Do not display lock for hosted domains (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Handle a null in unit tests Created 6 years, 3 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/signin/signin_manager_factory.h" 5 #include "chrome/browser/signin/signin_manager_factory.h"
6 6
7 #include "base/prefs/pref_registry_simple.h" 7 #include "base/prefs/pref_registry_simple.h"
8 #include "chrome/browser/browser_process.h" 8 #include "chrome/browser/browser_process.h"
9 #include "chrome/browser/profiles/profile.h" 9 #include "chrome/browser/profiles/profile.h"
10 #include "chrome/browser/signin/chrome_signin_client_factory.h" 10 #include "chrome/browser/signin/chrome_signin_client_factory.h"
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 #endif 70 #endif
71 71
72 // static 72 // static
73 SigninManagerFactory* SigninManagerFactory::GetInstance() { 73 SigninManagerFactory* SigninManagerFactory::GetInstance() {
74 return Singleton<SigninManagerFactory>::get(); 74 return Singleton<SigninManagerFactory>::get();
75 } 75 }
76 76
77 void SigninManagerFactory::RegisterProfilePrefs( 77 void SigninManagerFactory::RegisterProfilePrefs(
78 user_prefs::PrefRegistrySyncable* registry) { 78 user_prefs::PrefRegistrySyncable* registry) {
79 registry->RegisterStringPref( 79 registry->RegisterStringPref(
80 prefs::kGoogleServicesHostedDomain,
81 std::string(),
82 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
83 registry->RegisterStringPref(
80 prefs::kGoogleServicesLastUsername, 84 prefs::kGoogleServicesLastUsername,
81 std::string(), 85 std::string(),
82 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); 86 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
83 registry->RegisterStringPref( 87 registry->RegisterStringPref(
84 prefs::kGoogleServicesUserAccountId, 88 prefs::kGoogleServicesUserAccountId,
85 std::string(), 89 std::string(),
86 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); 90 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
87 registry->RegisterStringPref( 91 registry->RegisterStringPref(
88 prefs::kGoogleServicesUsername, 92 prefs::kGoogleServicesUsername,
89 std::string(), 93 std::string(),
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 } 151 }
148 152
149 void SigninManagerFactory::BrowserContextShutdown( 153 void SigninManagerFactory::BrowserContextShutdown(
150 content::BrowserContext* context) { 154 content::BrowserContext* context) {
151 SigninManagerBase* manager = static_cast<SigninManagerBase*>( 155 SigninManagerBase* manager = static_cast<SigninManagerBase*>(
152 GetServiceForBrowserContext(context, false)); 156 GetServiceForBrowserContext(context, false));
153 if (manager) 157 if (manager)
154 FOR_EACH_OBSERVER(Observer, observer_list_, SigninManagerShutdown(manager)); 158 FOR_EACH_OBSERVER(Observer, observer_list_, SigninManagerShutdown(manager));
155 BrowserContextKeyedServiceFactory::BrowserContextShutdown(context); 159 BrowserContextKeyedServiceFactory::BrowserContextShutdown(context);
156 } 160 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698