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

Unified Diff: components/sync/api/sync_error.cc

Issue 2130453004: [Sync] Move //sync to //components/sync. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 4 years, 5 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 | « components/sync/api/sync_error.h ('k') | components/sync/api/sync_error_factory.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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) {
« no previous file with comments | « components/sync/api/sync_error.h ('k') | components/sync/api/sync_error_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698