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

Unified Diff: sync/engine/syncer.cc

Issue 1144443004: Revert of [Sync] Refactoring polling to be reliable. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 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
« no previous file with comments | « sync/engine/syncer.h ('k') | sync/engine/syncer_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sync/engine/syncer.cc
diff --git a/sync/engine/syncer.cc b/sync/engine/syncer.cc
index 0b6bed27b0d5bbec52c5a27df28a68086276ce52..ac4688117d4caecaee71a29437d7fe4c7c300df2 100644
--- a/sync/engine/syncer.cc
+++ b/sync/engine/syncer.cc
@@ -4,7 +4,6 @@
#include "sync/engine/syncer.h"
-#include "base/auto_reset.h"
#include "base/location.h"
#include "base/logging.h"
#include "base/message_loop/message_loop.h"
@@ -46,24 +45,18 @@
using sessions::NudgeTracker;
Syncer::Syncer(syncer::CancelationSignal* cancelation_signal)
- : cancelation_signal_(cancelation_signal),
- is_syncing_(false) {
+ : cancelation_signal_(cancelation_signal) {
}
Syncer::~Syncer() {}
bool Syncer::ExitRequested() {
return cancelation_signal_->IsSignalled();
-}
-
-bool Syncer::IsSyncing() const {
- return is_syncing_;
}
bool Syncer::NormalSyncShare(ModelTypeSet request_types,
NudgeTracker* nudge_tracker,
SyncSession* session) {
- base::AutoReset<bool> is_syncing(&is_syncing_, true);
HandleCycleBegin(session);
if (nudge_tracker->IsGetUpdatesRequired() ||
session->context()->ShouldFetchUpdatesBeforeCommit()) {
@@ -95,7 +88,6 @@
ModelTypeSet request_types,
sync_pb::GetUpdatesCallerInfo::GetUpdatesSource source,
SyncSession* session) {
- base::AutoReset<bool> is_syncing(&is_syncing_, true);
VLOG(1) << "Configuring types " << ModelTypeSetToString(request_types);
HandleCycleBegin(session);
ConfigureGetUpdatesDelegate configure_delegate(source);
@@ -112,7 +104,6 @@
bool Syncer::PollSyncShare(ModelTypeSet request_types,
SyncSession* session) {
- base::AutoReset<bool> is_syncing(&is_syncing_, true);
VLOG(1) << "Polling types " << ModelTypeSetToString(request_types);
HandleCycleBegin(session);
PollGetUpdatesDelegate poll_delegate;
@@ -211,12 +202,7 @@
sync_pb::GetUpdatesCallerInfo::GetUpdatesSource source) {
if (!ExitRequested()) {
session->SendSyncCycleEndEventNotification(source);
-
- bool success = !sessions::HasSyncerError(
- session->status_controller().model_neutral_state());
- if (success && source == sync_pb::GetUpdatesCallerInfo::PERIODIC)
- session->mutable_status_controller()->UpdatePollTime();
- return success;
+ return true;
} else {
return false;
}
« no previous file with comments | « sync/engine/syncer.h ('k') | sync/engine/syncer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698