| 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/chromeos/drive/drive_integration_service.h" | 5 #include "chrome/browser/chromeos/drive/drive_integration_service.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/files/file_util.h" | 8 #include "base/files/file_util.h" |
| 9 #include "base/prefs/pref_change_registrar.h" | 9 #include "base/prefs/pref_change_registrar.h" |
| 10 #include "base/prefs/pref_service.h" | 10 #include "base/prefs/pref_service.h" |
| (...skipping 587 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 598 | 598 |
| 599 // static | 599 // static |
| 600 DriveIntegrationService* DriveIntegrationServiceFactory::FindForProfile( | 600 DriveIntegrationService* DriveIntegrationServiceFactory::FindForProfile( |
| 601 Profile* profile) { | 601 Profile* profile) { |
| 602 return static_cast<DriveIntegrationService*>( | 602 return static_cast<DriveIntegrationService*>( |
| 603 GetInstance()->GetServiceForBrowserContext(profile, false)); | 603 GetInstance()->GetServiceForBrowserContext(profile, false)); |
| 604 } | 604 } |
| 605 | 605 |
| 606 // static | 606 // static |
| 607 DriveIntegrationServiceFactory* DriveIntegrationServiceFactory::GetInstance() { | 607 DriveIntegrationServiceFactory* DriveIntegrationServiceFactory::GetInstance() { |
| 608 return Singleton<DriveIntegrationServiceFactory>::get(); | 608 return base::Singleton<DriveIntegrationServiceFactory>::get(); |
| 609 } | 609 } |
| 610 | 610 |
| 611 DriveIntegrationServiceFactory::DriveIntegrationServiceFactory() | 611 DriveIntegrationServiceFactory::DriveIntegrationServiceFactory() |
| 612 : BrowserContextKeyedServiceFactory( | 612 : BrowserContextKeyedServiceFactory( |
| 613 "DriveIntegrationService", | 613 "DriveIntegrationService", |
| 614 BrowserContextDependencyManager::GetInstance()) { | 614 BrowserContextDependencyManager::GetInstance()) { |
| 615 DependsOn(ProfileOAuth2TokenServiceFactory::GetInstance()); | 615 DependsOn(ProfileOAuth2TokenServiceFactory::GetInstance()); |
| 616 DependsOn(DriveNotificationManagerFactory::GetInstance()); | 616 DependsOn(DriveNotificationManagerFactory::GetInstance()); |
| 617 DependsOn(DownloadServiceFactory::GetInstance()); | 617 DependsOn(DownloadServiceFactory::GetInstance()); |
| 618 } | 618 } |
| (...skipping 23 matching lines...) Expand all Loading... |
| 642 profile, preference_watcher, | 642 profile, preference_watcher, |
| 643 NULL, std::string(), base::FilePath(), NULL); | 643 NULL, std::string(), base::FilePath(), NULL); |
| 644 } else { | 644 } else { |
| 645 service = factory_for_test_->Run(profile); | 645 service = factory_for_test_->Run(profile); |
| 646 } | 646 } |
| 647 | 647 |
| 648 return service; | 648 return service; |
| 649 } | 649 } |
| 650 | 650 |
| 651 } // namespace drive | 651 } // namespace drive |
| OLD | NEW |