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

Unified Diff: chrome/browser/sync/glue/history_model_worker.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
« no previous file with comments | « chrome/browser/sync/glue/history_model_worker.h ('k') | chrome/browser/sync/glue/password_model_worker.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/sync/glue/history_model_worker.cc
diff --git a/chrome/browser/sync/glue/history_model_worker.cc b/chrome/browser/sync/glue/history_model_worker.cc
index 88a819384d363c109ab7e77631be61354b831559..35d459d19c76306fd4bcb8d5dfc808582b57c060 100644
--- a/chrome/browser/sync/glue/history_model_worker.cc
+++ b/chrome/browser/sync/glue/history_model_worker.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.
@@ -18,12 +18,12 @@ class WorkerTask : public HistoryDBTask {
WorkerTask(
const WorkCallback& work,
WaitableEvent* done,
- UnrecoverableErrorInfo* error_info)
- : work_(work), done_(done), error_info_(error_info) {}
+ SyncerError* error)
+ : work_(work), done_(done), error_(error) {}
virtual bool RunOnDBThread(history::HistoryBackend* backend,
history::HistoryDatabase* db) {
- *error_info_ = work_.Run();
+ *error_ = work_.Run();
done_->Signal();
return true;
}
@@ -35,7 +35,7 @@ class WorkerTask : public HistoryDBTask {
protected:
WorkCallback work_;
WaitableEvent* done_;
- UnrecoverableErrorInfo* error_info_;
+ SyncerError* error_;
};
@@ -47,14 +47,14 @@ HistoryModelWorker::HistoryModelWorker(HistoryService* history_service)
HistoryModelWorker::~HistoryModelWorker() {
}
-UnrecoverableErrorInfo HistoryModelWorker::DoWorkAndWaitUntilDone(
+SyncerError HistoryModelWorker::DoWorkAndWaitUntilDone(
const WorkCallback& work) {
WaitableEvent done(false, false);
- UnrecoverableErrorInfo error_info;
- scoped_refptr<WorkerTask> task(new WorkerTask(work, &done, &error_info));
+ SyncerError error = UNSET;
+ scoped_refptr<WorkerTask> task(new WorkerTask(work, &done, &error));
history_service_->ScheduleDBTask(task.get(), &cancelable_consumer_);
done.Wait();
- return error_info;
+ return error;
}
ModelSafeGroup HistoryModelWorker::GetModelSafeGroup() {
« no previous file with comments | « chrome/browser/sync/glue/history_model_worker.h ('k') | chrome/browser/sync/glue/password_model_worker.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698