Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(166)

Side by Side Diff: sync/sessions/data_type_tracker.cc

Issue 1609923002: Fix remaining incompatibilities between scoped_ptr and unique_ptr. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/sessions/data_type_tracker.h" 5 #include "sync/sessions/data_type_tracker.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 10
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after
195 it != pending_invalidations_.end(); 195 it != pending_invalidations_.end();
196 ++it) { 196 ++it) {
197 if (!(*it)->IsUnknownVersion()) { 197 if (!(*it)->IsUnknownVersion()) {
198 msg->add_notification_hint((*it)->GetPayload()); 198 msg->add_notification_hint((*it)->GetPayload());
199 } 199 }
200 } 200 }
201 201
202 msg->set_server_dropped_hints( 202 msg->set_server_dropped_hints(
203 !pending_invalidations_.empty() && 203 !pending_invalidations_.empty() &&
204 (*pending_invalidations_.begin())->IsUnknownVersion()); 204 (*pending_invalidations_.begin())->IsUnknownVersion());
205 msg->set_client_dropped_hints(last_dropped_invalidation_); 205 msg->set_client_dropped_hints(!!last_dropped_invalidation_);
206 msg->set_local_modification_nudges(local_nudge_count_); 206 msg->set_local_modification_nudges(local_nudge_count_);
207 msg->set_datatype_refresh_nudges(local_refresh_request_count_); 207 msg->set_datatype_refresh_nudges(local_refresh_request_count_);
208 msg->set_initial_sync_in_progress(initial_sync_required_); 208 msg->set_initial_sync_in_progress(initial_sync_required_);
209 msg->set_sync_for_resolve_conflict_in_progress( 209 msg->set_sync_for_resolve_conflict_in_progress(
210 sync_required_to_resolve_conflict_); 210 sync_required_to_resolve_conflict_);
211 } 211 }
212 212
213 bool DataTypeTracker::IsThrottled() const { 213 bool DataTypeTracker::IsThrottled() const {
214 return !unthrottle_time_.is_null(); 214 return !unthrottle_time_.is_null();
215 } 215 }
(...skipping 18 matching lines...) Expand all
234 unthrottle_time_ = base::TimeTicks(); 234 unthrottle_time_ = base::TimeTicks();
235 } 235 }
236 } 236 }
237 237
238 void DataTypeTracker::UpdateLocalNudgeDelay(base::TimeDelta delay) { 238 void DataTypeTracker::UpdateLocalNudgeDelay(base::TimeDelta delay) {
239 nudge_delay_ = delay; 239 nudge_delay_ = delay;
240 } 240 }
241 241
242 } // namespace sessions 242 } // namespace sessions
243 } // namespace syncer 243 } // namespace syncer
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698