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

Unified Diff: chrome/browser/sync/engine/process_commit_response_command.cc

Issue 8510079: sync: Remove ModelNeutralExecuteImpl() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix bug that caused integration test failures Created 9 years, 1 month 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: chrome/browser/sync/engine/process_commit_response_command.cc
diff --git a/chrome/browser/sync/engine/process_commit_response_command.cc b/chrome/browser/sync/engine/process_commit_response_command.cc
index 0fc5dbd7021271277f4baa0419a868ff708cdf70..9a9705789f12ca9da412f9bafdc6c9a9f0998bdd 100644
--- a/chrome/browser/sync/engine/process_commit_response_command.cc
+++ b/chrome/browser/sync/engine/process_commit_response_command.cc
@@ -59,13 +59,21 @@ void ResetErrorCounters(StatusController* status) {
ProcessCommitResponseCommand::ProcessCommitResponseCommand() {}
ProcessCommitResponseCommand::~ProcessCommitResponseCommand() {}
-bool ProcessCommitResponseCommand::ModelNeutralExecuteImpl(
+void ProcessCommitResponseCommand::ExecuteImpl(
+ sessions::SyncSession* session) {
+ if (ModelNeutralShouldExitEarly(session))
+ return;
+
+ ModelChangingSyncerCommand::ExecuteImpl(session);
+}
+
+bool ProcessCommitResponseCommand::ModelNeutralShouldExitEarly(
sessions::SyncSession* session) {
ScopedDirLookup dir(session->context()->directory_manager(),
session->context()->account_name());
if (!dir.good()) {
LOG(ERROR) << "Scoped dir lookup failed!";
- return false;
+ return true;
}
StatusController* status = session->status_controller();
@@ -76,7 +84,7 @@ bool ProcessCommitResponseCommand::ModelNeutralExecuteImpl(
// TODO(sync): What if we didn't try to commit anything?
LOG(WARNING) << "Commit response has no commit body!";
IncrementErrorCounters(status);
- return false;
+ return true;
}
const CommitResponse& cr = response.commit();
@@ -91,9 +99,9 @@ bool ProcessCommitResponseCommand::ModelNeutralExecuteImpl(
LOG(ERROR) << " " << cr.entryresponse(i).error_message();
}
IncrementErrorCounters(status);
- return false;
+ return true;
}
- return true;
+ return false;
}
void ProcessCommitResponseCommand::ModelChangingExecuteImpl(
« no previous file with comments | « chrome/browser/sync/engine/process_commit_response_command.h ('k') | chrome/browser/sync/engine/process_updates_command.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698