| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #ifndef CHROME_BROWSER_MEDIA_GALLERIES_MEDIA_SCAN_MANAGER_H_ | 5 #ifndef CHROME_BROWSER_MEDIA_GALLERIES_MEDIA_SCAN_MANAGER_H_ |
| 6 #define CHROME_BROWSER_MEDIA_GALLERIES_MEDIA_SCAN_MANAGER_H_ | 6 #define CHROME_BROWSER_MEDIA_GALLERIES_MEDIA_SCAN_MANAGER_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <set> | 9 #include <set> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 62 void SetMediaFolderFinderFactory(const MediaFolderFinderFactory& factory); | 62 void SetMediaFolderFinderFactory(const MediaFolderFinderFactory& factory); |
| 63 | 63 |
| 64 // Here so that friend MediaScanManagerTest can access it. | 64 // Here so that friend MediaScanManagerTest can access it. |
| 65 static MediaFolderFinder::MediaFolderFinderResults FindContainerScanResults( | 65 static MediaFolderFinder::MediaFolderFinderResults FindContainerScanResults( |
| 66 const MediaFolderFinder::MediaFolderFinderResults& found_folders, | 66 const MediaFolderFinder::MediaFolderFinderResults& found_folders, |
| 67 const std::vector<base::FilePath>& sensitive_locations); | 67 const std::vector<base::FilePath>& sensitive_locations); |
| 68 | 68 |
| 69 private: | 69 private: |
| 70 struct ScanObservers { | 70 struct ScanObservers { |
| 71 ScanObservers(); | 71 ScanObservers(); |
| 72 ScanObservers(const ScanObservers& other); |
| 72 ~ScanObservers(); | 73 ~ScanObservers(); |
| 73 MediaScanManagerObserver* observer; | 74 MediaScanManagerObserver* observer; |
| 74 std::set<std::string /*extension id*/> scanning_extensions; | 75 std::set<std::string /*extension id*/> scanning_extensions; |
| 75 }; | 76 }; |
| 76 typedef std::map<Profile*, ScanObservers> ScanObserverMap; | 77 typedef std::map<Profile*, ScanObservers> ScanObserverMap; |
| 77 | 78 |
| 78 // extensions::ExtensionRegistryObserver implementation. | 79 // extensions::ExtensionRegistryObserver implementation. |
| 79 void OnExtensionUnloaded( | 80 void OnExtensionUnloaded( |
| 80 content::BrowserContext* browser_context, | 81 content::BrowserContext* browser_context, |
| 81 const extensions::Extension* extension, | 82 const extensions::Extension* extension, |
| (...skipping 22 matching lines...) Expand all Loading... |
| 104 ScopedObserver<extensions::ExtensionRegistry, | 105 ScopedObserver<extensions::ExtensionRegistry, |
| 105 extensions::ExtensionRegistryObserver> | 106 extensions::ExtensionRegistryObserver> |
| 106 scoped_extension_registry_observer_; | 107 scoped_extension_registry_observer_; |
| 107 | 108 |
| 108 base::WeakPtrFactory<MediaScanManager> weak_factory_; | 109 base::WeakPtrFactory<MediaScanManager> weak_factory_; |
| 109 | 110 |
| 110 DISALLOW_COPY_AND_ASSIGN(MediaScanManager); | 111 DISALLOW_COPY_AND_ASSIGN(MediaScanManager); |
| 111 }; | 112 }; |
| 112 | 113 |
| 113 #endif // CHROME_BROWSER_MEDIA_GALLERIES_MEDIA_SCAN_MANAGER_H_ | 114 #endif // CHROME_BROWSER_MEDIA_GALLERIES_MEDIA_SCAN_MANAGER_H_ |
| OLD | NEW |