| 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/signin/chrome_signin_manager_delegate.h" | 9 #include "chrome/browser/signin/chrome_signin_manager_delegate.h" |
| 10 #include "chrome/browser/signin/signin_manager.h" | 10 #include "chrome/browser/signin/signin_manager.h" |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 51 return static_cast<SigninManager*>( | 51 return static_cast<SigninManager*>( |
| 52 GetInstance()->GetServiceForBrowserContext(profile, false)); | 52 GetInstance()->GetServiceForBrowserContext(profile, false)); |
| 53 } | 53 } |
| 54 #endif | 54 #endif |
| 55 | 55 |
| 56 // static | 56 // static |
| 57 SigninManagerFactory* SigninManagerFactory::GetInstance() { | 57 SigninManagerFactory* SigninManagerFactory::GetInstance() { |
| 58 return Singleton<SigninManagerFactory>::get(); | 58 return Singleton<SigninManagerFactory>::get(); |
| 59 } | 59 } |
| 60 | 60 |
| 61 void SigninManagerFactory::RegisterUserPrefs( | 61 void SigninManagerFactory::RegisterProfilePrefs( |
| 62 user_prefs::PrefRegistrySyncable* registry) { | 62 user_prefs::PrefRegistrySyncable* registry) { |
| 63 registry->RegisterStringPref( | 63 registry->RegisterStringPref( |
| 64 prefs::kGoogleServicesLastUsername, | 64 prefs::kGoogleServicesLastUsername, |
| 65 std::string(), | 65 std::string(), |
| 66 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); | 66 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); |
| 67 registry->RegisterStringPref( | 67 registry->RegisterStringPref( |
| 68 prefs::kGoogleServicesUsername, | 68 prefs::kGoogleServicesUsername, |
| 69 std::string(), | 69 std::string(), |
| 70 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); | 70 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); |
| 71 registry->RegisterBooleanPref( | 71 registry->RegisterBooleanPref( |
| (...skipping 22 matching lines...) Expand all Loading... |
| 94 #if defined(OS_CHROMEOS) | 94 #if defined(OS_CHROMEOS) |
| 95 service = new SigninManagerBase(); | 95 service = new SigninManagerBase(); |
| 96 #else | 96 #else |
| 97 service = new SigninManager( | 97 service = new SigninManager( |
| 98 scoped_ptr<SigninManagerDelegate>( | 98 scoped_ptr<SigninManagerDelegate>( |
| 99 new ChromeSigninManagerDelegate(profile))); | 99 new ChromeSigninManagerDelegate(profile))); |
| 100 #endif | 100 #endif |
| 101 service->Initialize(profile, g_browser_process->local_state()); | 101 service->Initialize(profile, g_browser_process->local_state()); |
| 102 return service; | 102 return service; |
| 103 } | 103 } |
| OLD | NEW |