summaryrefslogtreecommitdiffstats
path: root/sync/util
diff options
context:
space:
mode:
authorskym <skym@chromium.org>2015-12-14 11:56:34 -0800
committerCommit bot <commit-bot@chromium.org>2015-12-14 19:57:20 +0000
commitf593336f972fa8d64584baf5c2e5cef809857a88 (patch)
treecc265bd5b06199bb10a78dd1835fb67db0312ebf /sync/util
parentd9f3318112e50d0cfd3e2c2cd97b236dd0038f79 (diff)
downloadchromium_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/util')
-rw-r--r--sync/util/get_session_name_win.cc4
-rw-r--r--sync/util/nigori.cc7
-rw-r--r--sync/util/nigori.h2
-rw-r--r--sync/util/test_unrecoverable_error_handler.h9
4 files changed, 12 insertions, 10 deletions
diff --git a/sync/util/get_session_name_win.cc b/sync/util/get_session_name_win.cc
index 58980a3..80df90b 100644
--- a/sync/util/get_session_name_win.cc
+++ b/sync/util/get_session_name_win.cc
@@ -4,12 +4,12 @@
#include "sync/util/get_session_name_win.h"
+#include <windows.h>
+
#include "base/logging.h"
#include "base/macros.h"
#include "base/strings/utf_string_conversions.h"
-#include <windows.h>
-
namespace syncer {
namespace internal {
diff --git a/sync/util/nigori.cc b/sync/util/nigori.cc
index 7a9702d..225e074 100644
--- a/sync/util/nigori.cc
+++ b/sync/util/nigori.cc
@@ -31,7 +31,8 @@ class NigoriStream {
// followed by |value| itself to the stream.
NigoriStream& operator<<(const std::string& value) {
uint32 size = base::HostToNet32(value.size());
- stream_.write((char *) &size, sizeof(uint32));
+
+ stream_.write(reinterpret_cast<char*>(&size), sizeof(uint32));
stream_ << value;
return *this;
}
@@ -41,9 +42,9 @@ class NigoriStream {
// bits, to the stream.
NigoriStream& operator<<(const Nigori::Type type) {
uint32 size = base::HostToNet32(sizeof(uint32));
- stream_.write((char *) &size, sizeof(uint32));
+ stream_.write(reinterpret_cast<char*>(&size), sizeof(uint32));
uint32 value = base::HostToNet32(type);
- stream_.write((char *) &value, sizeof(uint32));
+ stream_.write(reinterpret_cast<char*>(&value), sizeof(uint32));
return *this;
}
diff --git a/sync/util/nigori.h b/sync/util/nigori.h
index cd67bf9..40e9692 100644
--- a/sync/util/nigori.h
+++ b/sync/util/nigori.h
@@ -24,7 +24,7 @@ namespace syncer {
// for your secret (basically a map key), and |Encrypt| and |Decrypt| to store
// and retrieve the secret.
//
-// TODO: Link to doc.
+// https://www.cl.cam.ac.uk/~drt24/nigori/nigori-overview.pdf
class SYNC_EXPORT Nigori {
public:
enum Type {
diff --git a/sync/util/test_unrecoverable_error_handler.h b/sync/util/test_unrecoverable_error_handler.h
index 1546783..ec045067 100644
--- a/sync/util/test_unrecoverable_error_handler.h
+++ b/sync/util/test_unrecoverable_error_handler.h
@@ -2,8 +2,10 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef SYNC_INTERNAL_API_INCLUDES_TEST_UNRECOVERABLE_ERROR_HANDLER_H_
-#define SYNC_INTERNAL_API_INCLUDES_TEST_UNRECOVERABLE_ERROR_HANDLER_H_
+#ifndef SYNC_UTIL_TEST_UNRECOVERABLE_ERROR_HANDLER_H_
+#define SYNC_UTIL_TEST_UNRECOVERABLE_ERROR_HANDLER_H_
+
+#include <string>
#include "base/compiler_specific.h"
#include "base/memory/weak_ptr.h"
@@ -29,5 +31,4 @@ class TestUnrecoverableErrorHandler : public UnrecoverableErrorHandler {
} // namespace syncer
-#endif // SYNC_INTERNAL_API_INCLUDES_TEST_UNRECOVERABLE_ERROR_HANDLER_H_
-
+#endif // SYNC_UTIL_TEST_UNRECOVERABLE_ERROR_HANDLER_H_