| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/chromeos/login/signin/oauth2_login_manager_factory.h" | 5 #include "chrome/browser/chromeos/login/signin/oauth2_login_manager_factory.h" |
| 6 | 6 |
| 7 #include "chrome/browser/chromeos/login/signin/oauth2_login_manager.h" | 7 #include "chrome/browser/chromeos/login/signin/oauth2_login_manager.h" |
| 8 #include "chrome/browser/profiles/profile.h" | 8 #include "chrome/browser/profiles/profile.h" |
| 9 #include "chrome/browser/signin/account_tracker_service_factory.h" | 9 #include "chrome/browser/signin/account_tracker_service_factory.h" |
| 10 #include "chrome/browser/signin/gaia_cookie_manager_service_factory.h" | 10 #include "chrome/browser/signin/gaia_cookie_manager_service_factory.h" |
| (...skipping 21 matching lines...) Expand all Loading... |
| 32 // static | 32 // static |
| 33 OAuth2LoginManager* OAuth2LoginManagerFactory::GetForProfile( | 33 OAuth2LoginManager* OAuth2LoginManagerFactory::GetForProfile( |
| 34 Profile* profile) { | 34 Profile* profile) { |
| 35 return static_cast<OAuth2LoginManager*>( | 35 return static_cast<OAuth2LoginManager*>( |
| 36 GetInstance()->GetServiceForBrowserContext(profile, true)); | 36 GetInstance()->GetServiceForBrowserContext(profile, true)); |
| 37 } | 37 } |
| 38 | 38 |
| 39 // static | 39 // static |
| 40 OAuth2LoginManagerFactory* | 40 OAuth2LoginManagerFactory* |
| 41 OAuth2LoginManagerFactory::GetInstance() { | 41 OAuth2LoginManagerFactory::GetInstance() { |
| 42 return Singleton<OAuth2LoginManagerFactory>::get(); | 42 return base::Singleton<OAuth2LoginManagerFactory>::get(); |
| 43 } | 43 } |
| 44 | 44 |
| 45 KeyedService* OAuth2LoginManagerFactory::BuildServiceInstanceFor( | 45 KeyedService* OAuth2LoginManagerFactory::BuildServiceInstanceFor( |
| 46 content::BrowserContext* context) const { | 46 content::BrowserContext* context) const { |
| 47 Profile* profile = static_cast<Profile*>(context); | 47 Profile* profile = static_cast<Profile*>(context); |
| 48 OAuth2LoginManager* service; | 48 OAuth2LoginManager* service; |
| 49 service = new OAuth2LoginManager(profile); | 49 service = new OAuth2LoginManager(profile); |
| 50 return service; | 50 return service; |
| 51 } | 51 } |
| 52 | 52 |
| 53 } // namespace chromeos | 53 } // namespace chromeos |
| OLD | NEW |