| OLD | NEW |
| 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_mount_point_provider.h" | 5 #include "webkit/browser/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/file_util.h" | 9 #include "base/file_util.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 89 virtual bool HasFileSystemType(fileapi::FileSystemType type) const OVERRIDE { | 89 virtual bool HasFileSystemType(fileapi::FileSystemType type) const OVERRIDE { |
| 90 return enum_->HasFileSystemType(type); | 90 return enum_->HasFileSystemType(type); |
| 91 } | 91 } |
| 92 | 92 |
| 93 private: | 93 private: |
| 94 scoped_ptr<ObfuscatedFileUtil::AbstractOriginEnumerator> enum_; | 94 scoped_ptr<ObfuscatedFileUtil::AbstractOriginEnumerator> enum_; |
| 95 }; | 95 }; |
| 96 | 96 |
| 97 void DidOpenFileSystem( | 97 void DidOpenFileSystem( |
| 98 base::WeakPtr<SandboxMountPointProvider> mount_point_provider, | 98 base::WeakPtr<SandboxMountPointProvider> mount_point_provider, |
| 99 const FileSystemMountPointProvider::OpenFileSystemCallback& callback, | 99 const FileSystemBackend::OpenFileSystemCallback& callback, |
| 100 base::PlatformFileError* error) { | 100 base::PlatformFileError* error) { |
| 101 if (mount_point_provider.get()) | 101 if (mount_point_provider.get()) |
| 102 mount_point_provider.get()->CollectOpenFileSystemMetrics(*error); | 102 mount_point_provider.get()->CollectOpenFileSystemMetrics(*error); |
| 103 callback.Run(*error); | 103 callback.Run(*error); |
| 104 } | 104 } |
| 105 | 105 |
| 106 void OpenFileSystemOnFileThread( | 106 void OpenFileSystemOnFileThread( |
| 107 ObfuscatedFileUtil* file_util, | 107 ObfuscatedFileUtil* file_util, |
| 108 const GURL& origin_url, | 108 const GURL& origin_url, |
| 109 FileSystemType type, | 109 FileSystemType type, |
| (...skipping 575 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 685 | 685 |
| 686 while (!(file_path_each = enumerator->Next()).empty()) { | 686 while (!(file_path_each = enumerator->Next()).empty()) { |
| 687 usage += enumerator->Size(); | 687 usage += enumerator->Size(); |
| 688 usage += ObfuscatedFileUtil::ComputeFilePathCost(file_path_each); | 688 usage += ObfuscatedFileUtil::ComputeFilePathCost(file_path_each); |
| 689 } | 689 } |
| 690 | 690 |
| 691 return usage; | 691 return usage; |
| 692 } | 692 } |
| 693 | 693 |
| 694 } // namespace fileapi | 694 } // namespace fileapi |
| OLD | NEW |