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

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

Issue 8366030: Introduce the plumbing necessary to report Unrecoverable error from model safe workers. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: For review. Created 9 years, 2 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/model_safe_worker.cc
diff --git a/chrome/browser/sync/engine/model_safe_worker.cc b/chrome/browser/sync/engine/model_safe_worker.cc
index ae94b265de3361ae000af9318337e9f48ee29d0d..07ad2863d891f804f0fafdd494ef99a08fae1bf9 100644
--- a/chrome/browser/sync/engine/model_safe_worker.cc
+++ b/chrome/browser/sync/engine/model_safe_worker.cc
@@ -3,6 +3,7 @@
// found in the LICENSE file.
#include "chrome/browser/sync/engine/model_safe_worker.h"
+#include "chrome/browser/sync/sessions/unrecoverable_error_info.h"
#include "base/json/json_writer.h"
#include "base/memory/scoped_ptr.h"
@@ -10,6 +11,8 @@
namespace browser_sync {
+using sessions::UnrecoverableErrorInfo;
+
base::DictionaryValue* ModelSafeRoutingInfoToValue(
const ModelSafeRoutingInfo& routing_info) {
base::DictionaryValue* dict = new base::DictionaryValue();
@@ -74,8 +77,12 @@ ModelSafeWorker::ModelSafeWorker() {}
ModelSafeWorker::~ModelSafeWorker() {}
-void ModelSafeWorker::DoWorkAndWaitUntilDone(Callback0::Type* work) {
- work->Run(); // For GROUP_PASSIVE, we do the work on the current thread.
+UnrecoverableErrorInfo ModelSafeWorker::DoWorkAndWaitUntilDone(
+ Callback1<UnrecoverableErrorInfo*>::Type* work) {
+ UnrecoverableErrorInfo error_info;
+ work->Run(&error_info); // For GROUP_PASSIVE,
akalin 2011/10/25 03:20:06 put this as a single-line comment above this line
lipalani1 2011/10/26 00:12:13 Done.
+ // we do the work on the current thread.
+ return error_info;
}
ModelSafeGroup ModelSafeWorker::GetModelSafeGroup() {

Powered by Google App Engine
This is Rietveld 408576698