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

Side by Side Diff: content/browser/fileapi/browser_file_system_helper.cc

Issue 12717014: Launch packaged app with files on Drive on Chrome OS. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase. Created 7 years, 9 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 "content/browser/fileapi/browser_file_system_helper.h" 5 #include "content/browser/fileapi/browser_file_system_helper.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 return true; 101 return true;
102 case fileapi::FILE_PERMISSION_USE_FILE_PERMISSION: { 102 case fileapi::FILE_PERMISSION_USE_FILE_PERMISSION: {
103 const bool success = policy->HasPermissionsForFile( 103 const bool success = policy->HasPermissionsForFile(
104 process_id, url.path(), permissions); 104 process_id, url.path(), permissions);
105 if (!success) 105 if (!success)
106 *error = base::PLATFORM_FILE_ERROR_SECURITY; 106 *error = base::PLATFORM_FILE_ERROR_SECURITY;
107 return success; 107 return success;
108 } 108 }
109 case fileapi::FILE_PERMISSION_USE_FILESYSTEM_PERMISSION: { 109 case fileapi::FILE_PERMISSION_USE_FILESYSTEM_PERMISSION: {
110 const bool success = policy->HasPermissionsForFileSystem( 110 const bool success = policy->HasPermissionsForFileSystem(
111 process_id, url.filesystem_id(), permissions); 111 process_id, url.mount_filesystem_id(), permissions);
112 if (!success) 112 if (!success)
113 *error = base::PLATFORM_FILE_ERROR_SECURITY; 113 *error = base::PLATFORM_FILE_ERROR_SECURITY;
114 return success; 114 return success;
115 } 115 }
116 } 116 }
117 NOTREACHED(); 117 NOTREACHED();
118 *error = base::PLATFORM_FILE_ERROR_SECURITY; 118 *error = base::PLATFORM_FILE_ERROR_SECURITY;
119 return false; 119 return false;
120 } 120 }
121 121
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 // for the file. (We first need to check if it can already be read not to 156 // for the file. (We first need to check if it can already be read not to
157 // overwrite existing permissions) 157 // overwrite existing permissions)
158 if (!ChildProcessSecurityPolicyImpl::GetInstance()->CanReadFile( 158 if (!ChildProcessSecurityPolicyImpl::GetInstance()->CanReadFile(
159 process_id, *platform_path)) { 159 process_id, *platform_path)) {
160 ChildProcessSecurityPolicyImpl::GetInstance()->GrantReadFile( 160 ChildProcessSecurityPolicyImpl::GetInstance()->GrantReadFile(
161 process_id, *platform_path); 161 process_id, *platform_path);
162 } 162 }
163 } 163 }
164 164
165 } // namespace content 165 } // namespace content
OLDNEW
« no previous file with comments | « chrome/test/data/chromeos/gdata/remote_file_system_apitest_root_feed.json ('k') | webkit/fileapi/external_mount_points.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698