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

Side by Side Diff: components/browser_sync/browser/profile_sync_service.cc

Issue 1984863002: Clean up LoginUIService. Remove Singleton behavior from PeopleHandler (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: sync and add datatype push update notifications Created 4 years, 7 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
« no previous file with comments | « chrome/browser/ui/webui/signin/login_ui_service_unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "components/browser_sync/browser/profile_sync_service.h" 5 #include "components/browser_sync/browser/profile_sync_service.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <cstddef> 8 #include <cstddef>
9 #include <map> 9 #include <map>
10 #include <utility> 10 #include <utility>
(...skipping 1686 matching lines...) Expand 10 before | Expand all | Expand 10 after
1697 void ProfileSyncService::ChangePreferredDataTypes( 1697 void ProfileSyncService::ChangePreferredDataTypes(
1698 syncer::ModelTypeSet preferred_types) { 1698 syncer::ModelTypeSet preferred_types) {
1699 1699
1700 DVLOG(1) << "ChangePreferredDataTypes invoked"; 1700 DVLOG(1) << "ChangePreferredDataTypes invoked";
1701 const syncer::ModelTypeSet registered_types = GetRegisteredDataTypes(); 1701 const syncer::ModelTypeSet registered_types = GetRegisteredDataTypes();
1702 // Will only enable those types that are registered and preferred. 1702 // Will only enable those types that are registered and preferred.
1703 sync_prefs_.SetPreferredDataTypes(registered_types, preferred_types); 1703 sync_prefs_.SetPreferredDataTypes(registered_types, preferred_types);
1704 1704
1705 // Now reconfigure the DTM. 1705 // Now reconfigure the DTM.
1706 ReconfigureDatatypeManager(); 1706 ReconfigureDatatypeManager();
1707
1708 NotifyObservers();
Nicolas Zea 2016/05/17 20:00:55 Is this necessary? Configuration should notify the
tommycli 2016/05/17 23:23:22 Hi, I added this because OnUserChoseDatatypes wasn
1707 } 1709 }
1708 1710
1709 syncer::ModelTypeSet ProfileSyncService::GetActiveDataTypes() const { 1711 syncer::ModelTypeSet ProfileSyncService::GetActiveDataTypes() const {
1710 if (!IsSyncActive() || !ConfigurationDone()) 1712 if (!IsSyncActive() || !ConfigurationDone())
1711 return syncer::ModelTypeSet(); 1713 return syncer::ModelTypeSet();
1712 const syncer::ModelTypeSet preferred_types = GetPreferredDataTypes(); 1714 const syncer::ModelTypeSet preferred_types = GetPreferredDataTypes();
1713 const syncer::ModelTypeSet failed_types = 1715 const syncer::ModelTypeSet failed_types =
1714 data_type_status_table_.GetFailedTypes(); 1716 data_type_status_table_.GetFailedTypes();
1715 return Difference(preferred_types, failed_types); 1717 return Difference(preferred_types, failed_types);
1716 } 1718 }
(...skipping 815 matching lines...) Expand 10 before | Expand all | Expand 10 after
2532 } 2534 }
2533 2535
2534 std::string ProfileSyncService::unrecoverable_error_message() const { 2536 std::string ProfileSyncService::unrecoverable_error_message() const {
2535 return unrecoverable_error_message_; 2537 return unrecoverable_error_message_;
2536 } 2538 }
2537 2539
2538 tracked_objects::Location ProfileSyncService::unrecoverable_error_location() 2540 tracked_objects::Location ProfileSyncService::unrecoverable_error_location()
2539 const { 2541 const {
2540 return unrecoverable_error_location_; 2542 return unrecoverable_error_location_;
2541 } 2543 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/signin/login_ui_service_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698