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

Unified Diff: components/sync/sessions_impl/data_type_tracker.cc

Issue 2130453004: [Sync] Move //sync to //components/sync. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 4 years, 5 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 side-by-side diff with in-line comments
Download patch
Index: components/sync/sessions_impl/data_type_tracker.cc
diff --git a/sync/sessions/data_type_tracker.cc b/components/sync/sessions_impl/data_type_tracker.cc
similarity index 93%
rename from sync/sessions/data_type_tracker.cc
rename to components/sync/sessions_impl/data_type_tracker.cc
index fa7a507334502ee39df21b2c84d6a10ae3357d3b..bdd3488e185ab7d6e71ce89d9287ff5b71c516f6 100644
--- a/sync/sessions/data_type_tracker.cc
+++ b/components/sync/sessions_impl/data_type_tracker.cc
@@ -2,15 +2,15 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "sync/sessions/data_type_tracker.h"
+#include "components/sync/sessions_impl/data_type_tracker.h"
#include <stddef.h>
#include <algorithm>
#include "base/logging.h"
-#include "sync/internal_api/public/base/invalidation_interface.h"
-#include "sync/sessions/nudge_tracker.h"
+#include "components/sync/base/invalidation_interface.h"
+#include "components/sync/sessions_impl/nudge_tracker.h"
namespace syncer {
namespace sessions {
@@ -20,10 +20,9 @@ DataTypeTracker::DataTypeTracker()
local_refresh_request_count_(0),
payload_buffer_size_(NudgeTracker::kDefaultMaxPayloadsPerType),
initial_sync_required_(false),
- sync_required_to_resolve_conflict_(false) {
-}
+ sync_required_to_resolve_conflict_(false) {}
-DataTypeTracker::~DataTypeTracker() { }
+DataTypeTracker::~DataTypeTracker() {}
base::TimeDelta DataTypeTracker::RecordLocalChange() {
local_nudge_count_++;
@@ -116,8 +115,7 @@ void DataTypeTracker::RecordSuccessfulSyncCycle() {
// state. See crbug.com/324996.
for (ScopedVector<InvalidationInterface>::const_iterator it =
pending_invalidations_.begin();
- it != pending_invalidations_.end();
- ++it) {
+ it != pending_invalidations_.end(); ++it) {
(*it)->Acknowledge();
}
pending_invalidations_.clear();
@@ -192,8 +190,7 @@ void DataTypeTracker::FillGetUpdatesTriggersMessage(
// them internally.
for (ScopedVector<InvalidationInterface>::const_iterator it =
pending_invalidations_.begin();
- it != pending_invalidations_.end();
- ++it) {
+ it != pending_invalidations_.end(); ++it) {
if (!(*it)->IsUnknownVersion()) {
msg->add_notification_hint((*it)->GetPayload());
}
@@ -220,12 +217,11 @@ base::TimeDelta DataTypeTracker::GetTimeUntilUnthrottle(
NOTREACHED();
return base::TimeDelta::FromSeconds(0);
}
- return std::max(base::TimeDelta::FromSeconds(0),
- unthrottle_time_ - now);
+ return std::max(base::TimeDelta::FromSeconds(0), unthrottle_time_ - now);
}
void DataTypeTracker::ThrottleType(base::TimeDelta duration,
- base::TimeTicks now) {
+ base::TimeTicks now) {
unthrottle_time_ = std::max(unthrottle_time_, now + duration);
}
« no previous file with comments | « components/sync/sessions_impl/data_type_tracker.h ('k') | components/sync/sessions_impl/debug_info_getter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698