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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
47 LoggingObserver(); | 47 LoggingObserver(); |
48 ~LoggingObserver(); | 48 ~LoggingObserver(); |
49 | 49 |
50 // OperationObserver overrides. | 50 // OperationObserver overrides. |
51 virtual void OnDirectoryChangedByOperation( | 51 virtual void OnDirectoryChangedByOperation( |
52 const base::FilePath& path) OVERRIDE; | 52 const base::FilePath& path) OVERRIDE; |
53 virtual void OnCacheFileUploadNeededByOperation( | 53 virtual void OnCacheFileUploadNeededByOperation( |
54 const std::string& local_id) OVERRIDE; | 54 const std::string& local_id) OVERRIDE; |
55 virtual void OnEntryUpdatedByOperation( | 55 virtual void OnEntryUpdatedByOperation( |
56 const std::string& local_id) OVERRIDE; | 56 const std::string& local_id) OVERRIDE; |
| 57 virtual void OnDriveSyncError(DriveSyncErrorType type) OVERRIDE; |
57 | 58 |
58 // Gets the set of changed paths. | 59 // Gets the set of changed paths. |
59 const std::set<base::FilePath>& get_changed_paths() { | 60 const std::set<base::FilePath>& get_changed_paths() { |
60 return changed_paths_; | 61 return changed_paths_; |
61 } | 62 } |
62 | 63 |
63 // Gets the set of upload needed local IDs. | 64 // Gets the set of upload needed local IDs. |
64 const std::set<std::string>& upload_needed_local_ids() const { | 65 const std::set<std::string>& upload_needed_local_ids() const { |
65 return upload_needed_local_ids_; | 66 return upload_needed_local_ids_; |
66 } | 67 } |
67 | 68 |
68 // Gets the set of updated local IDs. | 69 // Gets the set of updated local IDs. |
69 const std::set<std::string>& updated_local_ids() const { | 70 const std::set<std::string>& updated_local_ids() const { |
70 return updated_local_ids_; | 71 return updated_local_ids_; |
71 } | 72 } |
72 | 73 |
| 74 // Gets the list of drive sync errors. |
| 75 const std::vector<DriveSyncErrorType> drive_sync_errors() const { |
| 76 return drive_sync_errors_; |
| 77 } |
| 78 |
73 private: | 79 private: |
74 std::set<base::FilePath> changed_paths_; | 80 std::set<base::FilePath> changed_paths_; |
75 std::set<std::string> upload_needed_local_ids_; | 81 std::set<std::string> upload_needed_local_ids_; |
76 std::set<std::string> updated_local_ids_; | 82 std::set<std::string> updated_local_ids_; |
| 83 std::vector<DriveSyncErrorType> drive_sync_errors_; |
77 }; | 84 }; |
78 | 85 |
79 OperationTestBase(); | 86 OperationTestBase(); |
80 explicit OperationTestBase(int test_thread_bundle_options); | 87 explicit OperationTestBase(int test_thread_bundle_options); |
81 virtual ~OperationTestBase(); | 88 virtual ~OperationTestBase(); |
82 | 89 |
83 // testing::Test overrides. | 90 // testing::Test overrides. |
84 virtual void SetUp() OVERRIDE; | 91 virtual void SetUp() OVERRIDE; |
85 | 92 |
86 // Returns the path of the temporary directory for putting test files. | 93 // Returns the path of the temporary directory for putting test files. |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
133 metadata_; | 140 metadata_; |
134 scoped_ptr<FakeFreeDiskSpaceGetter> fake_free_disk_space_getter_; | 141 scoped_ptr<FakeFreeDiskSpaceGetter> fake_free_disk_space_getter_; |
135 scoped_ptr<internal::FileCache, test_util::DestroyHelperForTests> cache_; | 142 scoped_ptr<internal::FileCache, test_util::DestroyHelperForTests> cache_; |
136 scoped_ptr<internal::ChangeListLoader> change_list_loader_; | 143 scoped_ptr<internal::ChangeListLoader> change_list_loader_; |
137 }; | 144 }; |
138 | 145 |
139 } // namespace file_system | 146 } // namespace file_system |
140 } // namespace drive | 147 } // namespace drive |
141 | 148 |
142 #endif // CHROME_BROWSER_CHROMEOS_DRIVE_FILE_SYSTEM_OPERATION_TEST_BASE_H_ | 149 #endif // CHROME_BROWSER_CHROMEOS_DRIVE_FILE_SYSTEM_OPERATION_TEST_BASE_H_ |
OLD | NEW |