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

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

Issue 9380040: Revert 121620 - Refactor FileSystemOperation to take callback for each method. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: 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"
19 #include "webkit/fileapi/file_system_operation.h" 20 #include "webkit/fileapi/file_system_operation.h"
20 #include "webkit/fileapi/file_system_operation_context.h" 21 #include "webkit/fileapi/file_system_operation_context.h"
21 #include "webkit/fileapi/file_system_options.h" 22 #include "webkit/fileapi/file_system_options.h"
22 #include "webkit/fileapi/file_system_types.h" 23 #include "webkit/fileapi/file_system_types.h"
23 #include "webkit/fileapi/file_system_usage_cache.h" 24 #include "webkit/fileapi/file_system_usage_cache.h"
24 #include "webkit/fileapi/file_system_util.h" 25 #include "webkit/fileapi/file_system_util.h"
25 #include "webkit/fileapi/obfuscated_file_util.h" 26 #include "webkit/fileapi/obfuscated_file_util.h"
26 #include "webkit/fileapi/quota_file_util.h" 27 #include "webkit/fileapi/quota_file_util.h"
27 #include "webkit/glue/webkit_glue.h" 28 #include "webkit/glue/webkit_glue.h"
28 #include "webkit/quota/quota_manager.h" 29 #include "webkit/quota/quota_manager.h"
(...skipping 379 matching lines...) Expand 10 before | Expand all | Expand 10 after
408 409
409 FileSystemFileUtil* SandboxMountPointProvider::GetFileUtil() { 410 FileSystemFileUtil* SandboxMountPointProvider::GetFileUtil() {
410 return sandbox_file_util_.get(); 411 return sandbox_file_util_.get();
411 } 412 }
412 413
413 FileSystemOperationInterface* 414 FileSystemOperationInterface*
414 SandboxMountPointProvider::CreateFileSystemOperation( 415 SandboxMountPointProvider::CreateFileSystemOperation(
415 const GURL& origin_url, 416 const GURL& origin_url,
416 FileSystemType file_system_type, 417 FileSystemType file_system_type,
417 const FilePath& virtual_path, 418 const FilePath& virtual_path,
419 scoped_ptr<FileSystemCallbackDispatcher> dispatcher,
418 base::MessageLoopProxy* file_proxy, 420 base::MessageLoopProxy* file_proxy,
419 FileSystemContext* context) const { 421 FileSystemContext* context) const {
420 return new FileSystemOperation(file_proxy, context); 422 return new FileSystemOperation(dispatcher.Pass(), file_proxy, context);
421 } 423 }
422 424
423 FilePath SandboxMountPointProvider::old_base_path() const { 425 FilePath SandboxMountPointProvider::old_base_path() const {
424 return profile_path_.Append(kOldFileSystemDirectory); 426 return profile_path_.Append(kOldFileSystemDirectory);
425 } 427 }
426 428
427 FilePath SandboxMountPointProvider::new_base_path() const { 429 FilePath SandboxMountPointProvider::new_base_path() const {
428 return profile_path_.Append(kNewFileSystemDirectory); 430 return profile_path_.Append(kNewFileSystemDirectory);
429 } 431 }
430 432
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after
639 i < file_system_options_.additional_allowed_schemes().size(); 641 i < file_system_options_.additional_allowed_schemes().size();
640 ++i) { 642 ++i) {
641 if (url.SchemeIs( 643 if (url.SchemeIs(
642 file_system_options_.additional_allowed_schemes()[i].c_str())) 644 file_system_options_.additional_allowed_schemes()[i].c_str()))
643 return true; 645 return true;
644 } 646 }
645 return false; 647 return false;
646 } 648 }
647 649
648 } // namespace fileapi 650 } // 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