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

Side by Side Diff: chrome/browser/sync/glue/sync_backend_host_core.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_core.h" 5 #include "chrome/browser/sync/glue/sync_backend_host_core.h"
6 6
7 #include "base/files/file_util.h" 7 #include "base/files/file_util.h"
8 #include "base/metrics/histogram.h" 8 #include "base/metrics/histogram.h"
9 #include "chrome/browser/sync/glue/invalidation_adapter.h" 9 #include "chrome/browser/sync/glue/invalidation_adapter.h"
10 #include "chrome/browser/sync/glue/local_device_info_provider_impl.h" 10 #include "chrome/browser/sync/glue/local_device_info_provider_impl.h"
(...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after
290 } 290 }
291 291
292 void SyncBackendHostCore::OnPassphraseTypeChanged( 292 void SyncBackendHostCore::OnPassphraseTypeChanged(
293 syncer::PassphraseType type, base::Time passphrase_time) { 293 syncer::PassphraseType type, base::Time passphrase_time) {
294 host_.Call( 294 host_.Call(
295 FROM_HERE, 295 FROM_HERE,
296 &SyncBackendHostImpl::HandlePassphraseTypeChangedOnFrontendLoop, 296 &SyncBackendHostImpl::HandlePassphraseTypeChangedOnFrontendLoop,
297 type, passphrase_time); 297 type, passphrase_time);
298 } 298 }
299 299
300 void SyncBackendHostCore::OnLocalSetCustomPassphrase(
301 const syncer::SyncEncryptionHandler::NigoriState& nigori_state) {
302 host_.Call(FROM_HERE,
303 &SyncBackendHostImpl::HandleLocalSetCustomPassphraseOnFrontendLoop,
304 nigori_state);
305 }
306
300 void SyncBackendHostCore::OnCommitCountersUpdated( 307 void SyncBackendHostCore::OnCommitCountersUpdated(
301 syncer::ModelType type, 308 syncer::ModelType type,
302 const syncer::CommitCounters& counters) { 309 const syncer::CommitCounters& counters) {
303 host_.Call( 310 host_.Call(
304 FROM_HERE, 311 FROM_HERE,
305 &SyncBackendHostImpl::HandleDirectoryCommitCountersUpdatedOnFrontendLoop, 312 &SyncBackendHostImpl::HandleDirectoryCommitCountersUpdatedOnFrontendLoop,
306 type, counters); 313 type, counters);
307 } 314 }
308 315
309 void SyncBackendHostCore::OnUpdateCountersUpdated( 316 void SyncBackendHostCore::OnUpdateCountersUpdated(
(...skipping 412 matching lines...) Expand 10 before | Expand all | Expand 10 after
722 base::TimeDelta::FromSeconds(kSaveChangesIntervalSeconds), 729 base::TimeDelta::FromSeconds(kSaveChangesIntervalSeconds),
723 this, &SyncBackendHostCore::SaveChanges); 730 this, &SyncBackendHostCore::SaveChanges);
724 } 731 }
725 732
726 void SyncBackendHostCore::SaveChanges() { 733 void SyncBackendHostCore::SaveChanges() {
727 DCHECK_EQ(base::MessageLoop::current(), sync_loop_); 734 DCHECK_EQ(base::MessageLoop::current(), sync_loop_);
728 sync_manager_->SaveChanges(); 735 sync_manager_->SaveChanges();
729 } 736 }
730 737
731 } // namespace browser_sync 738 } // namespace browser_sync
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698