OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 "chrome/browser/sync/engine/syncer_proto_util.h" | 5 #include "chrome/browser/sync/engine/syncer_proto_util.h" |
6 | 6 |
7 #include "chrome/browser/sync/engine/net/server_connection_manager.h" | 7 #include "chrome/browser/sync/engine/net/server_connection_manager.h" |
8 #include "chrome/browser/sync/engine/syncer.h" | 8 #include "chrome/browser/sync/engine/syncer.h" |
9 #include "chrome/browser/sync/engine/syncer_util.h" | 9 #include "chrome/browser/sync/engine/syncer_util.h" |
10 #include "chrome/browser/sync/protocol/service_constants.h" | 10 #include "chrome/browser/sync/protocol/service_constants.h" |
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
154 break; | 154 break; |
155 case ClientToServerResponse::NOT_MY_BIRTHDAY: | 155 case ClientToServerResponse::NOT_MY_BIRTHDAY: |
156 LOG(WARNING) << "Not my birthday return."; | 156 LOG(WARNING) << "Not my birthday return."; |
157 rv = false; | 157 rv = false; |
158 break; | 158 break; |
159 case ClientToServerResponse::THROTTLED: | 159 case ClientToServerResponse::THROTTLED: |
160 LOG(WARNING) << "Client silenced by server."; | 160 LOG(WARNING) << "Client silenced by server."; |
161 session->set_silenced_until(time(0) + kSyncDelayAfterThrottled); | 161 session->set_silenced_until(time(0) + kSyncDelayAfterThrottled); |
162 rv = false; | 162 rv = false; |
163 break; | 163 break; |
| 164 default: |
| 165 NOTREACHED(); |
| 166 break; |
164 } | 167 } |
165 | 168 |
166 } else if (session->connection_manager()->IsServerReachable()) { | 169 } else if (session->connection_manager()->IsServerReachable()) { |
167 status.TallyNewError(); | 170 status.TallyNewError(); |
168 } | 171 } |
169 return rv; | 172 return rv; |
170 } | 173 } |
171 | 174 |
172 // static | 175 // static |
173 bool SyncerProtoUtil::Compare(const syncable::Entry& local_entry, | 176 bool SyncerProtoUtil::Compare(const syncable::Entry& local_entry, |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
263 if (entry.has_non_unique_name()) { | 266 if (entry.has_non_unique_name()) { |
264 AppendUTF8ToPathString(entry.non_unique_name(), | 267 AppendUTF8ToPathString(entry.non_unique_name(), |
265 &result.non_unique_value()); | 268 &result.non_unique_value()); |
266 } else { | 269 } else { |
267 result.non_unique_value() = result.value(); | 270 result.non_unique_value() = result.value(); |
268 } | 271 } |
269 return result; | 272 return result; |
270 } | 273 } |
271 | 274 |
272 } // namespace browser_sync | 275 } // namespace browser_sync |
OLD | NEW |