OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #include "components/sync/driver/data_type_status_table.h" |
| 6 |
5 #include "components/sync/driver/data_type_manager.h" | 7 #include "components/sync/driver/data_type_manager.h" |
6 #include "components/sync/driver/data_type_status_table.h" | |
7 | 8 |
8 namespace sync_driver { | 9 namespace sync_driver { |
9 | 10 |
10 namespace { | 11 namespace { |
11 | 12 |
12 syncer::ModelTypeSet GetTypesFromErrorMap( | 13 syncer::ModelTypeSet GetTypesFromErrorMap( |
13 const DataTypeStatusTable::TypeErrorMap& errors) { | 14 const DataTypeStatusTable::TypeErrorMap& errors) { |
14 syncer::ModelTypeSet result; | 15 syncer::ModelTypeSet result; |
15 for (DataTypeStatusTable::TypeErrorMap::const_iterator it = errors.begin(); | 16 for (DataTypeStatusTable::TypeErrorMap::const_iterator it = errors.begin(); |
16 it != errors.end(); ++it) { | 17 it != errors.end(); ++it) { |
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
135 syncer::SyncError DataTypeStatusTable::GetUnrecoverableError() const { | 136 syncer::SyncError DataTypeStatusTable::GetUnrecoverableError() const { |
136 // Just return the first one. It is assumed all the unrecoverable errors | 137 // Just return the first one. It is assumed all the unrecoverable errors |
137 // have the same cause. The others are just tracked to know which types | 138 // have the same cause. The others are just tracked to know which types |
138 // were involved. | 139 // were involved. |
139 return (unrecoverable_errors_.empty() | 140 return (unrecoverable_errors_.empty() |
140 ? syncer::SyncError() | 141 ? syncer::SyncError() |
141 : unrecoverable_errors_.begin()->second); | 142 : unrecoverable_errors_.begin()->second); |
142 } | 143 } |
143 | 144 |
144 } // namespace sync_driver | 145 } // namespace sync_driver |
OLD | NEW |