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

Unified Diff: chrome/browser/sync/protocol/sync_protocol_error.cc

Issue 9699057: [Sync] Move 'sync' target to sync/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address Tim's comments Created 8 years, 9 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/protocol/sync_protocol_error.h ('k') | chrome/browser/sync/retry_verifier.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/sync/protocol/sync_protocol_error.cc
diff --git a/chrome/browser/sync/protocol/sync_protocol_error.cc b/chrome/browser/sync/protocol/sync_protocol_error.cc
deleted file mode 100644
index 7727f41539ab625010cdb254d19efa412cc74226..0000000000000000000000000000000000000000
--- a/chrome/browser/sync/protocol/sync_protocol_error.cc
+++ /dev/null
@@ -1,63 +0,0 @@
-// 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.
-
-#include "chrome/browser/sync/protocol/sync_protocol_error.h"
-
-#include <string>
-
-#include "base/logging.h"
-#include "base/values.h"
-
-namespace browser_sync {
-#define ENUM_CASE(x) case x: return #x; break;
-
-const char* GetSyncErrorTypeString(SyncProtocolErrorType type) {
- switch (type) {
- ENUM_CASE(SYNC_SUCCESS);
- ENUM_CASE(NOT_MY_BIRTHDAY);
- ENUM_CASE(THROTTLED);
- ENUM_CASE(CLEAR_PENDING);
- ENUM_CASE(TRANSIENT_ERROR);
- ENUM_CASE(NON_RETRIABLE_ERROR);
- ENUM_CASE(MIGRATION_DONE);
- ENUM_CASE(INVALID_CREDENTIAL);
- ENUM_CASE(UNKNOWN_ERROR);
- }
- NOTREACHED();
- return "";
-}
-
-const char* GetClientActionString(ClientAction action) {
- switch (action) {
- ENUM_CASE(UPGRADE_CLIENT);
- ENUM_CASE(CLEAR_USER_DATA_AND_RESYNC);
- ENUM_CASE(ENABLE_SYNC_ON_ACCOUNT);
- ENUM_CASE(STOP_AND_RESTART_SYNC);
- ENUM_CASE(DISABLE_SYNC_ON_CLIENT);
- ENUM_CASE(UNKNOWN_ACTION);
- }
- NOTREACHED();
- return "";
-}
-
-SyncProtocolError::SyncProtocolError()
- : error_type(UNKNOWN_ERROR),
- action(UNKNOWN_ACTION) {
-}
-
-SyncProtocolError::~SyncProtocolError() {
-}
-
-DictionaryValue* SyncProtocolError::ToValue() const {
- DictionaryValue* value = new DictionaryValue();
- value->SetString("ErrorType",
- GetSyncErrorTypeString(error_type));
- value->SetString("ErrorDescription", error_description);
- value->SetString("url", url);
- value->SetString("action", GetClientActionString(action));
- return value;
-}
-
-} // namespace browser_sync
-
« no previous file with comments | « chrome/browser/sync/protocol/sync_protocol_error.h ('k') | chrome/browser/sync/retry_verifier.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698