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

Unified Diff: chrome/browser/sync/sessions/sync_error.h

Issue 7621085: Server directed error handling backend code. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixing CR feedback. Created 9 years, 4 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/sessions/sync_error.h
diff --git a/chrome/browser/sync/sessions/sync_error.h b/chrome/browser/sync/sessions/sync_error.h
new file mode 100644
index 0000000000000000000000000000000000000000..7a2e9f478c7e07ae944791e17e3b7be97566e36b
--- /dev/null
+++ b/chrome/browser/sync/sessions/sync_error.h
@@ -0,0 +1,48 @@
+// Copyright (c) 2011 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.
+#ifndef CHROME_BROWSER_SYNC_SESSIONS_SYNC_ERROR_H_
+#define CHROME_BROWSER_SYNC_SESSIONS_SYNC_ERROR_H_
+#pragma once
+
+#include <string>
+
+#include "base/values.h"
+
+namespace browser_sync{
+namespace sessions {
+
+enum SyncErrorType {
+ SUCCESS,
tim (not reviewing) 2011/08/24 14:47:51 each case here should have comments.
lipalani1 2011/08/25 06:14:06 Done.
+ NOT_MY_BIRTHDAY,
+ THROTTLED,
+ CLEAR_PENDING,
+ TRANSIENT_ERROR,
+ NON_RETRIABLE_ERROR,
+ MIGRATION_DONE,
+ INVALID_CREDENTIAL,
+ UNKNOWN_ERROR
+};
+
+enum ClientAction {
+ UPGRADE_CLIENT,
+ CLEAR_USER_DATA_AND_RESYNC,
+ ENABLE_SYNC_ON_ACCOUNT,
+ STOP_AND_RESTART_SYNC,
+ DISABLE_SYNC_ON_CLIENT,
+ UNKNOWN_ACTION
+};
+
+struct SyncError {
tim (not reviewing) 2011/08/24 14:47:51 Can we call this 'SyncProtocolError' to make it a
lipalani1 2011/08/25 06:14:06 Done.
+ SyncErrorType error_type;
+ std::string error_description;
+ std::string url;
+ ClientAction action;
+ SyncError();
+ ~SyncError();
+ DictionaryValue* ToValue() const;
+};
+} // namespace sessions
+} // namespace browser_sync
+#endif // CHROME_BROWSER_SYNC_SESSIONS_SYNC_ERROR_H_
+

Powered by Google App Engine
This is Rietveld 408576698