| 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/fileapi/file_system_test_helper.h" | 5 #include "webkit/fileapi/file_system_test_helper.h" |
| 6 | 6 |
| 7 #include "base/file_util.h" | 7 #include "base/file_util.h" |
| 8 #include "base/message_loop.h" | 8 #include "base/message_loop.h" |
| 9 #include "base/message_loop_proxy.h" | 9 #include "base/message_loop_proxy.h" |
| 10 #include "googleurl/src/gurl.h" | 10 #include "googleurl/src/gurl.h" |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 84 | 84 |
| 85 // Prepare the origin's root directory. | 85 // Prepare the origin's root directory. |
| 86 FileSystemMountPointProvider* mount_point_provider = | 86 FileSystemMountPointProvider* mount_point_provider = |
| 87 file_system_context_->GetMountPointProvider(type_); | 87 file_system_context_->GetMountPointProvider(type_); |
| 88 mount_point_provider->GetFileSystemRootPathOnFileThread( | 88 mount_point_provider->GetFileSystemRootPathOnFileThread( |
| 89 origin_, type_, FilePath(), true /* create */); | 89 origin_, type_, FilePath(), true /* create */); |
| 90 | 90 |
| 91 if (file_util) | 91 if (file_util) |
| 92 file_util_ = file_util; | 92 file_util_ = file_util; |
| 93 else | 93 else |
| 94 file_util_ = mount_point_provider->GetFileUtil(); | 94 file_util_ = mount_point_provider->GetFileUtil(type_); |
| 95 | 95 |
| 96 DCHECK(file_util_); | 96 DCHECK(file_util_); |
| 97 | 97 |
| 98 // Initialize the usage cache file. | 98 // Initialize the usage cache file. |
| 99 FilePath usage_cache_path = GetUsageCachePath(); | 99 FilePath usage_cache_path = GetUsageCachePath(); |
| 100 if (!usage_cache_path.empty()) | 100 if (!usage_cache_path.empty()) |
| 101 FileSystemUsageCache::UpdateUsage(usage_cache_path, 0); | 101 FileSystemUsageCache::UpdateUsage(usage_cache_path, 0); |
| 102 } | 102 } |
| 103 | 103 |
| 104 void FileSystemTestOriginHelper::TearDown() { | 104 void FileSystemTestOriginHelper::TearDown() { |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 179 } | 179 } |
| 180 | 180 |
| 181 FileSystemOperationContext* FileSystemTestOriginHelper::NewOperationContext() { | 181 FileSystemOperationContext* FileSystemTestOriginHelper::NewOperationContext() { |
| 182 DCHECK(file_system_context_.get()); | 182 DCHECK(file_system_context_.get()); |
| 183 FileSystemOperationContext* context = | 183 FileSystemOperationContext* context = |
| 184 new FileSystemOperationContext(file_system_context_.get()); | 184 new FileSystemOperationContext(file_system_context_.get()); |
| 185 return context; | 185 return context; |
| 186 } | 186 } |
| 187 | 187 |
| 188 } // namespace fileapi | 188 } // namespace fileapi |
| OLD | NEW |