| 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 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 Loading... |
| 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 } |
| OLD | NEW |