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

Side by Side Diff: chrome/browser/sync_file_system/sync_file_system_service.cc

Issue 16105012: Unrevert "[Sync] Split GetPreferredTypes into GetActiveType..."" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Adjust mock Created 7 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_file_system/sync_file_system_service.h" 5 #include "chrome/browser/sync_file_system/sync_file_system_service.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 546 matching lines...) Expand 10 before | Expand all | Expand 10 after
557 SyncDirection direction) { 557 SyncDirection direction) {
558 FOR_EACH_OBSERVER( 558 FOR_EACH_OBSERVER(
559 SyncEventObserver, observers_, 559 SyncEventObserver, observers_,
560 OnFileSynced(url, sync_status, action_taken, direction)); 560 OnFileSynced(url, sync_status, action_taken, direction));
561 } 561 }
562 562
563 void SyncFileSystemService::UpdateSyncEnabledStatus( 563 void SyncFileSystemService::UpdateSyncEnabledStatus(
564 ProfileSyncServiceBase* profile_sync_service) { 564 ProfileSyncServiceBase* profile_sync_service) {
565 if (!profile_sync_service->HasSyncSetupCompleted()) 565 if (!profile_sync_service->HasSyncSetupCompleted())
566 return; 566 return;
567 sync_enabled_ = profile_sync_service->GetPreferredDataTypes().Has( 567 sync_enabled_ = profile_sync_service->GetActiveDataTypes().Has(
568 syncer::APPS); 568 syncer::APPS);
569 remote_file_service_->SetSyncEnabled(sync_enabled_); 569 remote_file_service_->SetSyncEnabled(sync_enabled_);
570 if (sync_enabled_) { 570 if (sync_enabled_) {
571 base::MessageLoopProxy::current()->PostTask( 571 base::MessageLoopProxy::current()->PostTask(
572 FROM_HERE, base::Bind(&SyncFileSystemService::MaybeStartSync, 572 FROM_HERE, base::Bind(&SyncFileSystemService::MaybeStartSync,
573 AsWeakPtr())); 573 AsWeakPtr()));
574 } 574 }
575 } 575 }
576 576
577 } // namespace sync_file_system 577 } // namespace sync_file_system
OLDNEW
« no previous file with comments | « chrome/browser/sync/profile_sync_service_mock.h ('k') | chrome/browser/ui/webui/ntp/foreign_session_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698