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 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
170 return file_util::ComputeDirectorySize( | 170 return file_util::ComputeDirectorySize( |
171 GetOriginRootPath().AppendASCII("Paths")); | 171 GetOriginRootPath().AppendASCII("Paths")); |
172 } | 172 } |
173 | 173 |
174 LocalFileSystemOperation* LocalFileSystemTestOriginHelper::NewOperation() { | 174 LocalFileSystemOperation* LocalFileSystemTestOriginHelper::NewOperation() { |
175 DCHECK(file_system_context_.get()); | 175 DCHECK(file_system_context_.get()); |
176 DCHECK(file_util_); | 176 DCHECK(file_util_); |
177 scoped_ptr<FileSystemOperationContext> operation_context( | 177 scoped_ptr<FileSystemOperationContext> operation_context( |
178 NewOperationContext()); | 178 NewOperationContext()); |
179 LocalFileSystemOperation* operation = static_cast<LocalFileSystemOperation*>( | 179 LocalFileSystemOperation* operation = static_cast<LocalFileSystemOperation*>( |
180 file_system_context_->CreateFileSystemOperation(CreateURL(FilePath()))); | 180 file_system_context_->CreateFileSystemOperation( |
| 181 CreateURL(FilePath()), NULL)); |
181 operation->set_override_file_util(file_util_); | 182 operation->set_override_file_util(file_util_); |
182 return operation; | 183 return operation; |
183 } | 184 } |
184 | 185 |
185 FileSystemOperationContext* | 186 FileSystemOperationContext* |
186 LocalFileSystemTestOriginHelper::NewOperationContext() { | 187 LocalFileSystemTestOriginHelper::NewOperationContext() { |
187 DCHECK(file_system_context_.get()); | 188 DCHECK(file_system_context_.get()); |
188 FileSystemOperationContext* context = | 189 FileSystemOperationContext* context = |
189 new FileSystemOperationContext(file_system_context_.get()); | 190 new FileSystemOperationContext(file_system_context_.get()); |
190 context->set_update_observers( | 191 context->set_update_observers( |
191 *file_system_context_->GetUpdateObservers(type_)); | 192 *file_system_context_->GetUpdateObservers(type_)); |
192 return context; | 193 return context; |
193 } | 194 } |
194 | 195 |
195 } // namespace fileapi | 196 } // namespace fileapi |
OLD | NEW |