| Index: components/sync/api/sync_error.cc
|
| diff --git a/sync/api/sync_error.cc b/components/sync/api/sync_error.cc
|
| similarity index 84%
|
| rename from sync/api/sync_error.cc
|
| rename to components/sync/api/sync_error.cc
|
| index 666be5f68fd7b17f2056079b3f909bc3dec25359..856955b79c3c460a4d91f530ea8d3de9e9eef5f1 100644
|
| --- a/sync/api/sync_error.cc
|
| +++ b/components/sync/api/sync_error.cc
|
| @@ -2,13 +2,13 @@
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| -#include "sync/api/sync_error.h"
|
| +#include "components/sync/api/sync_error.h"
|
|
|
| #include <ostream>
|
|
|
| #include "base/location.h"
|
| #include "base/logging.h"
|
| -#include "sync/internal_api/public/base/model_type.h"
|
| +#include "components/sync/base/model_type.h"
|
|
|
| namespace syncer {
|
|
|
| @@ -29,8 +29,7 @@ SyncError::SyncError(const SyncError& other) {
|
| Copy(other);
|
| }
|
|
|
| -SyncError::~SyncError() {
|
| -}
|
| +SyncError::~SyncError() {}
|
|
|
| SyncError& SyncError::operator=(const SyncError& other) {
|
| if (this == &other) {
|
| @@ -42,9 +41,7 @@ SyncError& SyncError::operator=(const SyncError& other) {
|
|
|
| void SyncError::Copy(const SyncError& other) {
|
| if (other.IsSet()) {
|
| - Init(other.location(),
|
| - other.message(),
|
| - other.model_type(),
|
| + Init(other.location(), other.message(), other.model_type(),
|
| other.error_type());
|
| } else {
|
| Clear();
|
| @@ -79,7 +76,6 @@ bool SyncError::IsSet() const {
|
| return error_type_ != UNSET;
|
| }
|
|
|
| -
|
| const tracked_objects::Location& SyncError::location() const {
|
| CHECK(IsSet());
|
| return *location_;
|
| @@ -142,21 +138,21 @@ std::string SyncError::ToString() const {
|
| if (!IsSet()) {
|
| return std::string();
|
| }
|
| - return location_->ToString() + ", " + ModelTypeToString(model_type_) +
|
| - " " + GetMessagePrefix() + message_;
|
| + return location_->ToString() + ", " + ModelTypeToString(model_type_) + " " +
|
| + GetMessagePrefix() + message_;
|
| }
|
|
|
| void SyncError::PrintLogError() const {
|
| - logging::LogSeverity logSeverity =
|
| - (GetSeverity() == SYNC_ERROR_SEVERITY_INFO)
|
| - ? logging::LOG_VERBOSE : logging::LOG_ERROR;
|
| + logging::LogSeverity logSeverity = (GetSeverity() == SYNC_ERROR_SEVERITY_INFO)
|
| + ? logging::LOG_VERBOSE
|
| + : logging::LOG_ERROR;
|
|
|
| LAZY_STREAM(logging::LogMessage(location_->file_name(),
|
| - location_->line_number(),
|
| - logSeverity).stream(),
|
| + location_->line_number(), logSeverity)
|
| + .stream(),
|
| logSeverity >= ::logging::GetMinLogLevel())
|
| - << ModelTypeToString(model_type_) << " "
|
| - << GetMessagePrefix() << message_;
|
| + << ModelTypeToString(model_type_) << " " << GetMessagePrefix()
|
| + << message_;
|
| }
|
|
|
| void PrintTo(const SyncError& sync_error, std::ostream* os) {
|
|
|