| 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 // MediaFileSystemRegistry implementation. | 5 // MediaFileSystemRegistry implementation. |
| 6 | 6 |
| 7 #include "chrome/browser/media_galleries/media_file_system_registry.h" | 7 #include "chrome/browser/media_galleries/media_file_system_registry.h" |
| 8 | 8 |
| 9 #include <set> | 9 #include <set> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 #include "content/public/browser/web_contents.h" | 43 #include "content/public/browser/web_contents.h" |
| 44 #include "webkit/browser/fileapi/isolated_context.h" | 44 #include "webkit/browser/fileapi/isolated_context.h" |
| 45 #include "webkit/common/fileapi/file_system_types.h" | 45 #include "webkit/common/fileapi/file_system_types.h" |
| 46 | 46 |
| 47 using content::BrowserThread; | 47 using content::BrowserThread; |
| 48 using content::NavigationController; | 48 using content::NavigationController; |
| 49 using content::RenderProcessHost; | 49 using content::RenderProcessHost; |
| 50 using content::WebContents; | 50 using content::WebContents; |
| 51 using fileapi::IsolatedContext; | 51 using fileapi::IsolatedContext; |
| 52 | 52 |
| 53 namespace chrome { | |
| 54 | |
| 55 namespace { | 53 namespace { |
| 56 | 54 |
| 57 struct InvalidatedGalleriesInfo { | 55 struct InvalidatedGalleriesInfo { |
| 58 std::set<ExtensionGalleriesHost*> extension_hosts; | 56 std::set<ExtensionGalleriesHost*> extension_hosts; |
| 59 std::set<MediaGalleryPrefId> pref_ids; | 57 std::set<MediaGalleryPrefId> pref_ids; |
| 60 }; | 58 }; |
| 61 | 59 |
| 62 void OnMTPDeviceAsyncDelegateCreated( | 60 void OnMTPDeviceAsyncDelegateCreated( |
| 63 const base::FilePath::StringType& device_location, | 61 const base::FilePath::StringType& device_location, |
| 64 MTPDeviceAsyncDelegate* delegate) { | 62 MTPDeviceAsyncDelegate* delegate) { |
| (...skipping 670 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 735 // matching PrefChangeRegistrar since it is no longer needed. Leave the | 733 // matching PrefChangeRegistrar since it is no longer needed. Leave the |
| 736 // |extension_hosts| entry alone, since it indicates the profile has been | 734 // |extension_hosts| entry alone, since it indicates the profile has been |
| 737 // previously used. | 735 // previously used. |
| 738 PrefChangeRegistrarMap::iterator pref_it = | 736 PrefChangeRegistrarMap::iterator pref_it = |
| 739 pref_change_registrar_map_.find(profile); | 737 pref_change_registrar_map_.find(profile); |
| 740 DCHECK(pref_it != pref_change_registrar_map_.end()); | 738 DCHECK(pref_it != pref_change_registrar_map_.end()); |
| 741 delete pref_it->second; | 739 delete pref_it->second; |
| 742 pref_change_registrar_map_.erase(pref_it); | 740 pref_change_registrar_map_.erase(pref_it); |
| 743 } | 741 } |
| 744 } | 742 } |
| 745 | |
| 746 } // namespace chrome | |
| OLD | NEW |