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 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
168 | 168 |
169 int64 FileSystemTestOriginHelper::ComputeCurrentDirectoryDatabaseUsage() const { | 169 int64 FileSystemTestOriginHelper::ComputeCurrentDirectoryDatabaseUsage() const { |
170 return file_util::ComputeDirectorySize( | 170 return file_util::ComputeDirectorySize( |
171 GetOriginRootPath().AppendASCII("Paths")); | 171 GetOriginRootPath().AppendASCII("Paths")); |
172 } | 172 } |
173 | 173 |
174 FileSystemOperation* FileSystemTestOriginHelper::NewOperation() { | 174 FileSystemOperation* FileSystemTestOriginHelper::NewOperation() { |
175 DCHECK(file_system_context_.get()); | 175 DCHECK(file_system_context_.get()); |
176 DCHECK(file_util_); | 176 DCHECK(file_util_); |
177 FileSystemOperation* operation = | 177 FileSystemOperation* operation = |
178 new FileSystemOperation(base::MessageLoopProxy::current(), | 178 new FileSystemOperation(file_system_context_.get()); |
179 file_system_context_.get()); | |
180 operation->set_override_file_util(file_util_); | 179 operation->set_override_file_util(file_util_); |
181 return operation; | 180 return operation; |
182 } | 181 } |
183 | 182 |
184 FileSystemOperationContext* FileSystemTestOriginHelper::NewOperationContext() { | 183 FileSystemOperationContext* FileSystemTestOriginHelper::NewOperationContext() { |
185 DCHECK(file_system_context_.get()); | 184 DCHECK(file_system_context_.get()); |
186 FileSystemOperationContext* context = | 185 FileSystemOperationContext* context = |
187 new FileSystemOperationContext(file_system_context_.get()); | 186 new FileSystemOperationContext(file_system_context_.get()); |
188 return context; | 187 return context; |
189 } | 188 } |
190 | 189 |
191 } // namespace fileapi | 190 } // namespace fileapi |
OLD | NEW |