| OLD | NEW |
| 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/sync/engine_impl/syncer.h" | 5 #include "components/sync/engine_impl/syncer.h" |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 | 8 |
| 9 #include "base/auto_reset.h" | 9 #include "base/auto_reset.h" |
| 10 #include "base/location.h" | 10 #include "base/location.h" |
| (...skipping 23 matching lines...) Expand all Loading... |
| 34 namespace syncer { | 34 namespace syncer { |
| 35 | 35 |
| 36 // TODO(akalin): We may want to propagate this switch up | 36 // TODO(akalin): We may want to propagate this switch up |
| 37 // eventually. | 37 // eventually. |
| 38 #if defined(OS_ANDROID) || defined(OS_IOS) | 38 #if defined(OS_ANDROID) || defined(OS_IOS) |
| 39 static const bool kCreateMobileBookmarksFolder = true; | 39 static const bool kCreateMobileBookmarksFolder = true; |
| 40 #else | 40 #else |
| 41 static const bool kCreateMobileBookmarksFolder = false; | 41 static const bool kCreateMobileBookmarksFolder = false; |
| 42 #endif | 42 #endif |
| 43 | 43 |
| 44 Syncer::Syncer(syncer::CancelationSignal* cancelation_signal) | 44 Syncer::Syncer(CancelationSignal* cancelation_signal) |
| 45 : cancelation_signal_(cancelation_signal), is_syncing_(false) {} | 45 : cancelation_signal_(cancelation_signal), is_syncing_(false) {} |
| 46 | 46 |
| 47 Syncer::~Syncer() {} | 47 Syncer::~Syncer() {} |
| 48 | 48 |
| 49 bool Syncer::ExitRequested() { | 49 bool Syncer::ExitRequested() { |
| 50 return cancelation_signal_->IsSignalled(); | 50 return cancelation_signal_->IsSignalled(); |
| 51 } | 51 } |
| 52 | 52 |
| 53 bool Syncer::IsSyncing() const { | 53 bool Syncer::IsSyncing() const { |
| 54 return is_syncing_; | 54 return is_syncing_; |
| (...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 203 } | 203 } |
| 204 | 204 |
| 205 bool Syncer::PostClearServerData(SyncCycle* cycle) { | 205 bool Syncer::PostClearServerData(SyncCycle* cycle) { |
| 206 DCHECK(cycle); | 206 DCHECK(cycle); |
| 207 ClearServerData clear_server_data(cycle->context()->account_name()); | 207 ClearServerData clear_server_data(cycle->context()->account_name()); |
| 208 const SyncerError post_result = clear_server_data.SendRequest(cycle); | 208 const SyncerError post_result = clear_server_data.SendRequest(cycle); |
| 209 return post_result == SYNCER_OK; | 209 return post_result == SYNCER_OK; |
| 210 } | 210 } |
| 211 | 211 |
| 212 } // namespace syncer | 212 } // namespace syncer |
| OLD | NEW |