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

Side by Side Diff: sync/engine/sync_scheduler_impl.cc

Issue 23441042: Refactor common invalidation framework types (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Move DEPS rule Created 7 years, 2 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 | Annotate | Revision Log
OLDNEW
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/engine/sync_scheduler_impl.h" 5 #include "sync/engine/sync_scheduler_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cstring> 8 #include <cstring>
9 9
10 #include "base/auto_reset.h" 10 #include "base/auto_reset.h"
(...skipping 375 matching lines...) Expand 10 before | Expand all | Expand 10 after
386 << ModelTypeSetToString(types); 386 << ModelTypeSetToString(types);
387 nudge_tracker_.RecordLocalRefreshRequest(types); 387 nudge_tracker_.RecordLocalRefreshRequest(types);
388 ScheduleNudgeImpl(desired_delay, nudge_location); 388 ScheduleNudgeImpl(desired_delay, nudge_location);
389 } 389 }
390 390
391 void SyncSchedulerImpl::ScheduleInvalidationNudge( 391 void SyncSchedulerImpl::ScheduleInvalidationNudge(
392 const TimeDelta& desired_delay, 392 const TimeDelta& desired_delay,
393 const ObjectIdInvalidationMap& invalidation_map, 393 const ObjectIdInvalidationMap& invalidation_map,
394 const tracked_objects::Location& nudge_location) { 394 const tracked_objects::Location& nudge_location) {
395 DCHECK(CalledOnValidThread()); 395 DCHECK(CalledOnValidThread());
396 DCHECK(!invalidation_map.empty()); 396 DCHECK(!invalidation_map.Empty());
397 397
398 SDVLOG_LOC(nudge_location, 2) 398 SDVLOG_LOC(nudge_location, 2)
399 << "Scheduling sync because we received invalidation for " 399 << "Scheduling sync because we received invalidation for "
400 << ModelTypeSetToString(ObjectIdSetToModelTypeSet( 400 << ModelTypeSetToString(
401 ObjectIdInvalidationMapToSet(invalidation_map))); 401 ObjectIdSetToModelTypeSet(invalidation_map.GetObjectIds()));
402 nudge_tracker_.RecordRemoteInvalidation(invalidation_map); 402 nudge_tracker_.RecordRemoteInvalidation(invalidation_map);
403 ScheduleNudgeImpl(desired_delay, nudge_location); 403 ScheduleNudgeImpl(desired_delay, nudge_location);
404 } 404 }
405 405
406 // TODO(zea): Consider adding separate throttling/backoff for datatype 406 // TODO(zea): Consider adding separate throttling/backoff for datatype
407 // refresh requests. 407 // refresh requests.
408 void SyncSchedulerImpl::ScheduleNudgeImpl( 408 void SyncSchedulerImpl::ScheduleNudgeImpl(
409 const TimeDelta& delay, 409 const TimeDelta& delay,
410 const tracked_objects::Location& nudge_location) { 410 const tracked_objects::Location& nudge_location) {
411 DCHECK(CalledOnValidThread()); 411 DCHECK(CalledOnValidThread());
(...skipping 482 matching lines...) Expand 10 before | Expand all | Expand 10 after
894 894
895 #undef SDVLOG_LOC 895 #undef SDVLOG_LOC
896 896
897 #undef SDVLOG 897 #undef SDVLOG
898 898
899 #undef SLOG 899 #undef SLOG
900 900
901 #undef ENUM_CASE 901 #undef ENUM_CASE
902 902
903 } // namespace syncer 903 } // namespace syncer
OLDNEW
« no previous file with comments | « chrome/browser/sync/test/integration/sync_test.cc ('k') | sync/internal_api/debug_info_event_listener.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698