| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/sessions/session_state.h" | 5 #include "chrome/browser/sync/sessions/session_state.h" |
| 6 | 6 |
| 7 #include <map> | 7 #include <map> |
| 8 #include <set> | 8 #include <set> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <utility> | 10 #include <utility> |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 88 value->SetString( | 88 value->SetString( |
| 89 syncable::ModelTypeToString(syncable::ModelTypeFromInt(i)), | 89 syncable::ModelTypeToString(syncable::ModelTypeFromInt(i)), |
| 90 base64_marker); | 90 base64_marker); |
| 91 } | 91 } |
| 92 return value; | 92 return value; |
| 93 } | 93 } |
| 94 | 94 |
| 95 ErrorCounters::ErrorCounters() | 95 ErrorCounters::ErrorCounters() |
| 96 : num_conflicting_commits(0), | 96 : num_conflicting_commits(0), |
| 97 consecutive_transient_error_commits(0), | 97 consecutive_transient_error_commits(0), |
| 98 consecutive_errors(0) { | 98 consecutive_errors(0), |
| 99 download_updates_result(UNSET), |
| 100 post_commit_result(UNSET), |
| 101 process_commit_response_result(UNSET) { |
| 99 } | 102 } |
| 100 | 103 |
| 101 DictionaryValue* ErrorCounters::ToValue() const { | 104 DictionaryValue* ErrorCounters::ToValue() const { |
| 102 DictionaryValue* value = new DictionaryValue(); | 105 DictionaryValue* value = new DictionaryValue(); |
| 103 value->SetInteger("numConflictingCommits", num_conflicting_commits); | 106 value->SetInteger("numConflictingCommits", num_conflicting_commits); |
| 104 value->SetInteger("consecutiveTransientErrorCommits", | 107 value->SetInteger("consecutiveTransientErrorCommits", |
| 105 consecutive_transient_error_commits); | 108 consecutive_transient_error_commits); |
| 106 value->SetInteger("consecutiveErrors", consecutive_errors); | 109 value->SetInteger("consecutiveErrors", consecutive_errors); |
| 107 return value; | 110 return value; |
| 108 } | 111 } |
| (...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 385 | 388 |
| 386 PerModelSafeGroupState::PerModelSafeGroupState(bool* dirty_flag) | 389 PerModelSafeGroupState::PerModelSafeGroupState(bool* dirty_flag) |
| 387 : conflict_progress(dirty_flag) { | 390 : conflict_progress(dirty_flag) { |
| 388 } | 391 } |
| 389 | 392 |
| 390 PerModelSafeGroupState::~PerModelSafeGroupState() { | 393 PerModelSafeGroupState::~PerModelSafeGroupState() { |
| 391 } | 394 } |
| 392 | 395 |
| 393 } // namespace sessions | 396 } // namespace sessions |
| 394 } // namespace browser_sync | 397 } // namespace browser_sync |
| OLD | NEW |