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 "sync/internal_api/sync_manager_impl.h" | 5 #include "sync/internal_api/sync_manager_impl.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/base64.h" | 9 #include "base/base64.h" |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 1271 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1282 js_event_handler_.Call(FROM_HERE, | 1282 js_event_handler_.Call(FROM_HERE, |
1283 &JsEventHandler::HandleJsEvent, | 1283 &JsEventHandler::HandleJsEvent, |
1284 "onIncomingNotification", | 1284 "onIncomingNotification", |
1285 JsEventDetails(&details)); | 1285 JsEventDetails(&details)); |
1286 } | 1286 } |
1287 } | 1287 } |
1288 | 1288 |
1289 void SyncManagerImpl::RefreshTypes(ModelTypeSet types) { | 1289 void SyncManagerImpl::RefreshTypes(ModelTypeSet types) { |
1290 DCHECK(thread_checker_.CalledOnValidThread()); | 1290 DCHECK(thread_checker_.CalledOnValidThread()); |
1291 const ModelTypeInvalidationMap& type_invalidation_map = | 1291 const ModelTypeInvalidationMap& type_invalidation_map = |
1292 ModelTypeSetToInvalidationMap(types, ""); | 1292 ModelTypeSetToInvalidationMap(types, std::string()); |
1293 if (type_invalidation_map.empty()) { | 1293 if (type_invalidation_map.empty()) { |
1294 LOG(WARNING) << "Sync received refresh request with no types specified."; | 1294 LOG(WARNING) << "Sync received refresh request with no types specified."; |
1295 } else { | 1295 } else { |
1296 allstatus_.IncrementNudgeCounter(NUDGE_SOURCE_LOCAL_REFRESH); | 1296 allstatus_.IncrementNudgeCounter(NUDGE_SOURCE_LOCAL_REFRESH); |
1297 scheduler_->ScheduleNudgeWithStatesAsync( | 1297 scheduler_->ScheduleNudgeWithStatesAsync( |
1298 TimeDelta::FromMilliseconds(kSyncRefreshDelayMsec), | 1298 TimeDelta::FromMilliseconds(kSyncRefreshDelayMsec), |
1299 NUDGE_SOURCE_LOCAL_REFRESH, | 1299 NUDGE_SOURCE_LOCAL_REFRESH, |
1300 type_invalidation_map, FROM_HERE); | 1300 type_invalidation_map, FROM_HERE); |
1301 } | 1301 } |
1302 | 1302 |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1400 int SyncManagerImpl::GetDefaultNudgeDelay() { | 1400 int SyncManagerImpl::GetDefaultNudgeDelay() { |
1401 return kDefaultNudgeDelayMilliseconds; | 1401 return kDefaultNudgeDelayMilliseconds; |
1402 } | 1402 } |
1403 | 1403 |
1404 // static. | 1404 // static. |
1405 int SyncManagerImpl::GetPreferencesNudgeDelay() { | 1405 int SyncManagerImpl::GetPreferencesNudgeDelay() { |
1406 return kPreferencesNudgeDelayMilliseconds; | 1406 return kPreferencesNudgeDelayMilliseconds; |
1407 } | 1407 } |
1408 | 1408 |
1409 } // namespace syncer | 1409 } // namespace syncer |
OLD | NEW |