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

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

Issue 21097005: Fix up some tests for copy-or-move validator and nearby. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add missing test Created 7 years, 4 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
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 #ifndef WEBKIT_BROWSER_FILEAPI_TEST_FILE_SYSTEM_BACKEND_H_ 5 #ifndef WEBKIT_BROWSER_FILEAPI_TEST_FILE_SYSTEM_BACKEND_H_
6 #define WEBKIT_BROWSER_FILEAPI_TEST_FILE_SYSTEM_BACKEND_H_ 6 #define WEBKIT_BROWSER_FILEAPI_TEST_FILE_SYSTEM_BACKEND_H_
7 7
8 #include "base/files/file_path.h" 8 #include "base/files/file_path.h"
9 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 const FileSystemURL& url, 59 const FileSystemURL& url,
60 int64 offset, 60 int64 offset,
61 FileSystemContext* context) const OVERRIDE; 61 FileSystemContext* context) const OVERRIDE;
62 virtual FileSystemQuotaUtil* GetQuotaUtil() OVERRIDE; 62 virtual FileSystemQuotaUtil* GetQuotaUtil() OVERRIDE;
63 63
64 // Initialize the CopyOrMoveFileValidatorFactory. Invalid to call more than 64 // Initialize the CopyOrMoveFileValidatorFactory. Invalid to call more than
65 // once. 65 // once.
66 void InitializeCopyOrMoveFileValidatorFactory( 66 void InitializeCopyOrMoveFileValidatorFactory(
67 scoped_ptr<CopyOrMoveFileValidatorFactory> factory); 67 scoped_ptr<CopyOrMoveFileValidatorFactory> factory);
68 68
69 // Reset the CopyOrMoveFileValidatorFactory to empty.
vandebo (ex-Chrome) 2013/07/31 22:43:23 Not used.
Greg Billock 2013/08/01 16:23:05 Done.
70 void ResetCopyOrMoveFileValidatorFactory();
71
69 const UpdateObserverList* GetUpdateObservers(FileSystemType type) const; 72 const UpdateObserverList* GetUpdateObservers(FileSystemType type) const;
70 void AddFileChangeObserver(FileChangeObserver* observer); 73 void AddFileChangeObserver(FileChangeObserver* observer);
71 74
72 // For CopyOrMoveFileValidatorFactory testing. Once it's set to true 75 // For CopyOrMoveFileValidatorFactory testing. Once it's set to true
73 // GetCopyOrMoveFileValidatorFactory will start returning security 76 // GetCopyOrMoveFileValidatorFactory will start returning security
74 // error if validator is not initialized. 77 // error if validator is not initialized.
75 void set_require_copy_or_move_validator(bool flag) { 78 void set_require_copy_or_move_validator(bool flag) {
76 require_copy_or_move_validator_ = flag; 79 require_copy_or_move_validator_ = flag;
77 } 80 }
78 81
79 private: 82 private:
80 class QuotaUtil; 83 class QuotaUtil;
81 84
82 base::FilePath base_path_; 85 base::FilePath base_path_;
83 scoped_refptr<base::SequencedTaskRunner> task_runner_; 86 scoped_refptr<base::SequencedTaskRunner> task_runner_;
84 scoped_ptr<AsyncFileUtilAdapter> local_file_util_; 87 scoped_ptr<AsyncFileUtilAdapter> local_file_util_;
85 scoped_ptr<QuotaUtil> quota_util_; 88 scoped_ptr<QuotaUtil> quota_util_;
86 89
87 bool require_copy_or_move_validator_; 90 bool require_copy_or_move_validator_;
88 scoped_ptr<CopyOrMoveFileValidatorFactory> 91 scoped_ptr<CopyOrMoveFileValidatorFactory>
89 copy_or_move_file_validator_factory_; 92 copy_or_move_file_validator_factory_;
90 93
91 DISALLOW_COPY_AND_ASSIGN(TestFileSystemBackend); 94 DISALLOW_COPY_AND_ASSIGN(TestFileSystemBackend);
92 }; 95 };
93 96
94 } // namespace fileapi 97 } // namespace fileapi
95 98
96 #endif // WEBKIT_BROWSER_FILEAPI_TEST_FILE_SYSTEM_BACKEND_H_ 99 #endif // WEBKIT_BROWSER_FILEAPI_TEST_FILE_SYSTEM_BACKEND_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698