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

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

Issue 16702003: Move ShellWindow into apps component. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Feedback Created 7 years, 6 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 #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 "apps/saved_files_service.h" 7 #include "apps/saved_files_service.h"
8 #include "apps/shell_window.h"
8 #include "base/bind.h" 9 #include "base/bind.h"
9 #include "base/file_util.h" 10 #include "base/file_util.h"
10 #include "base/files/file_path.h" 11 #include "base/files/file_path.h"
11 #include "base/logging.h" 12 #include "base/logging.h"
12 #include "base/path_service.h" 13 #include "base/path_service.h"
13 #include "base/strings/string_util.h" 14 #include "base/strings/string_util.h"
14 #include "base/strings/sys_string_conversions.h" 15 #include "base/strings/sys_string_conversions.h"
15 #include "base/strings/utf_string_conversions.h" 16 #include "base/strings/utf_string_conversions.h"
16 #include "chrome/browser/extensions/api/file_handlers/app_file_handler_util.h" 17 #include "chrome/browser/extensions/api/file_handlers/app_file_handler_util.h"
17 #include "chrome/browser/extensions/extension_service.h" 18 #include "chrome/browser/extensions/extension_service.h"
18 #include "chrome/browser/extensions/extension_system.h" 19 #include "chrome/browser/extensions/extension_system.h"
19 #include "chrome/browser/extensions/shell_window_registry.h" 20 #include "chrome/browser/extensions/shell_window_registry.h"
20 #include "chrome/browser/platform_util.h" 21 #include "chrome/browser/platform_util.h"
21 #include "chrome/browser/ui/chrome_select_file_policy.h" 22 #include "chrome/browser/ui/chrome_select_file_policy.h"
22 #include "chrome/browser/ui/extensions/shell_window.h"
23 #include "chrome/common/chrome_paths.h" 23 #include "chrome/common/chrome_paths.h"
24 #include "chrome/common/extensions/api/file_system.h" 24 #include "chrome/common/extensions/api/file_system.h"
25 #include "chrome/common/extensions/permissions/api_permission.h" 25 #include "chrome/common/extensions/permissions/api_permission.h"
26 #include "content/public/browser/browser_thread.h" 26 #include "content/public/browser/browser_thread.h"
27 #include "content/public/browser/child_process_security_policy.h" 27 #include "content/public/browser/child_process_security_policy.h"
28 #include "content/public/browser/render_process_host.h" 28 #include "content/public/browser/render_process_host.h"
29 #include "content/public/browser/render_view_host.h" 29 #include "content/public/browser/render_view_host.h"
30 #include "content/public/browser/web_contents.h" 30 #include "content/public/browser/web_contents.h"
31 #include "content/public/browser/web_contents_view.h" 31 #include "content/public/browser/web_contents_view.h"
32 #include "grit/generated_resources.h" 32 #include "grit/generated_resources.h"
(...skipping 10 matching lines...) Expand all
43 #include <CoreFoundation/CoreFoundation.h> 43 #include <CoreFoundation/CoreFoundation.h>
44 #include "base/mac/foundation_util.h" 44 #include "base/mac/foundation_util.h"
45 #endif 45 #endif
46 46
47 #if defined(OS_CHROMEOS) 47 #if defined(OS_CHROMEOS)
48 #include "chrome/browser/chromeos/drive/file_system_util.h" 48 #include "chrome/browser/chromeos/drive/file_system_util.h"
49 #endif 49 #endif
50 50
51 using apps::SavedFileEntry; 51 using apps::SavedFileEntry;
52 using apps::SavedFilesService; 52 using apps::SavedFilesService;
53 using apps::ShellWindow;
53 using fileapi::IsolatedContext; 54 using fileapi::IsolatedContext;
54 55
55 const char kInvalidParameters[] = "Invalid parameters"; 56 const char kInvalidParameters[] = "Invalid parameters";
56 const char kSecurityError[] = "Security error"; 57 const char kSecurityError[] = "Security error";
57 const char kInvalidCallingPage[] = "Invalid calling page. This function can't " 58 const char kInvalidCallingPage[] = "Invalid calling page. This function can't "
58 "be called from a background page."; 59 "be called from a background page.";
59 const char kUserCancelled[] = "User cancelled"; 60 const char kUserCancelled[] = "User cancelled";
60 const char kWritableFileError[] = 61 const char kWritableFileError[] =
61 "Cannot write to file in a restricted location"; 62 "Cannot write to file in a restricted location";
62 const char kRequiresFileSystemWriteError[] = 63 const char kRequiresFileSystemWriteError[] =
(...skipping 778 matching lines...) Expand 10 before | Expand all | Expand 10 after
841 // ID that was passed to restoreEntry. 842 // ID that was passed to restoreEntry.
842 RegisterFileSystemAndSendResponseWithIdOverride( 843 RegisterFileSystemAndSendResponseWithIdOverride(
843 file_entry->path, 844 file_entry->path,
844 file_entry->writable ? WRITABLE : READ_ONLY, 845 file_entry->writable ? WRITABLE : READ_ONLY,
845 file_entry->id); 846 file_entry->id);
846 } 847 }
847 return true; 848 return true;
848 } 849 }
849 850
850 } // namespace extensions 851 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698