OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 CHROME_BROWSER_CHROMEOS_DRIVE_FILE_SYSTEM_OPERATION_TEST_BASE_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_DRIVE_FILE_SYSTEM_OPERATION_TEST_BASE_H_ |
6 #define CHROME_BROWSER_CHROMEOS_DRIVE_FILE_SYSTEM_OPERATION_TEST_BASE_H_ | 6 #define CHROME_BROWSER_CHROMEOS_DRIVE_FILE_SYSTEM_OPERATION_TEST_BASE_H_ |
7 | 7 |
8 #include <set> | 8 #include <set> |
9 | 9 |
10 #include "base/files/scoped_temp_dir.h" | 10 #include "base/files/scoped_temp_dir.h" |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 public: | 50 public: |
51 typedef base::Callback<bool( | 51 typedef base::Callback<bool( |
52 const std::string& local_id, | 52 const std::string& local_id, |
53 const FileOperationCallback& callback)> WaitForSyncCompleteHandler; | 53 const FileOperationCallback& callback)> WaitForSyncCompleteHandler; |
54 | 54 |
55 LoggingDelegate(); | 55 LoggingDelegate(); |
56 ~LoggingDelegate(); | 56 ~LoggingDelegate(); |
57 | 57 |
58 // OperationDelegate overrides. | 58 // OperationDelegate overrides. |
59 virtual void OnFileChangedByOperation( | 59 virtual void OnFileChangedByOperation( |
60 const FileChange& changed_files) OVERRIDE; | 60 const FileChange& changed_files) override; |
61 virtual void OnEntryUpdatedByOperation( | 61 virtual void OnEntryUpdatedByOperation( |
62 const std::string& local_id) OVERRIDE; | 62 const std::string& local_id) override; |
63 virtual void OnDriveSyncError(DriveSyncErrorType type, | 63 virtual void OnDriveSyncError(DriveSyncErrorType type, |
64 const std::string& local_id) OVERRIDE; | 64 const std::string& local_id) override; |
65 virtual bool WaitForSyncComplete( | 65 virtual bool WaitForSyncComplete( |
66 const std::string& local_id, | 66 const std::string& local_id, |
67 const FileOperationCallback& callback) OVERRIDE; | 67 const FileOperationCallback& callback) override; |
68 | 68 |
69 // Gets the set of changed paths. | 69 // Gets the set of changed paths. |
70 const FileChange& get_changed_files() { return changed_files_; } | 70 const FileChange& get_changed_files() { return changed_files_; } |
71 | 71 |
72 // Gets the set of updated local IDs. | 72 // Gets the set of updated local IDs. |
73 const std::set<std::string>& updated_local_ids() const { | 73 const std::set<std::string>& updated_local_ids() const { |
74 return updated_local_ids_; | 74 return updated_local_ids_; |
75 } | 75 } |
76 | 76 |
77 // Gets the list of drive sync errors. | 77 // Gets the list of drive sync errors. |
(...skipping 12 matching lines...) Expand all Loading... |
90 std::set<std::string> updated_local_ids_; | 90 std::set<std::string> updated_local_ids_; |
91 std::vector<DriveSyncErrorType> drive_sync_errors_; | 91 std::vector<DriveSyncErrorType> drive_sync_errors_; |
92 WaitForSyncCompleteHandler wait_for_sync_complete_handler_; | 92 WaitForSyncCompleteHandler wait_for_sync_complete_handler_; |
93 }; | 93 }; |
94 | 94 |
95 OperationTestBase(); | 95 OperationTestBase(); |
96 explicit OperationTestBase(int test_thread_bundle_options); | 96 explicit OperationTestBase(int test_thread_bundle_options); |
97 virtual ~OperationTestBase(); | 97 virtual ~OperationTestBase(); |
98 | 98 |
99 // testing::Test overrides. | 99 // testing::Test overrides. |
100 virtual void SetUp() OVERRIDE; | 100 virtual void SetUp() override; |
101 | 101 |
102 // Returns the path of the temporary directory for putting test files. | 102 // Returns the path of the temporary directory for putting test files. |
103 base::FilePath temp_dir() const { return temp_dir_.path(); } | 103 base::FilePath temp_dir() const { return temp_dir_.path(); } |
104 | 104 |
105 // Synchronously gets the resource entry corresponding to the path from local | 105 // Synchronously gets the resource entry corresponding to the path from local |
106 // ResourceMetadta. | 106 // ResourceMetadta. |
107 FileError GetLocalResourceEntry(const base::FilePath& path, | 107 FileError GetLocalResourceEntry(const base::FilePath& path, |
108 ResourceEntry* entry); | 108 ResourceEntry* entry); |
109 | 109 |
110 // Synchronously gets the resource entry corresponding to the ID from local | 110 // Synchronously gets the resource entry corresponding to the ID from local |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
159 metadata_; | 159 metadata_; |
160 scoped_ptr<internal::AboutResourceLoader> about_resource_loader_; | 160 scoped_ptr<internal::AboutResourceLoader> about_resource_loader_; |
161 scoped_ptr<internal::LoaderController> loader_controller_; | 161 scoped_ptr<internal::LoaderController> loader_controller_; |
162 scoped_ptr<internal::ChangeListLoader> change_list_loader_; | 162 scoped_ptr<internal::ChangeListLoader> change_list_loader_; |
163 }; | 163 }; |
164 | 164 |
165 } // namespace file_system | 165 } // namespace file_system |
166 } // namespace drive | 166 } // namespace drive |
167 | 167 |
168 #endif // CHROME_BROWSER_CHROMEOS_DRIVE_FILE_SYSTEM_OPERATION_TEST_BASE_H_ | 168 #endif // CHROME_BROWSER_CHROMEOS_DRIVE_FILE_SYSTEM_OPERATION_TEST_BASE_H_ |
OLD | NEW |