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

Side by Side Diff: chrome/browser/media_galleries/media_file_system_registry.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/media_galleries/media_file_system_registry.h" 5 #include "chrome/browser/media_galleries/media_file_system_registry.h"
6 6
7 #include <set> 7 #include <set>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 using storage_monitor::MediaStorageUtil; 49 using storage_monitor::MediaStorageUtil;
50 using storage_monitor::StorageInfo; 50 using storage_monitor::StorageInfo;
51 using storage_monitor::StorageMonitor; 51 using storage_monitor::StorageMonitor;
52 52
53 namespace { 53 namespace {
54 54
55 class ShutdownNotifierFactory 55 class ShutdownNotifierFactory
56 : public BrowserContextKeyedServiceShutdownNotifierFactory { 56 : public BrowserContextKeyedServiceShutdownNotifierFactory {
57 public: 57 public:
58 static ShutdownNotifierFactory* GetInstance() { 58 static ShutdownNotifierFactory* GetInstance() {
59 return Singleton<ShutdownNotifierFactory>::get(); 59 return base::Singleton<ShutdownNotifierFactory>::get();
60 } 60 }
61 61
62 private: 62 private:
63 friend struct DefaultSingletonTraits<ShutdownNotifierFactory>; 63 friend struct base::DefaultSingletonTraits<ShutdownNotifierFactory>;
64 64
65 ShutdownNotifierFactory() 65 ShutdownNotifierFactory()
66 : BrowserContextKeyedServiceShutdownNotifierFactory( 66 : BrowserContextKeyedServiceShutdownNotifierFactory(
67 "MediaFileSystemRegistry") { 67 "MediaFileSystemRegistry") {
68 DependsOn(MediaGalleriesPreferencesFactory::GetInstance()); 68 DependsOn(MediaGalleriesPreferencesFactory::GetInstance());
69 } 69 }
70 ~ShutdownNotifierFactory() override {} 70 ~ShutdownNotifierFactory() override {}
71 71
72 DISALLOW_COPY_AND_ASSIGN(ShutdownNotifierFactory); 72 DISALLOW_COPY_AND_ASSIGN(ShutdownNotifierFactory);
73 }; 73 };
(...skipping 803 matching lines...) Expand 10 before | Expand all | Expand 10 after
877 DCHECK_CURRENTLY_ON(BrowserThread::UI); 877 DCHECK_CURRENTLY_ON(BrowserThread::UI);
878 878
879 auto extension_hosts_it = extension_hosts_map_.find(profile); 879 auto extension_hosts_it = extension_hosts_map_.find(profile);
880 DCHECK(extension_hosts_it != extension_hosts_map_.end()); 880 DCHECK(extension_hosts_it != extension_hosts_map_.end());
881 extension_hosts_map_.erase(extension_hosts_it); 881 extension_hosts_map_.erase(extension_hosts_it);
882 882
883 auto profile_subscription_it = profile_subscription_map_.find(profile); 883 auto profile_subscription_it = profile_subscription_map_.find(profile);
884 DCHECK(profile_subscription_it != profile_subscription_map_.end()); 884 DCHECK(profile_subscription_it != profile_subscription_map_.end());
885 profile_subscription_map_.erase(profile_subscription_it); 885 profile_subscription_map_.erase(profile_subscription_it);
886 } 886 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698