| 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_FOLDER_FINDER_H_ | 5 #ifndef CHROME_BROWSER_MEDIA_GALLERIES_MEDIA_FOLDER_FINDER_H_ |
| 6 #define CHROME_BROWSER_MEDIA_GALLERIES_MEDIA_FOLDER_FINDER_H_ | 6 #define CHROME_BROWSER_MEDIA_GALLERIES_MEDIA_FOLDER_FINDER_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 20 matching lines...) Expand all Loading... |
| 31 // MediaFolderFinder has a default set of per-platform paths to scan. | 31 // MediaFolderFinder has a default set of per-platform paths to scan. |
| 32 // Override in tests with SetRootsForTesting(). | 32 // Override in tests with SetRootsForTesting(). |
| 33 explicit MediaFolderFinder(const MediaFolderFinderResultsCallback& callback); | 33 explicit MediaFolderFinder(const MediaFolderFinderResultsCallback& callback); |
| 34 virtual ~MediaFolderFinder(); | 34 virtual ~MediaFolderFinder(); |
| 35 | 35 |
| 36 // Start the scan. | 36 // Start the scan. |
| 37 virtual void StartScan(); | 37 virtual void StartScan(); |
| 38 | 38 |
| 39 private: | 39 private: |
| 40 friend class MediaFolderFinderTest; | 40 friend class MediaFolderFinderTest; |
| 41 friend class MediaGalleriesPlatformAppBrowserTest; |
| 41 | 42 |
| 42 class Worker; | 43 class Worker; |
| 43 struct WorkerReply { | 44 struct WorkerReply { |
| 44 WorkerReply(); | 45 WorkerReply(); |
| 45 ~WorkerReply(); | 46 ~WorkerReply(); |
| 46 | 47 |
| 47 MediaGalleryScanResult scan_result; | 48 MediaGalleryScanResult scan_result; |
| 48 std::vector<base::FilePath> new_folders; | 49 std::vector<base::FilePath> new_folders; |
| 49 }; | 50 }; |
| 50 | 51 |
| (...skipping 27 matching lines...) Expand all Loading... |
| 78 // Set of roots to scan for testing. | 79 // Set of roots to scan for testing. |
| 79 bool has_roots_for_testing_; | 80 bool has_roots_for_testing_; |
| 80 std::vector<base::FilePath> roots_for_testing_; | 81 std::vector<base::FilePath> roots_for_testing_; |
| 81 | 82 |
| 82 base::WeakPtrFactory<MediaFolderFinder> weak_factory_; | 83 base::WeakPtrFactory<MediaFolderFinder> weak_factory_; |
| 83 | 84 |
| 84 DISALLOW_COPY_AND_ASSIGN(MediaFolderFinder); | 85 DISALLOW_COPY_AND_ASSIGN(MediaFolderFinder); |
| 85 }; | 86 }; |
| 86 | 87 |
| 87 #endif // CHROME_BROWSER_MEDIA_GALLERIES_MEDIA_FOLDER_FINDER_H_ | 88 #endif // CHROME_BROWSER_MEDIA_GALLERIES_MEDIA_FOLDER_FINDER_H_ |
| OLD | NEW |