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

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: Move syncer_error.* to internal_api/includes Created 8 years, 11 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..8cee1b55dbfa4c21ceffc2b3f947b49036743fda 100644
--- a/chrome/browser/sync/engine/download_updates_command.cc
+++ b/chrome/browser/sync/engine/download_updates_command.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -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 SYNCER_OK; // TODO(rlarocque): Return an error here.
}
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 SYNCER_OK;
}
void DownloadUpdatesCommand::AppendClientDebugInfoIfNeeded(
« no previous file with comments | « chrome/browser/sync/engine/download_updates_command.h ('k') | chrome/browser/sync/engine/get_commit_ids_command.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698