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/local_file_system_test_helper.h" | 5 #include "webkit/fileapi/local_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 LocalFileSystemTestOriginHelper::TearDown() { | 104 void LocalFileSystemTestOriginHelper::TearDown() { |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
181 | 181 |
182 FileSystemOperationContext* | 182 FileSystemOperationContext* |
183 LocalFileSystemTestOriginHelper::NewOperationContext() { | 183 LocalFileSystemTestOriginHelper::NewOperationContext() { |
184 DCHECK(file_system_context_.get()); | 184 DCHECK(file_system_context_.get()); |
185 FileSystemOperationContext* context = | 185 FileSystemOperationContext* context = |
186 new FileSystemOperationContext(file_system_context_.get()); | 186 new FileSystemOperationContext(file_system_context_.get()); |
187 return context; | 187 return context; |
188 } | 188 } |
189 | 189 |
190 } // namespace fileapi | 190 } // namespace fileapi |
OLD | NEW |