| 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/recovery/recovery_install_global_error_factory.h" | 5 #include "chrome/browser/recovery/recovery_install_global_error_factory.h" |
| 6 | 6 |
| 7 #include "chrome/browser/browser_process.h" | 7 #include "chrome/browser/browser_process.h" |
| 8 #include "chrome/browser/profiles/profile.h" | 8 #include "chrome/browser/profiles/profile.h" |
| 9 #include "chrome/browser/recovery/recovery_install_global_error.h" | 9 #include "chrome/browser/recovery/recovery_install_global_error.h" |
| 10 #include "chrome/browser/ui/global_error/global_error_service_factory.h" | 10 #include "chrome/browser/ui/global_error/global_error_service_factory.h" |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 // static | 22 // static |
| 23 RecoveryInstallGlobalError* | 23 RecoveryInstallGlobalError* |
| 24 RecoveryInstallGlobalErrorFactory::GetForProfile(Profile* profile) { | 24 RecoveryInstallGlobalErrorFactory::GetForProfile(Profile* profile) { |
| 25 return static_cast<RecoveryInstallGlobalError*>( | 25 return static_cast<RecoveryInstallGlobalError*>( |
| 26 GetInstance()->GetServiceForBrowserContext(profile, true)); | 26 GetInstance()->GetServiceForBrowserContext(profile, true)); |
| 27 } | 27 } |
| 28 | 28 |
| 29 // static | 29 // static |
| 30 RecoveryInstallGlobalErrorFactory* | 30 RecoveryInstallGlobalErrorFactory* |
| 31 RecoveryInstallGlobalErrorFactory::GetInstance() { | 31 RecoveryInstallGlobalErrorFactory::GetInstance() { |
| 32 return Singleton<RecoveryInstallGlobalErrorFactory>::get(); | 32 return base::Singleton<RecoveryInstallGlobalErrorFactory>::get(); |
| 33 } | 33 } |
| 34 | 34 |
| 35 KeyedService* RecoveryInstallGlobalErrorFactory::BuildServiceInstanceFor( | 35 KeyedService* RecoveryInstallGlobalErrorFactory::BuildServiceInstanceFor( |
| 36 content::BrowserContext* context) const { | 36 content::BrowserContext* context) const { |
| 37 #if defined(OS_WIN) || defined(OS_MACOSX) | 37 #if defined(OS_WIN) || defined(OS_MACOSX) |
| 38 return new RecoveryInstallGlobalError(static_cast<Profile*>(context)); | 38 return new RecoveryInstallGlobalError(static_cast<Profile*>(context)); |
| 39 #else | 39 #else |
| 40 return NULL; | 40 return NULL; |
| 41 #endif | 41 #endif |
| 42 } | 42 } |
| OLD | NEW |