| 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 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 146 const base::FilePath& profile_path, | 146 const base::FilePath& profile_path, |
| 147 const FileSystemOptions& file_system_options, | 147 const FileSystemOptions& file_system_options, |
| 148 quota::SpecialStoragePolicy* special_storage_policy) | 148 quota::SpecialStoragePolicy* special_storage_policy) |
| 149 : file_task_runner_(file_task_runner), | 149 : file_task_runner_(file_task_runner), |
| 150 profile_path_(profile_path), | 150 profile_path_(profile_path), |
| 151 file_system_options_(file_system_options), | 151 file_system_options_(file_system_options), |
| 152 enable_temporary_file_system_in_incognito_(false), | 152 enable_temporary_file_system_in_incognito_(false), |
| 153 sandbox_file_util_( | 153 sandbox_file_util_( |
| 154 new AsyncFileUtilAdapter( | 154 new AsyncFileUtilAdapter( |
| 155 new ObfuscatedFileUtil( | 155 new ObfuscatedFileUtil( |
| 156 special_storage_policy, |
| 156 profile_path.Append(kFileSystemDirectory)))), | 157 profile_path.Append(kFileSystemDirectory)))), |
| 157 file_system_usage_cache_(new FileSystemUsageCache(file_task_runner)), | 158 file_system_usage_cache_(new FileSystemUsageCache(file_task_runner)), |
| 158 quota_observer_(new SandboxQuotaObserver( | 159 quota_observer_(new SandboxQuotaObserver( |
| 159 quota_manager_proxy, | 160 quota_manager_proxy, |
| 160 file_task_runner, | 161 file_task_runner, |
| 161 sandbox_sync_file_util(), | 162 sandbox_sync_file_util(), |
| 162 file_system_usage_cache_.get())), | 163 file_system_usage_cache_.get())), |
| 163 enable_usage_tracking_( | 164 enable_usage_tracking_( |
| 164 !CommandLine::ForCurrentProcess()->HasSwitch( | 165 !CommandLine::ForCurrentProcess()->HasSwitch( |
| 165 kDisableUsageTracking)), | 166 kDisableUsageTracking)), |
| (...skipping 510 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 676 | 677 |
| 677 while (!(file_path_each = enumerator->Next()).empty()) { | 678 while (!(file_path_each = enumerator->Next()).empty()) { |
| 678 usage += enumerator->Size(); | 679 usage += enumerator->Size(); |
| 679 usage += ObfuscatedFileUtil::ComputeFilePathCost(file_path_each); | 680 usage += ObfuscatedFileUtil::ComputeFilePathCost(file_path_each); |
| 680 } | 681 } |
| 681 | 682 |
| 682 return usage; | 683 return usage; |
| 683 } | 684 } |
| 684 | 685 |
| 685 } // namespace fileapi | 686 } // namespace fileapi |
| OLD | NEW |