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

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

Issue 159773006: [invalidations] Added table with registered objectsIds (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@about_invalidations_clean
Patch Set: Change constness of iterators for android clang Created 6 years, 10 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/glue/sync_backend_host_impl.h" 5 #include "chrome/browser/sync/glue/sync_backend_host_impl.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "chrome/browser/chrome_notification_types.h" 8 #include "chrome/browser/chrome_notification_types.h"
9 #include "chrome/browser/invalidation/invalidation_service.h" 9 #include "chrome/browser/invalidation/invalidation_service.h"
10 #include "chrome/browser/invalidation/invalidation_service_factory.h" 10 #include "chrome/browser/invalidation/invalidation_service_factory.h"
(...skipping 644 matching lines...) Expand 10 before | Expand all | Expand 10 after
655 655
656 void SyncBackendHostImpl::OnIncomingInvalidation( 656 void SyncBackendHostImpl::OnIncomingInvalidation(
657 const syncer::ObjectIdInvalidationMap& invalidation_map) { 657 const syncer::ObjectIdInvalidationMap& invalidation_map) {
658 registrar_->sync_thread()->message_loop()->PostTask( 658 registrar_->sync_thread()->message_loop()->PostTask(
659 FROM_HERE, 659 FROM_HERE,
660 base::Bind(&SyncBackendHostCore::DoOnIncomingInvalidation, 660 base::Bind(&SyncBackendHostCore::DoOnIncomingInvalidation,
661 core_.get(), 661 core_.get(),
662 invalidation_map)); 662 invalidation_map));
663 } 663 }
664 664
665 std::string SyncBackendHostImpl::GetOwnerName() const {
666 return "SyncBackendHostImpl";
667 }
668
665 bool SyncBackendHostImpl::CheckPassphraseAgainstCachedPendingKeys( 669 bool SyncBackendHostImpl::CheckPassphraseAgainstCachedPendingKeys(
666 const std::string& passphrase) const { 670 const std::string& passphrase) const {
667 DCHECK(cached_pending_keys_.has_blob()); 671 DCHECK(cached_pending_keys_.has_blob());
668 DCHECK(!passphrase.empty()); 672 DCHECK(!passphrase.empty());
669 syncer::Nigori nigori; 673 syncer::Nigori nigori;
670 nigori.InitByDerivation("localhost", "dummy", passphrase); 674 nigori.InitByDerivation("localhost", "dummy", passphrase);
671 std::string plaintext; 675 std::string plaintext;
672 bool result = nigori.Decrypt(cached_pending_keys_.blob(), &plaintext); 676 bool result = nigori.Decrypt(cached_pending_keys_.blob(), &plaintext);
673 DVLOG_IF(1, result) << "Passphrase failed to decrypt pending keys."; 677 DVLOG_IF(1, result) << "Passphrase failed to decrypt pending keys.";
674 return result; 678 return result;
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
743 base::MessageLoop* SyncBackendHostImpl::GetSyncLoopForTesting() { 747 base::MessageLoop* SyncBackendHostImpl::GetSyncLoopForTesting() {
744 return registrar_->sync_thread()->message_loop(); 748 return registrar_->sync_thread()->message_loop();
745 } 749 }
746 750
747 } // namespace browser_sync 751 } // namespace browser_sync
748 752
749 #undef SDVLOG 753 #undef SDVLOG
750 754
751 #undef SLOG 755 #undef SLOG
752 756
OLDNEW
« no previous file with comments | « chrome/browser/sync/glue/sync_backend_host_impl.h ('k') | chrome/browser/ui/webui/invalidations_message_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698