| OLD | NEW |
| 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/prefs/pref_service.h" | 10 #include "base/prefs/pref_service.h" |
| 10 #include "components/sync_driver/sync_prefs.h" | 11 #include "components/sync_driver/sync_prefs.h" |
| 11 #include "components/sync_driver/sync_service.h" | 12 #include "components/sync_driver/sync_service.h" |
| 12 #include "google_apis/gaia/google_service_auth_error.h" | 13 #include "google_apis/gaia/google_service_auth_error.h" |
| 13 #include "ios/chrome/browser/pref_names.h" | 14 #include "ios/chrome/browser/pref_names.h" |
| 14 #include "ios/public/provider/chrome/browser/browser_state/chrome_browser_state.
h" | 15 #include "ios/public/provider/chrome/browser/browser_state/chrome_browser_state.
h" |
| 15 #include "net/base/network_change_notifier.h" | 16 #include "net/base/network_change_notifier.h" |
| 16 #include "sync/protocol/sync_protocol_error.h" | 17 #include "sync/protocol/sync_protocol_error.h" |
| 17 | 18 |
| 18 namespace { | 19 namespace { |
| (...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 187 } | 188 } |
| 188 | 189 |
| 189 void SyncSetupService::SetSyncEnabledWithoutChangingDatatypes( | 190 void SyncSetupService::SetSyncEnabledWithoutChangingDatatypes( |
| 190 bool sync_enabled) { | 191 bool sync_enabled) { |
| 191 sync_service_->SetSetupInProgress(true); | 192 sync_service_->SetSetupInProgress(true); |
| 192 if (sync_enabled) | 193 if (sync_enabled) |
| 193 sync_service_->RequestStart(); | 194 sync_service_->RequestStart(); |
| 194 else | 195 else |
| 195 sync_service_->RequestStop(sync_driver::SyncService::KEEP_DATA); | 196 sync_service_->RequestStop(sync_driver::SyncService::KEEP_DATA); |
| 196 } | 197 } |
| OLD | NEW |