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 #ifndef CHROME_BROWSER_SYNC_GLUE_DATA_TYPE_MANAGER_IMPL_H__ | 5 #ifndef CHROME_BROWSER_SYNC_GLUE_DATA_TYPE_MANAGER_IMPL_H__ |
6 #define CHROME_BROWSER_SYNC_GLUE_DATA_TYPE_MANAGER_IMPL_H__ | 6 #define CHROME_BROWSER_SYNC_GLUE_DATA_TYPE_MANAGER_IMPL_H__ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "chrome/browser/sync/glue/data_type_manager.h" | 9 #include "chrome/browser/sync/glue/data_type_manager.h" |
10 | 10 |
(...skipping 27 matching lines...) Expand all Loading... |
38 virtual void ConfigureWithoutNigori( | 38 virtual void ConfigureWithoutNigori( |
39 TypeSet desired_types, | 39 TypeSet desired_types, |
40 sync_api::ConfigureReason reason) OVERRIDE; | 40 sync_api::ConfigureReason reason) OVERRIDE; |
41 | 41 |
42 virtual void Stop() OVERRIDE; | 42 virtual void Stop() OVERRIDE; |
43 virtual State state() const OVERRIDE; | 43 virtual State state() const OVERRIDE; |
44 | 44 |
45 // |ModelAssociationResultProcessor| implementation. | 45 // |ModelAssociationResultProcessor| implementation. |
46 virtual void OnModelAssociationDone( | 46 virtual void OnModelAssociationDone( |
47 const DataTypeManager::ConfigureResult& result) OVERRIDE; | 47 const DataTypeManager::ConfigureResult& result) OVERRIDE; |
| 48 virtual void OnTypesLoaded() OVERRIDE; |
| 49 |
| 50 // Used by unit tests. TODO(sync) : This would go away if we made |
| 51 // this class be able to do Dependency injection. crbug.com/129212. |
| 52 ModelAssociationManager* GetModelAssociationManagerForTesting() { |
| 53 return &model_association_manager_; |
| 54 } |
48 | 55 |
49 private: | 56 private: |
50 // Stops all data types. | 57 // Stops all data types. |
51 void FinishStop(); | 58 void FinishStop(); |
52 void Abort(ConfigureStatus status, | 59 void Abort(ConfigureStatus status, |
53 const SyncError& error); | 60 const SyncError& error); |
54 | 61 |
55 // If there's a pending reconfigure, processes it and returns true. | 62 // If there's a pending reconfigure, processes it and returns true. |
56 // Otherwise, returns false. | 63 // Otherwise, returns false. |
57 bool ProcessReconfigure(); | 64 bool ProcessReconfigure(); |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
110 // been given a chance to start. | 117 // been given a chance to start. |
111 std::list<SyncError> failed_datatypes_info_; | 118 std::list<SyncError> failed_datatypes_info_; |
112 ModelAssociationManager model_association_manager_; | 119 ModelAssociationManager model_association_manager_; |
113 | 120 |
114 DISALLOW_COPY_AND_ASSIGN(DataTypeManagerImpl); | 121 DISALLOW_COPY_AND_ASSIGN(DataTypeManagerImpl); |
115 }; | 122 }; |
116 | 123 |
117 } // namespace browser_sync | 124 } // namespace browser_sync |
118 | 125 |
119 #endif // CHROME_BROWSER_SYNC_GLUE_DATA_TYPE_MANAGER_IMPL_H__ | 126 #endif // CHROME_BROWSER_SYNC_GLUE_DATA_TYPE_MANAGER_IMPL_H__ |
OLD | NEW |