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

Unified Diff: chrome/browser/sync/engine/model_safe_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
Index: chrome/browser/sync/engine/model_safe_worker.h
diff --git a/chrome/browser/sync/engine/model_safe_worker.h b/chrome/browser/sync/engine/model_safe_worker.h
index f4829ec4b58140f9d37d57541ff0bb7ac4d25c38..3a707db4a2749ff358343a17ea58042048a7314e 100644
--- a/chrome/browser/sync/engine/model_safe_worker.h
+++ b/chrome/browser/sync/engine/model_safe_worker.h
@@ -10,9 +10,11 @@
#include <string>
#include <vector>
+#include "base/callback.h"
#include "base/callback_old.h"
#include "base/memory/ref_counted.h"
#include "chrome/browser/sync/syncable/model_type.h"
+#include "chrome/browser/sync/util/unrecoverable_error_info.h"
namespace base {
class DictionaryValue;
@@ -20,6 +22,8 @@ class DictionaryValue;
namespace browser_sync {
+typedef base::Callback<UnrecoverableErrorInfo(void)> WorkCallback;
+
enum ModelSafeGroup {
GROUP_PASSIVE = 0, // Models that are just "passively" being synced; e.g.
// changes to these models don't need to be pushed to a
@@ -52,7 +56,8 @@ class ModelSafeWorker : public base::RefCountedThreadSafe<ModelSafeWorker> {
// Any time the Syncer performs model modifications (e.g employing a
// WriteTransaction), it should be done by this method to ensure it is done
// from a model-safe thread.
- virtual void DoWorkAndWaitUntilDone(Callback0::Type* work);
+ virtual UnrecoverableErrorInfo DoWorkAndWaitUntilDone(
+ const WorkCallback& work);
virtual ModelSafeGroup GetModelSafeGroup();
« no previous file with comments | « chrome/browser/sync/engine/model_changing_syncer_command.cc ('k') | chrome/browser/sync/engine/model_safe_worker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698