Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(145)

Side by Side Diff: chrome/browser/sync/sessions/session_state.cc

Issue 9158004: Detect sync server communication errors (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Update for review comments Created 8 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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 last_download_updates_result(UNSET),
100 last_post_commit_result(UNSET),
101 last_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
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
OLDNEW
« no previous file with comments | « chrome/browser/sync/sessions/session_state.h ('k') | chrome/browser/sync/sessions/status_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698