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

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

Issue 10834021: Outsource FileSystemOperationContext from LocalFileSystemOperation (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: build fix again Created 8 years, 4 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"
(...skipping 416 matching lines...) Expand 10 before | Expand all | Expand 10 after
427 const FilePath& virtual_path) const { 427 const FilePath& virtual_path) const {
428 // We simply return the very top directory of the sandbox 428 // We simply return the very top directory of the sandbox
429 // filesystem regardless of the input path. 429 // filesystem regardless of the input path.
430 return new_base_path(); 430 return new_base_path();
431 } 431 }
432 432
433 FileSystemOperationInterface* 433 FileSystemOperationInterface*
434 SandboxMountPointProvider::CreateFileSystemOperation( 434 SandboxMountPointProvider::CreateFileSystemOperation(
435 const FileSystemURL& url, 435 const FileSystemURL& url,
436 FileSystemContext* context) const { 436 FileSystemContext* context) const {
437 return new LocalFileSystemOperation(context); 437 scoped_ptr<FileSystemOperationContext> operation_context(
438 new FileSystemOperationContext(context));
439 return new LocalFileSystemOperation(context, operation_context.Pass());
438 } 440 }
439 441
440 webkit_blob::FileStreamReader* 442 webkit_blob::FileStreamReader*
441 SandboxMountPointProvider::CreateFileStreamReader( 443 SandboxMountPointProvider::CreateFileStreamReader(
442 const FileSystemURL& url, 444 const FileSystemURL& url,
443 int64 offset, 445 int64 offset,
444 FileSystemContext* context) const { 446 FileSystemContext* context) const {
445 return new FileSystemFileStreamReader(context, url, offset); 447 return new FileSystemFileStreamReader(context, url, offset);
446 } 448 }
447 449
(...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after
730 break; 732 break;
731 case base::PLATFORM_FILE_ERROR_FAILED: 733 case base::PLATFORM_FILE_ERROR_FAILED:
732 default: 734 default:
733 REPORT(kUnknownError); 735 REPORT(kUnknownError);
734 break; 736 break;
735 } 737 }
736 #undef REPORT 738 #undef REPORT
737 } 739 }
738 740
739 } // namespace fileapi 741 } // namespace fileapi
OLDNEW
« no previous file with comments | « webkit/fileapi/local_file_system_test_helper.cc ('k') | webkit/fileapi/test_mount_point_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698