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

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

Issue 420633002: [Sync] Cleanup datatype configuration error handling. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix compile Created 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « components/sync_driver/ui_data_type_controller_unittest.cc ('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 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 if (!IsSet()) { 142 if (!IsSet()) {
143 return std::string(); 143 return std::string();
144 } 144 }
145 return location_->ToString() + ", " + ModelTypeToString(model_type_) + 145 return location_->ToString() + ", " + ModelTypeToString(model_type_) +
146 " " + GetMessagePrefix() + message_; 146 " " + GetMessagePrefix() + message_;
147 } 147 }
148 148
149 void SyncError::PrintLogError() const { 149 void SyncError::PrintLogError() const {
150 logging::LogSeverity logSeverity = 150 logging::LogSeverity logSeverity =
151 (GetSeverity() == SYNC_ERROR_SEVERITY_INFO) 151 (GetSeverity() == SYNC_ERROR_SEVERITY_INFO)
152 ? logging::LOG_INFO : logging::LOG_ERROR; 152 ? logging::LOG_VERBOSE : logging::LOG_ERROR;
153 153
154 LAZY_STREAM(logging::LogMessage(location_->file_name(), 154 LAZY_STREAM(logging::LogMessage(location_->file_name(),
155 location_->line_number(), 155 location_->line_number(),
156 logSeverity).stream(), 156 logSeverity).stream(),
157 logSeverity >= ::logging::GetMinLogLevel()) 157 logSeverity >= ::logging::GetMinLogLevel())
158 << ModelTypeToString(model_type_) << " " 158 << ModelTypeToString(model_type_) << " "
159 << GetMessagePrefix() << message_; 159 << GetMessagePrefix() << message_;
160 } 160 }
161 161
162 void PrintTo(const SyncError& sync_error, std::ostream* os) { 162 void PrintTo(const SyncError& sync_error, std::ostream* os) {
163 *os << sync_error.ToString(); 163 *os << sync_error.ToString();
164 } 164 }
165 165
166 } // namespace syncer 166 } // namespace syncer
OLDNEW
« no previous file with comments | « components/sync_driver/ui_data_type_controller_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698