| 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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 69 | 69 |
| 70 // content::NotificationObserver implementation. | 70 // content::NotificationObserver implementation. |
| 71 virtual void Observe(int type, | 71 virtual void Observe(int type, |
| 72 const content::NotificationSource& source, | 72 const content::NotificationSource& source, |
| 73 const content::NotificationDetails& details) OVERRIDE; | 73 const content::NotificationDetails& details) OVERRIDE; |
| 74 | 74 |
| 75 bool ScanInProgress() const; | 75 bool ScanInProgress() const; |
| 76 | 76 |
| 77 void OnScanCompleted( | 77 void OnScanCompleted( |
| 78 bool success, | 78 bool success, |
| 79 const MediaFolderFinder::MediaFolderFinderResults& found_folders); | 79 const MediaFolderFinder::MediaFolderFinderResults& found_folders, |
| 80 const std::vector<base::FilePath>& sensitive_locations); |
| 80 | 81 |
| 81 void OnFoundContainerDirectories( | 82 void OnFoundContainerDirectories( |
| 82 const MediaFolderFinder::MediaFolderFinderResults& found_folders, | 83 const MediaFolderFinder::MediaFolderFinderResults& found_folders, |
| 83 const MediaFolderFinder::MediaFolderFinderResults& container_folders); | 84 const MediaFolderFinder::MediaFolderFinderResults& container_folders); |
| 84 | 85 |
| 85 scoped_ptr<MediaFolderFinder> folder_finder_; | 86 scoped_ptr<MediaFolderFinder> folder_finder_; |
| 86 | 87 |
| 87 // If not NULL, used to create |folder_finder_|. Used for testing. | 88 // If not NULL, used to create |folder_finder_|. Used for testing. |
| 88 MediaFolderFinderFactory testing_folder_finder_factory_; | 89 MediaFolderFinderFactory testing_folder_finder_factory_; |
| 89 | 90 |
| 90 // Set of extensions (on all profiles) that have an in-progress scan. | 91 // Set of extensions (on all profiles) that have an in-progress scan. |
| 91 ScanObserverMap observers_; | 92 ScanObserverMap observers_; |
| 92 | 93 |
| 93 // Used to listen for NOTIFICATION_EXTENSION_UNLOADED events. | 94 // Used to listen for NOTIFICATION_EXTENSION_UNLOADED events. |
| 94 content::NotificationRegistrar registrar_; | 95 content::NotificationRegistrar registrar_; |
| 95 | 96 |
| 96 base::WeakPtrFactory<MediaScanManager> weak_factory_; | 97 base::WeakPtrFactory<MediaScanManager> weak_factory_; |
| 97 | 98 |
| 98 DISALLOW_COPY_AND_ASSIGN(MediaScanManager); | 99 DISALLOW_COPY_AND_ASSIGN(MediaScanManager); |
| 99 }; | 100 }; |
| 100 | 101 |
| 101 #endif // CHROME_BROWSER_MEDIA_GALLERIES_MEDIA_SCAN_MANAGER_H_ | 102 #endif // CHROME_BROWSER_MEDIA_GALLERIES_MEDIA_SCAN_MANAGER_H_ |
| OLD | NEW |