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