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

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

Issue 9113024: Add return values to SyncerCommand (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Update for review comments Created 8 years, 12 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: chrome/browser/sync/engine/download_updates_command.cc
diff --git a/chrome/browser/sync/engine/download_updates_command.cc b/chrome/browser/sync/engine/download_updates_command.cc
index 86414a6e1e2ce26a4ca93c306a6f83af2bfd3fcb..ee29aac200fd61cf2e86f65b3266091165910677 100644
--- a/chrome/browser/sync/engine/download_updates_command.cc
+++ b/chrome/browser/sync/engine/download_updates_command.cc
@@ -30,7 +30,7 @@ using syncable::ModelTypeSetToString;
DownloadUpdatesCommand::DownloadUpdatesCommand() {}
DownloadUpdatesCommand::~DownloadUpdatesCommand() {}
-void DownloadUpdatesCommand::ExecuteImpl(SyncSession* session) {
+SyncerError DownloadUpdatesCommand::ExecuteImpl(SyncSession* session) {
ClientToServerMessage client_to_server_message;
ClientToServerResponse update_response;
@@ -48,7 +48,7 @@ void DownloadUpdatesCommand::ExecuteImpl(SyncSession* session) {
session->context()->account_name());
if (!dir.good()) {
LOG(ERROR) << "Scoped dir lookup failed!";
- return;
+ return DIRECTORY_LOOKUP_FAILED;
}
// Request updates for all enabled types.
@@ -105,7 +105,7 @@ void DownloadUpdatesCommand::ExecuteImpl(SyncSession* session) {
status->increment_num_consecutive_errors();
status->mutable_updates_response()->Clear();
LOG(ERROR) << "PostClientToServerMessage() failed during GetUpdates";
- return;
+ return NO_ERROR; // TODO(rlarocque): Return an error here.
tim (not reviewing) 2012/01/06 16:33:42 I'm assuming you aren't already because PostClient
rlarocque 2012/01/06 19:44:21 This will be fixed in the next patch in this serie
}
status->mutable_updates_response()->CopyFrom(update_response);
@@ -115,6 +115,7 @@ void DownloadUpdatesCommand::ExecuteImpl(SyncSession* session) {
<< " updates and indicated "
<< update_response.get_updates().changes_remaining()
<< " updates left on server.";
+ return NO_ERROR;
}
void DownloadUpdatesCommand::AppendClientDebugInfoIfNeeded(

Powered by Google App Engine
This is Rietveld 408576698