| 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 1116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1127 changed_types->Append(new base::StringValue(model_type_str)); | 1127 changed_types->Append(new base::StringValue(model_type_str)); |
| 1128 } | 1128 } |
| 1129 details.SetString("source", "REMOTE_INVALIDATION"); | 1129 details.SetString("source", "REMOTE_INVALIDATION"); |
| 1130 js_event_handler_.Call(FROM_HERE, | 1130 js_event_handler_.Call(FROM_HERE, |
| 1131 &JsEventHandler::HandleJsEvent, | 1131 &JsEventHandler::HandleJsEvent, |
| 1132 "onIncomingNotification", | 1132 "onIncomingNotification", |
| 1133 JsEventDetails(&details)); | 1133 JsEventDetails(&details)); |
| 1134 } | 1134 } |
| 1135 } | 1135 } |
| 1136 | 1136 |
| 1137 std::string SyncManagerImpl::GetOwnerName() const { return "SyncManagerImpl"; } |
| 1138 |
| 1137 void SyncManagerImpl::RefreshTypes(ModelTypeSet types) { | 1139 void SyncManagerImpl::RefreshTypes(ModelTypeSet types) { |
| 1138 DCHECK(thread_checker_.CalledOnValidThread()); | 1140 DCHECK(thread_checker_.CalledOnValidThread()); |
| 1139 if (types.Empty()) { | 1141 if (types.Empty()) { |
| 1140 LOG(WARNING) << "Sync received refresh request with no types specified."; | 1142 LOG(WARNING) << "Sync received refresh request with no types specified."; |
| 1141 } else { | 1143 } else { |
| 1142 allstatus_.IncrementNudgeCounter(NUDGE_SOURCE_LOCAL_REFRESH); | 1144 allstatus_.IncrementNudgeCounter(NUDGE_SOURCE_LOCAL_REFRESH); |
| 1143 scheduler_->ScheduleLocalRefreshRequest( | 1145 scheduler_->ScheduleLocalRefreshRequest( |
| 1144 TimeDelta::FromMilliseconds(kSyncRefreshDelayMsec), | 1146 TimeDelta::FromMilliseconds(kSyncRefreshDelayMsec), |
| 1145 types, FROM_HERE); | 1147 types, FROM_HERE); |
| 1146 } | 1148 } |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1237 int SyncManagerImpl::GetDefaultNudgeDelay() { | 1239 int SyncManagerImpl::GetDefaultNudgeDelay() { |
| 1238 return kDefaultNudgeDelayMilliseconds; | 1240 return kDefaultNudgeDelayMilliseconds; |
| 1239 } | 1241 } |
| 1240 | 1242 |
| 1241 // static. | 1243 // static. |
| 1242 int SyncManagerImpl::GetPreferencesNudgeDelay() { | 1244 int SyncManagerImpl::GetPreferencesNudgeDelay() { |
| 1243 return kPreferencesNudgeDelayMilliseconds; | 1245 return kPreferencesNudgeDelayMilliseconds; |
| 1244 } | 1246 } |
| 1245 | 1247 |
| 1246 } // namespace syncer | 1248 } // namespace syncer |
| OLD | NEW |