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 "content/browser/fileapi/browser_file_system_helper.h" | 5 #include "content/browser/fileapi/browser_file_system_helper.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 #include <string> | 8 #include <string> |
9 #include <utility> | 9 #include <utility> |
10 #include <vector> | 10 #include <vector> |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
109 return false; | 109 return false; |
110 | 110 |
111 return context->GetFileSystemBackend(url.type()) != NULL; | 111 return context->GetFileSystemBackend(url.type()) != NULL; |
112 } | 112 } |
113 | 113 |
114 void SyncGetPlatformPath(storage::FileSystemContext* context, | 114 void SyncGetPlatformPath(storage::FileSystemContext* context, |
115 int process_id, | 115 int process_id, |
116 const GURL& path, | 116 const GURL& path, |
117 base::FilePath* platform_path) { | 117 base::FilePath* platform_path) { |
118 DCHECK(context->default_file_task_runner()-> | 118 DCHECK(context->default_file_task_runner()-> |
119 RunsTasksOnCurrentThread()); | 119 RunsTasksInCurrentSequence()); |
120 DCHECK(platform_path); | 120 DCHECK(platform_path); |
121 *platform_path = base::FilePath(); | 121 *platform_path = base::FilePath(); |
122 storage::FileSystemURL url(context->CrackURL(path)); | 122 storage::FileSystemURL url(context->CrackURL(path)); |
123 if (!FileSystemURLIsValid(context, url)) | 123 if (!FileSystemURLIsValid(context, url)) |
124 return; | 124 return; |
125 | 125 |
126 // Make sure if this file is ok to be read (in the current architecture | 126 // Make sure if this file is ok to be read (in the current architecture |
127 // which means roughly same as the renderer is allowed to get the platform | 127 // which means roughly same as the renderer is allowed to get the platform |
128 // path to the file). | 128 // path to the file). |
129 ChildProcessSecurityPolicyImpl* policy = | 129 ChildProcessSecurityPolicyImpl* policy = |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
214 // different from the receiver's. | 214 // different from the receiver's. |
215 file_system_file.url = | 215 file_system_file.url = |
216 GURL(storage::GetIsolatedFileSystemRootURIString( | 216 GURL(storage::GetIsolatedFileSystemRootURIString( |
217 file_system_url.origin(), filesystem_id, std::string()) | 217 file_system_url.origin(), filesystem_id, std::string()) |
218 .append(register_name)); | 218 .append(register_name)); |
219 file_system_file.filesystem_id = filesystem_id; | 219 file_system_file.filesystem_id = filesystem_id; |
220 } | 220 } |
221 } | 221 } |
222 | 222 |
223 } // namespace content | 223 } // namespace content |
OLD | NEW |