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

Side by Side Diff: ios/chrome/browser/sync/sync_setup_service.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
« no previous file with comments | « ios/chrome/browser/sync/ios_chrome_sync_client.mm ('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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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 "ios/chrome/browser/sync/sync_setup_service.h" 5 #include "ios/chrome/browser/sync/sync_setup_service.h"
6 6
7 #include <stdio.h> 7 #include <stdio.h>
8 8
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/metrics/histogram_macros.h" 10 #include "base/metrics/histogram_macros.h"
11 #include "components/prefs/pref_service.h" 11 #include "components/prefs/pref_service.h"
12 #include "components/sync/base/stop_source.h" 12 #include "components/sync/base/stop_source.h"
13 #include "components/sync/driver/sync_prefs.h" 13 #include "components/sync/base/sync_prefs.h"
14 #include "components/sync/driver/sync_service.h" 14 #include "components/sync/driver/sync_service.h"
15 #include "components/sync/protocol/sync_protocol_error.h" 15 #include "components/sync/protocol/sync_protocol_error.h"
16 #include "google_apis/gaia/google_service_auth_error.h" 16 #include "google_apis/gaia/google_service_auth_error.h"
17 #include "ios/chrome/browser/browser_state/chrome_browser_state.h" 17 #include "ios/chrome/browser/browser_state/chrome_browser_state.h"
18 #include "ios/chrome/browser/pref_names.h" 18 #include "ios/chrome/browser/pref_names.h"
19 #include "net/base/network_change_notifier.h" 19 #include "net/base/network_change_notifier.h"
20 20
21 namespace { 21 namespace {
22 // The set of user-selectable datatypes. This must be in the same order as 22 // The set of user-selectable datatypes. This must be in the same order as
23 // |SyncSetupService::SyncableDatatype|. 23 // |SyncSetupService::SyncableDatatype|.
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
191 bool sync_enabled) { 191 bool sync_enabled) {
192 sync_blocker_ = sync_service_->GetSetupInProgressHandle(); 192 sync_blocker_ = sync_service_->GetSetupInProgressHandle();
193 if (sync_enabled) { 193 if (sync_enabled) {
194 sync_service_->RequestStart(); 194 sync_service_->RequestStart();
195 } else { 195 } else {
196 UMA_HISTOGRAM_ENUMERATION("Sync.StopSource", syncer::CHROME_SYNC_SETTINGS, 196 UMA_HISTOGRAM_ENUMERATION("Sync.StopSource", syncer::CHROME_SYNC_SETTINGS,
197 syncer::STOP_SOURCE_LIMIT); 197 syncer::STOP_SOURCE_LIMIT);
198 sync_service_->RequestStop(syncer::SyncService::KEEP_DATA); 198 sync_service_->RequestStop(syncer::SyncService::KEEP_DATA);
199 } 199 }
200 } 200 }
OLDNEW
« no previous file with comments | « ios/chrome/browser/sync/ios_chrome_sync_client.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698