Chromium Code Reviews| 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_ |
| + |