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

Side by Side Diff: webkit/tools/test_shell/simple_file_system.cc

Issue 6810037: File API changes needed for safely passing user selected file entities from the file browser comp... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 8 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
« no previous file with comments | « webkit/quota/special_storage_policy.h ('k') | webkit/tools/test_shell/test_shell.gypi » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "webkit/tools/test_shell/simple_file_system.h" 5 #include "webkit/tools/test_shell/simple_file_system.h"
6 6
7 #include "base/file_path.h" 7 #include "base/file_path.h"
8 #include "base/memory/scoped_callback_factory.h" 8 #include "base/memory/scoped_callback_factory.h"
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "base/message_loop_proxy.h" 10 #include "base/message_loop_proxy.h"
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 // The FileSystem temp directory was not initialized successfully. 148 // The FileSystem temp directory was not initialized successfully.
149 callbacks->didFail(WebKit::WebFileErrorSecurity); 149 callbacks->didFail(WebKit::WebFileErrorSecurity);
150 return; 150 return;
151 } 151 }
152 152
153 fileapi::FileSystemType type; 153 fileapi::FileSystemType type;
154 if (web_filesystem_type == WebFileSystem::TypeTemporary) 154 if (web_filesystem_type == WebFileSystem::TypeTemporary)
155 type = fileapi::kFileSystemTypeTemporary; 155 type = fileapi::kFileSystemTypeTemporary;
156 else if (web_filesystem_type == WebFileSystem::TypePersistent) 156 else if (web_filesystem_type == WebFileSystem::TypePersistent)
157 type = fileapi::kFileSystemTypePersistent; 157 type = fileapi::kFileSystemTypePersistent;
158 else if (web_filesystem_type == WebFileSystem::TypeExternal)
159 type = fileapi::kFileSystemTypeExternal;
158 else { 160 else {
159 // Unknown type filesystem is requested. 161 // Unknown type filesystem is requested.
160 callbacks->didFail(WebKit::WebFileErrorSecurity); 162 callbacks->didFail(WebKit::WebFileErrorSecurity);
161 return; 163 return;
162 } 164 }
163 165
164 GURL origin_url(frame->securityOrigin().toString()); 166 GURL origin_url(frame->securityOrigin().toString());
165 GetNewOperation(callbacks)->OpenFileSystem(origin_url, type, create); 167 GetNewOperation(callbacks)->OpenFileSystem(origin_url, type, create);
166 } 168 }
167 169
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
224 226
225 FileSystemOperation* SimpleFileSystem::GetNewOperation( 227 FileSystemOperation* SimpleFileSystem::GetNewOperation(
226 WebFileSystemCallbacks* callbacks) { 228 WebFileSystemCallbacks* callbacks) {
227 SimpleFileSystemCallbackDispatcher* dispatcher = 229 SimpleFileSystemCallbackDispatcher* dispatcher =
228 new SimpleFileSystemCallbackDispatcher(AsWeakPtr(), callbacks); 230 new SimpleFileSystemCallbackDispatcher(AsWeakPtr(), callbacks);
229 FileSystemOperation* operation = new FileSystemOperation( 231 FileSystemOperation* operation = new FileSystemOperation(
230 dispatcher, base::MessageLoopProxy::CreateForCurrentThread(), 232 dispatcher, base::MessageLoopProxy::CreateForCurrentThread(),
231 file_system_context_.get(), NULL); 233 file_system_context_.get(), NULL);
232 return operation; 234 return operation;
233 } 235 }
OLDNEW
« no previous file with comments | « webkit/quota/special_storage_policy.h ('k') | webkit/tools/test_shell/test_shell.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698