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

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

Issue 367153005: Sync: Refactoring of DEVICE_INFO syncable type - Part 1 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed build issues in browser_tests Created 6 years, 5 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/file_util.h" 7 #include "base/file_util.h"
8 #include "base/metrics/histogram.h" 8 #include "base/metrics/histogram.h"
9 #include "chrome/browser/sync/glue/device_info.h" 9 #include "chrome/browser/sync/glue/device_info.h"
10 #include "chrome/browser/sync/glue/sync_backend_registrar.h" 10 #include "chrome/browser/sync/glue/sync_backend_registrar.h"
(...skipping 480 matching lines...) Expand 10 before | Expand all | Expand 10 after
491 491
492 registrar_->ActivateDataType(syncer::DEVICE_INFO, 492 registrar_->ActivateDataType(syncer::DEVICE_INFO,
493 syncer::GROUP_PASSIVE, 493 syncer::GROUP_PASSIVE,
494 synced_device_tracker_.get(), 494 synced_device_tracker_.get(),
495 sync_manager_->GetUserShare()); 495 sync_manager_->GetUserShare());
496 496
497 host_.Call(FROM_HERE, 497 host_.Call(FROM_HERE,
498 &SyncBackendHostImpl::HandleInitializationSuccessOnFrontendLoop, 498 &SyncBackendHostImpl::HandleInitializationSuccessOnFrontendLoop,
499 js_backend_, 499 js_backend_,
500 debug_info_listener_, 500 debug_info_listener_,
501 sync_manager_->GetSyncContextProxy()); 501 sync_manager_->GetSyncContextProxy(),
502 sync_manager_->cache_guid());
502 503
503 js_backend_.Reset(); 504 js_backend_.Reset();
504 debug_info_listener_.Reset(); 505 debug_info_listener_.Reset();
505 } 506 }
506 507
507 void SyncBackendHostCore::DoSetDecryptionPassphrase( 508 void SyncBackendHostCore::DoSetDecryptionPassphrase(
508 const std::string& passphrase) { 509 const std::string& passphrase) {
509 DCHECK_EQ(base::MessageLoop::current(), sync_loop_); 510 DCHECK_EQ(base::MessageLoop::current(), sync_loop_);
510 sync_manager_->GetEncryptionHandler()->SetDecryptionPassphrase( 511 sync_manager_->GetEncryptionHandler()->SetDecryptionPassphrase(
511 passphrase); 512 passphrase);
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after
717 this, &SyncBackendHostCore::SaveChanges); 718 this, &SyncBackendHostCore::SaveChanges);
718 } 719 }
719 720
720 void SyncBackendHostCore::SaveChanges() { 721 void SyncBackendHostCore::SaveChanges() {
721 DCHECK_EQ(base::MessageLoop::current(), sync_loop_); 722 DCHECK_EQ(base::MessageLoop::current(), sync_loop_);
722 sync_manager_->SaveChanges(); 723 sync_manager_->SaveChanges();
723 } 724 }
724 725
725 } // namespace browser_sync 726 } // namespace browser_sync
726 727
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698