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

Side by Side Diff: chrome/browser/sync/sessions/sync_session.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/sync_session.h" 5 #include "chrome/browser/sync/sessions/sync_session.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "chrome/browser/sync/syncable/directory_manager.h" 10 #include "chrome/browser/sync/syncable/directory_manager.h"
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 initial_sync_ended, 158 initial_sync_ended,
159 download_progress_markers, 159 download_progress_markers,
160 HasMoreToSync(), 160 HasMoreToSync(),
161 delegate_->IsSyncingCurrentlySilenced(), 161 delegate_->IsSyncingCurrentlySilenced(),
162 status_controller_->unsynced_handles().size(), 162 status_controller_->unsynced_handles().size(),
163 status_controller_->TotalNumBlockingConflictingItems(), 163 status_controller_->TotalNumBlockingConflictingItems(),
164 status_controller_->TotalNumConflictingItems(), 164 status_controller_->TotalNumConflictingItems(),
165 status_controller_->did_commit_items(), 165 status_controller_->did_commit_items(),
166 source_, 166 source_,
167 dir->GetEntriesCount(), 167 dir->GetEntriesCount(),
168 status_controller_->sync_start_time()); 168 status_controller_->sync_start_time(),
169 !Succeeded());
169 } 170 }
170 171
171 void SyncSession::SendEventNotification(SyncEngineEvent::EventCause cause) { 172 void SyncSession::SendEventNotification(SyncEngineEvent::EventCause cause) {
172 SyncEngineEvent event(cause); 173 SyncEngineEvent event(cause);
173 const SyncSessionSnapshot& snapshot = TakeSnapshot(); 174 const SyncSessionSnapshot& snapshot = TakeSnapshot();
174 event.snapshot = &snapshot; 175 event.snapshot = &snapshot;
175 176
176 DVLOG(1) << "Sending event with snapshot: " << snapshot.ToString(); 177 DVLOG(1) << "Sending event with snapshot: " << snapshot.ToString();
177 context()->NotifyListeners(event); 178 context()->NotifyListeners(event);
178 } 179 }
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
251 IsError(status_controller_->error().last_post_commit_result); 252 IsError(status_controller_->error().last_post_commit_result);
252 const bool process_commit_response_error = 253 const bool process_commit_response_error =
253 IsError(status_controller_->error().last_process_commit_response_result); 254 IsError(status_controller_->error().last_process_commit_response_result);
254 return !download_updates_error 255 return !download_updates_error
255 && !post_commit_error 256 && !post_commit_error
256 && !process_commit_response_error; 257 && !process_commit_response_error;
257 } 258 }
258 259
259 } // namespace sessions 260 } // namespace sessions
260 } // namespace browser_sync 261 } // namespace browser_sync
OLDNEW
« no previous file with comments | « chrome/browser/sync/sessions/session_state_unittest.cc ('k') | chrome/browser/sync/test_profile_sync_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698