OLD | NEW |
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_CHROMEOS_EXTENSIONS_FILE_HANDLER_UTIL_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_HANDLER_UTIL_H_ |
6 #define CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_HANDLER_UTIL_H_ | 6 #define CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_HANDLER_UTIL_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
11 #include "base/platform_file.h" | 11 #include "base/platform_file.h" |
12 #include "chrome/common/extensions/extension.h" | 12 #include "chrome/common/extensions/extension.h" |
13 #include "chrome/common/extensions/url_pattern_set.h" | 13 #include "chrome/common/extensions/url_pattern_set.h" |
14 | 14 |
15 class Browser; | 15 class Browser; |
16 class ExtensionHost; | 16 class ExtensionHost; |
17 class FileBrowserHandler; | 17 class FileBrowserHandler; |
18 class GURL; | 18 class GURL; |
19 class Profile; | 19 class Profile; |
20 | 20 |
21 namespace file_handler_util { | 21 namespace file_handler_util { |
22 | 22 |
| 23 void UpdateFileHandlerUsageStats(Profile* profile, const std::string& task_id); |
| 24 |
23 // Gets read-write file access permission flags. | 25 // Gets read-write file access permission flags. |
24 int GetReadWritePermissions(); | 26 int GetReadWritePermissions(); |
25 // Gets read-only file access permission flags. | 27 // Gets read-only file access permission flags. |
26 int GetReadOnlyPermissions(); | 28 int GetReadOnlyPermissions(); |
27 | 29 |
28 // Generates file task id for the file actin specified by the extension. | 30 // Generates file task id for the file actin specified by the extension. |
29 std::string MakeTaskID(const std::string& extension_id, | 31 std::string MakeTaskID(const std::string& extension_id, |
30 const std::string& action_id); | 32 const std::string& action_id); |
31 | 33 |
32 // Extracts action and extension id bound to the file task. | 34 // Extracts action and extension id bound to the file task. |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
129 const std::string extension_id_; | 131 const std::string extension_id_; |
130 const std::string action_id_; | 132 const std::string action_id_; |
131 | 133 |
132 // (File path, permission for file path) pairs for the handler. | 134 // (File path, permission for file path) pairs for the handler. |
133 std::vector<std::pair<FilePath, int> > handler_host_permissions_; | 135 std::vector<std::pair<FilePath, int> > handler_host_permissions_; |
134 }; | 136 }; |
135 | 137 |
136 } // namespace file_handler_util | 138 } // namespace file_handler_util |
137 | 139 |
138 #endif // CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_HANDLER_UTIL_H_ | 140 #endif // CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_HANDLER_UTIL_H_ |
OLD | NEW |