OLD | NEW |
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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 #endif | 56 #endif |
57 | 57 |
58 // static | 58 // static |
59 SigninManagerFactory* SigninManagerFactory::GetInstance() { | 59 SigninManagerFactory* SigninManagerFactory::GetInstance() { |
60 return Singleton<SigninManagerFactory>::get(); | 60 return Singleton<SigninManagerFactory>::get(); |
61 } | 61 } |
62 | 62 |
63 void SigninManagerFactory::RegisterProfilePrefs( | 63 void SigninManagerFactory::RegisterProfilePrefs( |
64 user_prefs::PrefRegistrySyncable* registry) { | 64 user_prefs::PrefRegistrySyncable* registry) { |
65 registry->RegisterStringPref( | 65 registry->RegisterStringPref( |
| 66 prefs::kGoogleServicesHostedDomain, |
| 67 std::string(), |
| 68 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); |
| 69 registry->RegisterStringPref( |
66 prefs::kGoogleServicesLastUsername, | 70 prefs::kGoogleServicesLastUsername, |
67 std::string(), | 71 std::string(), |
68 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); | 72 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); |
69 registry->RegisterStringPref( | 73 registry->RegisterStringPref( |
70 prefs::kGoogleServicesUserAccountId, | 74 prefs::kGoogleServicesUserAccountId, |
71 std::string(), | 75 std::string(), |
72 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); | 76 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); |
73 registry->RegisterStringPref( | 77 registry->RegisterStringPref( |
74 prefs::kGoogleServicesUsername, | 78 prefs::kGoogleServicesUsername, |
75 std::string(), | 79 std::string(), |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
133 } | 137 } |
134 | 138 |
135 void SigninManagerFactory::BrowserContextShutdown( | 139 void SigninManagerFactory::BrowserContextShutdown( |
136 content::BrowserContext* context) { | 140 content::BrowserContext* context) { |
137 SigninManagerBase* manager = static_cast<SigninManagerBase*>( | 141 SigninManagerBase* manager = static_cast<SigninManagerBase*>( |
138 GetServiceForBrowserContext(context, false)); | 142 GetServiceForBrowserContext(context, false)); |
139 if (manager) | 143 if (manager) |
140 FOR_EACH_OBSERVER(Observer, observer_list_, SigninManagerShutdown(manager)); | 144 FOR_EACH_OBSERVER(Observer, observer_list_, SigninManagerShutdown(manager)); |
141 BrowserContextKeyedServiceFactory::BrowserContextShutdown(context); | 145 BrowserContextKeyedServiceFactory::BrowserContextShutdown(context); |
142 } | 146 } |
OLD | NEW |