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

Side by Side Diff: components/sync/driver/sync_service_utils.cc

Issue 2395533003: [Sync] Move some things from driver to base. (Closed)
Patch Set: Rebase. Created 4 years, 2 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/sync/driver/sync_service_utils.h" 5 #include "components/sync/driver/sync_service_utils.h"
6 6
7 #include "components/sync/driver/sync_prefs.h" 7 #include "components/sync/base/sync_prefs.h"
8 #include "components/sync/driver/sync_service.h" 8 #include "components/sync/driver/sync_service.h"
9 9
10 namespace syncer { 10 namespace syncer {
11 11
12 bool IsTabSyncEnabledAndUnencrypted(SyncService* sync_service, 12 bool IsTabSyncEnabledAndUnencrypted(SyncService* sync_service,
13 PrefService* pref_service) { 13 PrefService* pref_service) {
14 // Check field trials and settings allow sending the URL on suggest requests. 14 // Check field trials and settings allow sending the URL on suggest requests.
15 SyncPrefs sync_prefs(pref_service); 15 SyncPrefs sync_prefs(pref_service);
16 return sync_service && sync_service->CanSyncStart() && 16 return sync_service && sync_service->CanSyncStart() &&
17 sync_prefs.GetPreferredDataTypes(UserTypes()).Has(PROXY_TABS) && 17 sync_prefs.GetPreferredDataTypes(UserTypes()).Has(PROXY_TABS) &&
18 !sync_service->GetEncryptedDataTypes().Has(SESSIONS); 18 !sync_service->GetEncryptedDataTypes().Has(SESSIONS);
19 } 19 }
20 20
21 } // namespace syncer 21 } // namespace syncer
OLDNEW
« no previous file with comments | « components/sync/driver/sync_prefs_unittest.cc ('k') | components/sync/driver/system_encryptor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698