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

Unified Diff: chrome/browser/sync/glue/ui_model_worker.h

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 try jobs. 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
« no previous file with comments | « chrome/browser/sync/glue/password_model_worker.cc ('k') | chrome/browser/sync/glue/ui_model_worker.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/sync/glue/ui_model_worker.h
diff --git a/chrome/browser/sync/glue/ui_model_worker.h b/chrome/browser/sync/glue/ui_model_worker.h
index a9d35bdd50068f26d7052e01a497b71f790e9e6a..6008f6db712a956b2965e9006302f371fce75ec0 100644
--- a/chrome/browser/sync/glue/ui_model_worker.h
+++ b/chrome/browser/sync/glue/ui_model_worker.h
@@ -7,10 +7,12 @@
#pragma once
#include "base/callback.h"
+#include "base/compiler_specific.h"
#include "base/synchronization/condition_variable.h"
#include "base/synchronization/lock.h"
#include "base/task.h"
#include "chrome/browser/sync/engine/model_safe_worker.h"
+#include "chrome/browser/sync/util/unrecoverable_error_info.h"
namespace base {
class WaitableEvent;
@@ -36,10 +38,13 @@ class UIModelWorker : public browser_sync::ModelSafeWorker {
// A simple task to signal a waitable event after Run()ning a Closure.
class CallDoWorkAndSignalTask : public Task {
public:
- CallDoWorkAndSignalTask(Callback0::Type* work,
- base::WaitableEvent* work_done,
- UIModelWorker* scheduler)
- : work_(work), work_done_(work_done), scheduler_(scheduler) {
+ CallDoWorkAndSignalTask(
+ const WorkCallback& work,
+ base::WaitableEvent* work_done,
+ UIModelWorker* scheduler,
+ UnrecoverableErrorInfo* error_info)
+ : work_(work), work_done_(work_done), scheduler_(scheduler),
+ error_info_(error_info) {
}
virtual ~CallDoWorkAndSignalTask() { }
@@ -49,12 +54,14 @@ class UIModelWorker : public browser_sync::ModelSafeWorker {
private:
// Task data - a closure and a waitable event to signal after the work has
// been done.
- Callback0::Type* work_;
+ WorkCallback work_;
base::WaitableEvent* work_done_;
// The UIModelWorker responsible for scheduling us.
UIModelWorker* const scheduler_;
+ UnrecoverableErrorInfo* error_info_;
+
DISALLOW_COPY_AND_ASSIGN(CallDoWorkAndSignalTask);
};
@@ -65,8 +72,9 @@ class UIModelWorker : public browser_sync::ModelSafeWorker {
void Stop();
// ModelSafeWorker implementation. Called on syncapi SyncerThread.
- virtual void DoWorkAndWaitUntilDone(Callback0::Type* work);
- virtual ModelSafeGroup GetModelSafeGroup();
+ virtual UnrecoverableErrorInfo DoWorkAndWaitUntilDone(
+ const WorkCallback& work) OVERRIDE;
+ virtual ModelSafeGroup GetModelSafeGroup() OVERRIDE;
// Upon receiving this idempotent call, the ModelSafeWorker can
// assume no work will ever be scheduled again from now on. If it has any work
« no previous file with comments | « chrome/browser/sync/glue/password_model_worker.cc ('k') | chrome/browser/sync/glue/ui_model_worker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698