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

Side by Side Diff: webkit/browser/fileapi/sandbox_file_system_backend.cc

Issue 20277003: FileAPI: Clean up around FileSystemBackend (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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
« no previous file with comments | « webkit/browser/fileapi/obfuscated_file_util_unittest.cc ('k') | no next file » | 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) 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/browser/fileapi/sandbox_file_system_backend.h" 5 #include "webkit/browser/fileapi/sandbox_file_system_backend.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/file_util.h" 8 #include "base/file_util.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 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 87
88 virtual bool HasFileSystemType(fileapi::FileSystemType type) const OVERRIDE { 88 virtual bool HasFileSystemType(fileapi::FileSystemType type) const OVERRIDE {
89 return enum_->HasFileSystemType(type); 89 return enum_->HasFileSystemType(type);
90 } 90 }
91 91
92 private: 92 private:
93 scoped_ptr<ObfuscatedFileUtil::AbstractOriginEnumerator> enum_; 93 scoped_ptr<ObfuscatedFileUtil::AbstractOriginEnumerator> enum_;
94 }; 94 };
95 95
96 void DidOpenFileSystem( 96 void DidOpenFileSystem(
97 base::WeakPtr<SandboxFileSystemBackend> mount_point_provider, 97 base::WeakPtr<SandboxFileSystemBackend> sandbox_backend,
98 const base::Callback<void(base::PlatformFileError error)>& callback, 98 const base::Callback<void(base::PlatformFileError error)>& callback,
99 base::PlatformFileError* error) { 99 base::PlatformFileError* error) {
100 if (mount_point_provider.get()) 100 if (sandbox_backend.get())
101 mount_point_provider.get()->CollectOpenFileSystemMetrics(*error); 101 sandbox_backend.get()->CollectOpenFileSystemMetrics(*error);
102 callback.Run(*error); 102 callback.Run(*error);
103 } 103 }
104 104
105 void OpenFileSystemOnFileThread( 105 void OpenFileSystemOnFileThread(
106 ObfuscatedFileUtil* file_util, 106 ObfuscatedFileUtil* file_util,
107 const GURL& origin_url, 107 const GURL& origin_url,
108 FileSystemType type, 108 FileSystemType type,
109 OpenFileSystemMode mode, 109 OpenFileSystemMode mode,
110 base::PlatformFileError* error_ptr) { 110 base::PlatformFileError* error_ptr) {
111 DCHECK(error_ptr); 111 DCHECK(error_ptr);
(...skipping 541 matching lines...) Expand 10 before | Expand all | Expand 10 after
653 653
654 while (!(file_path_each = enumerator->Next()).empty()) { 654 while (!(file_path_each = enumerator->Next()).empty()) {
655 usage += enumerator->Size(); 655 usage += enumerator->Size();
656 usage += ObfuscatedFileUtil::ComputeFilePathCost(file_path_each); 656 usage += ObfuscatedFileUtil::ComputeFilePathCost(file_path_each);
657 } 657 }
658 658
659 return usage; 659 return usage;
660 } 660 }
661 661
662 } // namespace fileapi 662 } // namespace fileapi
OLDNEW
« no previous file with comments | « webkit/browser/fileapi/obfuscated_file_util_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698