diff options
author | skym <skym@chromium.org> | 2015-12-14 11:56:34 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-12-14 19:57:20 +0000 |
commit | f593336f972fa8d64584baf5c2e5cef809857a88 (patch) | |
tree | cc265bd5b06199bb10a78dd1835fb67db0312ebf /sync/api | |
parent | d9f3318112e50d0cfd3e2c2cd97b236dd0038f79 (diff) | |
download | chromium_src-f593336f972fa8d64584baf5c2e5cef809857a88.zip chromium_src-f593336f972fa8d64584baf5c2e5cef809857a88.tar.gz chromium_src-f593336f972fa8d64584baf5c2e5cef809857a88.tar.bz2 |
[Sync] Fixing all trivial lint violations in src/sync/*
BUG=567301
Review URL: https://codereview.chromium.org/1510023002
Cr-Commit-Position: refs/heads/master@{#365077}
Diffstat (limited to 'sync/api')
-rw-r--r-- | sync/api/attachments/attachment_id.h | 2 | ||||
-rw-r--r-- | sync/api/entity_change.cc | 2 | ||||
-rw-r--r-- | sync/api/entity_data.cc | 2 | ||||
-rw-r--r-- | sync/api/fake_sync_change_processor.cc | 1 | ||||
-rw-r--r-- | sync/api/fake_sync_change_processor.h | 2 | ||||
-rw-r--r-- | sync/api/sync_change_processor.h | 3 | ||||
-rw-r--r-- | sync/api/sync_data.cc | 1 | ||||
-rw-r--r-- | sync/api/sync_data_unittest.cc | 4 | ||||
-rw-r--r-- | sync/api/sync_error.h | 33 | ||||
-rw-r--r-- | sync/api/sync_error_factory_mock.h | 3 |
10 files changed, 32 insertions, 21 deletions
diff --git a/sync/api/attachments/attachment_id.h b/sync/api/attachments/attachment_id.h index 039d386..835011a 100644 --- a/sync/api/attachments/attachment_id.h +++ b/sync/api/attachments/attachment_id.h @@ -72,7 +72,7 @@ class SYNC_EXPORT AttachmentId { ImmutableAttachmentIdProto proto_; - AttachmentId(sync_pb::AttachmentIdProto* proto); + explicit AttachmentId(sync_pb::AttachmentIdProto* proto); }; // All public interfaces use AttachmentIdList. AttachmentIdSet is used in diff --git a/sync/api/entity_change.cc b/sync/api/entity_change.cc index e2f2bed..81020de 100644 --- a/sync/api/entity_change.cc +++ b/sync/api/entity_change.cc @@ -26,7 +26,7 @@ EntityChange EntityChange::CreateDelete(std::string client_key) { EntityChange::EntityChange(std::string client_key, ChangeType type, EntityDataPtr data) - : client_key_(client_key), type_(type), data_(data){}; + : client_key_(client_key), type_(type), data_(data) {} EntityChange::~EntityChange() {} diff --git a/sync/api/entity_data.cc b/sync/api/entity_data.cc index 0914022..35e5e74 100644 --- a/sync/api/entity_data.cc +++ b/sync/api/entity_data.cc @@ -4,6 +4,8 @@ #include "sync/api/entity_data.h" +#include <algorithm> + #include "base/logging.h" namespace syncer_v2 { diff --git a/sync/api/fake_sync_change_processor.cc b/sync/api/fake_sync_change_processor.cc index 2721650..b9adf88 100644 --- a/sync/api/fake_sync_change_processor.cc +++ b/sync/api/fake_sync_change_processor.cc @@ -3,6 +3,7 @@ // found in the LICENSE file. #include "sync/api/fake_sync_change_processor.h" + #include "sync/api/sync_change.h" #include "sync/api/sync_data.h" diff --git a/sync/api/fake_sync_change_processor.h b/sync/api/fake_sync_change_processor.h index d9bd596..7271edf 100644 --- a/sync/api/fake_sync_change_processor.h +++ b/sync/api/fake_sync_change_processor.h @@ -5,6 +5,8 @@ #ifndef SYNC_API_FAKE_SYNC_CHANGE_PROCESSOR_H_ #define SYNC_API_FAKE_SYNC_CHANGE_PROCESSOR_H_ +#include <string> + #include "sync/api/sync_change_processor.h" namespace syncer { diff --git a/sync/api/sync_change_processor.h b/sync/api/sync_change_processor.h index b70ef3d..e815d3e 100644 --- a/sync/api/sync_change_processor.h +++ b/sync/api/sync_change_processor.h @@ -5,6 +5,7 @@ #ifndef SYNC_API_SYNC_CHANGE_PROCESSOR_H_ #define SYNC_API_SYNC_CHANGE_PROCESSOR_H_ +#include <string> #include <vector> #include "sync/api/sync_data.h" @@ -59,7 +60,7 @@ class SYNC_EXPORT SyncChangeProcessor { // // Refer to sync_data.h for a description of |sync_tag|. // - // TODO:(maniscalco): N.B. this method should really be pure virtual. An + // TODO(maniscalco): N.B. this method should really be pure virtual. An // implentation is provided here just to verify that everything compiles. // Update this method to be pure virtual (bug 353300). virtual void GetSyncData(const ModelType& type, diff --git a/sync/api/sync_data.cc b/sync/api/sync_data.cc index d6c9152..17b54dc 100644 --- a/sync/api/sync_data.cc +++ b/sync/api/sync_data.cc @@ -4,6 +4,7 @@ #include "sync/api/sync_data.h" +#include <algorithm> #include <ostream> #include "base/json/json_writer.h" diff --git a/sync/api/sync_data_unittest.cc b/sync/api/sync_data_unittest.cc index 9d45149..9d676c0 100644 --- a/sync/api/sync_data_unittest.cc +++ b/sync/api/sync_data_unittest.cc @@ -23,9 +23,9 @@ namespace syncer { namespace { -const string kSyncTag = "3984729834"; +const char kSyncTag[] = "3984729834"; const ModelType kDatatype = syncer::PREFERENCES; -const string kNonUniqueTitle = "my preference"; +const char kNonUniqueTitle[] = "my preference"; const int64 kId = 439829; const base::Time kLastModifiedTime = base::Time(); diff --git a/sync/api/sync_error.h b/sync/api/sync_error.h index 281621e..d2832a5 100644 --- a/sync/api/sync_error.h +++ b/sync/api/sync_error.h @@ -27,21 +27,23 @@ class SYNC_EXPORT SyncError { // in the datatype being disabled) from actionable sync errors (which might // have more complicated results). enum ErrorType { - UNSET, // No error. - UNRECOVERABLE_ERROR, // An unrecoverable runtime error was encountered, and - // sync should be disabled and purged completely. - DATATYPE_ERROR, // A datatype error was encountered, and the datatype - // should be disabled and purged completely. Note that - // datatype errors may be reset, triggering a - // re-enable. - PERSISTENCE_ERROR, // A persistence error was detected, and the - // datataype should be associated after a sync update. - CRYPTO_ERROR, // A cryptographer error was detected, and the - // datatype should be associated after it is resolved. - UNREADY_ERROR, // A datatype is not ready to start yet, so should be - // neither purged nor enabled until it is ready. - DATATYPE_POLICY_ERROR // A datatype should be disabled and purged due - // to configuration constraints. + UNSET, // No error. + UNRECOVERABLE_ERROR, // An unrecoverable runtime error was encountered, + // and sync should be disabled and purged completely. + DATATYPE_ERROR, // A datatype error was encountered, and the datatype + // should be disabled and purged completely. Note + // that datatype errors may be reset, triggering a + // re-enable. + PERSISTENCE_ERROR, // A persistence error was detected, and the + // datataype should be associated after a sync + // update. + CRYPTO_ERROR, // A cryptographer error was detected, and the + // datatype should be associated after it is + // resolved. + UNREADY_ERROR, // A datatype is not ready to start yet, so should be + // neither purged nor enabled until it is ready. + DATATYPE_POLICY_ERROR // A datatype should be disabled and purged due to + // configuration constraints. }; // Severity is used to indicate how an error should be logged and @@ -93,6 +95,7 @@ class SYNC_EXPORT SyncError { // Returns empty string is IsSet() is false. std::string ToString() const; + private: // Print error information to log. void PrintLogError() const; diff --git a/sync/api/sync_error_factory_mock.h b/sync/api/sync_error_factory_mock.h index bd675ee..cffab26 100644 --- a/sync/api/sync_error_factory_mock.h +++ b/sync/api/sync_error_factory_mock.h @@ -5,8 +5,9 @@ #ifndef SYNC_API_SYNC_ERROR_FACTORY_MOCK_H_ #define SYNC_API_SYNC_ERROR_FACTORY_MOCK_H_ -#include "sync/api/sync_error_factory.h" +#include <string> +#include "sync/api/sync_error_factory.h" #include "testing/gmock/include/gmock/gmock.h" namespace syncer { |