Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(328)

Side by Side Diff: chrome/browser/chromeos/drive/drive_integration_service.cc

Issue 1308823002: Move Singleton and related structs to namespace base (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: ToT Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/drive/drive_integration_service.h ('k') | chrome/browser/chromeos/events/system_key_event_listener.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698