Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(181)

Side by Side Diff: webkit/browser/fileapi/test_file_system_backend.cc

Issue 18565002: [FileSystem] Add another copy-or-move validation hook for post-write. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix flakey test Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « webkit/browser/fileapi/copy_or_move_operation_delegate_unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/browser/fileapi/test_file_system_backend.h" 5 #include "webkit/browser/fileapi/test_file_system_backend.h"
6 6
7 #include <set> 7 #include <set>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 if (require_copy_or_move_validator_) { 176 if (require_copy_or_move_validator_) {
177 if (!copy_or_move_file_validator_factory_) 177 if (!copy_or_move_file_validator_factory_)
178 *error_code = base::PLATFORM_FILE_ERROR_SECURITY; 178 *error_code = base::PLATFORM_FILE_ERROR_SECURITY;
179 return copy_or_move_file_validator_factory_.get(); 179 return copy_or_move_file_validator_factory_.get();
180 } 180 }
181 return NULL; 181 return NULL;
182 } 182 }
183 183
184 void TestFileSystemBackend::InitializeCopyOrMoveFileValidatorFactory( 184 void TestFileSystemBackend::InitializeCopyOrMoveFileValidatorFactory(
185 scoped_ptr<CopyOrMoveFileValidatorFactory> factory) { 185 scoped_ptr<CopyOrMoveFileValidatorFactory> factory) {
186 // What purpose is this check serving?
186 if (!require_copy_or_move_validator_) { 187 if (!require_copy_or_move_validator_) {
187 DCHECK(!factory); 188 DCHECK(!factory);
188 return; 189 return;
189 } 190 }
190 if (!copy_or_move_file_validator_factory_) 191 if (!copy_or_move_file_validator_factory_)
191 copy_or_move_file_validator_factory_ = factory.Pass(); 192 copy_or_move_file_validator_factory_ = factory.Pass();
192 } 193 }
193 194
194 FileSystemOperation* TestFileSystemBackend::CreateFileSystemOperation( 195 FileSystemOperation* TestFileSystemBackend::CreateFileSystemOperation(
195 const FileSystemURL& url, 196 const FileSystemURL& url,
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
234 return quota_util_->GetUpdateObservers(type); 235 return quota_util_->GetUpdateObservers(type);
235 } 236 }
236 237
237 void TestFileSystemBackend::AddFileChangeObserver( 238 void TestFileSystemBackend::AddFileChangeObserver(
238 FileChangeObserver* observer) { 239 FileChangeObserver* observer) {
239 quota_util_->AddFileChangeObserver( 240 quota_util_->AddFileChangeObserver(
240 kFileSystemTypeTest, observer, quota_util_->task_runner()); 241 kFileSystemTypeTest, observer, quota_util_->task_runner());
241 } 242 }
242 243
243 } // namespace fileapi 244 } // namespace fileapi
OLDNEW
« no previous file with comments | « webkit/browser/fileapi/copy_or_move_operation_delegate_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698