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_H__ | 5 #ifndef CHROME_BROWSER_SYNC_GLUE_DATA_TYPE_MANAGER_H__ |
6 #define CHROME_BROWSER_SYNC_GLUE_DATA_TYPE_MANAGER_H__ | 6 #define CHROME_BROWSER_SYNC_GLUE_DATA_TYPE_MANAGER_H__ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <list> | 9 #include <list> |
10 #include <set> | 10 #include <set> |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 | 52 |
53 typedef syncable::ModelTypeSet TypeSet; | 53 typedef syncable::ModelTypeSet TypeSet; |
54 | 54 |
55 // Note: |errors| is only filled when status is not OK. | 55 // Note: |errors| is only filled when status is not OK. |
56 struct ConfigureResult { | 56 struct ConfigureResult { |
57 ConfigureResult(); | 57 ConfigureResult(); |
58 ConfigureResult(ConfigureStatus status, | 58 ConfigureResult(ConfigureStatus status, |
59 TypeSet requested_types); | 59 TypeSet requested_types); |
60 ConfigureResult(ConfigureStatus status, | 60 ConfigureResult(ConfigureStatus status, |
61 TypeSet requested_types, | 61 TypeSet requested_types, |
62 const std::list<SyncError>& failed_data_types, | 62 const std::list<csync::SyncError>& failed_data_types, |
63 syncable::ModelTypeSet waiting_to_start); | 63 syncable::ModelTypeSet waiting_to_start); |
64 ~ConfigureResult(); | 64 ~ConfigureResult(); |
65 ConfigureStatus status; | 65 ConfigureStatus status; |
66 TypeSet requested_types; | 66 TypeSet requested_types; |
67 | 67 |
68 // These types encountered a failure in association. | 68 // These types encountered a failure in association. |
69 std::list<SyncError> failed_data_types; | 69 std::list<csync::SyncError> failed_data_types; |
70 | 70 |
71 // List of types that failed to start association with in our alloted | 71 // List of types that failed to start association with in our alloted |
72 // time period(see kDataTypeLoadWaitTimeInSeconds). We move | 72 // time period(see kDataTypeLoadWaitTimeInSeconds). We move |
73 // forward here and allow these types to continue loading in the | 73 // forward here and allow these types to continue loading in the |
74 // background. When these types are loaded DataTypeManager will | 74 // background. When these types are loaded DataTypeManager will |
75 // be informed and another configured cycle will be started. | 75 // be informed and another configured cycle will be started. |
76 syncable::ModelTypeSet waiting_to_start; | 76 syncable::ModelTypeSet waiting_to_start; |
77 }; | 77 }; |
78 | 78 |
79 virtual ~DataTypeManager() {} | 79 virtual ~DataTypeManager() {} |
(...skipping 25 matching lines...) Expand all Loading... |
105 // stopped. | 105 // stopped. |
106 virtual void Stop() = 0; | 106 virtual void Stop() = 0; |
107 | 107 |
108 // The current state of the data type manager. | 108 // The current state of the data type manager. |
109 virtual State state() const = 0; | 109 virtual State state() const = 0; |
110 }; | 110 }; |
111 | 111 |
112 } // namespace browser_sync | 112 } // namespace browser_sync |
113 | 113 |
114 #endif // CHROME_BROWSER_SYNC_GLUE_DATA_TYPE_MANAGER_H__ | 114 #endif // CHROME_BROWSER_SYNC_GLUE_DATA_TYPE_MANAGER_H__ |
OLD | NEW |