Index: components/sync_driver/data_type_manager_impl.cc |
diff --git a/components/sync_driver/data_type_manager_impl.cc b/components/sync_driver/data_type_manager_impl.cc |
index dfffa3c775078403ff6a0a8aa4071e9a9dbfd68a..bc6ec16f3b56f1184d1d8582bd1b8015a65ca139 100644 |
--- a/components/sync_driver/data_type_manager_impl.cc |
+++ b/components/sync_driver/data_type_manager_impl.cc |
@@ -260,12 +260,14 @@ void DataTypeManagerImpl::Restart(syncer::ConfigureReason reason) { |
DCHECK(state_ == STOPPED || state_ == CONFIGURED || state_ == RETRYING); |
+ State old_state = state_; |
maniscalco
2015/03/25 00:31:48
Opportunity for const,
const State old_state = st
Nicolas Zea
2015/03/25 00:41:17
Done.
|
+ state_ = DOWNLOAD_PENDING; |
maniscalco
2015/03/25 00:31:48
So is it important that we set state_ to DOWNLOAD_
Nicolas Zea
2015/03/25 00:41:17
Yes, as NotifyStart() can trigger ProfileSyncServi
maniscalco
2015/03/25 00:47:53
Got it. That's a helpful comment. Thanks for add
|
+ |
// Starting from a "steady state" (stopped or configured) state |
// should send a start notification. |
- if (state_ == STOPPED || state_ == CONFIGURED) |
+ if (old_state == STOPPED || old_state == CONFIGURED) |
NotifyStart(); |
- state_ = DOWNLOAD_PENDING; |
download_types_queue_ = PrioritizeTypes(enabled_types); |
association_types_queue_ = std::queue<AssociationTypesInfo>(); |