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 #include "chrome/browser/extensions/api/file_system/file_system_api.h" | 5 #include "chrome/browser/extensions/api/file_system/file_system_api.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <memory> | 9 #include <memory> |
10 #include <set> | 10 #include <set> |
(...skipping 22 matching lines...) Expand all Loading... |
33 #include "chrome/common/chrome_paths.h" | 33 #include "chrome/common/chrome_paths.h" |
34 #include "chrome/common/extensions/api/file_system.h" | 34 #include "chrome/common/extensions/api/file_system.h" |
35 #include "chrome/grit/generated_resources.h" | 35 #include "chrome/grit/generated_resources.h" |
36 #include "content/public/browser/browser_thread.h" | 36 #include "content/public/browser/browser_thread.h" |
37 #include "content/public/browser/child_process_security_policy.h" | 37 #include "content/public/browser/child_process_security_policy.h" |
38 #include "content/public/browser/render_frame_host.h" | 38 #include "content/public/browser/render_frame_host.h" |
39 #include "content/public/browser/render_process_host.h" | 39 #include "content/public/browser/render_process_host.h" |
40 #include "content/public/browser/storage_partition.h" | 40 #include "content/public/browser/storage_partition.h" |
41 #include "content/public/browser/web_contents.h" | 41 #include "content/public/browser/web_contents.h" |
42 #include "extensions/browser/api/file_handlers/app_file_handler_util.h" | 42 #include "extensions/browser/api/file_handlers/app_file_handler_util.h" |
| 43 #include "extensions/browser/api/file_system/saved_file_entry.h" |
43 #include "extensions/browser/app_window/app_window.h" | 44 #include "extensions/browser/app_window/app_window.h" |
44 #include "extensions/browser/app_window/app_window_registry.h" | 45 #include "extensions/browser/app_window/app_window_registry.h" |
45 #include "extensions/browser/extension_prefs.h" | 46 #include "extensions/browser/extension_prefs.h" |
46 #include "extensions/browser/extension_system.h" | 47 #include "extensions/browser/extension_system.h" |
47 #include "extensions/browser/extension_util.h" | 48 #include "extensions/browser/extension_util.h" |
48 #include "extensions/browser/granted_file_entry.h" | 49 #include "extensions/browser/granted_file_entry.h" |
49 #include "extensions/browser/path_util.h" | 50 #include "extensions/browser/path_util.h" |
50 #include "extensions/common/permissions/api_permission.h" | 51 #include "extensions/common/permissions/api_permission.h" |
51 #include "extensions/common/permissions/permissions_data.h" | 52 #include "extensions/common/permissions/permissions_data.h" |
52 #include "net/base/mime_util.h" | 53 #include "net/base/mime_util.h" |
(...skipping 15 matching lines...) Expand all Loading... |
68 #if defined(OS_CHROMEOS) | 69 #if defined(OS_CHROMEOS) |
69 #include "base/strings/string16.h" | 70 #include "base/strings/string16.h" |
70 #include "chrome/browser/chromeos/file_manager/filesystem_api_util.h" | 71 #include "chrome/browser/chromeos/file_manager/filesystem_api_util.h" |
71 #include "chrome/browser/chromeos/file_manager/volume_manager.h" | 72 #include "chrome/browser/chromeos/file_manager/volume_manager.h" |
72 #include "extensions/browser/event_router.h" | 73 #include "extensions/browser/event_router.h" |
73 #include "extensions/browser/extension_registry.h" | 74 #include "extensions/browser/extension_registry.h" |
74 #include "extensions/common/constants.h" | 75 #include "extensions/common/constants.h" |
75 #include "url/url_constants.h" | 76 #include "url/url_constants.h" |
76 #endif | 77 #endif |
77 | 78 |
78 using apps::SavedFileEntry; | |
79 using apps::SavedFilesService; | 79 using apps::SavedFilesService; |
80 using storage::IsolatedContext; | 80 using storage::IsolatedContext; |
81 | 81 |
82 const char kInvalidCallingPage[] = | 82 const char kInvalidCallingPage[] = |
83 "Invalid calling page. " | 83 "Invalid calling page. " |
84 "This function can't be called from a background page."; | 84 "This function can't be called from a background page."; |
85 const char kUserCancelled[] = "User cancelled"; | 85 const char kUserCancelled[] = "User cancelled"; |
86 const char kWritableFileErrorFormat[] = "Error opening %s"; | 86 const char kWritableFileErrorFormat[] = "Error opening %s"; |
87 const char kRequiresFileSystemWriteError[] = | 87 const char kRequiresFileSystemWriteError[] = |
88 "Operation requires fileSystem.write permission"; | 88 "Operation requires fileSystem.write permission"; |
(...skipping 1146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1235 return RespondNow(Error(kNotSupportedOnNonKioskSessionError)); | 1235 return RespondNow(Error(kNotSupportedOnNonKioskSessionError)); |
1236 std::vector<api::file_system::Volume> result_volume_list; | 1236 std::vector<api::file_system::Volume> result_volume_list; |
1237 FillVolumeList(chrome_details_.GetProfile(), &result_volume_list); | 1237 FillVolumeList(chrome_details_.GetProfile(), &result_volume_list); |
1238 | 1238 |
1239 return RespondNow(ArgumentList( | 1239 return RespondNow(ArgumentList( |
1240 api::file_system::GetVolumeList::Results::Create(result_volume_list))); | 1240 api::file_system::GetVolumeList::Results::Create(result_volume_list))); |
1241 } | 1241 } |
1242 #endif | 1242 #endif |
1243 | 1243 |
1244 } // namespace extensions | 1244 } // namespace extensions |
OLD | NEW |