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

Side by Side Diff: chrome/browser/sync/glue/sync_backend_host.cc

Issue 7861013: Fix the false-positive detection of commit errors (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Another attempt at detecting errors Created 9 years, 2 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 "build/build_config.h" 5 #include "build/build_config.h"
6 6
7 #include "chrome/browser/sync/glue/sync_backend_host.h" 7 #include "chrome/browser/sync/glue/sync_backend_host.h"
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <map> 10 #include <map>
(...skipping 448 matching lines...) Expand 10 before | Expand all | Expand 10 after
459 if (!sync_loop_) 459 if (!sync_loop_)
460 return; 460 return;
461 DCHECK_EQ(MessageLoop::current(), sync_loop_); 461 DCHECK_EQ(MessageLoop::current(), sync_loop_);
462 host_->frontend_loop_->PostTask( 462 host_->frontend_loop_->PostTask(
463 FROM_HERE, 463 FROM_HERE,
464 NewRunnableMethod(this, &Core::NotifyEncryptionComplete, 464 NewRunnableMethod(this, &Core::NotifyEncryptionComplete,
465 encrypted_types)); 465 encrypted_types));
466 } 466 }
467 467
468 void SyncBackendHost::Core::OnActionableError( 468 void SyncBackendHost::Core::OnActionableError(
469 const browser_sync::SyncProtocolError& sync_error) { 469 const browser_sync::SyncOperationResult& sync_error) {
470 if (!sync_loop_) 470 if (!sync_loop_)
471 return; 471 return;
472 DCHECK_EQ(MessageLoop::current(), sync_loop_); 472 DCHECK_EQ(MessageLoop::current(), sync_loop_);
473 host_->frontend_loop_->PostTask( 473 host_->frontend_loop_->PostTask(
474 FROM_HERE, 474 FROM_HERE,
475 NewRunnableMethod(this, &Core::HandleActionableErrorEventOnFrontendLoop, 475 NewRunnableMethod(this, &Core::HandleActionableErrorEventOnFrontendLoop,
476 sync_error)); 476 sync_error));
477 } 477 }
478 478
479 SyncBackendHost::Core::DoInitializeOptions::DoInitializeOptions( 479 SyncBackendHost::Core::DoInitializeOptions::DoInitializeOptions(
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
676 base::TimeDelta::FromSeconds(kSaveChangesIntervalSeconds), 676 base::TimeDelta::FromSeconds(kSaveChangesIntervalSeconds),
677 this, &Core::SaveChanges); 677 this, &Core::SaveChanges);
678 } 678 }
679 679
680 void SyncBackendHost::Core::SaveChanges() { 680 void SyncBackendHost::Core::SaveChanges() {
681 DCHECK_EQ(MessageLoop::current(), sync_loop_); 681 DCHECK_EQ(MessageLoop::current(), sync_loop_);
682 sync_manager_->SaveChanges(); 682 sync_manager_->SaveChanges();
683 } 683 }
684 684
685 void SyncBackendHost::Core::HandleActionableErrorEventOnFrontendLoop( 685 void SyncBackendHost::Core::HandleActionableErrorEventOnFrontendLoop(
686 const browser_sync::SyncProtocolError& sync_error) { 686 const browser_sync::SyncOperationResult& sync_error) {
687 if (!host_ || !host_->frontend_) 687 if (!host_ || !host_->frontend_)
688 return; 688 return;
689 DCHECK_EQ(MessageLoop::current(), host_->frontend_loop_); 689 DCHECK_EQ(MessageLoop::current(), host_->frontend_loop_);
690 host_->frontend_->OnActionableError(sync_error); 690 host_->frontend_->OnActionableError(sync_error);
691 } 691 }
692 692
693 void SyncBackendHost::Core::HandleAuthErrorEventOnFrontendLoop( 693 void SyncBackendHost::Core::HandleAuthErrorEventOnFrontendLoop(
694 const GoogleServiceAuthError& new_auth_error) { 694 const GoogleServiceAuthError& new_auth_error) {
695 if (!host_ || !host_->frontend_) 695 if (!host_ || !host_->frontend_)
696 return; 696 return;
(...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after
969 FROM_HERE, 969 FROM_HERE,
970 base::Bind(&SyncBackendHost::Core::DoRefreshEncryption, 970 base::Bind(&SyncBackendHost::Core::DoRefreshEncryption,
971 core_.get(), sync_thread_done_callback)); 971 core_.get(), sync_thread_done_callback));
972 } 972 }
973 973
974 #undef SVLOG 974 #undef SVLOG
975 975
976 #undef SLOG 976 #undef SLOG
977 977
978 } // namespace browser_sync 978 } // namespace browser_sync
OLDNEW
« no previous file with comments | « chrome/browser/sync/glue/sync_backend_host.h ('k') | chrome/browser/sync/internal_api/sync_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698