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

Side by Side Diff: chrome/browser/extensions/api/file_system/file_system_api.h

Issue 173853007: Media Galleries: Prune uninteresting folders when scanning. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: add tests, fix bugs 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 (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 #ifndef CHROME_BROWSER_EXTENSIONS_API_FILE_SYSTEM_FILE_SYSTEM_API_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_FILE_SYSTEM_FILE_SYSTEM_API_H_
6 #define CHROME_BROWSER_EXTENSIONS_API_FILE_SYSTEM_FILE_SYSTEM_API_H_ 6 #define CHROME_BROWSER_EXTENSIONS_API_FILE_SYSTEM_FILE_SYSTEM_API_H_
7 7
8 #include <vector>
9
10 #include "base/files/file_path.h"
8 #include "chrome/browser/extensions/chrome_extension_function.h" 11 #include "chrome/browser/extensions/chrome_extension_function.h"
9 #include "chrome/common/extensions/api/file_system.h" 12 #include "chrome/common/extensions/api/file_system.h"
10 #include "ui/shell_dialogs/select_file_dialog.h" 13 #include "ui/shell_dialogs/select_file_dialog.h"
11 14
12 namespace base {
13 class FilePath;
14 }
15
16 namespace extensions { 15 namespace extensions {
17 class ExtensionPrefs; 16 class ExtensionPrefs;
18 17
19 namespace file_system_api { 18 namespace file_system_api {
20 19
21 // Methods to get and set the path of the directory containing the last file 20 // Methods to get and set the path of the directory containing the last file
22 // chosen by the user in response to a chrome.fileSystem.chooseEntry() call for 21 // chosen by the user in response to a chrome.fileSystem.chooseEntry() call for
23 // the given extension. 22 // the given extension.
24 23
25 // Returns an empty path on failure. 24 // Returns an empty path on failure.
26 base::FilePath GetLastChooseEntryDirectory(const ExtensionPrefs* prefs, 25 base::FilePath GetLastChooseEntryDirectory(const ExtensionPrefs* prefs,
27 const std::string& extension_id); 26 const std::string& extension_id);
28 27
29 void SetLastChooseEntryDirectory(ExtensionPrefs* prefs, 28 void SetLastChooseEntryDirectory(ExtensionPrefs* prefs,
30 const std::string& extension_id, 29 const std::string& extension_id,
31 const base::FilePath& path); 30 const base::FilePath& path);
32 31
32 std::vector<base::FilePath> GetGrayListedDirectories();
33
33 } // namespace file_system_api 34 } // namespace file_system_api
34 35
35 class FileSystemGetDisplayPathFunction : public ChromeSyncExtensionFunction { 36 class FileSystemGetDisplayPathFunction : public ChromeSyncExtensionFunction {
36 public: 37 public:
37 DECLARE_EXTENSION_FUNCTION("fileSystem.getDisplayPath", 38 DECLARE_EXTENSION_FUNCTION("fileSystem.getDisplayPath",
38 FILESYSTEM_GETDISPLAYPATH) 39 FILESYSTEM_GETDISPLAYPATH)
39 40
40 protected: 41 protected:
41 virtual ~FileSystemGetDisplayPathFunction() {} 42 virtual ~FileSystemGetDisplayPathFunction() {}
42 virtual bool RunImpl() OVERRIDE; 43 virtual bool RunImpl() OVERRIDE;
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
205 DECLARE_EXTENSION_FUNCTION("fileSystem.restoreEntry", FILESYSTEM_RESTOREENTRY) 206 DECLARE_EXTENSION_FUNCTION("fileSystem.restoreEntry", FILESYSTEM_RESTOREENTRY)
206 207
207 protected: 208 protected:
208 virtual ~FileSystemRestoreEntryFunction() {} 209 virtual ~FileSystemRestoreEntryFunction() {}
209 virtual bool RunImpl() OVERRIDE; 210 virtual bool RunImpl() OVERRIDE;
210 }; 211 };
211 212
212 } // namespace extensions 213 } // namespace extensions
213 214
214 #endif // CHROME_BROWSER_EXTENSIONS_API_FILE_SYSTEM_FILE_SYSTEM_API_H_ 215 #endif // CHROME_BROWSER_EXTENSIONS_API_FILE_SYSTEM_FILE_SYSTEM_API_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698