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

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

Issue 9235040: [Sync] Handle errors during first sync gracefully. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Upload before commit. 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) 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 #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 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 const std::string 117 const std::string
118 (&download_progress_markers)[syncable::MODEL_TYPE_COUNT], 118 (&download_progress_markers)[syncable::MODEL_TYPE_COUNT],
119 bool more_to_sync, 119 bool more_to_sync,
120 bool is_silenced, 120 bool is_silenced,
121 int64 unsynced_count, 121 int64 unsynced_count,
122 int num_blocking_conflicting_updates, 122 int num_blocking_conflicting_updates,
123 int num_conflicting_updates, 123 int num_conflicting_updates,
124 bool did_commit_items, 124 bool did_commit_items,
125 const SyncSourceInfo& source, 125 const SyncSourceInfo& source,
126 size_t num_entries, 126 size_t num_entries,
127 base::Time sync_start_time) 127 base::Time sync_start_time,
128 bool retry_scheduled)
128 : syncer_status(syncer_status), 129 : syncer_status(syncer_status),
129 errors(errors), 130 errors(errors),
130 num_server_changes_remaining(num_server_changes_remaining), 131 num_server_changes_remaining(num_server_changes_remaining),
131 is_share_usable(is_share_usable), 132 is_share_usable(is_share_usable),
132 initial_sync_ended(initial_sync_ended), 133 initial_sync_ended(initial_sync_ended),
133 download_progress_markers(), 134 download_progress_markers(),
134 has_more_to_sync(more_to_sync), 135 has_more_to_sync(more_to_sync),
135 is_silenced(is_silenced), 136 is_silenced(is_silenced),
136 unsynced_count(unsynced_count), 137 unsynced_count(unsynced_count),
137 num_blocking_conflicting_updates(num_blocking_conflicting_updates), 138 num_blocking_conflicting_updates(num_blocking_conflicting_updates),
138 num_conflicting_updates(num_conflicting_updates), 139 num_conflicting_updates(num_conflicting_updates),
139 did_commit_items(did_commit_items), 140 did_commit_items(did_commit_items),
140 source(source), 141 source(source),
141 num_entries(num_entries), 142 num_entries(num_entries),
142 sync_start_time(sync_start_time) { 143 sync_start_time(sync_start_time),
144 retry_scheduled(retry_scheduled) {
143 for (int i = syncable::FIRST_REAL_MODEL_TYPE; 145 for (int i = syncable::FIRST_REAL_MODEL_TYPE;
144 i < syncable::MODEL_TYPE_COUNT; ++i) { 146 i < syncable::MODEL_TYPE_COUNT; ++i) {
145 const_cast<std::string&>(this->download_progress_markers[i]).assign( 147 const_cast<std::string&>(this->download_progress_markers[i]).assign(
146 download_progress_markers[i]); 148 download_progress_markers[i]);
147 } 149 }
148 } 150 }
149 151
150 SyncSessionSnapshot::~SyncSessionSnapshot() {} 152 SyncSessionSnapshot::~SyncSessionSnapshot() {}
151 153
152 DictionaryValue* SyncSessionSnapshot::ToValue() const { 154 DictionaryValue* SyncSessionSnapshot::ToValue() const {
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after
386 388
387 PerModelSafeGroupState::PerModelSafeGroupState(bool* dirty_flag) 389 PerModelSafeGroupState::PerModelSafeGroupState(bool* dirty_flag)
388 : conflict_progress(dirty_flag) { 390 : conflict_progress(dirty_flag) {
389 } 391 }
390 392
391 PerModelSafeGroupState::~PerModelSafeGroupState() { 393 PerModelSafeGroupState::~PerModelSafeGroupState() {
392 } 394 }
393 395
394 } // namespace sessions 396 } // namespace sessions
395 } // 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/session_state_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698