| 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 1122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1133 changed_types->Append(new base::StringValue(model_type_str)); | 1133 changed_types->Append(new base::StringValue(model_type_str)); |
| 1134 } | 1134 } |
| 1135 details.SetString("source", "REMOTE_INVALIDATION"); | 1135 details.SetString("source", "REMOTE_INVALIDATION"); |
| 1136 js_event_handler_.Call(FROM_HERE, | 1136 js_event_handler_.Call(FROM_HERE, |
| 1137 &JsEventHandler::HandleJsEvent, | 1137 &JsEventHandler::HandleJsEvent, |
| 1138 "onIncomingNotification", | 1138 "onIncomingNotification", |
| 1139 JsEventDetails(&details)); | 1139 JsEventDetails(&details)); |
| 1140 } | 1140 } |
| 1141 } | 1141 } |
| 1142 | 1142 |
| 1143 std::string SyncManagerImpl::GetOwnerName() const { return "SyncManagerImpl"; } |
| 1144 |
| 1143 void SyncManagerImpl::RefreshTypes(ModelTypeSet types) { | 1145 void SyncManagerImpl::RefreshTypes(ModelTypeSet types) { |
| 1144 DCHECK(thread_checker_.CalledOnValidThread()); | 1146 DCHECK(thread_checker_.CalledOnValidThread()); |
| 1145 if (types.Empty()) { | 1147 if (types.Empty()) { |
| 1146 LOG(WARNING) << "Sync received refresh request with no types specified."; | 1148 LOG(WARNING) << "Sync received refresh request with no types specified."; |
| 1147 } else { | 1149 } else { |
| 1148 allstatus_.IncrementNudgeCounter(NUDGE_SOURCE_LOCAL_REFRESH); | 1150 allstatus_.IncrementNudgeCounter(NUDGE_SOURCE_LOCAL_REFRESH); |
| 1149 scheduler_->ScheduleLocalRefreshRequest( | 1151 scheduler_->ScheduleLocalRefreshRequest( |
| 1150 TimeDelta::FromMilliseconds(kSyncRefreshDelayMsec), | 1152 TimeDelta::FromMilliseconds(kSyncRefreshDelayMsec), |
| 1151 types, FROM_HERE); | 1153 types, FROM_HERE); |
| 1152 } | 1154 } |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1260 int SyncManagerImpl::GetDefaultNudgeDelay() { | 1262 int SyncManagerImpl::GetDefaultNudgeDelay() { |
| 1261 return kDefaultNudgeDelayMilliseconds; | 1263 return kDefaultNudgeDelayMilliseconds; |
| 1262 } | 1264 } |
| 1263 | 1265 |
| 1264 // static. | 1266 // static. |
| 1265 int SyncManagerImpl::GetPreferencesNudgeDelay() { | 1267 int SyncManagerImpl::GetPreferencesNudgeDelay() { |
| 1266 return kPreferencesNudgeDelayMilliseconds; | 1268 return kPreferencesNudgeDelayMilliseconds; |
| 1267 } | 1269 } |
| 1268 | 1270 |
| 1269 } // namespace syncer | 1271 } // namespace syncer |
| OLD | NEW |