Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(304)

Side by Side Diff: chrome/browser/media_galleries/media_folder_finder.h

Issue 174013009: Add end to end test for Media galleries scan API. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix mock Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698