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

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

Issue 1177853002: [Sync] Add ability to save/restore Nigori to SyncEncryptionHandlerImpl (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 6 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 "base/logging.h" 8 #include "base/logging.h"
9 #include "chrome/browser/browser_process.h" 9 #include "chrome/browser/browser_process.h"
10 #include "chrome/browser/chrome_notification_types.h" 10 #include "chrome/browser/chrome_notification_types.h"
(...skipping 811 matching lines...) Expand 10 before | Expand all | Expand 10 after
822 void SyncBackendHostImpl::HandlePassphraseTypeChangedOnFrontendLoop( 822 void SyncBackendHostImpl::HandlePassphraseTypeChangedOnFrontendLoop(
823 syncer::PassphraseType type, 823 syncer::PassphraseType type,
824 base::Time explicit_passphrase_time) { 824 base::Time explicit_passphrase_time) {
825 DCHECK_EQ(base::MessageLoop::current(), frontend_loop_); 825 DCHECK_EQ(base::MessageLoop::current(), frontend_loop_);
826 DVLOG(1) << "Passphrase type changed to " 826 DVLOG(1) << "Passphrase type changed to "
827 << syncer::PassphraseTypeToString(type); 827 << syncer::PassphraseTypeToString(type);
828 cached_passphrase_type_ = type; 828 cached_passphrase_type_ = type;
829 cached_explicit_passphrase_time_ = explicit_passphrase_time; 829 cached_explicit_passphrase_time_ = explicit_passphrase_time;
830 } 830 }
831 831
832 void SyncBackendHostImpl::HandleLocalSetCustomPassphraseOnFrontendLoop(
833 const syncer::SyncEncryptionHandler::NigoriState& nigori_state) {
834 DCHECK_EQ(base::MessageLoop::current(), frontend_loop_);
835 frontend_->OnLocalSetCustomPassphrase(nigori_state);
836 }
837
832 void SyncBackendHostImpl::HandleConnectionStatusChangeOnFrontendLoop( 838 void SyncBackendHostImpl::HandleConnectionStatusChangeOnFrontendLoop(
833 syncer::ConnectionStatus status) { 839 syncer::ConnectionStatus status) {
834 if (!frontend_) 840 if (!frontend_)
835 return; 841 return;
836 842
837 DCHECK_EQ(base::MessageLoop::current(), frontend_loop_); 843 DCHECK_EQ(base::MessageLoop::current(), frontend_loop_);
838 844
839 DVLOG(1) << "Connection status changed: " 845 DVLOG(1) << "Connection status changed: "
840 << syncer::ConnectionStatusToString(status); 846 << syncer::ConnectionStatusToString(status);
841 frontend_->OnConnectionStatusChange(status); 847 frontend_->OnConnectionStatusChange(status);
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
875 881
876 base::MessageLoop* SyncBackendHostImpl::GetSyncLoopForTesting() { 882 base::MessageLoop* SyncBackendHostImpl::GetSyncLoopForTesting() {
877 return registrar_->sync_thread()->message_loop(); 883 return registrar_->sync_thread()->message_loop();
878 } 884 }
879 885
880 } // namespace browser_sync 886 } // namespace browser_sync
881 887
882 #undef SDVLOG 888 #undef SDVLOG
883 889
884 #undef SLOG 890 #undef SLOG
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698