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

Side by Side Diff: chrome/browser/sync/profile_sync_service.cc

Issue 1418513005: [sync] Set up notification-free infra for triggering local sync refresh (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Response to review Created 5 years, 1 month 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/sync/profile_sync_service.h ('k') | components/sync_driver/fake_sync_service.h » ('j') | 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 "chrome/browser/sync/profile_sync_service.h" 5 #include "chrome/browser/sync/profile_sync_service.h"
6 6
7 #include <cstddef> 7 #include <cstddef>
8 #include <map> 8 #include <map>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 1669 matching lines...) Expand 10 before | Expand all | Expand 10 after
1680 1680
1681 bool ProfileSyncService::IsSyncAllowed() const { 1681 bool ProfileSyncService::IsSyncAllowed() const {
1682 return IsSyncAllowedByFlag() && !IsManaged(); 1682 return IsSyncAllowedByFlag() && !IsManaged();
1683 } 1683 }
1684 1684
1685 bool ProfileSyncService::IsSyncActive() const { 1685 bool ProfileSyncService::IsSyncActive() const {
1686 return backend_initialized_ && backend_mode_ == SYNC && data_type_manager_ && 1686 return backend_initialized_ && backend_mode_ == SYNC && data_type_manager_ &&
1687 data_type_manager_->state() != DataTypeManager::STOPPED; 1687 data_type_manager_->state() != DataTypeManager::STOPPED;
1688 } 1688 }
1689 1689
1690 void ProfileSyncService::TriggerRefresh(const syncer::ModelTypeSet& types) {
1691 if (backend_initialized_)
1692 backend_->TriggerRefresh(types);
1693 }
1694
1690 bool ProfileSyncService::IsSignedIn() const { 1695 bool ProfileSyncService::IsSignedIn() const {
1691 // Sync is logged in if there is a non-empty effective account id. 1696 // Sync is logged in if there is a non-empty effective account id.
1692 return !signin_->GetAccountIdToUse().empty(); 1697 return !signin_->GetAccountIdToUse().empty();
1693 } 1698 }
1694 1699
1695 bool ProfileSyncService::IsBackendInitialized() const { 1700 bool ProfileSyncService::IsBackendInitialized() const {
1696 return backend_initialized_; 1701 return backend_initialized_;
1697 } 1702 }
1698 1703
1699 ProfileSyncService::BackendMode ProfileSyncService::backend_mode() const { 1704 ProfileSyncService::BackendMode ProfileSyncService::backend_mode() const {
(...skipping 1033 matching lines...) Expand 10 before | Expand all | Expand 10 after
2733 } 2738 }
2734 2739
2735 std::string ProfileSyncService::unrecoverable_error_message() const { 2740 std::string ProfileSyncService::unrecoverable_error_message() const {
2736 return unrecoverable_error_message_; 2741 return unrecoverable_error_message_;
2737 } 2742 }
2738 2743
2739 tracked_objects::Location ProfileSyncService::unrecoverable_error_location() 2744 tracked_objects::Location ProfileSyncService::unrecoverable_error_location()
2740 const { 2745 const {
2741 return unrecoverable_error_location_; 2746 return unrecoverable_error_location_;
2742 } 2747 }
OLDNEW
« no previous file with comments | « chrome/browser/sync/profile_sync_service.h ('k') | components/sync_driver/fake_sync_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698