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

Side by Side Diff: sync/api/sync_error.cc

Issue 312163004: [Sync] Add support for dynamically enabling/disabling types (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address comments Created 6 years, 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « sync/api/sync_error.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "sync/api/sync_error.h" 5 #include "sync/api/sync_error.h"
6 6
7 #include <ostream> 7 #include <ostream>
8 8
9 #include "base/location.h" 9 #include "base/location.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 16 matching lines...) Expand all
27 break; 27 break;
28 case DATATYPE_ERROR: 28 case DATATYPE_ERROR:
29 type_message = "datatype error was encountered: "; 29 type_message = "datatype error was encountered: ";
30 break; 30 break;
31 case PERSISTENCE_ERROR: 31 case PERSISTENCE_ERROR:
32 type_message = "persistence error was encountered: "; 32 type_message = "persistence error was encountered: ";
33 break; 33 break;
34 case CRYPTO_ERROR: 34 case CRYPTO_ERROR:
35 type_message = "cryptographer error was encountered: "; 35 type_message = "cryptographer error was encountered: ";
36 break; 36 break;
37 default: 37 case UNREADY_ERROR:
38 NOTREACHED(); 38 type_message = "unready error was encountered: ";
39 type_message = "invalid error: "; 39 break;
40 case UNSET:
41 NOTREACHED() << "Invalid error type";
42 return;
40 } 43 }
41 Init(location, type_message + custom_message, model_type, error_type); 44 Init(location, type_message + custom_message, model_type, error_type);
42 PrintLogError(); 45 PrintLogError();
43 } 46 }
44 47
45 SyncError::SyncError(const SyncError& other) { 48 SyncError::SyncError(const SyncError& other) {
46 Copy(other); 49 Copy(other);
47 } 50 }
48 51
49 SyncError::~SyncError() { 52 SyncError::~SyncError() {
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 logging::LOG_ERROR).stream(), 134 logging::LOG_ERROR).stream(),
132 LOG_IS_ON(ERROR)) 135 LOG_IS_ON(ERROR))
133 << ModelTypeToString(model_type_) << " " << message_; 136 << ModelTypeToString(model_type_) << " " << message_;
134 } 137 }
135 138
136 void PrintTo(const SyncError& sync_error, std::ostream* os) { 139 void PrintTo(const SyncError& sync_error, std::ostream* os) {
137 *os << sync_error.ToString(); 140 *os << sync_error.ToString();
138 } 141 }
139 142
140 } // namespace syncer 143 } // namespace syncer
OLDNEW
« no previous file with comments | « sync/api/sync_error.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698