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

Side by Side Diff: webkit/fileapi/sandbox_mount_point_provider.cc

Issue 9372044: Refactor FileSystemOperation to take callback for each method. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Reflected kinuko's comments + Fixture for failing-Write -> Cancel pattern. Created 8 years, 10 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 "webkit/fileapi/sandbox_mount_point_provider.h" 5 #include "webkit/fileapi/sandbox_mount_point_provider.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
11 #include "base/message_loop.h" 11 #include "base/message_loop.h"
12 #include "base/message_loop_proxy.h" 12 #include "base/message_loop_proxy.h"
13 #include "base/rand_util.h" 13 #include "base/rand_util.h"
14 #include "base/string_util.h" 14 #include "base/string_util.h"
15 #include "base/stringprintf.h" 15 #include "base/stringprintf.h"
16 #include "base/metrics/histogram.h" 16 #include "base/metrics/histogram.h"
17 #include "googleurl/src/gurl.h" 17 #include "googleurl/src/gurl.h"
18 #include "net/base/net_util.h" 18 #include "net/base/net_util.h"
19 #include "webkit/fileapi/file_system_callback_dispatcher.h"
20 #include "webkit/fileapi/file_system_operation.h" 19 #include "webkit/fileapi/file_system_operation.h"
21 #include "webkit/fileapi/file_system_operation_context.h" 20 #include "webkit/fileapi/file_system_operation_context.h"
22 #include "webkit/fileapi/file_system_options.h" 21 #include "webkit/fileapi/file_system_options.h"
23 #include "webkit/fileapi/file_system_types.h" 22 #include "webkit/fileapi/file_system_types.h"
24 #include "webkit/fileapi/file_system_usage_cache.h" 23 #include "webkit/fileapi/file_system_usage_cache.h"
25 #include "webkit/fileapi/file_system_util.h" 24 #include "webkit/fileapi/file_system_util.h"
26 #include "webkit/fileapi/obfuscated_file_util.h" 25 #include "webkit/fileapi/obfuscated_file_util.h"
27 #include "webkit/fileapi/quota_file_util.h" 26 #include "webkit/fileapi/quota_file_util.h"
28 #include "webkit/glue/webkit_glue.h" 27 #include "webkit/glue/webkit_glue.h"
29 #include "webkit/quota/quota_manager.h" 28 #include "webkit/quota/quota_manager.h"
(...skipping 379 matching lines...) Expand 10 before | Expand all | Expand 10 after
409 408
410 FileSystemFileUtil* SandboxMountPointProvider::GetFileUtil() { 409 FileSystemFileUtil* SandboxMountPointProvider::GetFileUtil() {
411 return sandbox_file_util_.get(); 410 return sandbox_file_util_.get();
412 } 411 }
413 412
414 FileSystemOperationInterface* 413 FileSystemOperationInterface*
415 SandboxMountPointProvider::CreateFileSystemOperation( 414 SandboxMountPointProvider::CreateFileSystemOperation(
416 const GURL& origin_url, 415 const GURL& origin_url,
417 FileSystemType file_system_type, 416 FileSystemType file_system_type,
418 const FilePath& virtual_path, 417 const FilePath& virtual_path,
419 scoped_ptr<FileSystemCallbackDispatcher> dispatcher,
420 base::MessageLoopProxy* file_proxy, 418 base::MessageLoopProxy* file_proxy,
421 FileSystemContext* context) const { 419 FileSystemContext* context) const {
422 return new FileSystemOperation(dispatcher.Pass(), file_proxy, context); 420 return new FileSystemOperation(file_proxy, context);
423 } 421 }
424 422
425 FilePath SandboxMountPointProvider::old_base_path() const { 423 FilePath SandboxMountPointProvider::old_base_path() const {
426 return profile_path_.Append(kOldFileSystemDirectory); 424 return profile_path_.Append(kOldFileSystemDirectory);
427 } 425 }
428 426
429 FilePath SandboxMountPointProvider::new_base_path() const { 427 FilePath SandboxMountPointProvider::new_base_path() const {
430 return profile_path_.Append(kNewFileSystemDirectory); 428 return profile_path_.Append(kNewFileSystemDirectory);
431 } 429 }
432 430
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after
641 i < file_system_options_.additional_allowed_schemes().size(); 639 i < file_system_options_.additional_allowed_schemes().size();
642 ++i) { 640 ++i) {
643 if (url.SchemeIs( 641 if (url.SchemeIs(
644 file_system_options_.additional_allowed_schemes()[i].c_str())) 642 file_system_options_.additional_allowed_schemes()[i].c_str()))
645 return true; 643 return true;
646 } 644 }
647 return false; 645 return false;
648 } 646 }
649 647
650 } // namespace fileapi 648 } // namespace fileapi
OLDNEW
« no previous file with comments | « webkit/fileapi/sandbox_mount_point_provider.h ('k') | webkit/tools/test_shell/simple_file_system.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698