| 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/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 Loading... |
| 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 Loading... |
| 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 } |
| OLD | NEW |