diff options
author | Bertrand SIMONNET <bsimonnet@chromium.org> | 2014-07-02 12:13:56 -0700 |
---|---|---|
committer | chrome-internal-fetch <chrome-internal-fetch@google.com> | 2014-07-08 17:31:14 +0000 |
commit | b54b6dce29733370c74385e08ecd6666302f4df9 (patch) | |
tree | b9952e9b54cf69643a1275bab9ccc78b426ab1e8 | |
parent | e865fcabe29083c6ac5a3c797c7395fc1fbd66a0 (diff) | |
download | platform_external_libbrillo-b54b6dce29733370c74385e08ecd6666302f4df9.tar.gz platform_external_libbrillo-b54b6dce29733370c74385e08ecd6666302f4df9.tar.bz2 platform_external_libbrillo-b54b6dce29733370c74385e08ecd6666302f4df9.zip |
libchromeos: Fix linting issues
This fixes the easiest linting issues introduced by the move from platform to
platform2 (mostly complete import path and correct header guard).
A second CL will address non trivial issues.
BUG=chromium:391075
TEST=FEATURES=test emerge-amd64-generic libchromeos bootstat platform2
TEST=emerge-daisy libchromeos bootstat platform2
Change-Id: Ide30a251b72c605a7a50f327bd89915bb3235498
Reviewed-on: https://chromium-review.googlesource.com/206519
Reviewed-by: Alex Vakulenko <avakulenko@chromium.org>
Tested-by: Bertrand Simonnet <bsimonnet@chromium.org>
Commit-Queue: Ben Chan <benchan@chromium.org>
36 files changed, 126 insertions, 110 deletions
diff --git a/chromeos/bootstat/bootstat.h b/chromeos/bootstat/bootstat.h index d6b13d2..b1b8b4d 100644 --- a/chromeos/bootstat/bootstat.h +++ b/chromeos/bootstat/bootstat.h @@ -7,8 +7,8 @@ // mechanism to associate a named event with the time that it // occurred and with other relevant statistics. -#ifndef BOOTSTAT_H_ -#define BOOTSTAT_H_ +#ifndef LIBCHROMEOS_CHROMEOS_BOOTSTAT_BOOTSTAT_H_ +#define LIBCHROMEOS_CHROMEOS_BOOTSTAT_BOOTSTAT_H_ #if defined(__cplusplus) extern "C" { @@ -39,4 +39,4 @@ extern void bootstat_log(const char* event_name); #if defined(__cplusplus) } #endif -#endif // BOOTSTAT_H_ +#endif // LIBCHROMEOS_CHROMEOS_BOOTSTAT_BOOTSTAT_H_ diff --git a/chromeos/bootstat/bootstat_test.h b/chromeos/bootstat/bootstat_test.h index cf3ee9f..2fe7e76 100644 --- a/chromeos/bootstat/bootstat_test.h +++ b/chromeos/bootstat/bootstat_test.h @@ -7,8 +7,8 @@ // test code only, and is not intended to be exported for general // use. -#ifndef BOOTSTAT_TEST_H_ -#define BOOTSTAT_TEST_H_ +#ifndef LIBCHROMEOS_CHROMEOS_BOOTSTAT_BOOTSTAT_TEST_H_ +#define LIBCHROMEOS_CHROMEOS_BOOTSTAT_BOOTSTAT_TEST_H_ #if defined(__cplusplus) extern "C" { @@ -21,4 +21,4 @@ extern void bootstat_set_disk_file_name_for_test(const char*); #if defined(__cplusplus) } #endif -#endif // BOOTSTAT_TEST_H_ +#endif // LIBCHROMEOS_CHROMEOS_BOOTSTAT_BOOTSTAT_TEST_H_ diff --git a/chromeos/bootstat/log_unit_tests.cc b/chromeos/bootstat/log_unit_tests.cc index a87b426..fce46ee 100644 --- a/chromeos/bootstat/log_unit_tests.cc +++ b/chromeos/bootstat/log_unit_tests.cc @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "bootstat.h" -#include "bootstat_test.h" +#include "chromeos/bootstat/bootstat.h" +#include "chromeos/bootstat/bootstat_test.h" #include <errno.h> #include <stdlib.h> @@ -34,14 +34,14 @@ static void RemoveFile(const string& file_path) { // event files. After logging, the expected content is tested // against the actual content. class EventTracker { - public: + public: EventTracker(const string& name, const string& uptime_prefix, const string& disk_prefix); void TestLogEvent(const string& uptime, const string& diskstats); void TestLogSymlink(const string& dirname, bool create_target); void Reset(); - private: + private: string event_name_; string uptime_file_name_; string uptime_content_; @@ -190,7 +190,7 @@ void EventTracker::Reset() { // selected by this test. This class also redirects the location for // the event files created by bootstat_log() to a temporary directory. class BootstatTest : public ::testing::Test { - protected: + protected: virtual void SetUp(); virtual void TearDown(); @@ -206,7 +206,7 @@ class BootstatTest : public ::testing::Test { string stats_output_dir_; - private: + private: string uptime_event_prefix_; string disk_event_prefix_; @@ -319,11 +319,10 @@ TEST_F(BootstatTest, ContentGeneration) { TEST_F(BootstatTest, EventNameTruncation) { static const char kMostVoluminousEventName[] = // 16 32 48 64 - "event-6789abcdef_123456789ABCDEF.123456789abcdef0123456789abcdef" // 64 - "=064+56789abcdef_123456789ABCDEF.123456789abcdef0123456789abcdef" // 128 - "=128+56789abcdef_123456789ABCDEF.123456789abcdef0123456789abcdef" // 191 - "=191+56789abcdef_123456789ABCDEF.123456789abcdef0123456789abcdef" // 256 - ; + "event-6789abcdef_123456789ABCDEF.123456789abcdef0123456789abcdef" // 64 + "=064+56789abcdef_123456789ABCDEF.123456789abcdef0123456789abcdef" // 128 + "=128+56789abcdef_123456789ABCDEF.123456789abcdef0123456789abcdef" // 191 + "=191+56789abcdef_123456789ABCDEF.123456789abcdef0123456789abcdef"; // 256 string very_long(kMostVoluminousEventName); SetMockStats(bootstat_data[0], bootstat_data[1]); diff --git a/chromeos/callback.h b/chromeos/callback.h index fe09979..99b01b1 100644 --- a/chromeos/callback.h +++ b/chromeos/callback.h @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef PLATFORM_BASE_CALLBACK_H_ -#define PLATFORM_BASE_CALLBACK_H_ +#ifndef LIBCHROMEOS_CHROMEOS_CALLBACK_H_ +#define LIBCHROMEOS_CHROMEOS_CALLBACK_H_ #include <google/protobuf/stubs/common.h> @@ -18,4 +18,4 @@ using google::protobuf::NewCallback; } // namespace chromeos -#endif // PLATFORM_BASE_PORT_H_ +#endif // LIBCHROMEOS_CHROMEOS_CALLBACK_H_ diff --git a/chromeos/cryptohome.cc b/chromeos/cryptohome.cc index 239c5c1..54e8b05 100644 --- a/chromeos/cryptohome.cc +++ b/chromeos/cryptohome.cc @@ -130,6 +130,6 @@ void SetSystemSalt(std::string* value) { salt = value; } -} // namespace home -} // namespace cryptohome -} // namespace chromeos +} // namespace home +} // namespace cryptohome +} // namespace chromeos diff --git a/chromeos/cryptohome.h b/chromeos/cryptohome.h index 182c5e4..47ea1b6 100644 --- a/chromeos/cryptohome.h +++ b/chromeos/cryptohome.h @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef CHROMEOS_CRYPTOHOME_H_ -#define CHROMEOS_CRYPTOHOME_H_ +#ifndef LIBCHROMEOS_CHROMEOS_CRYPTOHOME_H_ +#define LIBCHROMEOS_CHROMEOS_CRYPTOHOME_H_ #include <string> @@ -66,8 +66,8 @@ void SetSystemSalt(std::string* salt); // Returns the system salt. std::string* GetSystemSalt(); -} // namespace home -} // namespace cryptohome -} // namespace chromeos +} // namespace home +} // namespace cryptohome +} // namespace chromeos -#endif // CHROMEOS_CRYPTOHOME_H_ +#endif // LIBCHROMEOS_CHROMEOS_CRYPTOHOME_H_ diff --git a/chromeos/dbus/abstract_dbus_service.cc b/chromeos/dbus/abstract_dbus_service.cc index 5dd1491..a59922f 100644 --- a/chromeos/dbus/abstract_dbus_service.cc +++ b/chromeos/dbus/abstract_dbus_service.cc @@ -2,9 +2,10 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include <chromeos/dbus/abstract_dbus_service.h> #include <base/logging.h> +#include "chromeos/dbus/abstract_dbus_service.h" + namespace chromeos { namespace dbus { diff --git a/chromeos/dbus/abstract_dbus_service.h b/chromeos/dbus/abstract_dbus_service.h index 7b24632..b15ae79 100644 --- a/chromeos/dbus/abstract_dbus_service.h +++ b/chromeos/dbus/abstract_dbus_service.h @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef CHROMEOS_DBUS_ABSTRACT_DBUS_SERVICE_H_ -#define CHROMEOS_DBUS_ABSTRACT_DBUS_SERVICE_H_ +#ifndef LIBCHROMEOS_CHROMEOS_DBUS_ABSTRACT_DBUS_SERVICE_H_ +#define LIBCHROMEOS_CHROMEOS_DBUS_ABSTRACT_DBUS_SERVICE_H_ #include <chromeos/dbus/dbus.h> @@ -46,4 +46,4 @@ class AbstractDbusService { } // namespace dbus } // namespace chromeos -#endif // CHROMEOS_DBUS_ABSTRACT_DBUS_SERVICE_H_ +#endif // LIBCHROMEOS_CHROMEOS_DBUS_ABSTRACT_DBUS_SERVICE_H_ diff --git a/chromeos/dbus/dbus.h b/chromeos/dbus/dbus.h index 45511cf..979608c 100644 --- a/chromeos/dbus/dbus.h +++ b/chromeos/dbus/dbus.h @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef CHROMEOS_DBUS_H_ -#define CHROMEOS_DBUS_H_ +#ifndef LIBCHROMEOS_CHROMEOS_DBUS_DBUS_H_ +#define LIBCHROMEOS_CHROMEOS_DBUS_DBUS_H_ #include <dbus/dbus-glib.h> #include <glib-object.h> @@ -196,7 +196,7 @@ bool RegisterExclusiveService(const BusConnection& connection, const char* service_path, GObject* object); -template <typename F> // F is a function signature +template <typename F> // F is a function signature class MonitorConnection; template <typename A1> @@ -433,11 +433,10 @@ bool RetrieveProperty(const Proxy& proxy, G_TYPE_STRING, property, G_TYPE_INVALID, G_TYPE_VALUE, &value, - G_TYPE_INVALID)){ + G_TYPE_INVALID)) { LOG(ERROR) << "Getting property failed: " << (error->message ? error->message : "Unknown Error."); return false; - } return glib::Retrieve(value, result); } @@ -475,8 +474,8 @@ class SignalWatcher { SignalWatcher() {} ~SignalWatcher(); void StartMonitoring(const std::string& interface, const std::string& signal); - private: + private: // Callback invoked on the given signal arrival. virtual void OnSignal(DBusMessage* message) = 0; @@ -494,4 +493,4 @@ class SignalWatcher { } // namespace dbus } // namespace chromeos -#endif // CHROMEOS_DBUS_H_ +#endif // LIBCHROMEOS_CHROMEOS_DBUS_DBUS_H_ diff --git a/chromeos/exception.h b/chromeos/exception.h index 79fbeaf..ae6621f 100644 --- a/chromeos/exception.h +++ b/chromeos/exception.h @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef CHROMEOS_EXCEPTION_H_ -#define CHROMEOS_EXCEPTION_H_ +#ifndef LIBCHROMEOS_CHROMEOS_EXCEPTION_H_ +#define LIBCHROMEOS_CHROMEOS_EXCEPTION_H_ #include <base/logging.h> @@ -181,5 +181,5 @@ void TerminalError(const T& x) { /******************************************************************************/ -#endif // CHROMEOS_EXCEPTION_H_ +#endif // LIBCHROMEOS_CHROMEOS_EXCEPTION_H_ diff --git a/chromeos/glib/object.h b/chromeos/glib/object.h index 17e0a16..487259a 100644 --- a/chromeos/glib/object.h +++ b/chromeos/glib/object.h @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef CHROMEOS_GLIB_OBJECT_H_ -#define CHROMEOS_GLIB_OBJECT_H_ +#ifndef LIBCHROMEOS_CHROMEOS_GLIB_OBJECT_H_ +#define LIBCHROMEOS_CHROMEOS_GLIB_OBJECT_H_ #include <glib-object.h> @@ -104,7 +104,7 @@ class Value; template < > inline ::GType type_to_gtypeid<const Value*>() { return G_TYPE_VALUE; -}; +} template < > inline ::GType type_to_gtypeid< ::uint32>() { @@ -112,17 +112,17 @@ inline ::GType type_to_gtypeid< ::uint32>() { // assumes sizeof(guint) == sizeof(guint32). Need a static_assert to assert // that. return G_TYPE_UINT; -}; +} template < > inline ::GType type_to_gtypeid< ::int64>() { return G_TYPE_INT64; -}; +} template < > inline ::GType type_to_gtypeid< ::int32>() { return G_TYPE_INT; -}; +} // \brief Value (and Retrieve) support using std::string as well as const char* // by promoting from const char* to the string. promote_from provides a mapping @@ -335,7 +335,6 @@ typedef ::scoped_ptr< ::GArray, FreeArray> ScopedArray; template <typename T> // T models pointer class ScopedPtrArray { public: - typedef ::GPtrArray element_type; typedef T value_type; @@ -501,4 +500,4 @@ class ScopedHashTable { } // namespace glib } // namespace chromeos -#endif // GLIB_OBJECT_H_ +#endif // LIBCHROMEOS_CHROMEOS_GLIB_OBJECT_H_ diff --git a/chromeos/policy/device_policy.cc b/chromeos/policy/device_policy.cc index c4a55b9..e9445e7 100644 --- a/chromeos/policy/device_policy.cc +++ b/chromeos/policy/device_policy.cc @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "device_policy.h" +#include "policy/device_policy.h" namespace policy { diff --git a/chromeos/policy/device_policy.h b/chromeos/policy/device_policy.h index cecb601..f25c910 100644 --- a/chromeos/policy/device_policy.h +++ b/chromeos/policy/device_policy.h @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef LIBPOLICY_DEVICE_POLICY_H_ -#define LIBPOLICY_DEVICE_POLICY_H_ +#ifndef LIBCHROMEOS_CHROMEOS_POLICY_DEVICE_POLICY_H_ +#define LIBCHROMEOS_CHROMEOS_POLICY_DEVICE_POLICY_H_ #include <set> #include <string> @@ -158,4 +158,4 @@ class DevicePolicy { #pragma GCC visibility pop -#endif // LIBPOLICY_DEVICE_POLICY_H_ +#endif // LIBCHROMEOS_CHROMEOS_POLICY_DEVICE_POLICY_H_ diff --git a/chromeos/policy/device_policy_impl.cc b/chromeos/policy/device_policy_impl.cc index d29a81e..b888447 100644 --- a/chromeos/policy/device_policy_impl.cc +++ b/chromeos/policy/device_policy_impl.cc @@ -10,6 +10,7 @@ #include <openssl/evp.h> #include <openssl/x509.h> +#include <set> #include <string> #include "bindings/chrome_device_policy.pb.h" diff --git a/chromeos/policy/device_policy_impl.h b/chromeos/policy/device_policy_impl.h index f90191e..46eb4fa 100644 --- a/chromeos/policy/device_policy_impl.h +++ b/chromeos/policy/device_policy_impl.h @@ -2,9 +2,10 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef LIBPOLICY_DEVICE_POLICY_IMPL_H_ -#define LIBPOLICY_DEVICE_POLICY_IMPL_H_ +#ifndef LIBCHROMEOS_CHROMEOS_POLICY_DEVICE_POLICY_IMPL_H_ +#define LIBCHROMEOS_CHROMEOS_POLICY_DEVICE_POLICY_IMPL_H_ +#include <set> #include <string> #include <vector> @@ -13,7 +14,7 @@ #include "bindings/chrome_device_policy.pb.h" #include "bindings/device_management_backend.pb.h" -#include "device_policy.h" +#include "policy/device_policy.h" #pragma GCC visibility push(default) @@ -83,4 +84,4 @@ class DevicePolicyImpl : public DevicePolicy { #pragma GCC visibility pop -#endif // LIBPOLICY_DEVICE_POLICY_IMPL_H_ +#endif // LIBCHROMEOS_CHROMEOS_POLICY_DEVICE_POLICY_IMPL_H_ diff --git a/chromeos/policy/libpolicy.cc b/chromeos/policy/libpolicy.cc index b620445..2e2c621 100644 --- a/chromeos/policy/libpolicy.cc +++ b/chromeos/policy/libpolicy.cc @@ -2,11 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "libpolicy.h" +#include "policy/libpolicy.h" #include <base/logging.h> -#include "device_policy_impl.h" +#include "policy/device_policy_impl.h" namespace policy { diff --git a/chromeos/policy/libpolicy.h b/chromeos/policy/libpolicy.h index cd3aaf5..aac1a43 100644 --- a/chromeos/policy/libpolicy.h +++ b/chromeos/policy/libpolicy.h @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef POLICY_LIBPOLICY_H_ -#define POLICY_LIBPOLICY_H_ +#ifndef LIBCHROMEOS_CHROMEOS_POLICY_LIBPOLICY_H_ +#define LIBCHROMEOS_CHROMEOS_POLICY_LIBPOLICY_H_ #include <string> @@ -26,7 +26,7 @@ class PolicyProvider { virtual ~PolicyProvider(); // Contructor for tests only! - PolicyProvider(DevicePolicy* device_policy); + explicit PolicyProvider(DevicePolicy* device_policy); // This function will ensure the freshnes of the contents that the getters // are delivering. Normally contents are cached to prevent unneccessary load. @@ -47,4 +47,4 @@ class PolicyProvider { #pragma GCC visibility pop -#endif // POLICY_LIBPOLICY_H_ +#endif // LIBCHROMEOS_CHROMEOS_POLICY_LIBPOLICY_H_ diff --git a/chromeos/policy/mock_device_policy.h b/chromeos/policy/mock_device_policy.h index 7148430..1b49a2f 100644 --- a/chromeos/policy/mock_device_policy.h +++ b/chromeos/policy/mock_device_policy.h @@ -2,15 +2,16 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef MOCK_DEVICE_POLICY_H_ -#define MOCK_DEVICE_POLICY_H_ +#ifndef LIBCHROMEOS_CHROMEOS_POLICY_MOCK_DEVICE_POLICY_H_ +#define LIBCHROMEOS_CHROMEOS_POLICY_MOCK_DEVICE_POLICY_H_ +#include <set> #include <string> #include <vector> #include <gmock/gmock.h> -#include "device_policy.h" +#include "policy/device_policy.h" #pragma GCC visibility push(default) @@ -82,4 +83,4 @@ class MockDevicePolicy : public DevicePolicy { #pragma GCC visibility pop -#endif // LIBPOLICY_DEVICE_POLICY_H_ +#endif // LIBCHROMEOS_CHROMEOS_POLICY_MOCK_DEVICE_POLICY_H_ diff --git a/chromeos/policy/mock_libpolicy.h b/chromeos/policy/mock_libpolicy.h index 57a7ec9..894aef3 100644 --- a/chromeos/policy/mock_libpolicy.h +++ b/chromeos/policy/mock_libpolicy.h @@ -2,10 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef POLICY_MOCK_LIBPOLICY_H_ -#define POLICY_MOCK_LIBPOLICY_H_ +#ifndef LIBCHROMEOS_CHROMEOS_POLICY_MOCK_LIBPOLICY_H_ +#define LIBCHROMEOS_CHROMEOS_POLICY_MOCK_LIBPOLICY_H_ #include <gmock/gmock.h> +#include <set> #include "policy/libpolicy.h" @@ -30,4 +31,4 @@ class MockPolicyProvider : public PolicyProvider { #pragma GCC visibility pop -#endif // POLICY_MOCK_LIBPOLICY_H_ +#endif // LIBCHROMEOS_CHROMEOS_POLICY_MOCK_LIBPOLICY_H_ diff --git a/chromeos/process.h b/chromeos/process.h index 36f659a..b5eb700 100644 --- a/chromeos/process.h +++ b/chromeos/process.h @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef CHROMEOS_PROCESS_H_ -#define CHROMEOS_PROCESS_H_ +#ifndef LIBCHROMEOS_CHROMEOS_PROCESS_H_ +#define LIBCHROMEOS_CHROMEOS_PROCESS_H_ #include <sys/types.h> @@ -177,4 +177,4 @@ class ProcessImpl : public Process { } // namespace chromeos -#endif // CHROMEOS_PROCESS_H +#endif // LIBCHROMEOS_CHROMEOS_PROCESS_H_ diff --git a/chromeos/process_information.cc b/chromeos/process_information.cc index 3fcb4d7..6d3a7f8 100644 --- a/chromeos/process_information.cc +++ b/chromeos/process_information.cc @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "process_information.h" +#include "chromeos/process_information.h" namespace chromeos { diff --git a/chromeos/process_information.h b/chromeos/process_information.h index c9cee34..8fbcaae 100644 --- a/chromeos/process_information.h +++ b/chromeos/process_information.h @@ -2,6 +2,9 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifndef LIBCHROMEOS_CHROMEOS_PROCESS_INFORMATION_H_ +#define LIBCHROMEOS_CHROMEOS_PROCESS_INFORMATION_H_ + #include <set> #include <string> #include <vector> @@ -66,3 +69,5 @@ class ProcessInformation { }; } // namespace chromeos + +#endif // LIBCHROMEOS_CHROMEOS_PROCESS_INFORMATION_H_ diff --git a/chromeos/process_mock.h b/chromeos/process_mock.h index 8188788..9e8acac 100644 --- a/chromeos/process_mock.h +++ b/chromeos/process_mock.h @@ -2,14 +2,15 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef CHROMEOS_PROCESS_MOCK_H_ -#define CHROMEOS_PROCESS_MOCK_H_ +#ifndef LIBCHROMEOS_CHROMEOS_PROCESS_MOCK_H_ +#define LIBCHROMEOS_CHROMEOS_PROCESS_MOCK_H_ #include <string> -#include <chromeos/process.h> #include <gmock/gmock.h> +#include "chromeos/process.h" + namespace chromeos { class ProcessMock : public Process { @@ -37,4 +38,4 @@ class ProcessMock : public Process { } // namespace chromeos -#endif // CHROMEOS_PROCESS_MOCK_H_ +#endif // LIBCHROMEOS_CHROMEOS_PROCESS_MOCK_H_ diff --git a/chromeos/secure_blob.cc b/chromeos/secure_blob.cc index 6ac6053..dcef168 100644 --- a/chromeos/secure_blob.cc +++ b/chromeos/secure_blob.cc @@ -2,7 +2,9 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "secure_blob.h" +#include <string> + +#include "chromeos/secure_blob.h" namespace chromeos { diff --git a/chromeos/secure_blob.h b/chromeos/secure_blob.h index eacfd5c..6b8c101 100644 --- a/chromeos/secure_blob.h +++ b/chromeos/secure_blob.h @@ -2,10 +2,12 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef CHROMEOS_SECURE_BLOB_H_ -#define CHROMEOS_SECURE_BLOB_H_ +#ifndef LIBCHROMEOS_CHROMEOS_SECURE_BLOB_H_ +#define LIBCHROMEOS_CHROMEOS_SECURE_BLOB_H_ -#include "utility.h" +#include <string> + +#include "chromeos/utility.h" namespace chromeos { @@ -35,4 +37,4 @@ class SecureBlob : public chromeos::Blob { } // namespace chromeos -#endif // CHROMEOS_SECURE_BLOB_H_ +#endif // LIBCHROMEOS_CHROMEOS_SECURE_BLOB_H_ diff --git a/chromeos/secure_blob_unittest.cc b/chromeos/secure_blob_unittest.cc index bc5bac6..0b7be1e 100644 --- a/chromeos/secure_blob_unittest.cc +++ b/chromeos/secure_blob_unittest.cc @@ -4,12 +4,12 @@ // Unit tests for SecureBlob. -#include "secure_blob.h" +#include "chromeos/secure_blob.h" #include <base/logging.h> #include <gtest/gtest.h> -#include "utility.h" +#include "chromeos/utility.h" namespace chromeos { using std::string; @@ -92,4 +92,4 @@ TEST_F(SecureBlobTest, ResizeTest) { EXPECT_EQ(0, static_cast<unsigned char*>(blob.data())[length - 1]); } -} // namespace cryptohome +} // namespace chromeos diff --git a/chromeos/syslog_logging.h b/chromeos/syslog_logging.h index 86dda42..3df8e26 100644 --- a/chromeos/syslog_logging.h +++ b/chromeos/syslog_logging.h @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef CHROMEOS_SYSLOG_LOGGING_H_ -#define CHROMEOS_SYSLOG_LOGGING_H_ +#ifndef LIBCHROMEOS_CHROMEOS_SYSLOG_LOGGING_H_ +#define LIBCHROMEOS_CHROMEOS_SYSLOG_LOGGING_H_ #include <string> @@ -43,4 +43,4 @@ bool FindLog(const char* string); } // namespace chromeos -#endif // CHROMEOS_SYSLOG_LOGGING_H_ +#endif // LIBCHROMEOS_CHROMEOS_SYSLOG_LOGGING_H_ diff --git a/chromeos/syslog_logging_unittest.cc b/chromeos/syslog_logging_unittest.cc index 770db3f..cb11119 100644 --- a/chromeos/syslog_logging_unittest.cc +++ b/chromeos/syslog_logging_unittest.cc @@ -30,4 +30,4 @@ TEST_F(SyslogLoggingDeathTest, FatalLoggingIsFatal) { SetLogFlags(old_flags); } -} // namespace cryptohome +} // namespace chromeos diff --git a/chromeos/test_helpers.h b/chromeos/test_helpers.h index 1fd1229..bbc1a35 100644 --- a/chromeos/test_helpers.h +++ b/chromeos/test_helpers.h @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef _CHROMEOS_TEST_HELPERS_H_ -#define _CHROMEOS_TEST_HELPERS_H_ +#ifndef LIBCHROMEOS_CHROMEOS_TEST_HELPERS_H_ +#define LIBCHROMEOS_CHROMEOS_TEST_HELPERS_H_ #include "gtest/gtest.h" @@ -13,7 +13,8 @@ #include <base/file_util.h> #include <base/files/file_path.h> #include <base/logging.h> -#include <chromeos/syslog_logging.h> + +#include "chromeos/syslog_logging.h" inline void ExpectFileEquals(const char* golden, const char* file_path) { @@ -29,4 +30,4 @@ inline void SetUpTests(int *argc, char** argv, bool log_to_stderr) { ::testing::InitGoogleTest(argc, argv); } -#endif // _CHROMEOS_TEST_HELPERS_H_ +#endif // LIBCHROMEOS_CHROMEOS_TEST_HELPERS_H_ diff --git a/chromeos/ui/chromium_command_builder.h b/chromeos/ui/chromium_command_builder.h index a25c918..41bef72 100644 --- a/chromeos/ui/chromium_command_builder.h +++ b/chromeos/ui/chromium_command_builder.h @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef CHROMEOS_UI_CHROMIUM_COMMAND_BUILDER_H_ -#define CHROMEOS_UI_CHROMIUM_COMMAND_BUILDER_H_ +#ifndef LIBCHROMEOS_CHROMEOS_UI_CHROMIUM_COMMAND_BUILDER_H_ +#define LIBCHROMEOS_CHROMEOS_UI_CHROMIUM_COMMAND_BUILDER_H_ #include <sys/types.h> @@ -164,4 +164,4 @@ class ChromiumCommandBuilder { } // namespace ui } // namespace chromeos -#endif // LOGIN_MANAGER_CHROMIUM_COMMAND_BUILDER_H_ +#endif // LIBCHROMEOS_CHROMEOS_UI_CHROMIUM_COMMAND_BUILDER_H_ diff --git a/chromeos/ui/util.h b/chromeos/ui/util.h index 5e114db..2987961 100644 --- a/chromeos/ui/util.h +++ b/chromeos/ui/util.h @@ -8,8 +8,8 @@ #include <base/files/file_path.h> -#ifndef CHROMEOS_UI_UTIL_H_ -#define CHROMEOS_UI_UTIL_H_ +#ifndef LIBCHROMEOS_CHROMEOS_UI_UTIL_H_ +#define LIBCHROMEOS_CHROMEOS_UI_UTIL_H_ namespace chromeos { namespace ui { @@ -47,4 +47,4 @@ bool Run(const char* command, const char* arg, ...); } // namespace ui } // namespace chromeos -#endif // CHROMEOS_UI_UTIL_H_ +#endif // LIBCHROMEOS_CHROMEOS_UI_UTIL_H_ diff --git a/chromeos/ui/x_server_runner.cc b/chromeos/ui/x_server_runner.cc index a03cfea..57c9817 100644 --- a/chromeos/ui/x_server_runner.cc +++ b/chromeos/ui/x_server_runner.cc @@ -23,8 +23,8 @@ #include <base/rand_util.h> #include <base/strings/string_number_conversions.h> #include <base/strings/stringprintf.h> -#include <chromeos/bootstat/bootstat.h> +#include "chromeos/bootstat/bootstat.h" #include "chromeos/ui/util.h" namespace chromeos { diff --git a/chromeos/ui/x_server_runner.h b/chromeos/ui/x_server_runner.h index 6c1484e..dafae50 100644 --- a/chromeos/ui/x_server_runner.h +++ b/chromeos/ui/x_server_runner.h @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef CHROMEOS_UI_X_SERVER_RUNNER_H_ -#define CHROMEOS_UI_X_SERVER_RUNNER_H_ +#ifndef LIBCHROMEOS_CHROMEOS_UI_X_SERVER_RUNNER_H_ +#define LIBCHROMEOS_CHROMEOS_UI_X_SERVER_RUNNER_H_ #include <sys/types.h> @@ -80,4 +80,4 @@ class XServerRunner { } // namespace ui } // namespace chromeos -#endif // CHROMEOS_UI_X_SERVER_RUNNER_H_ +#endif // LIBCHROMEOS_CHROMEOS_UI_X_SERVER_RUNNER_H_ diff --git a/chromeos/utility.cc b/chromeos/utility.cc index 4d4ace2..675e337 100644 --- a/chromeos/utility.cc +++ b/chromeos/utility.cc @@ -8,6 +8,7 @@ #include <unistd.h> #include <cstring> +#include <map> #include <string> #include <vector> diff --git a/chromeos/utility.h b/chromeos/utility.h index 05b361b..e43ff59 100644 --- a/chromeos/utility.h +++ b/chromeos/utility.h @@ -2,11 +2,12 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef CHROMEOS_UTILITY_H_ -#define CHROMEOS_UTILITY_H_ +#ifndef LIBCHROMEOS_CHROMEOS_UTILITY_H_ +#define LIBCHROMEOS_CHROMEOS_UTILITY_H_ #include <cstdlib> #include <cstring> +#include <map> #include <string> #include <vector> @@ -113,4 +114,4 @@ bool SecureRandomString(size_t len, std::string* result); } // namespace chromeos -#endif /* CHROMEOS_UTILITY_H_ */ +#endif // LIBCHROMEOS_CHROMEOS_UTILITY_H_ diff --git a/testrunner.cc b/testrunner.cc index e4daaea..47a89aa 100644 --- a/testrunner.cc +++ b/testrunner.cc @@ -4,10 +4,11 @@ // based on pam_google_testrunner.cc -#include <chromeos/test_helpers.h> #include <gtest/gtest.h> #include <glib-object.h> +#include "chromeos/test_helpers.h" + int main(int argc, char** argv) { ::g_type_init(); SetUpTests(&argc, argv, true); |