diff options
author | avi <avi@chromium.org> | 2015-12-25 15:27:45 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-12-25 23:28:47 +0000 |
commit | f57136c13874f21a4c6885e49d00d3c45bb427ba (patch) | |
tree | d009df408c8384390d7f10dc961742e2c24ead8b | |
parent | bc5337b805a6249554ca15d8bae77713ace7eff4 (diff) | |
download | chromium_src-f57136c13874f21a4c6885e49d00d3c45bb427ba.zip chromium_src-f57136c13874f21a4c6885e49d00d3c45bb427ba.tar.gz chromium_src-f57136c13874f21a4c6885e49d00d3c45bb427ba.tar.bz2 |
Switch to standard integer types in components/, part 3 of 4.
BUG=138542
TBR=blundell@chromium.org
Review URL: https://codereview.chromium.org/1551433002
Cr-Commit-Position: refs/heads/master@{#366874}
523 files changed, 1376 insertions, 595 deletions
diff --git a/chrome/browser/sync/glue/session_sync_test_helper.h b/chrome/browser/sync/glue/session_sync_test_helper.h index d6ecf74..64a76c8 100644 --- a/chrome/browser/sync/glue/session_sync_test_helper.h +++ b/chrome/browser/sync/glue/session_sync_test_helper.h @@ -8,6 +8,7 @@ #include <string> #include <vector> +#include "base/macros.h" #include "components/sessions/core/session_id.h" namespace sync_driver { @@ -50,6 +51,7 @@ class SessionSyncTestHelper { private: int max_tab_node_id_; + DISALLOW_COPY_AND_ASSIGN(SessionSyncTestHelper); }; diff --git a/chrome/browser/sync/glue/synced_window_delegate_android.h b/chrome/browser/sync/glue/synced_window_delegate_android.h index f5c3a83..be3089f 100644 --- a/chrome/browser/sync/glue/synced_window_delegate_android.h +++ b/chrome/browser/sync/glue/synced_window_delegate_android.h @@ -6,6 +6,7 @@ #define CHROME_BROWSER_SYNC_GLUE_SYNCED_WINDOW_DELEGATE_ANDROID_H_ #include "base/compiler_specific.h" +#include "base/macros.h" #include "components/sessions/core/session_id.h" #include "components/sync_sessions/synced_window_delegate.h" diff --git a/components/navigation_interception/component_jni_registrar.cc b/components/navigation_interception/component_jni_registrar.cc index 9663529..f22367e 100644 --- a/components/navigation_interception/component_jni_registrar.cc +++ b/components/navigation_interception/component_jni_registrar.cc @@ -6,6 +6,7 @@ #include "base/android/jni_android.h" #include "base/android/jni_registrar.h" +#include "base/macros.h" #include "components/navigation_interception/intercept_navigation_delegate.h" #include "components/navigation_interception/navigation_params_android.h" diff --git a/components/navigation_interception/intercept_navigation_delegate.h b/components/navigation_interception/intercept_navigation_delegate.h index 57858fd..9b1fe29 100644 --- a/components/navigation_interception/intercept_navigation_delegate.h +++ b/components/navigation_interception/intercept_navigation_delegate.h @@ -6,6 +6,7 @@ #define COMPONENTS_NAVIGATION_INTERCEPTION_INTERCEPT_NAVIGATION_DELEGATE_H_ #include "base/android/jni_weak_ref.h" +#include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "base/supports_user_data.h" diff --git a/components/navigation_interception/intercept_navigation_throttle.h b/components/navigation_interception/intercept_navigation_throttle.h index 7ce2963..57fd8d0 100644 --- a/components/navigation_interception/intercept_navigation_throttle.h +++ b/components/navigation_interception/intercept_navigation_throttle.h @@ -8,6 +8,7 @@ #include <string> #include "base/callback.h" +#include "base/macros.h" #include "base/memory/weak_ptr.h" #include "content/public/browser/navigation_throttle.h" diff --git a/components/navigation_metrics/navigation_metrics.cc b/components/navigation_metrics/navigation_metrics.cc index ffebe68..e0d61c7 100644 --- a/components/navigation_metrics/navigation_metrics.cc +++ b/components/navigation_metrics/navigation_metrics.cc @@ -4,6 +4,7 @@ #include "components/navigation_metrics/navigation_metrics.h" +#include "base/macros.h" #include "base/metrics/histogram.h" #include "url/gurl.h" diff --git a/components/net_log/chrome_net_log.cc b/components/net_log/chrome_net_log.cc index 3fa79d4..ad3c2d5 100644 --- a/components/net_log/chrome_net_log.cc +++ b/components/net_log/chrome_net_log.cc @@ -12,6 +12,7 @@ #include "base/strings/stringprintf.h" #include "base/sys_info.h" #include "base/values.h" +#include "build/build_config.h" #include "components/data_reduction_proxy/core/common/data_reduction_proxy_event_store.h" #include "components/net_log/net_log_temp_file.h" #include "components/net_log/net_log_temp_file.h" diff --git a/components/net_log/net_log_temp_file.cc b/components/net_log/net_log_temp_file.cc index a8073dd..e775567 100644 --- a/components/net_log/net_log_temp_file.cc +++ b/components/net_log/net_log_temp_file.cc @@ -8,6 +8,7 @@ #include "base/files/file_util.h" #include "base/files/scoped_file.h" #include "base/values.h" +#include "build/build_config.h" #include "components/net_log/chrome_net_log.h" #include "net/log/write_to_file_net_log_observer.h" diff --git a/components/net_log/net_log_temp_file.h b/components/net_log/net_log_temp_file.h index bdc596e..48522fa 100644 --- a/components/net_log/net_log_temp_file.h +++ b/components/net_log/net_log_temp_file.h @@ -7,10 +7,10 @@ #include <string> -#include "base/basictypes.h" #include "base/command_line.h" #include "base/files/file_path.h" #include "base/gtest_prod_util.h" +#include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "base/threading/thread_checker.h" #include "net/log/net_log.h" diff --git a/components/net_log/net_log_temp_file_unittest.cc b/components/net_log/net_log_temp_file_unittest.cc index 618c8e4..86b2eb3 100644 --- a/components/net_log/net_log_temp_file_unittest.cc +++ b/components/net_log/net_log_temp_file_unittest.cc @@ -4,7 +4,8 @@ #include "components/net_log/net_log_temp_file.h" -#include "base/basictypes.h" +#include <stdint.h> + #include "base/command_line.h" #include "base/files/file_path.h" #include "base/files/file_util.h" @@ -93,7 +94,7 @@ class NetLogTempFileTest : public ::testing::Test { EXPECT_EQ(net_export_log_, net_log_temp_file_->log_path_); ASSERT_TRUE(base::PathExists(net_export_log_)); - int64 file_size; + int64_t file_size; // base::GetFileSize returns proper file size on open handles. ASSERT_TRUE(base::GetFileSize(net_export_log_, &file_size)); EXPECT_GT(file_size, 0); @@ -324,13 +325,13 @@ TEST_F(NetLogTempFileTest, DoStartClearsFile) { net_log_temp_file_->ProcessCommand(NetLogTempFile::DO_START); VerifyFileAndStateAfterDoStart(); - int64 start_file_size; + int64_t start_file_size; EXPECT_TRUE(base::GetFileSize(net_export_log_, &start_file_size)); net_log_temp_file_->ProcessCommand(NetLogTempFile::DO_STOP); VerifyFileAndStateAfterDoStop(); - int64 stop_file_size; + int64_t stop_file_size; EXPECT_TRUE(base::GetFileSize(net_export_log_, &stop_file_size)); EXPECT_GE(stop_file_size, start_file_size); @@ -339,7 +340,7 @@ TEST_F(NetLogTempFileTest, DoStartClearsFile) { EXPECT_TRUE( base::AppendToFile(net_export_log_, junk_data.c_str(), junk_data.size())); - int64 junk_file_size; + int64_t junk_file_size; EXPECT_TRUE(base::GetFileSize(net_export_log_, &junk_file_size)); EXPECT_GT(junk_file_size, stop_file_size); @@ -348,14 +349,14 @@ TEST_F(NetLogTempFileTest, DoStartClearsFile) { net_log_temp_file_->ProcessCommand(NetLogTempFile::DO_START); VerifyFileAndStateAfterDoStart(); - int64 new_start_file_size; + int64_t new_start_file_size; EXPECT_TRUE(base::GetFileSize(net_export_log_, &new_start_file_size)); EXPECT_EQ(new_start_file_size, start_file_size); net_log_temp_file_->ProcessCommand(NetLogTempFile::DO_STOP); VerifyFileAndStateAfterDoStop(); - int64 new_stop_file_size; + int64_t new_stop_file_size; EXPECT_TRUE(base::GetFileSize(net_export_log_, &new_stop_file_size)); EXPECT_EQ(new_stop_file_size, stop_file_size); } @@ -370,7 +371,7 @@ TEST_F(NetLogTempFileTest, CheckAddEvent) { net_log_temp_file_->ProcessCommand(NetLogTempFile::DO_STOP); VerifyFileAndStateAfterDoStop(); - int64 stop_file_size; + int64_t stop_file_size; EXPECT_TRUE(base::GetFileSize(net_export_log_, &stop_file_size)); // Perform DO_START and add an Event and then DO_STOP and then compare @@ -384,7 +385,7 @@ TEST_F(NetLogTempFileTest, CheckAddEvent) { net_log_temp_file_->ProcessCommand(NetLogTempFile::DO_STOP); VerifyFileAndStateAfterDoStop(); - int64 new_stop_file_size; + int64_t new_stop_file_size; EXPECT_TRUE(base::GetFileSize(net_export_log_, &new_stop_file_size)); EXPECT_GE(new_stop_file_size, stop_file_size); } diff --git a/components/network_hints/browser/network_hints_message_filter.cc b/components/network_hints/browser/network_hints_message_filter.cc index 0fc22a9..20f8342 100644 --- a/components/network_hints/browser/network_hints_message_filter.cc +++ b/components/network_hints/browser/network_hints_message_filter.cc @@ -5,6 +5,7 @@ #include "components/network_hints/browser/network_hints_message_filter.h" #include "base/logging.h" +#include "base/macros.h" #include "components/network_hints/common/network_hints_common.h" #include "components/network_hints/common/network_hints_messages.h" #include "ipc/ipc_message_macros.h" diff --git a/components/network_hints/common/network_hints_common.h b/components/network_hints/common/network_hints_common.h index 701b003..ecf67c7 100644 --- a/components/network_hints/common/network_hints_common.h +++ b/components/network_hints/common/network_hints_common.h @@ -5,6 +5,8 @@ #ifndef COMPONENTS_NETWORK_HINTS_COMMON_NETWORK_HINTS_COMMON_H_ #define COMPONENTS_NETWORK_HINTS_COMMON_NETWORK_HINTS_COMMON_H_ +#include <stddef.h> + #include <string> #include <vector> diff --git a/components/network_hints/renderer/dns_prefetch_queue.h b/components/network_hints/renderer/dns_prefetch_queue.h index 7f5ac2f..2e03f24 100644 --- a/components/network_hints/renderer/dns_prefetch_queue.h +++ b/components/network_hints/renderer/dns_prefetch_queue.h @@ -26,7 +26,10 @@ #include <string> -#include "base/basictypes.h" +#include <stddef.h> +#include <stdint.h> + +#include "base/macros.h" #include "base/memory/scoped_ptr.h" namespace network_hints { @@ -36,7 +39,7 @@ namespace network_hints { class DnsQueue { public: // BufferSize is a signed type used for indexing into a buffer. - typedef int32 BufferSize; + typedef int32_t BufferSize; enum PushResult { SUCCESSFUL_PUSH, OVERFLOW_PUSH, REDUNDANT_PUSH }; diff --git a/components/network_hints/renderer/dns_prefetch_queue_unittest.cc b/components/network_hints/renderer/dns_prefetch_queue_unittest.cc index cb808c1..4e8f3ae 100644 --- a/components/network_hints/renderer/dns_prefetch_queue_unittest.cc +++ b/components/network_hints/renderer/dns_prefetch_queue_unittest.cc @@ -2,8 +2,12 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#include <stddef.h> +#include <stdint.h> + #include <sstream> +#include "base/macros.h" #include "components/network_hints/renderer/dns_prefetch_queue.h" #include "testing/gtest/include/gtest/gtest.h" @@ -19,8 +23,9 @@ class DnsQueueTest : public testing::Test { // value in sync with the Push value. class DnsQueueSequentialTester { public: - DnsQueueSequentialTester(DnsQueue& buffer, int32 read_counter = 0, - int32 write_counter = 0); + DnsQueueSequentialTester(DnsQueue& buffer, + int32_t read_counter = 0, + int32_t write_counter = 0); // Return of false means buffer was full, or would not take entry. bool Push(void); // Push the string value of next number. @@ -30,18 +35,17 @@ class DnsQueueSequentialTester { private: DnsQueue* buffer_; - int32 read_counter_; // expected value of next read string. - int32 write_counter_; // Numerical value to write next string. + int32_t read_counter_; // expected value of next read string. + int32_t write_counter_; // Numerical value to write next string. DISALLOW_COPY_AND_ASSIGN(DnsQueueSequentialTester); }; - -DnsQueueSequentialTester::DnsQueueSequentialTester( - DnsQueue& buffer, int32 read_counter, int32 write_counter) +DnsQueueSequentialTester::DnsQueueSequentialTester(DnsQueue& buffer, + int32_t read_counter, + int32_t write_counter) : buffer_(&buffer), read_counter_(read_counter), - write_counter_(write_counter) { -} + write_counter_(write_counter) {} bool DnsQueueSequentialTester::Push(void) { std::ostringstream value; diff --git a/components/network_hints/renderer/renderer_dns_prefetch.h b/components/network_hints/renderer/renderer_dns_prefetch.h index 9ee4f61..9df9e5b 100644 --- a/components/network_hints/renderer/renderer_dns_prefetch.h +++ b/components/network_hints/renderer/renderer_dns_prefetch.h @@ -21,10 +21,12 @@ #ifndef COMPONENTS_NETWORK_HINTS_RENDERER_RENDERER_DNS_PREFETCH_H_ #define COMPONENTS_NETWORK_HINTS_RENDERER_RENDERER_DNS_PREFETCH_H_ +#include <stddef.h> + #include <map> #include <string> -#include "base/basictypes.h" +#include "base/macros.h" #include "base/memory/weak_ptr.h" #include "components/network_hints/renderer/dns_prefetch_queue.h" diff --git a/components/network_hints/renderer/renderer_preconnect.h b/components/network_hints/renderer/renderer_preconnect.h index 53a8e3d..39dac93 100644 --- a/components/network_hints/renderer/renderer_preconnect.h +++ b/components/network_hints/renderer/renderer_preconnect.h @@ -17,6 +17,7 @@ #ifndef COMPONENTS_NETWORK_HINTS_RENDERER_RENDERER_PRECONNECT_H_ #define COMPONENTS_NETWORK_HINTS_RENDERER_RENDERER_PRECONNECT_H_ +#include "base/macros.h" #include "url/gurl.h" namespace network_hints { diff --git a/components/network_time/network_time_tracker.cc b/components/network_time/network_time_tracker.cc index 76ee415..17efaff 100644 --- a/components/network_time/network_time_tracker.cc +++ b/components/network_time/network_time_tracker.cc @@ -4,13 +4,15 @@ #include "components/network_time/network_time_tracker.h" -#include "base/basictypes.h" +#include <stdint.h> + #include "base/i18n/time_formatting.h" #include "base/logging.h" #include "base/prefs/pref_registry_simple.h" #include "base/prefs/pref_service.h" #include "base/strings/utf_string_conversions.h" #include "base/time/tick_clock.h" +#include "build/build_config.h" #include "components/network_time/network_time_pref_names.h" namespace network_time { @@ -19,9 +21,9 @@ namespace { // Clock resolution is platform dependent. #if defined(OS_WIN) -const int64 kTicksResolutionMs = base::Time::kMinLowResolutionThresholdMs; +const int64_t kTicksResolutionMs = base::Time::kMinLowResolutionThresholdMs; #else -const int64 kTicksResolutionMs = 1; // Assume 1ms for non-windows platforms. +const int64_t kTicksResolutionMs = 1; // Assume 1ms for non-windows platforms. #endif // Number of time measurements performed in a given network time calculation. diff --git a/components/network_time/network_time_tracker.h b/components/network_time/network_time_tracker.h index 80fd0c2..e625ff3 100644 --- a/components/network_time/network_time_tracker.h +++ b/components/network_time/network_time_tracker.h @@ -5,6 +5,7 @@ #ifndef COMPONENTS_NETWORK_TIME_NETWORK_TIME_TRACKER_H_ #define COMPONENTS_NETWORK_TIME_NETWORK_TIME_TRACKER_H_ +#include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "base/threading/thread_checker.h" #include "base/time/time.h" diff --git a/components/network_time/network_time_tracker_unittest.cc b/components/network_time/network_time_tracker_unittest.cc index b2352c0..c2133fd 100644 --- a/components/network_time/network_time_tracker_unittest.cc +++ b/components/network_time/network_time_tracker_unittest.cc @@ -5,6 +5,7 @@ #include "components/network_time/network_time_tracker.h" #include <math.h> +#include <stdint.h> #include "base/compiler_specific.h" #include "base/prefs/testing_pref_service.h" @@ -16,15 +17,15 @@ namespace network_time { namespace { // These are all in milliseconds. -const int64 kLatency1 = 50; -const int64 kLatency2 = 500; +const int64_t kLatency1 = 50; +const int64_t kLatency2 = 500; // Can not be smaller than 15, it's the NowFromSystemTime() resolution. -const int64 kResolution1 = 17; -const int64 kResolution2 = 177; +const int64_t kResolution1 = 17; +const int64_t kResolution2 = 177; -const int64 kPseudoSleepTime1 = 500000001; -const int64 kPseudoSleepTime2 = 1888; +const int64_t kPseudoSleepTime1 = 500000001; +const int64_t kPseudoSleepTime2 = 1888; // A custom tick clock that will return an arbitrary time. class TestTickClock : public base::TickClock { @@ -61,7 +62,7 @@ class NetworkTimeTrackerTest : public testing::Test { return ticks_now_; } - void AddToTicksNow(int64 ms) { + void AddToTicksNow(int64_t ms) { ticks_now_ += base::TimeDelta::FromMilliseconds(ms); } diff --git a/components/ntp_snippets/ntp_snippets_service.h b/components/ntp_snippets/ntp_snippets_service.h index 8544d6b..76cb3d3 100644 --- a/components/ntp_snippets/ntp_snippets_service.h +++ b/components/ntp_snippets/ntp_snippets_service.h @@ -5,6 +5,8 @@ #ifndef COMPONENTS_NTP_SNIPPETS_NTP_SNIPPETS_SERVICE_H_ #define COMPONENTS_NTP_SNIPPETS_NTP_SNIPPETS_SERVICE_H_ +#include <stddef.h> + #include <string> #include <vector> diff --git a/components/ntp_snippets/ntp_snippets_service_unittest.cc b/components/ntp_snippets/ntp_snippets_service_unittest.cc index 35e8f37..df1cf7b 100644 --- a/components/ntp_snippets/ntp_snippets_service_unittest.cc +++ b/components/ntp_snippets/ntp_snippets_service_unittest.cc @@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#include "base/macros.h" #include "base/time/time.h" #include "components/ntp_snippets/ntp_snippet.h" #include "components/ntp_snippets/ntp_snippets_service.h" diff --git a/components/offline_pages/offline_page_archiver.h b/components/offline_pages/offline_page_archiver.h index eec0f7c..5a412a1 100644 --- a/components/offline_pages/offline_page_archiver.h +++ b/components/offline_pages/offline_page_archiver.h @@ -5,6 +5,8 @@ #ifndef COMPONENTS_OFFLINE_PAGES_OFFLINE_PAGE_ARCHIVER_H_ #define COMPONENTS_OFFLINE_PAGES_OFFLINE_PAGE_ARCHIVER_H_ +#include <stdint.h> + #include "base/callback.h" #include "base/files/file_path.h" #include "base/strings/string16.h" @@ -58,7 +60,7 @@ class OfflinePageArchiver { ArchiverResult /* result */, const GURL& /* url */, const base::FilePath& /* file_path */, - int64 /* file_size */)> CreateArchiveCallback; + int64_t /* file_size */)> CreateArchiveCallback; virtual ~OfflinePageArchiver() {} diff --git a/components/offline_pages/offline_page_feature.cc b/components/offline_pages/offline_page_feature.cc index 8d51f52..586ed20 100644 --- a/components/offline_pages/offline_page_feature.cc +++ b/components/offline_pages/offline_page_feature.cc @@ -8,6 +8,7 @@ #include "base/command_line.h" #include "base/metrics/field_trial.h" +#include "build/build_config.h" #include "components/offline_pages/offline_page_switches.h" #if defined(OS_ANDROID) diff --git a/components/offline_pages/offline_page_item.cc b/components/offline_pages/offline_page_item.cc index 2cfcfc0..2259c1f 100644 --- a/components/offline_pages/offline_page_item.cc +++ b/components/offline_pages/offline_page_item.cc @@ -20,22 +20,21 @@ OfflinePageItem::OfflinePageItem() } OfflinePageItem::OfflinePageItem(const GURL& url, - int64 bookmark_id, + int64_t bookmark_id, const base::FilePath& file_path, - int64 file_size) + int64_t file_size) : url(url), bookmark_id(bookmark_id), version(kCurrentVersion), file_path(file_path), file_size(file_size), access_count(0), - flags(NO_FLAG) { -} + flags(NO_FLAG) {} OfflinePageItem::OfflinePageItem(const GURL& url, - int64 bookmark_id, + int64_t bookmark_id, const base::FilePath& file_path, - int64 file_size, + int64_t file_size, const base::Time& creation_time) : url(url), bookmark_id(bookmark_id), @@ -45,8 +44,7 @@ OfflinePageItem::OfflinePageItem(const GURL& url, creation_time(creation_time), last_access_time(creation_time), access_count(0), - flags(NO_FLAG) { -} + flags(NO_FLAG) {} OfflinePageItem::~OfflinePageItem() { } diff --git a/components/offline_pages/offline_page_item.h b/components/offline_pages/offline_page_item.h index 29e6bb6..a7bf8c8 100644 --- a/components/offline_pages/offline_page_item.h +++ b/components/offline_pages/offline_page_item.h @@ -5,9 +5,10 @@ #ifndef COMPONENTS_OFFLINE_PAGES_OFFLINE_PAGE_ITEM_H_ #define COMPONENTS_OFFLINE_PAGES_OFFLINE_PAGE_ITEM_H_ +#include <stdint.h> + #include <string> -#include "base/basictypes.h" #include "base/files/file_path.h" #include "base/strings/string16.h" #include "base/time/time.h" @@ -26,13 +27,13 @@ struct OfflinePageItem { OfflinePageItem(); OfflinePageItem(const GURL& url, - int64 bookmark_id, + int64_t bookmark_id, const base::FilePath& file_path, - int64 file_size); + int64_t file_size); OfflinePageItem(const GURL& url, - int64 bookmark_id, + int64_t bookmark_id, const base::FilePath& file_path, - int64 file_size, + int64_t file_size, const base::Time& creation_time); ~OfflinePageItem(); @@ -50,13 +51,13 @@ struct OfflinePageItem { // The URL of the page. GURL url; // The Bookmark ID related to the offline page. - int64 bookmark_id; + int64_t bookmark_id; // Version of the offline page item. int version; // The file path to the archive with a local copy of the page. base::FilePath file_path; // The size of the offline copy. - int64 file_size; + int64_t file_size; // The time when the offline archive was created. base::Time creation_time; // The time when the offline archive was last accessed. diff --git a/components/offline_pages/offline_page_metadata_store.h b/components/offline_pages/offline_page_metadata_store.h index 0f2b444..0d65914 100644 --- a/components/offline_pages/offline_page_metadata_store.h +++ b/components/offline_pages/offline_page_metadata_store.h @@ -5,6 +5,8 @@ #ifndef COMPONENTS_OFFLINE_PAGES_OFFLINE_PAGE_METADATA_STORE_H_ #define COMPONENTS_OFFLINE_PAGES_OFFLINE_PAGE_METADATA_STORE_H_ +#include <stdint.h> + #include <vector> #include "base/callback.h" diff --git a/components/offline_pages/offline_page_metadata_store_impl.cc b/components/offline_pages/offline_page_metadata_store_impl.cc index 1b98fb1..4d465cf 100644 --- a/components/offline_pages/offline_page_metadata_store_impl.cc +++ b/components/offline_pages/offline_page_metadata_store_impl.cc @@ -15,6 +15,7 @@ #include "base/strings/string_number_conversions.h" #include "base/strings/utf_string_conversions.h" #include "base/thread_task_runner_handle.h" +#include "build/build_config.h" #include "components/leveldb_proto/proto_database_impl.h" #include "components/offline_pages/offline_page_item.h" #include "components/offline_pages/proto/offline_pages.pb.h" diff --git a/components/offline_pages/offline_page_metadata_store_impl.h b/components/offline_pages/offline_page_metadata_store_impl.h index e10fc33..f5476f7 100644 --- a/components/offline_pages/offline_page_metadata_store_impl.h +++ b/components/offline_pages/offline_page_metadata_store_impl.h @@ -5,9 +5,12 @@ #ifndef COMPONENTS_OFFLINE_PAGES_OFFLINE_PAGE_METADATA_STORE_IMPL_H_ #define COMPONENTS_OFFLINE_PAGES_OFFLINE_PAGE_METADATA_STORE_IMPL_H_ +#include <stdint.h> + #include <vector> #include "base/files/file_path.h" +#include "base/macros.h" #include "base/memory/ref_counted.h" #include "base/memory/weak_ptr.h" #include "components/leveldb_proto/proto_database.h" diff --git a/components/offline_pages/offline_page_metadata_store_impl_unittest.cc b/components/offline_pages/offline_page_metadata_store_impl_unittest.cc index 4965d38..01b5f3c 100644 --- a/components/offline_pages/offline_page_metadata_store_impl_unittest.cc +++ b/components/offline_pages/offline_page_metadata_store_impl_unittest.cc @@ -4,6 +4,8 @@ #include "components/offline_pages/offline_page_metadata_store_impl.h" +#include <stdint.h> + #include "base/bind.h" #include "base/files/file_path.h" #include "base/files/scoped_temp_dir.h" @@ -23,10 +25,10 @@ namespace offline_pages { namespace { const char kTestURL[] = "https://example.com"; -const int64 kTestBookmarkId = 1234LL; +const int64_t kTestBookmarkId = 1234LL; const base::FilePath::CharType kFilePath[] = FILE_PATH_LITERAL("/offline_pages/example_com.mhtml"); -int64 kFileSize = 234567; +int64_t kFileSize = 234567; class OfflinePageMetadataStoreImplTest : public testing::Test { public: @@ -178,7 +180,7 @@ TEST_F(OfflinePageMetadataStoreImplTest, RemoveOfflinePage) { EXPECT_EQ(1U, offline_pages_.size()); // Remove the offline page. - std::vector<int64> ids_to_remove; + std::vector<int64_t> ids_to_remove; ids_to_remove.push_back(offline_page.bookmark_id); store->RemoveOfflinePages( ids_to_remove, @@ -249,7 +251,7 @@ TEST_F(OfflinePageMetadataStoreImplTest, AddRemoveMultipleOfflinePages) { EXPECT_EQ(2U, offline_pages_.size()); // Remove the offline page. - std::vector<int64> ids_to_remove; + std::vector<int64_t> ids_to_remove; ids_to_remove.push_back(offline_page_1.bookmark_id); store->RemoveOfflinePages( ids_to_remove, diff --git a/components/offline_pages/offline_page_model.cc b/components/offline_pages/offline_page_model.cc index 71102f7..ffb5872 100644 --- a/components/offline_pages/offline_page_model.cc +++ b/components/offline_pages/offline_page_model.cc @@ -85,8 +85,8 @@ void EmptyDeleteCallback(OfflinePageModel::DeletePageResult /* result */) { } void FindPagesMissingArchiveFile( - const std::vector<std::pair<int64, base::FilePath>>& id_path_pairs, - std::vector<int64>* ids_of_pages_missing_archive_file) { + const std::vector<std::pair<int64_t, base::FilePath>>& id_path_pairs, + std::vector<int64_t>* ids_of_pages_missing_archive_file) { DCHECK(ids_of_pages_missing_archive_file); for (const auto& id_path : id_path_pairs) { @@ -149,7 +149,7 @@ void OfflinePageModel::RemoveObserver(Observer* observer) { } void OfflinePageModel::SavePage(const GURL& url, - int64 bookmark_id, + int64_t bookmark_id, scoped_ptr<OfflinePageArchiver> archiver, const SavePageCallback& callback) { DCHECK(is_loaded_); @@ -169,7 +169,7 @@ void OfflinePageModel::SavePage(const GURL& url, pending_archivers_.push_back(archiver.Pass()); } -void OfflinePageModel::MarkPageAccessed(int64 bookmark_id) { +void OfflinePageModel::MarkPageAccessed(int64_t bookmark_id) { DCHECK(is_loaded_); auto iter = offline_pages_.find(bookmark_id); if (iter == offline_pages_.end()) @@ -190,7 +190,7 @@ void OfflinePageModel::MarkPageAccessed(int64 bookmark_id) { weak_ptr_factory_.GetWeakPtr(), offline_page_item)); } -void OfflinePageModel::MarkPageForDeletion(int64 bookmark_id, +void OfflinePageModel::MarkPageForDeletion(int64_t bookmark_id, const DeletePageCallback& callback) { DCHECK(is_loaded_); auto iter = offline_pages_.find(bookmark_id); @@ -210,16 +210,16 @@ void OfflinePageModel::MarkPageForDeletion(int64 bookmark_id, } void OfflinePageModel::DeletePageByBookmarkId( - int64 bookmark_id, + int64_t bookmark_id, const DeletePageCallback& callback) { DCHECK(is_loaded_); - std::vector<int64> bookmark_ids_to_delete; + std::vector<int64_t> bookmark_ids_to_delete; bookmark_ids_to_delete.push_back(bookmark_id); DeletePagesByBookmarkId(bookmark_ids_to_delete, callback); } void OfflinePageModel::DeletePagesByBookmarkId( - const std::vector<int64>& bookmark_ids, + const std::vector<int64_t>& bookmark_ids, const DeletePageCallback& callback) { DCHECK(is_loaded_); @@ -250,7 +250,7 @@ void OfflinePageModel::DeletePagesByBookmarkId( void OfflinePageModel::ClearAll(const base::Closure& callback) { DCHECK(is_loaded_); - std::vector<int64> bookmark_ids; + std::vector<int64_t> bookmark_ids; for (const auto& id_page_pair : offline_pages_) bookmark_ids.push_back(id_page_pair.first); DeletePagesByBookmarkId( @@ -296,7 +296,7 @@ const std::vector<OfflinePageItem> OfflinePageModel::GetPagesToCleanUp() const { } const OfflinePageItem* OfflinePageModel::GetPageByBookmarkId( - int64 bookmark_id) const { + int64_t bookmark_id) const { const auto iter = offline_pages_.find(bookmark_id); return iter != offline_pages_.end() && !iter->second.IsMarkedForDeletion() ? &(iter->second) @@ -329,14 +329,14 @@ const OfflinePageItem* OfflinePageModel::GetPageByOnlineURL( void OfflinePageModel::CheckForExternalFileDeletion() { DCHECK(is_loaded_); - std::vector<std::pair<int64, base::FilePath>> id_path_pairs; + std::vector<std::pair<int64_t, base::FilePath>> id_path_pairs; for (const auto& id_page_pair : offline_pages_) { id_path_pairs.push_back( std::make_pair(id_page_pair.first, id_page_pair.second.file_path)); } - std::vector<int64>* ids_of_pages_missing_archive_file = - new std::vector<int64>(); + std::vector<int64_t>* ids_of_pages_missing_archive_file = + new std::vector<int64_t>(); task_runner_->PostTaskAndReply( FROM_HERE, base::Bind(&FindPagesMissingArchiveFile, id_path_pairs, ids_of_pages_missing_archive_file), @@ -350,14 +350,14 @@ OfflinePageMetadataStore* OfflinePageModel::GetStoreForTesting() { } void OfflinePageModel::OnCreateArchiveDone(const GURL& requested_url, - int64 bookmark_id, + int64_t bookmark_id, const base::Time& start_time, const SavePageCallback& callback, OfflinePageArchiver* archiver, ArchiverResult archiver_result, const GURL& url, const base::FilePath& file_path, - int64 file_size) { + int64_t file_size) { if (requested_url != url) { DVLOG(1) << "Saved URL does not match requested URL."; // TODO(fgorski): We have created an archive for a wrong URL. It should be @@ -450,7 +450,7 @@ void OfflinePageModel::OnUndoOfflinePageDone( } void OfflinePageModel::FinalizePageDeletion() { - std::vector<int64> bookmark_ids_pending_deletion; + std::vector<int64_t> bookmark_ids_pending_deletion; for (const auto& id_page_pair : offline_pages_) { if (!id_page_pair.second.IsMarkedForDeletion()) continue; @@ -459,7 +459,7 @@ void OfflinePageModel::FinalizePageDeletion() { DeletePagesByBookmarkId(bookmark_ids_pending_deletion, DeletePageCallback()); } -void OfflinePageModel::UndoPageDeletion(int64 bookmark_id) { +void OfflinePageModel::UndoPageDeletion(int64_t bookmark_id) { auto iter = offline_pages_.find(bookmark_id); if (iter == offline_pages_.end()) return; @@ -561,7 +561,7 @@ void OfflinePageModel::DeletePendingArchiver(OfflinePageArchiver* archiver) { } void OfflinePageModel::OnDeleteArchiveFilesDone( - const std::vector<int64>& bookmark_ids, + const std::vector<int64_t>& bookmark_ids, const DeletePageCallback& callback, const bool* success) { DCHECK(success); @@ -578,14 +578,14 @@ void OfflinePageModel::OnDeleteArchiveFilesDone( } void OfflinePageModel::OnRemoveOfflinePagesDone( - const std::vector<int64>& bookmark_ids, + const std::vector<int64_t>& bookmark_ids, const DeletePageCallback& callback, bool success) { // Delete the offline page from the in memory cache regardless of success in // store. base::Time now = base::Time::Now(); - int64 total_size = 0; - for (int64 bookmark_id : bookmark_ids) { + int64_t total_size = 0; + for (int64_t bookmark_id : bookmark_ids) { auto iter = offline_pages_.find(bookmark_id); if (iter == offline_pages_.end()) continue; @@ -645,7 +645,7 @@ void OfflinePageModel::InformDeletePageDone(const DeletePageCallback& callback, } void OfflinePageModel::OnFindPagesMissingArchiveFile( - const std::vector<int64>* ids_of_pages_missing_archive_file) { + const std::vector<int64_t>* ids_of_pages_missing_archive_file) { DCHECK(ids_of_pages_missing_archive_file); if (ids_of_pages_missing_archive_file->empty()) return; @@ -664,9 +664,9 @@ void OfflinePageModel::OnFindPagesMissingArchiveFile( } void OfflinePageModel::OnRemoveOfflinePagesMissingArchiveFileDone( - const std::vector<int64>& bookmark_ids, + const std::vector<int64_t>& bookmark_ids, OfflinePageModel::DeletePageResult /* result */) { - for (int64 bookmark_id : bookmark_ids) { + for (int64_t bookmark_id : bookmark_ids) { FOR_EACH_OBSERVER(Observer, observers_, OfflinePageDeleted(bookmark_id)); } } diff --git a/components/offline_pages/offline_page_model.h b/components/offline_pages/offline_page_model.h index 48763f2..471938e 100644 --- a/components/offline_pages/offline_page_model.h +++ b/components/offline_pages/offline_page_model.h @@ -5,6 +5,8 @@ #ifndef COMPONENTS_OFFLINE_PAGES_OFFLINE_PAGE_MODEL_H_ #define COMPONENTS_OFFLINE_PAGES_OFFLINE_PAGE_MODEL_H_ +#include <stdint.h> + #include <map> #include <vector> @@ -113,7 +115,7 @@ class OfflinePageModel : public KeyedService, // Invoked when an offline copy related to |bookmark_id| was deleted. // In can be invoked as a result of |CheckForExternalFileDeletion|, if a // deleted page is detected. - virtual void OfflinePageDeleted(int64 bookmark_id) = 0; + virtual void OfflinePageDeleted(int64_t bookmark_id) = 0; protected: virtual ~Observer() {} @@ -148,29 +150,29 @@ class OfflinePageModel : public KeyedService, // Attempts to save a page addressed by |url| offline. Requires that the model // is loaded. void SavePage(const GURL& url, - int64 bookmark_id, + int64_t bookmark_id, scoped_ptr<OfflinePageArchiver> archiver, const SavePageCallback& callback); // Marks that the offline page related to the passed |bookmark_id| has been // accessed. Its access info, including last access time and access count, // will be updated. Requires that the model is loaded. - void MarkPageAccessed(int64 bookmark_id); + void MarkPageAccessed(int64_t bookmark_id); // Marks that the offline page related to the passed |bookmark_id| was going // to be deleted. The deletion will occur in a short while. The undo can be // done before this. Requires that the model is loaded. - void MarkPageForDeletion(int64 bookmark_id, + void MarkPageForDeletion(int64_t bookmark_id, const DeletePageCallback& callback); // Deletes an offline page related to the passed |bookmark_id|. Requires that // the model is loaded. - void DeletePageByBookmarkId(int64 bookmark_id, + void DeletePageByBookmarkId(int64_t bookmark_id, const DeletePageCallback& callback); // Deletes offline pages related to the passed |bookmark_ids|. Requires that // the model is loaded. - void DeletePagesByBookmarkId(const std::vector<int64>& bookmark_ids, + void DeletePagesByBookmarkId(const std::vector<int64_t>& bookmark_ids, const DeletePageCallback& callback); // Wipes out all the data by deleting all saved files and clearing the store. @@ -188,7 +190,7 @@ class OfflinePageModel : public KeyedService, // Returns an offline page associated with a specified |bookmark_id|. nullptr // is returned if not found. - const OfflinePageItem* GetPageByBookmarkId(int64 bookmark_id) const; + const OfflinePageItem* GetPageByBookmarkId(int64_t bookmark_id) const; // Returns an offline page that is stored as |offline_url|. A nullptr is // returned if not found. @@ -237,14 +239,14 @@ class OfflinePageModel : public KeyedService, // Steps for saving a page offline. void OnCreateArchiveDone(const GURL& requested_url, - int64 bookmark_id, + int64_t bookmark_id, const base::Time& start_time, const SavePageCallback& callback, OfflinePageArchiver* archiver, OfflinePageArchiver::ArchiverResult result, const GURL& url, const base::FilePath& file_path, - int64 file_size); + int64_t file_size); void OnAddOfflinePageDone(OfflinePageArchiver* archiver, const SavePageCallback& callback, const OfflinePageItem& offline_page, @@ -254,11 +256,10 @@ class OfflinePageModel : public KeyedService, void DeletePendingArchiver(OfflinePageArchiver* archiver); // Steps for deleting files and data for an offline page. - void OnDeleteArchiveFilesDone( - const std::vector<int64>& bookmark_ids, - const DeletePageCallback& callback, - const bool* success); - void OnRemoveOfflinePagesDone(const std::vector<int64>& bookmark_ids, + void OnDeleteArchiveFilesDone(const std::vector<int64_t>& bookmark_ids, + const DeletePageCallback& callback, + const bool* success); + void OnRemoveOfflinePagesDone(const std::vector<int64_t>& bookmark_ids, const DeletePageCallback& callback, bool success); void InformDeletePageDone(const DeletePageCallback& callback, @@ -274,14 +275,14 @@ class OfflinePageModel : public KeyedService, void FinalizePageDeletion(); // Steps for undoing an offline page deletion. - void UndoPageDeletion(int64 bookmark_id); + void UndoPageDeletion(int64_t bookmark_id); void OnUndoOfflinePageDone(const OfflinePageItem& offline_page, bool success); // Callbacks for checking if offline pages are missing archive files. void OnFindPagesMissingArchiveFile( - const std::vector<int64>* pages_missing_archive_file); + const std::vector<int64_t>* pages_missing_archive_file); void OnRemoveOfflinePagesMissingArchiveFileDone( - const std::vector<int64>& bookmark_ids, + const std::vector<int64_t>& bookmark_ids, OfflinePageModel::DeletePageResult result); // Steps for clearing all. @@ -307,7 +308,7 @@ class OfflinePageModel : public KeyedService, bool is_loaded_; // In memory copy of the offline page metadata, keyed by bookmark IDs. - std::map<int64, OfflinePageItem> offline_pages_; + std::map<int64_t, OfflinePageItem> offline_pages_; scoped_refptr<base::SequencedTaskRunner> task_runner_; diff --git a/components/offline_pages/offline_page_model_unittest.cc b/components/offline_pages/offline_page_model_unittest.cc index 5f8c2b0..aa2797b 100644 --- a/components/offline_pages/offline_page_model_unittest.cc +++ b/components/offline_pages/offline_page_model_unittest.cc @@ -4,6 +4,8 @@ #include "components/offline_pages/offline_page_model.h" +#include <stdint.h> + #include <algorithm> #include "base/bind.h" @@ -35,13 +37,13 @@ namespace offline_pages { namespace { const GURL kTestUrl("http://example.com"); -const int64 kTestPageBookmarkId1 = 1234LL; +const int64_t kTestPageBookmarkId1 = 1234LL; const GURL kTestUrl2("http://other.page.com"); const GURL kTestUrl3("http://test.xyz"); const GURL kFileUrl("file:///foo"); -const int64 kTestPageBookmarkId2 = 5678LL; -const int64 kTestPageBookmarkId3 = 42LL; -const int64 kTestFileSize = 876543LL; +const int64_t kTestPageBookmarkId2 = 5678LL; +const int64_t kTestPageBookmarkId3 = 42LL; +const int64_t kTestFileSize = 876543LL; } // namespace @@ -60,7 +62,7 @@ class OfflinePageModelTest // OfflinePageModel::Observer implementation. void OfflinePageModelLoaded(OfflinePageModel* model) override; void OfflinePageModelChanged(OfflinePageModel* model) override; - void OfflinePageDeleted(int64 bookmark_id) override; + void OfflinePageDeleted(int64_t bookmark_id) override; // OfflinePageTestArchiver::Observer implementation. void SetLastPathCreatedByArchiver(const base::FilePath& file_path) override; @@ -92,11 +94,10 @@ class OfflinePageModelTest OfflinePageTestStore* GetStore(); - void SavePage(const GURL& url, int64 bookmark_id); - void SavePageWithArchiverResult( - const GURL& url, - int64 bookmark_id, - OfflinePageArchiver::ArchiverResult result); + void SavePage(const GURL& url, int64_t bookmark_id); + void SavePageWithArchiverResult(const GURL& url, + int64_t bookmark_id, + OfflinePageArchiver::ArchiverResult result); OfflinePageModel* model() { return model_.get(); } @@ -108,9 +109,7 @@ class OfflinePageModelTest return last_delete_result_; } - int64 last_deleted_bookmark_id() const { - return last_deleted_bookmark_id_; - } + int64_t last_deleted_bookmark_id() const { return last_deleted_bookmark_id_; } const base::FilePath& last_archiver_path() { return last_archiver_path_; } @@ -123,7 +122,7 @@ class OfflinePageModelTest SavePageResult last_save_result_; DeletePageResult last_delete_result_; base::FilePath last_archiver_path_; - int64 last_deleted_bookmark_id_; + int64_t last_deleted_bookmark_id_; }; OfflinePageModelTest::OfflinePageModelTest() @@ -158,7 +157,7 @@ void OfflinePageModelTest::OfflinePageModelChanged(OfflinePageModel* model) { ASSERT_EQ(model_.get(), model); } -void OfflinePageModelTest::OfflinePageDeleted(int64 bookmark_id) { +void OfflinePageModelTest::OfflinePageDeleted(int64_t bookmark_id) { last_deleted_bookmark_id_ = bookmark_id; } @@ -229,7 +228,7 @@ OfflinePageTestStore* OfflinePageModelTest::GetStore() { return static_cast<OfflinePageTestStore*>(model()->GetStoreForTesting()); } -void OfflinePageModelTest::SavePage(const GURL& url, int64 bookmark_id) { +void OfflinePageModelTest::SavePage(const GURL& url, int64_t bookmark_id) { SavePageWithArchiverResult( url, bookmark_id, @@ -238,7 +237,7 @@ void OfflinePageModelTest::SavePage(const GURL& url, int64 bookmark_id) { void OfflinePageModelTest::SavePageWithArchiverResult( const GURL& url, - int64 bookmark_id, + int64_t bookmark_id, OfflinePageArchiver::ArchiverResult result) { scoped_ptr<OfflinePageTestArchiver> archiver( BuildArchiver(url, result).Pass()); @@ -612,7 +611,7 @@ TEST_F(OfflinePageModelTest, DeleteMultiplePages) { EXPECT_EQ(3u, store->GetAllPages().size()); // Delete multiple pages. - std::vector<int64> ids_to_delete; + std::vector<int64_t> ids_to_delete; ids_to_delete.push_back(kTestPageBookmarkId2); ids_to_delete.push_back(kTestPageBookmarkId1); ids_to_delete.push_back(23434LL); // Non-existent ID. diff --git a/components/offline_pages/offline_page_test_archiver.cc b/components/offline_pages/offline_page_test_archiver.cc index e26467c..8d1b7b1 100644 --- a/components/offline_pages/offline_page_test_archiver.cc +++ b/components/offline_pages/offline_page_test_archiver.cc @@ -16,7 +16,7 @@ OfflinePageTestArchiver::OfflinePageTestArchiver( Observer* observer, const GURL& url, ArchiverResult result, - int64 size_to_report, + int64_t size_to_report, const scoped_refptr<base::SingleThreadTaskRunner>& task_runner) : observer_(observer), url_(url), diff --git a/components/offline_pages/offline_page_test_archiver.h b/components/offline_pages/offline_page_test_archiver.h index a8a9383..8cb3e2a 100644 --- a/components/offline_pages/offline_page_test_archiver.h +++ b/components/offline_pages/offline_page_test_archiver.h @@ -5,6 +5,9 @@ #ifndef COMPONENTS_OFFLINE_PAGES_OFFLINE_PAGE_TEST_ARCHIVER_H_ #define COMPONENTS_OFFLINE_PAGES_OFFLINE_PAGE_TEST_ARCHIVER_H_ +#include <stddef.h> +#include <stdint.h> + #include "base/macros.h" #include "base/memory/ref_counted.h" #include "base/single_thread_task_runner.h" @@ -35,7 +38,7 @@ class OfflinePageTestArchiver : public OfflinePageArchiver { Observer* observer, const GURL& url, ArchiverResult result, - int64 size_to_report, + int64_t size_to_report, const scoped_refptr<base::SingleThreadTaskRunner>& task_runner); ~OfflinePageTestArchiver() override; @@ -65,7 +68,7 @@ class OfflinePageTestArchiver : public OfflinePageArchiver { base::FilePath archives_dir_; base::FilePath filename_; ArchiverResult result_; - int64 size_to_report_; + int64_t size_to_report_; bool create_archive_called_; bool delayed_; CreateArchiveCallback callback_; diff --git a/components/offline_pages/offline_page_test_store.cc b/components/offline_pages/offline_page_test_store.cc index 8c8ea94..186a0b9 100644 --- a/components/offline_pages/offline_page_test_store.cc +++ b/components/offline_pages/offline_page_test_store.cc @@ -46,7 +46,7 @@ void OfflinePageTestStore::AddOrUpdateOfflinePage( } void OfflinePageTestStore::RemoveOfflinePages( - const std::vector<int64>& bookmark_ids, + const std::vector<int64_t>& bookmark_ids, const UpdateCallback& callback) { ASSERT_FALSE(bookmark_ids.empty()); bool result = false; @@ -69,7 +69,7 @@ void OfflinePageTestStore::Reset(const ResetCallback& callback) { } void OfflinePageTestStore::UpdateLastAccessTime( - int64 bookmark_id, + int64_t bookmark_id, const base::Time& last_access_time) { auto iter = offline_pages_.find(bookmark_id); if (iter == offline_pages_.end()) diff --git a/components/offline_pages/offline_page_test_store.h b/components/offline_pages/offline_page_test_store.h index 84a0eea..d711a58 100644 --- a/components/offline_pages/offline_page_test_store.h +++ b/components/offline_pages/offline_page_test_store.h @@ -5,6 +5,8 @@ #ifndef COMPONENTS_OFFLINE_PAGES_OFFLINE_PAGE_TEST_STORE_H_ #define COMPONENTS_OFFLINE_PAGES_OFFLINE_PAGE_TEST_STORE_H_ +#include <stdint.h> + #include <map> #include <vector> @@ -37,11 +39,11 @@ class OfflinePageTestStore : public OfflinePageMetadataStore { void Load(const LoadCallback& callback) override; void AddOrUpdateOfflinePage(const OfflinePageItem& offline_page, const UpdateCallback& callback) override; - void RemoveOfflinePages(const std::vector<int64>& bookmark_ids, + void RemoveOfflinePages(const std::vector<int64_t>& bookmark_ids, const UpdateCallback& callback) override; void Reset(const ResetCallback& callback) override; - void UpdateLastAccessTime(int64 bookmark_id, + void UpdateLastAccessTime(int64_t bookmark_id, const base::Time& last_access_time); // Returns all pages, regardless their states. @@ -56,7 +58,7 @@ class OfflinePageTestStore : public OfflinePageMetadataStore { scoped_refptr<base::SingleThreadTaskRunner> task_runner_; TestScenario scenario_; - std::map<int64, OfflinePageItem> offline_pages_; + std::map<int64_t, OfflinePageItem> offline_pages_; DISALLOW_ASSIGN(OfflinePageTestStore); }; diff --git a/components/omnibox/browser/answers_cache.h b/components/omnibox/browser/answers_cache.h index e0be238..0f62949 100644 --- a/components/omnibox/browser/answers_cache.h +++ b/components/omnibox/browser/answers_cache.h @@ -5,9 +5,11 @@ #ifndef COMPONENTS_OMNIBOX_BROWSER_ANSWERS_CACHE_H_ #define COMPONENTS_OMNIBOX_BROWSER_ANSWERS_CACHE_H_ +#include <stddef.h> + #include <list> -#include "base/basictypes.h" +#include "base/macros.h" #include "base/strings/string16.h" struct AnswersQueryData { diff --git a/components/omnibox/browser/autocomplete_classifier.h b/components/omnibox/browser/autocomplete_classifier.h index aca4e06..bdb0116 100644 --- a/components/omnibox/browser/autocomplete_classifier.h +++ b/components/omnibox/browser/autocomplete_classifier.h @@ -5,8 +5,8 @@ #ifndef COMPONENTS_OMNIBOX_BROWSER_AUTOCOMPLETE_CLASSIFIER_H_ #define COMPONENTS_OMNIBOX_BROWSER_AUTOCOMPLETE_CLASSIFIER_H_ -#include "base/basictypes.h" #include "base/compiler_specific.h" +#include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "base/strings/string16.h" #include "components/keyed_service/core/keyed_service.h" diff --git a/components/omnibox/browser/autocomplete_controller.cc b/components/omnibox/browser/autocomplete_controller.cc index 5b05b65..f040752 100644 --- a/components/omnibox/browser/autocomplete_controller.cc +++ b/components/omnibox/browser/autocomplete_controller.cc @@ -4,6 +4,8 @@ #include "components/omnibox/browser/autocomplete_controller.h" +#include <stddef.h> + #include <set> #include <string> diff --git a/components/omnibox/browser/autocomplete_controller.h b/components/omnibox/browser/autocomplete_controller.h index c0afef2..3c5795a 100644 --- a/components/omnibox/browser/autocomplete_controller.h +++ b/components/omnibox/browser/autocomplete_controller.h @@ -5,9 +5,9 @@ #ifndef COMPONENTS_OMNIBOX_BROWSER_AUTOCOMPLETE_CONTROLLER_H_ #define COMPONENTS_OMNIBOX_BROWSER_AUTOCOMPLETE_CONTROLLER_H_ -#include "base/basictypes.h" #include "base/compiler_specific.h" #include "base/gtest_prod_util.h" +#include "base/macros.h" #include "base/memory/ref_counted.h" #include "base/strings/string16.h" #include "base/time/time.h" diff --git a/components/omnibox/browser/autocomplete_input.cc b/components/omnibox/browser/autocomplete_input.cc index d5e10f5b..57a43a1 100644 --- a/components/omnibox/browser/autocomplete_input.cc +++ b/components/omnibox/browser/autocomplete_input.cc @@ -4,6 +4,7 @@ #include "components/omnibox/browser/autocomplete_input.h" +#include "base/macros.h" #include "base/strings/string_split.h" #include "base/strings/string_util.h" #include "base/strings/utf_string_conversions.h" diff --git a/components/omnibox/browser/autocomplete_input.h b/components/omnibox/browser/autocomplete_input.h index 12c317d..38a431c 100644 --- a/components/omnibox/browser/autocomplete_input.h +++ b/components/omnibox/browser/autocomplete_input.h @@ -5,9 +5,10 @@ #ifndef COMPONENTS_OMNIBOX_BROWSER_AUTOCOMPLETE_INPUT_H_ #define COMPONENTS_OMNIBOX_BROWSER_AUTOCOMPLETE_INPUT_H_ +#include <stddef.h> + #include <string> -#include "base/basictypes.h" #include "base/strings/string16.h" #include "components/metrics/proto/omnibox_event.pb.h" #include "components/metrics/proto/omnibox_input_type.pb.h" diff --git a/components/omnibox/browser/autocomplete_input_unittest.cc b/components/omnibox/browser/autocomplete_input_unittest.cc index a227f38..b52d6f9 100644 --- a/components/omnibox/browser/autocomplete_input_unittest.cc +++ b/components/omnibox/browser/autocomplete_input_unittest.cc @@ -4,7 +4,9 @@ #include "components/omnibox/browser/autocomplete_input.h" -#include "base/basictypes.h" +#include <stddef.h> + +#include "base/macros.h" #include "base/strings/string16.h" #include "base/strings/utf_string_conversions.h" #include "build/build_config.h" diff --git a/components/omnibox/browser/autocomplete_match.cc b/components/omnibox/browser/autocomplete_match.cc index a980c31..138575c 100644 --- a/components/omnibox/browser/autocomplete_match.cc +++ b/components/omnibox/browser/autocomplete_match.cc @@ -6,6 +6,7 @@ #include "base/i18n/time_formatting.h" #include "base/logging.h" +#include "base/macros.h" #include "base/strings/string16.h" #include "base/strings/string_number_conversions.h" #include "base/strings/string_piece.h" @@ -13,6 +14,7 @@ #include "base/strings/string_util.h" #include "base/strings/utf_string_conversions.h" #include "base/time/time.h" +#include "build/build_config.h" #include "components/omnibox/browser/autocomplete_provider.h" #include "components/omnibox/browser/suggestion_answer.h" #include "components/search_engines/template_url.h" diff --git a/components/omnibox/browser/autocomplete_match.h b/components/omnibox/browser/autocomplete_match.h index 270a2e2..002f224 100644 --- a/components/omnibox/browser/autocomplete_match.h +++ b/components/omnibox/browser/autocomplete_match.h @@ -5,6 +5,8 @@ #ifndef COMPONENTS_OMNIBOX_BROWSER_AUTOCOMPLETE_MATCH_H_ #define COMPONENTS_OMNIBOX_BROWSER_AUTOCOMPLETE_MATCH_H_ +#include <stddef.h> + #include <map> #include <string> #include <vector> diff --git a/components/omnibox/browser/autocomplete_match_type.cc b/components/omnibox/browser/autocomplete_match_type.cc index 597c872..c826f95 100644 --- a/components/omnibox/browser/autocomplete_match_type.cc +++ b/components/omnibox/browser/autocomplete_match_type.cc @@ -2,10 +2,9 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#include "base/macros.h" #include "components/omnibox/browser/autocomplete_match_type.h" -#include "base/basictypes.h" - // static std::string AutocompleteMatchType::ToString(AutocompleteMatchType::Type type) { const char* strings[] = { diff --git a/components/omnibox/browser/autocomplete_match_unittest.cc b/components/omnibox/browser/autocomplete_match_unittest.cc index 7424ba0..b51fda0 100644 --- a/components/omnibox/browser/autocomplete_match_unittest.cc +++ b/components/omnibox/browser/autocomplete_match_unittest.cc @@ -4,7 +4,9 @@ #include "components/omnibox/browser/autocomplete_match.h" -#include "base/basictypes.h" +#include <stddef.h> + +#include "base/macros.h" #include "base/strings/utf_string_conversions.h" #include "components/omnibox/browser/test_scheme_classifier.h" #include "testing/gtest/include/gtest/gtest.h" diff --git a/components/omnibox/browser/autocomplete_provider.h b/components/omnibox/browser/autocomplete_provider.h index 1adb7a1..197962a 100644 --- a/components/omnibox/browser/autocomplete_provider.h +++ b/components/omnibox/browser/autocomplete_provider.h @@ -5,8 +5,10 @@ #ifndef COMPONENTS_OMNIBOX_BROWSER_AUTOCOMPLETE_PROVIDER_H_ #define COMPONENTS_OMNIBOX_BROWSER_AUTOCOMPLETE_PROVIDER_H_ -#include "base/basictypes.h" +#include <stddef.h> + #include "base/gtest_prod_util.h" +#include "base/macros.h" #include "base/memory/ref_counted.h" #include "base/strings/string16.h" #include "components/metrics/proto/omnibox_event.pb.h" diff --git a/components/omnibox/browser/autocomplete_provider_unittest.cc b/components/omnibox/browser/autocomplete_provider_unittest.cc index edf06f6..545783e 100644 --- a/components/omnibox/browser/autocomplete_provider_unittest.cc +++ b/components/omnibox/browser/autocomplete_provider_unittest.cc @@ -4,9 +4,12 @@ #include "components/omnibox/browser/autocomplete_provider.h" +#include <stddef.h> + #include "base/bind.h" #include "base/command_line.h" #include "base/location.h" +#include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "base/message_loop/message_loop.h" #include "base/single_thread_task_runner.h" diff --git a/components/omnibox/browser/autocomplete_result.h b/components/omnibox/browser/autocomplete_result.h index d532de6..979d2ec 100644 --- a/components/omnibox/browser/autocomplete_result.h +++ b/components/omnibox/browser/autocomplete_result.h @@ -9,7 +9,8 @@ #include <map> -#include "base/basictypes.h" +#include "base/macros.h" +#include "build/build_config.h" #include "components/metrics/proto/omnibox_event.pb.h" #include "components/omnibox/browser/autocomplete_match.h" #include "url/gurl.h" diff --git a/components/omnibox/browser/autocomplete_result_unittest.cc b/components/omnibox/browser/autocomplete_result_unittest.cc index 0e65669..02eac88 100644 --- a/components/omnibox/browser/autocomplete_result_unittest.cc +++ b/components/omnibox/browser/autocomplete_result_unittest.cc @@ -4,8 +4,11 @@ #include "components/omnibox/browser/autocomplete_result.h" +#include <stddef.h> + #include <vector> +#include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "base/metrics/field_trial.h" #include "base/strings/string_number_conversions.h" diff --git a/components/omnibox/browser/base_search_provider.cc b/components/omnibox/browser/base_search_provider.cc index f4ec1d1..c6833f6 100644 --- a/components/omnibox/browser/base_search_provider.cc +++ b/components/omnibox/browser/base_search_provider.cc @@ -4,7 +4,11 @@ #include "components/omnibox/browser/base_search_provider.h" +#include <stddef.h> +#include <stdint.h> + #include "base/i18n/case_conversion.h" +#include "base/macros.h" #include "base/strings/string_util.h" #include "base/strings/utf_string_conversions.h" #include "components/data_use_measurement/core/data_use_user_data.h" @@ -147,7 +151,7 @@ void BaseSearchProvider::AddProviderInfo(ProvidersInfo* provider_info) const { metrics::OmniboxEventProto_ProviderInfo& new_entry = provider_info->back(); new_entry.set_provider(AsOmniboxEventProviderType()); new_entry.set_provider_done(done_); - std::vector<uint32> field_trial_hashes; + std::vector<uint32_t> field_trial_hashes; OmniboxFieldTrial::GetActiveSuggestFieldTrialHashes(&field_trial_hashes); for (size_t i = 0; i < field_trial_hashes.size(); ++i) { if (field_trial_triggered_) diff --git a/components/omnibox/browser/base_search_provider.h b/components/omnibox/browser/base_search_provider.h index 6c9355e..3520582 100644 --- a/components/omnibox/browser/base_search_provider.h +++ b/components/omnibox/browser/base_search_provider.h @@ -15,6 +15,7 @@ #include <vector> #include "base/gtest_prod_util.h" +#include "base/macros.h" #include "base/memory/scoped_vector.h" #include "base/strings/string16.h" #include "components/metrics/proto/omnibox_event.pb.h" diff --git a/components/omnibox/browser/base_search_provider_unittest.cc b/components/omnibox/browser/base_search_provider_unittest.cc index 0800f03..afd1490 100644 --- a/components/omnibox/browser/base_search_provider_unittest.cc +++ b/components/omnibox/browser/base_search_provider_unittest.cc @@ -4,6 +4,7 @@ #include "components/omnibox/browser/base_search_provider.h" +#include "base/macros.h" #include "base/strings/string16.h" #include "base/strings/utf_string_conversions.h" #include "components/omnibox/browser/autocomplete_match.h" diff --git a/components/omnibox/browser/bookmark_provider.cc b/components/omnibox/browser/bookmark_provider.cc index fc55713..6c1c3857 100644 --- a/components/omnibox/browser/bookmark_provider.cc +++ b/components/omnibox/browser/bookmark_provider.cc @@ -8,6 +8,7 @@ #include <functional> #include <vector> +#include "base/macros.h" #include "base/prefs/pref_service.h" #include "base/strings/string_util.h" #include "base/strings/utf_string_conversions.h" diff --git a/components/omnibox/browser/bookmark_provider.h b/components/omnibox/browser/bookmark_provider.h index 98f1a85..72fd13d 100644 --- a/components/omnibox/browser/bookmark_provider.h +++ b/components/omnibox/browser/bookmark_provider.h @@ -5,9 +5,12 @@ #ifndef COMPONENTS_OMNIBOX_BROWSER_BOOKMARK_PROVIDER_H_ #define COMPONENTS_OMNIBOX_BROWSER_BOOKMARK_PROVIDER_H_ +#include <stddef.h> + #include <string> #include "base/gtest_prod_util.h" +#include "base/macros.h" #include "components/omnibox/browser/autocomplete_input.h" #include "components/omnibox/browser/autocomplete_match.h" #include "components/omnibox/browser/autocomplete_provider.h" diff --git a/components/omnibox/browser/builtin_provider.cc b/components/omnibox/browser/builtin_provider.cc index 6e3dde6..4c79be6 100644 --- a/components/omnibox/browser/builtin_provider.cc +++ b/components/omnibox/browser/builtin_provider.cc @@ -4,6 +4,8 @@ #include "components/omnibox/browser/builtin_provider.h" +#include <stddef.h> + #include <algorithm> #include "base/strings/string_util.h" diff --git a/components/omnibox/browser/builtin_provider.h b/components/omnibox/browser/builtin_provider.h index 4c6a9d5..768c9e3 100644 --- a/components/omnibox/browser/builtin_provider.h +++ b/components/omnibox/browser/builtin_provider.h @@ -7,8 +7,8 @@ #include <vector> -#include "base/basictypes.h" #include "base/compiler_specific.h" +#include "base/macros.h" #include "base/strings/string16.h" #include "components/omnibox/browser/autocomplete_match.h" #include "components/omnibox/browser/autocomplete_provider.h" diff --git a/components/omnibox/browser/history_provider.h b/components/omnibox/browser/history_provider.h index a64b0a6..8608927 100644 --- a/components/omnibox/browser/history_provider.h +++ b/components/omnibox/browser/history_provider.h @@ -5,7 +5,10 @@ #ifndef COMPONENTS_OMNIBOX_BROWSER_HISTORY_PROVIDER_H_ #define COMPONENTS_OMNIBOX_BROWSER_HISTORY_PROVIDER_H_ +#include <stddef.h> + #include "base/compiler_specific.h" +#include "base/macros.h" #include "components/omnibox/browser/autocomplete_provider.h" #include "components/omnibox/browser/autocomplete_provider_client.h" #include "components/omnibox/browser/in_memory_url_index_types.h" diff --git a/components/omnibox/browser/history_quick_provider.cc b/components/omnibox/browser/history_quick_provider.cc index 122a1f7..9a7774d 100644 --- a/components/omnibox/browser/history_quick_provider.cc +++ b/components/omnibox/browser/history_quick_provider.cc @@ -4,9 +4,10 @@ #include "components/omnibox/browser/history_quick_provider.h" +#include <stddef.h> + #include <vector> -#include "base/basictypes.h" #include "base/i18n/break_iterator.h" #include "base/logging.h" #include "base/metrics/field_trial.h" diff --git a/components/omnibox/browser/history_quick_provider.h b/components/omnibox/browser/history_quick_provider.h index 7257624..33239f9 100644 --- a/components/omnibox/browser/history_quick_provider.h +++ b/components/omnibox/browser/history_quick_provider.h @@ -7,9 +7,9 @@ #include <string> -#include "base/basictypes.h" #include "base/compiler_specific.h" #include "base/gtest_prod_util.h" +#include "base/macros.h" #include "components/history/core/browser/history_types.h" #include "components/omnibox/browser/autocomplete_input.h" #include "components/omnibox/browser/autocomplete_match.h" diff --git a/components/omnibox/browser/history_url_provider.cc b/components/omnibox/browser/history_url_provider.cc index 1965be5..978cb86 100644 --- a/components/omnibox/browser/history_url_provider.cc +++ b/components/omnibox/browser/history_url_provider.cc @@ -6,10 +6,10 @@ #include <algorithm> -#include "base/basictypes.h" #include "base/bind.h" #include "base/command_line.h" #include "base/location.h" +#include "base/macros.h" #include "base/message_loop/message_loop.h" #include "base/metrics/histogram.h" #include "base/prefs/pref_service.h" diff --git a/components/omnibox/browser/history_url_provider.h b/components/omnibox/browser/history_url_provider.h index d7d67e8..9cee39d 100644 --- a/components/omnibox/browser/history_url_provider.h +++ b/components/omnibox/browser/history_url_provider.h @@ -5,11 +5,14 @@ #ifndef COMPONENTS_OMNIBOX_BROWSER_HISTORY_URL_PROVIDER_H_ #define COMPONENTS_OMNIBOX_BROWSER_HISTORY_URL_PROVIDER_H_ +#include <stddef.h> + #include <string> #include <vector> #include "base/compiler_specific.h" #include "base/gtest_prod_util.h" +#include "base/macros.h" #include "base/synchronization/cancellation_flag.h" #include "base/threading/thread_checker.h" #include "components/history/core/browser/history_match.h" diff --git a/components/omnibox/browser/in_memory_url_index.h b/components/omnibox/browser/in_memory_url_index.h index e13aabf..1f098cb 100644 --- a/components/omnibox/browser/in_memory_url_index.h +++ b/components/omnibox/browser/in_memory_url_index.h @@ -5,15 +5,17 @@ #ifndef COMPONENTS_OMNIBOX_BROWSER_IN_MEMORY_URL_INDEX_H_ #define COMPONENTS_OMNIBOX_BROWSER_IN_MEMORY_URL_INDEX_H_ +#include <stddef.h> + #include <functional> #include <map> #include <set> #include <string> #include <vector> -#include "base/basictypes.h" #include "base/files/file_path.h" #include "base/gtest_prod_util.h" +#include "base/macros.h" #include "base/memory/ref_counted.h" #include "base/memory/weak_ptr.h" #include "base/strings/string16.h" diff --git a/components/omnibox/browser/in_memory_url_index_types.h b/components/omnibox/browser/in_memory_url_index_types.h index 2ef6b76..218760a 100644 --- a/components/omnibox/browser/in_memory_url_index_types.h +++ b/components/omnibox/browser/in_memory_url_index_types.h @@ -5,6 +5,8 @@ #ifndef COMPONENTS_OMNIBOX_BROWSER_IN_MEMORY_URL_INDEX_TYPES_H_ #define COMPONENTS_OMNIBOX_BROWSER_IN_MEMORY_URL_INDEX_TYPES_H_ +#include <stddef.h> + #include <map> #include <set> #include <vector> diff --git a/components/omnibox/browser/in_memory_url_index_types_unittest.cc b/components/omnibox/browser/in_memory_url_index_types_unittest.cc index 9229d43..a66ea9b 100644 --- a/components/omnibox/browser/in_memory_url_index_types_unittest.cc +++ b/components/omnibox/browser/in_memory_url_index_types_unittest.cc @@ -4,8 +4,11 @@ #include "components/omnibox/browser/in_memory_url_index_types.h" +#include <stddef.h> + #include <algorithm> +#include "base/macros.h" #include "base/strings/string16.h" #include "base/strings/utf_string_conversions.h" #include "testing/gtest/include/gtest/gtest.h" diff --git a/components/omnibox/browser/keyword_extensions_delegate.h b/components/omnibox/browser/keyword_extensions_delegate.h index 1b67b98..ce833da 100644 --- a/components/omnibox/browser/keyword_extensions_delegate.h +++ b/components/omnibox/browser/keyword_extensions_delegate.h @@ -12,7 +12,6 @@ #include <string> -#include "base/basictypes.h" #include "base/macros.h" #include "base/strings/string16.h" diff --git a/components/omnibox/browser/keyword_provider.cc b/components/omnibox/browser/keyword_provider.cc index 360d94b..a0b5cc8 100644 --- a/components/omnibox/browser/keyword_provider.cc +++ b/components/omnibox/browser/keyword_provider.cc @@ -7,6 +7,7 @@ #include <algorithm> #include <vector> +#include "base/macros.h" #include "base/strings/string16.h" #include "base/strings/string_util.h" #include "base/strings/utf_string_conversions.h" diff --git a/components/omnibox/browser/keyword_provider.h b/components/omnibox/browser/keyword_provider.h index e82e6cd..5263871 100644 --- a/components/omnibox/browser/keyword_provider.h +++ b/components/omnibox/browser/keyword_provider.h @@ -11,10 +11,12 @@ #ifndef COMPONENTS_OMNIBOX_BROWSER_KEYWORD_PROVIDER_H_ #define COMPONENTS_OMNIBOX_BROWSER_KEYWORD_PROVIDER_H_ +#include <stddef.h> + #include <string> -#include "base/basictypes.h" #include "base/compiler_specific.h" +#include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "components/metrics/proto/omnibox_input_type.pb.h" #include "components/omnibox/browser/autocomplete_input.h" diff --git a/components/omnibox/browser/keyword_provider_unittest.cc b/components/omnibox/browser/keyword_provider_unittest.cc index ff66f15..fa44fba 100644 --- a/components/omnibox/browser/keyword_provider_unittest.cc +++ b/components/omnibox/browser/keyword_provider_unittest.cc @@ -2,7 +2,10 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#include <stddef.h> + #include "base/command_line.h" +#include "base/macros.h" #include "base/message_loop/message_loop.h" #include "base/metrics/field_trial.h" #include "base/strings/utf_string_conversions.h" diff --git a/components/omnibox/browser/mock_autocomplete_provider_client.h b/components/omnibox/browser/mock_autocomplete_provider_client.h index fc73c1f..5367ba3 100644 --- a/components/omnibox/browser/mock_autocomplete_provider_client.h +++ b/components/omnibox/browser/mock_autocomplete_provider_client.h @@ -7,6 +7,7 @@ #include <string> +#include "base/macros.h" #include "components/omnibox/browser/autocomplete_provider_client.h" #include "components/omnibox/browser/autocomplete_scheme_classifier.h" #include "components/search_engines/search_terms_data.h" diff --git a/components/omnibox/browser/omnibox_client.h b/components/omnibox/browser/omnibox_client.h index 77c9079..e2d013c 100644 --- a/components/omnibox/browser/omnibox_client.h +++ b/components/omnibox/browser/omnibox_client.h @@ -5,7 +5,6 @@ #ifndef COMPONENTS_OMNIBOX_BROWSER_OMNIBOX_CLIENT_H_ #define COMPONENTS_OMNIBOX_BROWSER_OMNIBOX_CLIENT_H_ -#include "base/basictypes.h" #include "components/omnibox/browser/autocomplete_provider_client.h" #include "components/omnibox/browser/omnibox_navigation_observer.h" #include "components/omnibox/common/omnibox_focus_state.h" diff --git a/components/omnibox/browser/omnibox_controller.h b/components/omnibox/browser/omnibox_controller.h index dead265..b352ec0 100644 --- a/components/omnibox/browser/omnibox_controller.h +++ b/components/omnibox/browser/omnibox_controller.h @@ -5,8 +5,8 @@ #ifndef COMPONENTS_OMNIBOX_BROWSER_OMNIBOX_CONTROLLER_H_ #define COMPONENTS_OMNIBOX_BROWSER_OMNIBOX_CONTROLLER_H_ -#include "base/basictypes.h" #include "base/compiler_specific.h" +#include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "base/strings/string16.h" #include "components/omnibox/browser/autocomplete_controller.h" diff --git a/components/omnibox/browser/omnibox_edit_controller.h b/components/omnibox/browser/omnibox_edit_controller.h index 622c485..9dab8b3 100644 --- a/components/omnibox/browser/omnibox_edit_controller.h +++ b/components/omnibox/browser/omnibox_edit_controller.h @@ -5,6 +5,7 @@ #ifndef COMPONENTS_OMNIBOX_BROWSER_OMNIBOX_EDIT_CONTROLLER_H_ #define COMPONENTS_OMNIBOX_BROWSER_OMNIBOX_EDIT_CONTROLLER_H_ +#include "base/macros.h" #include "base/strings/string16.h" #include "ui/base/page_transition_types.h" #include "ui/base/window_open_disposition.h" diff --git a/components/omnibox/browser/omnibox_edit_model.cc b/components/omnibox/browser/omnibox_edit_model.cc index e194a03..369a77d 100644 --- a/components/omnibox/browser/omnibox_edit_model.cc +++ b/components/omnibox/browser/omnibox_edit_model.cc @@ -9,6 +9,7 @@ #include "base/auto_reset.h" #include "base/format_macros.h" +#include "base/macros.h" #include "base/metrics/histogram.h" #include "base/metrics/user_metrics.h" #include "base/strings/string_number_conversions.h" diff --git a/components/omnibox/browser/omnibox_edit_model.h b/components/omnibox/browser/omnibox_edit_model.h index 1e8dcf8..13f3035 100644 --- a/components/omnibox/browser/omnibox_edit_model.h +++ b/components/omnibox/browser/omnibox_edit_model.h @@ -5,8 +5,10 @@ #ifndef COMPONENTS_OMNIBOX_BROWSER_OMNIBOX_EDIT_MODEL_H_ #define COMPONENTS_OMNIBOX_BROWSER_OMNIBOX_EDIT_MODEL_H_ -#include "base/basictypes.h" +#include <stddef.h> + #include "base/compiler_specific.h" +#include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "base/strings/string16.h" #include "base/time/time.h" diff --git a/components/omnibox/browser/omnibox_field_trial.cc b/components/omnibox/browser/omnibox_field_trial.cc index 8d6f801..95d0c67 100644 --- a/components/omnibox/browser/omnibox_field_trial.cc +++ b/components/omnibox/browser/omnibox_field_trial.cc @@ -14,6 +14,7 @@ #include "base/strings/string_util.h" #include "base/strings/stringprintf.h" #include "base/time/time.h" +#include "build/build_config.h" #include "components/metrics/proto/omnibox_event.pb.h" #include "components/omnibox/browser/omnibox_switches.h" #include "components/search/search.h" @@ -141,7 +142,7 @@ int OmniboxFieldTrial::GetDisabledProviderTypes() { } void OmniboxFieldTrial::GetActiveSuggestFieldTrialHashes( - std::vector<uint32>* field_trial_hashes) { + std::vector<uint32_t>* field_trial_hashes) { field_trial_hashes->clear(); for (int i = 0; i < kMaxAutocompleteDynamicFieldTrials; ++i) { const std::string& trial_name = DynamicFieldTrialName(i); diff --git a/components/omnibox/browser/omnibox_field_trial.h b/components/omnibox/browser/omnibox_field_trial.h index f7ed8de..9309ba3 100644 --- a/components/omnibox/browser/omnibox_field_trial.h +++ b/components/omnibox/browser/omnibox_field_trial.h @@ -5,11 +5,14 @@ #ifndef COMPONENTS_OMNIBOX_BROWSER_OMNIBOX_FIELD_TRIAL_H_ #define COMPONENTS_OMNIBOX_BROWSER_OMNIBOX_FIELD_TRIAL_H_ +#include <stddef.h> +#include <stdint.h> + #include <map> #include <string> #include <vector> -#include "base/basictypes.h" +#include "base/macros.h" #include "components/metrics/proto/omnibox_event.pb.h" #include "components/omnibox/browser/autocomplete_match_type.h" @@ -123,7 +126,7 @@ class OmniboxFieldTrial { // Populates |field_trial_hash| with hashes of the active suggest field trial // names, if any. static void GetActiveSuggestFieldTrialHashes( - std::vector<uint32>* field_trial_hash); + std::vector<uint32_t>* field_trial_hash); // --------------------------------------------------------- // For the AutocompleteController "stop timer" field trial. diff --git a/components/omnibox/browser/omnibox_field_trial_unittest.cc b/components/omnibox/browser/omnibox_field_trial_unittest.cc index b24f629..77f903d 100644 --- a/components/omnibox/browser/omnibox_field_trial_unittest.cc +++ b/components/omnibox/browser/omnibox_field_trial_unittest.cc @@ -4,11 +4,12 @@ #include "components/omnibox/browser/omnibox_field_trial.h" -#include "base/basictypes.h" #include "base/command_line.h" +#include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "base/metrics/field_trial.h" #include "base/strings/string16.h" +#include "build/build_config.h" #include "components/metrics/proto/omnibox_event.pb.h" #include "components/search/search.h" #include "components/variations/entropy_provider.h" diff --git a/components/omnibox/browser/omnibox_metrics_provider.h b/components/omnibox/browser/omnibox_metrics_provider.h index 11cb5f5..1bf0ead 100644 --- a/components/omnibox/browser/omnibox_metrics_provider.h +++ b/components/omnibox/browser/omnibox_metrics_provider.h @@ -5,7 +5,7 @@ #ifndef COMPONENTS_OMNIBOX_BROWSER_OMNIBOX_METRICS_PROVIDER_H_ #define COMPONENTS_OMNIBOX_BROWSER_OMNIBOX_METRICS_PROVIDER_H_ -#include "base/basictypes.h" +#include "base/macros.h" #include "components/metrics/metrics_provider.h" #include "components/metrics/proto/chrome_user_metrics_extension.pb.h" #include "components/omnibox/browser/omnibox_event_global_tracker.h" diff --git a/components/omnibox/browser/omnibox_popup_model.h b/components/omnibox/browser/omnibox_popup_model.h index a878849..3668a11 100644 --- a/components/omnibox/browser/omnibox_popup_model.h +++ b/components/omnibox/browser/omnibox_popup_model.h @@ -5,7 +5,9 @@ #ifndef COMPONENTS_OMNIBOX_BROWSER_OMNIBOX_POPUP_MODEL_H_ #define COMPONENTS_OMNIBOX_BROWSER_OMNIBOX_POPUP_MODEL_H_ -#include "base/basictypes.h" +#include <stddef.h> + +#include "base/macros.h" #include "base/observer_list.h" #include "components/omnibox/browser/autocomplete_controller.h" #include "components/omnibox/browser/autocomplete_result.h" diff --git a/components/omnibox/browser/omnibox_popup_view.h b/components/omnibox/browser/omnibox_popup_view.h index 5ba71fe..74dd208 100644 --- a/components/omnibox/browser/omnibox_popup_view.h +++ b/components/omnibox/browser/omnibox_popup_view.h @@ -11,6 +11,8 @@ #ifndef COMPONENTS_OMNIBOX_BROWSER_OMNIBOX_POPUP_VIEW_H_ #define COMPONENTS_OMNIBOX_BROWSER_OMNIBOX_POPUP_VIEW_H_ +#include <stddef.h> + #include "build/build_config.h" namespace gfx { diff --git a/components/omnibox/browser/omnibox_view.cc b/components/omnibox/browser/omnibox_view.cc index d070f0a..bf9f8f8 100644 --- a/components/omnibox/browser/omnibox_view.cc +++ b/components/omnibox/browser/omnibox_view.cc @@ -10,6 +10,7 @@ #include "base/strings/string16.h" #include "base/strings/string_util.h" #include "base/strings/utf_string_conversions.h" +#include "build/build_config.h" #include "components/omnibox/browser/autocomplete_match.h" #include "components/omnibox/browser/omnibox_client.h" #include "components/omnibox/browser/omnibox_edit_controller.h" diff --git a/components/omnibox/browser/omnibox_view.h b/components/omnibox/browser/omnibox_view.h index a053c60..2524bf9e 100644 --- a/components/omnibox/browser/omnibox_view.h +++ b/components/omnibox/browser/omnibox_view.h @@ -11,9 +11,12 @@ #ifndef COMPONENTS_OMNIBOX_BROWSER_OMNIBOX_VIEW_H_ #define COMPONENTS_OMNIBOX_BROWSER_OMNIBOX_VIEW_H_ +#include <stddef.h> + #include <string> #include "base/gtest_prod_util.h" +#include "base/macros.h" #include "base/strings/string16.h" #include "base/strings/string_util.h" #include "base/strings/utf_string_conversions.h" diff --git a/components/omnibox/browser/omnibox_view_unittest.cc b/components/omnibox/browser/omnibox_view_unittest.cc index 1056e78..b9dcf92 100644 --- a/components/omnibox/browser/omnibox_view_unittest.cc +++ b/components/omnibox/browser/omnibox_view_unittest.cc @@ -2,6 +2,9 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#include <stddef.h> + +#include "base/macros.h" #include "base/strings/string16.h" #include "base/strings/string_util.h" #include "base/strings/utf_string_conversions.h" diff --git a/components/omnibox/browser/scored_history_match.h b/components/omnibox/browser/scored_history_match.h index bcb270b..0b2e1a0 100644 --- a/components/omnibox/browser/scored_history_match.h +++ b/components/omnibox/browser/scored_history_match.h @@ -5,6 +5,8 @@ #ifndef COMPONENTS_OMNIBOX_BROWSER_SCORED_HISTORY_MATCH_H_ #define COMPONENTS_OMNIBOX_BROWSER_SCORED_HISTORY_MATCH_H_ +#include <stddef.h> + #include <string> #include <vector> diff --git a/components/omnibox/browser/search_provider.cc b/components/omnibox/browser/search_provider.cc index b26910c..72cb2fe 100644 --- a/components/omnibox/browser/search_provider.cc +++ b/components/omnibox/browser/search_provider.cc @@ -4,6 +4,8 @@ #include "components/omnibox/browser/search_provider.h" +#include <stddef.h> + #include <algorithm> #include <cmath> diff --git a/components/omnibox/browser/search_provider.h b/components/omnibox/browser/search_provider.h index 259e7c6..eaacdcb 100644 --- a/components/omnibox/browser/search_provider.h +++ b/components/omnibox/browser/search_provider.h @@ -14,9 +14,9 @@ #include <string> #include <vector> -#include "base/basictypes.h" #include "base/compiler_specific.h" #include "base/gtest_prod_util.h" +#include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "base/time/time.h" #include "base/timer/timer.h" diff --git a/components/omnibox/browser/search_suggestion_parser.cc b/components/omnibox/browser/search_suggestion_parser.cc index df0e00b..95558ec 100644 --- a/components/omnibox/browser/search_suggestion_parser.cc +++ b/components/omnibox/browser/search_suggestion_parser.cc @@ -4,6 +4,8 @@ #include "components/omnibox/browser/search_suggestion_parser.h" +#include <stddef.h> + #include <algorithm> #include "base/i18n/icu_string_conversions.h" diff --git a/components/omnibox/browser/search_suggestion_parser.h b/components/omnibox/browser/search_suggestion_parser.h index 3ecb78e..448a1c4 100644 --- a/components/omnibox/browser/search_suggestion_parser.h +++ b/components/omnibox/browser/search_suggestion_parser.h @@ -8,7 +8,7 @@ #include <string> #include <vector> -#include "base/basictypes.h" +#include "base/macros.h" #include "base/strings/string16.h" #include "base/strings/string_piece.h" #include "components/omnibox/browser/autocomplete_match.h" diff --git a/components/omnibox/browser/shortcuts_backend.cc b/components/omnibox/browser/shortcuts_backend.cc index 99d6f84..8bfa6e6 100644 --- a/components/omnibox/browser/shortcuts_backend.cc +++ b/components/omnibox/browser/shortcuts_backend.cc @@ -4,6 +4,8 @@ #include "components/omnibox/browser/shortcuts_backend.h" +#include <stddef.h> + #include <map> #include <string> #include <vector> diff --git a/components/omnibox/browser/shortcuts_backend.h b/components/omnibox/browser/shortcuts_backend.h index 957762f..a2fde3f 100644 --- a/components/omnibox/browser/shortcuts_backend.h +++ b/components/omnibox/browser/shortcuts_backend.h @@ -11,6 +11,7 @@ #include "base/files/file_path.h" #include "base/gtest_prod_util.h" +#include "base/macros.h" #include "base/memory/ref_counted.h" #include "base/memory/scoped_ptr.h" #include "base/observer_list.h" diff --git a/components/omnibox/browser/shortcuts_database.h b/components/omnibox/browser/shortcuts_database.h index 968bba4..10d6a4c 100644 --- a/components/omnibox/browser/shortcuts_database.h +++ b/components/omnibox/browser/shortcuts_database.h @@ -11,6 +11,7 @@ #include "base/files/file_path.h" #include "base/gtest_prod_util.h" +#include "base/macros.h" #include "base/memory/ref_counted.h" #include "base/strings/string16.h" #include "sql/connection.h" diff --git a/components/omnibox/browser/shortcuts_database_unittest.cc b/components/omnibox/browser/shortcuts_database_unittest.cc index 902868c..15116b8 100644 --- a/components/omnibox/browser/shortcuts_database_unittest.cc +++ b/components/omnibox/browser/shortcuts_database_unittest.cc @@ -4,12 +4,16 @@ #include "components/omnibox/browser/shortcuts_database.h" +#include <stddef.h> + #include "base/files/scoped_temp_dir.h" #include "base/format_macros.h" +#include "base/macros.h" #include "base/path_service.h" #include "base/strings/stringprintf.h" #include "base/strings/utf_string_conversions.h" #include "base/time/time.h" +#include "build/build_config.h" #include "components/omnibox/browser/autocomplete_match_type.h" #include "components/omnibox/browser/shortcuts_constants.h" #include "sql/statement.h" diff --git a/components/omnibox/browser/shortcuts_provider.cc b/components/omnibox/browser/shortcuts_provider.cc index 5e8b2f2..dcea1d2 100644 --- a/components/omnibox/browser/shortcuts_provider.cc +++ b/components/omnibox/browser/shortcuts_provider.cc @@ -4,6 +4,8 @@ #include "components/omnibox/browser/shortcuts_provider.h" +#include <stddef.h> + #include <algorithm> #include <cmath> #include <map> diff --git a/components/omnibox/browser/suggestion_answer.cc b/components/omnibox/browser/suggestion_answer.cc index dc48910..cf6f2b4 100644 --- a/components/omnibox/browser/suggestion_answer.cc +++ b/components/omnibox/browser/suggestion_answer.cc @@ -4,6 +4,8 @@ #include "components/omnibox/browser/suggestion_answer.h" +#include <stddef.h> + #include "base/i18n/rtl.h" #include "base/strings/string_util.h" #include "base/strings/utf_string_conversions.h" diff --git a/components/omnibox/browser/suggestion_answer.h b/components/omnibox/browser/suggestion_answer.h index e64fe4d..6f947a7 100644 --- a/components/omnibox/browser/suggestion_answer.h +++ b/components/omnibox/browser/suggestion_answer.h @@ -9,6 +9,7 @@ #include <vector> #include "base/gtest_prod_util.h" +#include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "url/gurl.h" diff --git a/components/omnibox/browser/test_scheme_classifier.cc b/components/omnibox/browser/test_scheme_classifier.cc index df9b0d0..9e7b8ac 100644 --- a/components/omnibox/browser/test_scheme_classifier.cc +++ b/components/omnibox/browser/test_scheme_classifier.cc @@ -2,6 +2,9 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#include <stddef.h> + +#include "base/macros.h" #include "components/metrics/proto/omnibox_input_type.pb.h" #include "components/omnibox/browser/test_scheme_classifier.h" #include "net/url_request/url_request.h" diff --git a/components/omnibox/browser/url_index_private_data.cc b/components/omnibox/browser/url_index_private_data.cc index 77ddb9f..0409ea6 100644 --- a/components/omnibox/browser/url_index_private_data.cc +++ b/components/omnibox/browser/url_index_private_data.cc @@ -4,6 +4,8 @@ #include "components/omnibox/browser/url_index_private_data.h" +#include <stdint.h> + #include <functional> #include <iterator> #include <limits> @@ -11,10 +13,10 @@ #include <string> #include <vector> -#include "base/basictypes.h" #include "base/files/file_util.h" #include "base/i18n/break_iterator.h" #include "base/i18n/case_conversion.h" +#include "base/macros.h" #include "base/metrics/histogram.h" #include "base/strings/string_split.h" #include "base/strings/string_util.h" @@ -1077,8 +1079,8 @@ bool URLIndexPrivateData::RestoreWordList( if (!cache.has_word_list()) return false; const WordListItem& list_item(cache.word_list()); - uint32 expected_item_count = list_item.word_count(); - uint32 actual_item_count = list_item.word_size(); + uint32_t expected_item_count = list_item.word_count(); + uint32_t actual_item_count = list_item.word_size(); if (actual_item_count == 0 || actual_item_count != expected_item_count) return false; const RepeatedPtrField<std::string>& words(list_item.word()); @@ -1093,8 +1095,8 @@ bool URLIndexPrivateData::RestoreWordMap( if (!cache.has_word_map()) return false; const WordMapItem& list_item(cache.word_map()); - uint32 expected_item_count = list_item.item_count(); - uint32 actual_item_count = list_item.word_map_entry_size(); + uint32_t expected_item_count = list_item.item_count(); + uint32_t actual_item_count = list_item.word_map_entry_size(); if (actual_item_count == 0 || actual_item_count != expected_item_count) return false; const RepeatedPtrField<WordMapEntry>& entries(list_item.word_map_entry()); @@ -1109,8 +1111,8 @@ bool URLIndexPrivateData::RestoreCharWordMap( if (!cache.has_char_word_map()) return false; const CharWordMapItem& list_item(cache.char_word_map()); - uint32 expected_item_count = list_item.item_count(); - uint32 actual_item_count = list_item.char_word_map_entry_size(); + uint32_t expected_item_count = list_item.item_count(); + uint32_t actual_item_count = list_item.char_word_map_entry_size(); if (actual_item_count == 0 || actual_item_count != expected_item_count) return false; const RepeatedPtrField<CharWordMapEntry>& @@ -1123,8 +1125,8 @@ bool URLIndexPrivateData::RestoreCharWordMap( return false; base::char16 uni_char = static_cast<base::char16>(iter->char_16()); WordIDSet word_id_set; - const RepeatedField<int32>& word_ids(iter->word_id()); - for (RepeatedField<int32>::const_iterator jiter = word_ids.begin(); + const RepeatedField<int32_t>& word_ids(iter->word_id()); + for (RepeatedField<int32_t>::const_iterator jiter = word_ids.begin(); jiter != word_ids.end(); ++jiter) word_id_set.insert(*jiter); char_word_map_[uni_char] = word_id_set; @@ -1137,8 +1139,8 @@ bool URLIndexPrivateData::RestoreWordIDHistoryMap( if (!cache.has_word_id_history_map()) return false; const WordIDHistoryMapItem& list_item(cache.word_id_history_map()); - uint32 expected_item_count = list_item.item_count(); - uint32 actual_item_count = list_item.word_id_history_map_entry_size(); + uint32_t expected_item_count = list_item.item_count(); + uint32_t actual_item_count = list_item.word_id_history_map_entry_size(); if (actual_item_count == 0 || actual_item_count != expected_item_count) return false; const RepeatedPtrField<WordIDHistoryMapEntry>& @@ -1151,8 +1153,8 @@ bool URLIndexPrivateData::RestoreWordIDHistoryMap( return false; WordID word_id = iter->word_id(); HistoryIDSet history_id_set; - const RepeatedField<int64>& history_ids(iter->history_id()); - for (RepeatedField<int64>::const_iterator jiter = history_ids.begin(); + const RepeatedField<int64_t>& history_ids(iter->history_id()); + for (RepeatedField<int64_t>::const_iterator jiter = history_ids.begin(); jiter != history_ids.end(); ++jiter) { history_id_set.insert(*jiter); AddToHistoryIDWordMap(*jiter, word_id); @@ -1167,8 +1169,8 @@ bool URLIndexPrivateData::RestoreHistoryInfoMap( if (!cache.has_history_info_map()) return false; const HistoryInfoMapItem& list_item(cache.history_info_map()); - uint32 expected_item_count = list_item.item_count(); - uint32 actual_item_count = list_item.history_info_map_entry_size(); + uint32_t expected_item_count = list_item.item_count(); + uint32_t actual_item_count = list_item.history_info_map_entry_size(); if (actual_item_count == 0 || actual_item_count != expected_item_count) return false; const RepeatedPtrField<HistoryInfoMapEntry>& @@ -1208,8 +1210,8 @@ bool URLIndexPrivateData::RestoreWordStartsMap( // page titles. if (cache.has_word_starts_map()) { const WordStartsMapItem& list_item(cache.word_starts_map()); - uint32 expected_item_count = list_item.item_count(); - uint32 actual_item_count = list_item.word_starts_map_entry_size(); + uint32_t expected_item_count = list_item.item_count(); + uint32_t actual_item_count = list_item.word_starts_map_entry_size(); if (actual_item_count == 0 || actual_item_count != expected_item_count) return false; const RepeatedPtrField<WordStartsMapEntry>& @@ -1219,13 +1221,13 @@ bool URLIndexPrivateData::RestoreWordStartsMap( HistoryID history_id = iter->history_id(); RowWordStarts word_starts; // Restore the URL word starts. - const RepeatedField<int32>& url_starts(iter->url_word_starts()); - for (RepeatedField<int32>::const_iterator jiter = url_starts.begin(); + const RepeatedField<int32_t>& url_starts(iter->url_word_starts()); + for (RepeatedField<int32_t>::const_iterator jiter = url_starts.begin(); jiter != url_starts.end(); ++jiter) word_starts.url_word_starts_.push_back(*jiter); // Restore the page title word starts. - const RepeatedField<int32>& title_starts(iter->title_word_starts()); - for (RepeatedField<int32>::const_iterator jiter = title_starts.begin(); + const RepeatedField<int32_t>& title_starts(iter->title_word_starts()); + for (RepeatedField<int32_t>::const_iterator jiter = title_starts.begin(); jiter != title_starts.end(); ++jiter) word_starts.title_word_starts_.push_back(*jiter); word_starts_map_[history_id] = word_starts; diff --git a/components/omnibox/browser/url_index_private_data.h b/components/omnibox/browser/url_index_private_data.h index c772f29..9253ee1 100644 --- a/components/omnibox/browser/url_index_private_data.h +++ b/components/omnibox/browser/url_index_private_data.h @@ -5,6 +5,8 @@ #ifndef COMPONENTS_OMNIBOX_BROWSER_URL_INDEX_PRIVATE_DATA_H_ #define COMPONENTS_OMNIBOX_BROWSER_URL_INDEX_PRIVATE_DATA_H_ +#include <stddef.h> + #include <set> #include <string> diff --git a/components/omnibox/browser/url_prefix.cc b/components/omnibox/browser/url_prefix.cc index bc0eab4..2c52959 100644 --- a/components/omnibox/browser/url_prefix.cc +++ b/components/omnibox/browser/url_prefix.cc @@ -4,7 +4,6 @@ #include "components/omnibox/browser/url_prefix.h" -#include "base/basictypes.h" #include "base/i18n/case_conversion.h" #include "base/strings/string_util.h" #include "base/strings/utf_string_conversions.h" diff --git a/components/omnibox/browser/url_prefix.h b/components/omnibox/browser/url_prefix.h index a0b555d..96fd1ef 100644 --- a/components/omnibox/browser/url_prefix.h +++ b/components/omnibox/browser/url_prefix.h @@ -5,6 +5,8 @@ #ifndef COMPONENTS_OMNIBOX_BROWSER_URL_PREFIX_H_ #define COMPONENTS_OMNIBOX_BROWSER_URL_PREFIX_H_ +#include <stddef.h> + #include <vector> #include "base/strings/string16.h" diff --git a/components/omnibox/browser/zero_suggest_provider.cc b/components/omnibox/browser/zero_suggest_provider.cc index a12a1b4..e1f7be7 100644 --- a/components/omnibox/browser/zero_suggest_provider.cc +++ b/components/omnibox/browser/zero_suggest_provider.cc @@ -4,6 +4,8 @@ #include "components/omnibox/browser/zero_suggest_provider.h" +#include <stddef.h> + #include "base/callback.h" #include "base/i18n/case_conversion.h" #include "base/json/json_string_value_serializer.h" diff --git a/components/omnibox/browser/zero_suggest_provider.h b/components/omnibox/browser/zero_suggest_provider.h index 904aa6d..79fa99f 100644 --- a/components/omnibox/browser/zero_suggest_provider.h +++ b/components/omnibox/browser/zero_suggest_provider.h @@ -9,8 +9,8 @@ #ifndef COMPONENTS_OMNIBOX_BROWSER_ZERO_SUGGEST_PROVIDER_H_ #define COMPONENTS_OMNIBOX_BROWSER_ZERO_SUGGEST_PROVIDER_H_ -#include "base/basictypes.h" #include "base/compiler_specific.h" +#include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "components/history/core/browser/history_types.h" #include "components/metrics/proto/omnibox_event.pb.h" diff --git a/components/open_from_clipboard/clipboard_recent_content_ios.h b/components/open_from_clipboard/clipboard_recent_content_ios.h index b0b893f..3ea3283 100644 --- a/components/open_from_clipboard/clipboard_recent_content_ios.h +++ b/components/open_from_clipboard/clipboard_recent_content_ios.h @@ -6,6 +6,7 @@ #define COMPONENTS_OPEN_FROM_CLIPBOARD_CLIPBOARD_RECENT_CONTENT_IOS_H_ #include "base/mac/scoped_nsobject.h" +#include "base/macros.h" #include "base/time/time.h" #include "components/open_from_clipboard/clipboard_recent_content.h" #include "url/gurl.h" diff --git a/components/open_from_clipboard/clipboard_recent_content_ios.mm b/components/open_from_clipboard/clipboard_recent_content_ios.mm index 98eaa2a..0f483cf 100644 --- a/components/open_from_clipboard/clipboard_recent_content_ios.mm +++ b/components/open_from_clipboard/clipboard_recent_content_ios.mm @@ -5,6 +5,8 @@ #import "components/open_from_clipboard/clipboard_recent_content_ios.h" #import <CommonCrypto/CommonDigest.h> +#include <stddef.h> +#include <stdint.h> #import <UIKit/UIKit.h> #import "base/ios/ios_util.h" @@ -133,8 +135,8 @@ bool ClipboardRecentContentIOS::GetRecentURLFromClipboard(GURL* url) const { } base::TimeDelta ClipboardRecentContentIOS::GetClipboardContentAge() const { - return base::TimeDelta::FromSeconds( - static_cast<int64>(-[last_pasteboard_change_date_ timeIntervalSinceNow])); + return base::TimeDelta::FromSeconds(static_cast<int64_t>( + -[last_pasteboard_change_date_ timeIntervalSinceNow])); } void ClipboardRecentContentIOS::SuppressClipboardContent() { diff --git a/components/os_crypt/ie7_password_win.cc b/components/os_crypt/ie7_password_win.cc index eebd57b..1c31eb9 100644 --- a/components/os_crypt/ie7_password_win.cc +++ b/components/os_crypt/ie7_password_win.cc @@ -4,6 +4,9 @@ #include "components/os_crypt/ie7_password_win.h" +#include <stddef.h> +#include <stdint.h> + #include <string> #include <vector> @@ -75,9 +78,9 @@ bool GetUserPassFromData(const std::vector<unsigned char>& data, if (information->header.fixed_header_size != sizeof(Header)) return false; - const uint8* offset_to_data = &data[0] + - information->pre_header.header_size + - information->pre_header.pre_header_size; + const uint8_t* offset_to_data = &data[0] + + information->pre_header.header_size + + information->pre_header.pre_header_size; for (int i = 0; i < entry_count / 2; ++i) { diff --git a/components/os_crypt/ie7_password_win.h b/components/os_crypt/ie7_password_win.h index 5babae3..5757714 100644 --- a/components/os_crypt/ie7_password_win.h +++ b/components/os_crypt/ie7_password_win.h @@ -9,7 +9,6 @@ #include <string> #include <vector> -#include "base/basictypes.h" #include "base/time/time.h" // Contains the information read from the IE7/IE8 Storage2 key in the registry. diff --git a/components/os_crypt/ie7_password_win_unittest.cc b/components/os_crypt/ie7_password_win_unittest.cc index a17787c..6aba48c 100644 --- a/components/os_crypt/ie7_password_win_unittest.cc +++ b/components/os_crypt/ie7_password_win_unittest.cc @@ -8,6 +8,7 @@ #include <vector> +#include "base/macros.h" #include "testing/gtest/include/gtest/gtest.h" TEST(IE7PasswordTest, GetUserPassword) { diff --git a/components/os_crypt/os_crypt.h b/components/os_crypt/os_crypt.h index 33e5b71..ecffa4e 100644 --- a/components/os_crypt/os_crypt.h +++ b/components/os_crypt/os_crypt.h @@ -9,6 +9,7 @@ #include "base/macros.h" #include "base/strings/string16.h" +#include "build/build_config.h" // The OSCrypt class gives access to simple encryption and decryption of // strings. Note that on Mac, access to the system Keychain is required and diff --git a/components/os_crypt/os_crypt_mac.mm b/components/os_crypt/os_crypt_mac.mm index dcfd2fb..58a0edc 100644 --- a/components/os_crypt/os_crypt_mac.mm +++ b/components/os_crypt/os_crypt_mac.mm @@ -5,6 +5,7 @@ #include "components/os_crypt/os_crypt.h" #include <CommonCrypto/CommonCryptor.h> // for kCCBlockSizeAES128 +#include <stddef.h> #include "base/command_line.h" #include "base/debug/leak_annotations.h" diff --git a/components/os_crypt/os_crypt_posix.cc b/components/os_crypt/os_crypt_posix.cc index 74e8db3..b5dc334 100644 --- a/components/os_crypt/os_crypt_posix.cc +++ b/components/os_crypt/os_crypt_posix.cc @@ -4,6 +4,8 @@ #include "components/os_crypt/os_crypt.h" +#include <stddef.h> + #include "base/logging.h" #include "base/memory/scoped_ptr.h" #include "base/strings/utf_string_conversions.h" diff --git a/components/os_crypt/os_crypt_switches.cc b/components/os_crypt/os_crypt_switches.cc index 6dffb39..5684dd1 100644 --- a/components/os_crypt/os_crypt_switches.cc +++ b/components/os_crypt/os_crypt_switches.cc @@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#include "build/build_config.h" #include "components/os_crypt/os_crypt_switches.h" namespace os_crypt { diff --git a/components/os_crypt/os_crypt_unittest.cc b/components/os_crypt/os_crypt_unittest.cc index 7f742ba..9837cbc 100644 --- a/components/os_crypt/os_crypt_unittest.cc +++ b/components/os_crypt/os_crypt_unittest.cc @@ -7,8 +7,10 @@ #include <string> #include "base/compiler_specific.h" +#include "base/macros.h" #include "base/strings/string_util.h" #include "base/strings/utf_string_conversions.h" +#include "build/build_config.h" #include "testing/gtest/include/gtest/gtest.h" namespace { diff --git a/components/ownership/mock_owner_key_util.cc b/components/ownership/mock_owner_key_util.cc index 5b28c78..e00ef1c 100644 --- a/components/ownership/mock_owner_key_util.cc +++ b/components/ownership/mock_owner_key_util.cc @@ -20,13 +20,13 @@ MockOwnerKeyUtil::MockOwnerKeyUtil() { MockOwnerKeyUtil::~MockOwnerKeyUtil() { } -bool MockOwnerKeyUtil::ImportPublicKey(std::vector<uint8>* output) { +bool MockOwnerKeyUtil::ImportPublicKey(std::vector<uint8_t>* output) { *output = public_key_; return !public_key_.empty(); } crypto::ScopedSECKEYPrivateKey MockOwnerKeyUtil::FindPrivateKeyInSlot( - const std::vector<uint8>& key, + const std::vector<uint8_t>& key, PK11SlotInfo* slot) { if (!private_key_) return nullptr; @@ -43,7 +43,7 @@ void MockOwnerKeyUtil::Clear() { private_key_.reset(); } -void MockOwnerKeyUtil::SetPublicKey(const std::vector<uint8>& key) { +void MockOwnerKeyUtil::SetPublicKey(const std::vector<uint8_t>& key) { public_key_ = key; } diff --git a/components/ownership/mock_owner_key_util.h b/components/ownership/mock_owner_key_util.h index c36eb13..2ccd4b2 100644 --- a/components/ownership/mock_owner_key_util.h +++ b/components/ownership/mock_owner_key_util.h @@ -5,11 +5,13 @@ #ifndef COMPONENTS_OWNERSHIP_MOCK_OWNER_KEY_UTIL_H_ #define COMPONENTS_OWNERSHIP_MOCK_OWNER_KEY_UTIL_H_ +#include <stdint.h> + #include <vector> -#include "base/basictypes.h" #include "base/compiler_specific.h" #include "base/files/file_path.h" +#include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "components/ownership/owner_key_util.h" #include "components/ownership/ownership_export.h" @@ -27,9 +29,9 @@ class OWNERSHIP_EXPORT MockOwnerKeyUtil : public OwnerKeyUtil { MockOwnerKeyUtil(); // OwnerKeyUtil implementation: - bool ImportPublicKey(std::vector<uint8>* output) override; + bool ImportPublicKey(std::vector<uint8_t>* output) override; crypto::ScopedSECKEYPrivateKey FindPrivateKeyInSlot( - const std::vector<uint8>& key, + const std::vector<uint8_t>& key, PK11SlotInfo* slot) override; bool IsPublicKeyPresent() override; @@ -37,7 +39,7 @@ class OWNERSHIP_EXPORT MockOwnerKeyUtil : public OwnerKeyUtil { void Clear(); // Configures the mock to return the given public key. - void SetPublicKey(const std::vector<uint8>& key); + void SetPublicKey(const std::vector<uint8_t>& key); // Sets the public key to use from the given private key, but doesn't // configure the private key. @@ -49,7 +51,7 @@ class OWNERSHIP_EXPORT MockOwnerKeyUtil : public OwnerKeyUtil { private: ~MockOwnerKeyUtil() override; - std::vector<uint8> public_key_; + std::vector<uint8_t> public_key_; crypto::ScopedSECKEYPrivateKey private_key_; DISALLOW_COPY_AND_ASSIGN(MockOwnerKeyUtil); diff --git a/components/ownership/owner_key_util.h b/components/ownership/owner_key_util.h index 8cedd88..3a108d2 100644 --- a/components/ownership/owner_key_util.h +++ b/components/ownership/owner_key_util.h @@ -5,10 +5,11 @@ #ifndef COMPONENTS_OWNERSHIP_OWNER_KEY_UTIL_H_ #define COMPONENTS_OWNERSHIP_OWNER_KEY_UTIL_H_ +#include <stdint.h> + #include <string> #include <vector> -#include "base/basictypes.h" #include "base/macros.h" #include "base/memory/ref_counted.h" #include "base/memory/scoped_ptr.h" @@ -28,7 +29,7 @@ class OWNERSHIP_EXPORT PublicKey public: PublicKey(); - std::vector<uint8>& data() { return data_; } + std::vector<uint8_t>& data() { return data_; } bool is_loaded() const { return !data_.empty(); } @@ -42,7 +43,7 @@ class OWNERSHIP_EXPORT PublicKey virtual ~PublicKey(); - std::vector<uint8> data_; + std::vector<uint8_t> data_; DISALLOW_COPY_AND_ASSIGN(PublicKey); }; @@ -73,13 +74,13 @@ class OWNERSHIP_EXPORT OwnerKeyUtil public: // Attempts to read the public key from the file system. Upon success, // returns true and populates |output|. False on failure. - virtual bool ImportPublicKey(std::vector<uint8>* output) = 0; + virtual bool ImportPublicKey(std::vector<uint8_t>* output) = 0; // Looks for the private key associated with |key| in the |slot| // and returns it if it can be found. Returns NULL otherwise. // Caller takes ownership. virtual crypto::ScopedSECKEYPrivateKey FindPrivateKeyInSlot( - const std::vector<uint8>& key, + const std::vector<uint8_t>& key, PK11SlotInfo* slot) = 0; // Checks whether the public key is present in the file system. diff --git a/components/ownership/owner_key_util_impl.cc b/components/ownership/owner_key_util_impl.cc index 15efd1f..0d36ede 100644 --- a/components/ownership/owner_key_util_impl.cc +++ b/components/ownership/owner_key_util_impl.cc @@ -10,6 +10,7 @@ #include "base/files/file_util.h" #include "base/logging.h" #include "base/sys_info.h" +#include "build/build_config.h" #include "crypto/nss_key_util.h" namespace ownership { @@ -21,9 +22,9 @@ OwnerKeyUtilImpl::OwnerKeyUtilImpl(const base::FilePath& public_key_file) OwnerKeyUtilImpl::~OwnerKeyUtilImpl() { } -bool OwnerKeyUtilImpl::ImportPublicKey(std::vector<uint8>* output) { +bool OwnerKeyUtilImpl::ImportPublicKey(std::vector<uint8_t>* output) { // Get the file size (must fit in a 32 bit int for NSS). - int64 file_size; + int64_t file_size; if (!base::GetFileSize(public_key_file_, &file_size)) { #if defined(OS_CHROMEOS) LOG_IF(ERROR, base::SysInfo::IsRunningOnChromeOS()) @@ -31,12 +32,12 @@ bool OwnerKeyUtilImpl::ImportPublicKey(std::vector<uint8>* output) { #endif // defined(OS_CHROMEOS) return false; } - if (file_size > static_cast<int64>(std::numeric_limits<int>::max())) { + if (file_size > static_cast<int64_t>(std::numeric_limits<int>::max())) { LOG(ERROR) << public_key_file_.value() << "is " << file_size << "bytes!!! Too big!"; return false; } - int32 safe_file_size = static_cast<int32>(file_size); + int32_t safe_file_size = static_cast<int32_t>(file_size); output->resize(safe_file_size); @@ -53,7 +54,7 @@ bool OwnerKeyUtilImpl::ImportPublicKey(std::vector<uint8>* output) { } crypto::ScopedSECKEYPrivateKey OwnerKeyUtilImpl::FindPrivateKeyInSlot( - const std::vector<uint8>& key, + const std::vector<uint8_t>& key, PK11SlotInfo* slot) { if (!slot) return nullptr; diff --git a/components/ownership/owner_key_util_impl.h b/components/ownership/owner_key_util_impl.h index 137b4f7..eb00570 100644 --- a/components/ownership/owner_key_util_impl.h +++ b/components/ownership/owner_key_util_impl.h @@ -5,6 +5,8 @@ #ifndef COMPONENTS_OWNERSHIP_OWNER_KEY_UTIL_IMPL_H_ #define COMPONENTS_OWNERSHIP_OWNER_KEY_UTIL_IMPL_H_ +#include <stdint.h> + #include "base/compiler_specific.h" #include "base/files/file_path.h" #include "base/macros.h" @@ -20,9 +22,9 @@ class OWNERSHIP_EXPORT OwnerKeyUtilImpl : public OwnerKeyUtil { explicit OwnerKeyUtilImpl(const base::FilePath& public_key_file); // OwnerKeyUtil implementation: - bool ImportPublicKey(std::vector<uint8>* output) override; + bool ImportPublicKey(std::vector<uint8_t>* output) override; crypto::ScopedSECKEYPrivateKey FindPrivateKeyInSlot( - const std::vector<uint8>& key, + const std::vector<uint8_t>& key, PK11SlotInfo* slot) override; bool IsPublicKeyPresent() override; diff --git a/components/ownership/owner_key_util_impl_unittest.cc b/components/ownership/owner_key_util_impl_unittest.cc index 43205c4..1441766 100644 --- a/components/ownership/owner_key_util_impl_unittest.cc +++ b/components/ownership/owner_key_util_impl_unittest.cc @@ -4,20 +4,22 @@ #include "components/ownership/owner_key_util_impl.h" +#include <stdint.h> + #include <string> #include <vector> -#include "base/basictypes.h" #include "base/files/file_path.h" #include "base/files/file_util.h" #include "base/files/scoped_temp_dir.h" +#include "base/macros.h" #include "base/memory/ref_counted.h" #include "testing/gtest/include/gtest/gtest.h" namespace ownership { // 2048-bit RSA public key for testing. -const uint8 kTestKeyData[] = { +const uint8_t kTestKeyData[] = { 0x30, 0x82, 0x01, 0x22, 0x30, 0x0d, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x01, 0x05, 0x00, 0x03, 0x82, 0x01, 0x0f, 0x00, 0x30, 0x82, 0x01, 0x0a, 0x02, 0x82, 0x01, 0x01, 0x00, 0xe8, 0x39, 0x11, @@ -66,15 +68,15 @@ class OwnerKeyUtilImplTest : public testing::Test { TEST_F(OwnerKeyUtilImplTest, ImportPublicKey) { // Export public key, so that we can compare it to the one we get off disk. - std::vector<uint8> public_key(kTestKeyData, - kTestKeyData + sizeof(kTestKeyData)); + std::vector<uint8_t> public_key(kTestKeyData, + kTestKeyData + sizeof(kTestKeyData)); ASSERT_EQ(static_cast<int>(public_key.size()), base::WriteFile(key_file_, reinterpret_cast<const char*>(public_key.data()), public_key.size())); EXPECT_TRUE(util_->IsPublicKeyPresent()); - std::vector<uint8> from_disk; + std::vector<uint8_t> from_disk; EXPECT_TRUE(util_->ImportPublicKey(&from_disk)); EXPECT_EQ(public_key, from_disk); @@ -83,7 +85,7 @@ TEST_F(OwnerKeyUtilImplTest, ImportPublicKey) { TEST_F(OwnerKeyUtilImplTest, ImportPublicKeyFailed) { // First test the case where the file is missing which should fail. EXPECT_FALSE(util_->IsPublicKeyPresent()); - std::vector<uint8> from_disk; + std::vector<uint8_t> from_disk; EXPECT_FALSE(util_->ImportPublicKey(&from_disk)); // Next try empty file. This should fail and the array should be empty. diff --git a/components/ownership/owner_settings_service.cc b/components/ownership/owner_settings_service.cc index 42ccfe4..b15609e 100644 --- a/components/ownership/owner_settings_service.cc +++ b/components/ownership/owner_settings_service.cc @@ -6,8 +6,8 @@ #include <cryptohi.h> #include <keyhi.h> +#include <stdint.h> -#include "base/basictypes.h" #include "base/bind.h" #include "base/callback.h" #include "base/location.h" @@ -50,7 +50,7 @@ scoped_ptr<em::PolicyFetchResponse> AssembleAndSignPolicy( SECItem signature_item; if (SGN_Begin(sign_context.get()) != SECSuccess || SGN_Update(sign_context.get(), - reinterpret_cast<const uint8*>( + reinterpret_cast<const uint8_t*>( policy_response->policy_data().c_str()), policy_response->policy_data().size()) != SECSuccess || SGN_End(sign_context.get(), &signature_item) != SECSuccess) { diff --git a/components/packed_ct_ev_whitelist/bit_stream_reader.h b/components/packed_ct_ev_whitelist/bit_stream_reader.h index 5c95243..3ad9819 100644 --- a/components/packed_ct_ev_whitelist/bit_stream_reader.h +++ b/components/packed_ct_ev_whitelist/bit_stream_reader.h @@ -5,8 +5,10 @@ #ifndef COMPONENTS_PACKED_CT_EV_WHITELIST_BIT_STREAM_READER_H_ #define COMPONENTS_PACKED_CT_EV_WHITELIST_BIT_STREAM_READER_H_ +#include <stddef.h> #include <stdint.h> +#include "base/macros.h" #include "base/strings/string_piece.h" namespace packed_ct_ev_whitelist { @@ -54,7 +56,7 @@ class BitStreamReader { // Index of the last bit read within |current_byte_|. Since bits are read // from the MSB to the LSB, this value is initialized to 7 and decremented // after each read. - int8 current_bit_; + int8_t current_bit_; DISALLOW_COPY_AND_ASSIGN(BitStreamReader); }; diff --git a/components/packed_ct_ev_whitelist/bit_stream_reader_unittest.cc b/components/packed_ct_ev_whitelist/bit_stream_reader_unittest.cc index 9cf44f2..d3d84a8 100644 --- a/components/packed_ct_ev_whitelist/bit_stream_reader_unittest.cc +++ b/components/packed_ct_ev_whitelist/bit_stream_reader_unittest.cc @@ -4,6 +4,9 @@ #include "components/packed_ct_ev_whitelist/bit_stream_reader.h" +#include <stddef.h> +#include <stdint.h> + #include <algorithm> #include <string> diff --git a/components/packed_ct_ev_whitelist/packed_ct_ev_whitelist.h b/components/packed_ct_ev_whitelist/packed_ct_ev_whitelist.h index f3accc4..6ad1349 100644 --- a/components/packed_ct_ev_whitelist/packed_ct_ev_whitelist.h +++ b/components/packed_ct_ev_whitelist/packed_ct_ev_whitelist.h @@ -11,6 +11,7 @@ #include <vector> #include "base/gtest_prod_util.h" +#include "base/macros.h" #include "base/version.h" #include "net/cert/ct_ev_whitelist.h" diff --git a/components/packed_ct_ev_whitelist/packed_ct_ev_whitelist_unittest.cc b/components/packed_ct_ev_whitelist/packed_ct_ev_whitelist_unittest.cc index 6e2c1fb..3af2760 100644 --- a/components/packed_ct_ev_whitelist/packed_ct_ev_whitelist_unittest.cc +++ b/components/packed_ct_ev_whitelist/packed_ct_ev_whitelist_unittest.cc @@ -4,10 +4,13 @@ #include "components/packed_ct_ev_whitelist/packed_ct_ev_whitelist.h" +#include <stdint.h> + #include <algorithm> #include <string> #include "base/big_endian.h" +#include "base/macros.h" #include "testing/gtest/include/gtest/gtest.h" namespace { diff --git a/components/page_load_metrics/browser/metrics_web_contents_observer.cc b/components/page_load_metrics/browser/metrics_web_contents_observer.cc index d11bd57..e5d6fae 100644 --- a/components/page_load_metrics/browser/metrics_web_contents_observer.cc +++ b/components/page_load_metrics/browser/metrics_web_contents_observer.cc @@ -4,6 +4,9 @@ #include "components/page_load_metrics/browser/metrics_web_contents_observer.h" +#include <stddef.h> +#include <stdint.h> + #include "base/location.h" #include "base/logging.h" #include "base/metrics/histogram.h" @@ -102,7 +105,7 @@ UserAbortType AbortTypeForPageTransition(ui::PageTransition transition) { const size_t kNumRapporHistogramBuckets = 6; uint64_t RapporHistogramBucketIndex(const base::TimeDelta& time) { - int64 seconds = time.InSeconds(); + int64_t seconds = time.InSeconds(); if (seconds < 2) return 0; if (seconds < 4) diff --git a/components/page_load_metrics/browser/metrics_web_contents_observer_unittest.cc b/components/page_load_metrics/browser/metrics_web_contents_observer_unittest.cc index d8074fb..668282a 100644 --- a/components/page_load_metrics/browser/metrics_web_contents_observer_unittest.cc +++ b/components/page_load_metrics/browser/metrics_web_contents_observer_unittest.cc @@ -4,6 +4,7 @@ #include "components/page_load_metrics/browser/metrics_web_contents_observer.h" +#include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "base/process/kill.h" #include "base/test/histogram_tester.h" diff --git a/components/pairing/bluetooth_controller_pairing_controller.cc b/components/pairing/bluetooth_controller_pairing_controller.cc index 2f2553a..1a6fe80 100644 --- a/components/pairing/bluetooth_controller_pairing_controller.cc +++ b/components/pairing/bluetooth_controller_pairing_controller.cc @@ -471,21 +471,21 @@ void BluetoothControllerPairingController::DisplayPinCode( void BluetoothControllerPairingController::DisplayPasskey( device::BluetoothDevice* device, - uint32 passkey) { + uint32_t passkey) { // Disallow unknown device. device->RejectPairing(); } void BluetoothControllerPairingController::KeysEntered( device::BluetoothDevice* device, - uint32 entered) { + uint32_t entered) { // Disallow unknown device. device->RejectPairing(); } void BluetoothControllerPairingController::ConfirmPasskey( device::BluetoothDevice* device, - uint32 passkey) { + uint32_t passkey) { confirmation_code_ = base::StringPrintf("%06d", passkey); ChangeStage(STAGE_WAITING_FOR_CODE_CONFIRMATION); } diff --git a/components/pairing/bluetooth_controller_pairing_controller.h b/components/pairing/bluetooth_controller_pairing_controller.h index c987563..177211d 100644 --- a/components/pairing/bluetooth_controller_pairing_controller.h +++ b/components/pairing/bluetooth_controller_pairing_controller.h @@ -5,6 +5,8 @@ #ifndef COMPONENTS_PAIRING_BLUETOOTH_CONTROLLER_PAIRING_CONTROLLER_H_ #define COMPONENTS_PAIRING_BLUETOOTH_CONTROLLER_PAIRING_CONTROLLER_H_ +#include <stdint.h> + #include <set> #include "base/macros.h" @@ -97,9 +99,11 @@ class BluetoothControllerPairingController void RequestPasskey(device::BluetoothDevice* device) override; void DisplayPinCode(device::BluetoothDevice* device, const std::string& pincode) override; - void DisplayPasskey(device::BluetoothDevice* device, uint32 passkey) override; - void KeysEntered(device::BluetoothDevice* device, uint32 entered) override; - void ConfirmPasskey(device::BluetoothDevice* device, uint32 passkey) override; + void DisplayPasskey(device::BluetoothDevice* device, + uint32_t passkey) override; + void KeysEntered(device::BluetoothDevice* device, uint32_t entered) override; + void ConfirmPasskey(device::BluetoothDevice* device, + uint32_t passkey) override; void AuthorizePairing(device::BluetoothDevice* device) override; Stage current_stage_; diff --git a/components/pairing/bluetooth_host_pairing_controller.cc b/components/pairing/bluetooth_host_pairing_controller.cc index 4a0e6fe..6ff9bf5 100644 --- a/components/pairing/bluetooth_host_pairing_controller.cc +++ b/components/pairing/bluetooth_host_pairing_controller.cc @@ -187,7 +187,7 @@ void BluetoothHostPairingController::OnGetAdapter( void BluetoothHostPairingController::SetName() { // Hash the bluetooth address and take the lower 2 bytes to create a human // readable device name. - const uint32 device_id = base::Hash(adapter_->GetAddress()) & 0xFFFF; + const uint32_t device_id = base::Hash(adapter_->GetAddress()) & 0xFFFF; device_name_ = base::StringPrintf("%s%04X", kDeviceNamePrefix, device_id); adapter_->SetName( @@ -486,21 +486,21 @@ void BluetoothHostPairingController::DisplayPinCode( void BluetoothHostPairingController::DisplayPasskey( device::BluetoothDevice* device, - uint32 passkey) { + uint32_t passkey) { // Disallow unknown device. device->RejectPairing(); } void BluetoothHostPairingController::KeysEntered( device::BluetoothDevice* device, - uint32 entered) { + uint32_t entered) { // Disallow unknown device. device->RejectPairing(); } void BluetoothHostPairingController::ConfirmPasskey( device::BluetoothDevice* device, - uint32 passkey) { + uint32_t passkey) { // If a new connection is occurring, reset the stage. This can occur if the // pairing times out, or a new controller connects. if (current_stage_ == STAGE_WAITING_FOR_CODE_CONFIRMATION) diff --git a/components/pairing/bluetooth_host_pairing_controller.h b/components/pairing/bluetooth_host_pairing_controller.h index 75c1eb3..74dd416 100644 --- a/components/pairing/bluetooth_host_pairing_controller.h +++ b/components/pairing/bluetooth_host_pairing_controller.h @@ -5,6 +5,8 @@ #ifndef COMPONENTS_PAIRING_BLUETOOTH_HOST_PAIRING_CONTROLLER_H_ #define COMPONENTS_PAIRING_BLUETOOTH_HOST_PAIRING_CONTROLLER_H_ +#include <stdint.h> + #include "base/macros.h" #include "base/memory/ref_counted.h" #include "base/memory/weak_ptr.h" @@ -93,9 +95,11 @@ class BluetoothHostPairingController void RequestPasskey(device::BluetoothDevice* device) override; void DisplayPinCode(device::BluetoothDevice* device, const std::string& pincode) override; - void DisplayPasskey(device::BluetoothDevice* device, uint32 passkey) override; - void KeysEntered(device::BluetoothDevice* device, uint32 entered) override; - void ConfirmPasskey(device::BluetoothDevice* device, uint32 passkey) override; + void DisplayPasskey(device::BluetoothDevice* device, + uint32_t passkey) override; + void KeysEntered(device::BluetoothDevice* device, uint32_t entered) override; + void ConfirmPasskey(device::BluetoothDevice* device, + uint32_t passkey) override; void AuthorizePairing(device::BluetoothDevice* device) override; Stage current_stage_; diff --git a/components/pairing/fake_controller_pairing_controller.h b/components/pairing/fake_controller_pairing_controller.h index 3992674..3f884d9 100644 --- a/components/pairing/fake_controller_pairing_controller.h +++ b/components/pairing/fake_controller_pairing_controller.h @@ -5,6 +5,8 @@ #ifndef COMPONENTS_PAIRING_FAKE_CONTROLLER_PAIRING_CONTROLLER_H_ #define COMPONENTS_PAIRING_FAKE_CONTROLLER_PAIRING_CONTROLLER_H_ +#include <stddef.h> + #include <set> #include <utility> diff --git a/components/pairing/fake_host_pairing_controller.cc b/components/pairing/fake_host_pairing_controller.cc index 0e4a34e..b2f79fd 100644 --- a/components/pairing/fake_host_pairing_controller.cc +++ b/components/pairing/fake_host_pairing_controller.cc @@ -4,6 +4,8 @@ #include "components/pairing/fake_host_pairing_controller.h" +#include <stddef.h> + #include <map> #include <vector> diff --git a/components/pairing/proto_decoder.h b/components/pairing/proto_decoder.h index fc02819..1091995 100644 --- a/components/pairing/proto_decoder.h +++ b/components/pairing/proto_decoder.h @@ -5,6 +5,8 @@ #ifndef COMPONENTS_PAIRING_PROTO_DECODER_H_ #define COMPONENTS_PAIRING_PROTO_DECODER_H_ +#include <stdint.h> + #include <deque> #include "base/logging.h" diff --git a/components/password_manager/content/browser/content_password_manager_driver.h b/components/password_manager/content/browser/content_password_manager_driver.h index 9139377..fdd0412 100644 --- a/components/password_manager/content/browser/content_password_manager_driver.h +++ b/components/password_manager/content/browser/content_password_manager_driver.h @@ -8,8 +8,8 @@ #include <map> #include <vector> -#include "base/basictypes.h" #include "base/compiler_specific.h" +#include "base/macros.h" #include "components/autofill/core/common/password_form_field_prediction_map.h" #include "components/autofill/core/common/password_form_generation_data.h" #include "components/password_manager/core/browser/password_autofill_manager.h" diff --git a/components/password_manager/content/browser/content_password_manager_driver_factory.h b/components/password_manager/content/browser/content_password_manager_driver_factory.h index d36f53c..f5bf925 100644 --- a/components/password_manager/content/browser/content_password_manager_driver_factory.h +++ b/components/password_manager/content/browser/content_password_manager_driver_factory.h @@ -7,8 +7,8 @@ #include <map> -#include "base/basictypes.h" #include "base/compiler_specific.h" +#include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "base/supports_user_data.h" #include "components/password_manager/core/browser/password_autofill_manager.h" diff --git a/components/password_manager/content/browser/content_password_manager_driver_unittest.cc b/components/password_manager/content/browser/content_password_manager_driver_unittest.cc index ed03eb7..fc0b460 100644 --- a/components/password_manager/content/browser/content_password_manager_driver_unittest.cc +++ b/components/password_manager/content/browser/content_password_manager_driver_unittest.cc @@ -4,6 +4,9 @@ #include "components/password_manager/content/browser/content_password_manager_driver.h" +#include <stdint.h> + +#include "base/macros.h" #include "components/autofill/content/common/autofill_messages.h" #include "components/autofill/core/browser/test_autofill_client.h" #include "components/password_manager/core/browser/stub_log_manager.h" @@ -48,7 +51,7 @@ class ContentPasswordManagerDriverTest } bool WasLoggingActivationMessageSent(bool* activation_flag) { - const uint32 kMsgID = AutofillMsg_SetLoggingState::ID; + const uint32_t kMsgID = AutofillMsg_SetLoggingState::ID; const IPC::Message* message = process()->sink().GetFirstMessageMatching(kMsgID); if (!message) diff --git a/components/password_manager/content/browser/credential_manager_dispatcher_unittest.cc b/components/password_manager/content/browser/credential_manager_dispatcher_unittest.cc index 4af2471..39f1e1d 100644 --- a/components/password_manager/content/browser/credential_manager_dispatcher_unittest.cc +++ b/components/password_manager/content/browser/credential_manager_dispatcher_unittest.cc @@ -4,11 +4,14 @@ #include "components/password_manager/content/browser/credential_manager_dispatcher.h" +#include <stdint.h> + #include <string> #include <vector> #include "base/bind.h" #include "base/command_line.h" +#include "base/macros.h" #include "base/prefs/pref_registry_simple.h" #include "base/prefs/testing_pref_service.h" #include "base/run_loop.h" @@ -244,7 +247,7 @@ class CredentialManagerDispatcherTest RunAllPendingTasks(); - const uint32 kMsgID = CredentialManagerMsg_SendCredential::ID; + const uint32_t kMsgID = CredentialManagerMsg_SendCredential::ID; const IPC::Message* message = process()->sink().GetFirstMessageMatching(kMsgID); ASSERT_TRUE(message); @@ -263,7 +266,7 @@ class CredentialManagerDispatcherTest RunAllPendingTasks(); - const uint32 kMsgID = CredentialManagerMsg_SendCredential::ID; + const uint32_t kMsgID = CredentialManagerMsg_SendCredential::ID; const IPC::Message* message = process()->sink().GetFirstMessageMatching(kMsgID); ASSERT_TRUE(message); @@ -296,7 +299,7 @@ TEST_F(CredentialManagerDispatcherTest, CredentialManagerOnStore) { dispatcher()->OnStore(kRequestId, info); - const uint32 kMsgID = CredentialManagerMsg_AcknowledgeStore::ID; + const uint32_t kMsgID = CredentialManagerMsg_AcknowledgeStore::ID; const IPC::Message* message = process()->sink().GetFirstMessageMatching(kMsgID); EXPECT_TRUE(message); @@ -333,7 +336,7 @@ TEST_F(CredentialManagerDispatcherTest, CredentialManagerStoreOverwrite) { _, CredentialSourceType::CREDENTIAL_SOURCE_API)) .Times(testing::Exactly(0)); - const uint32 kMsgID = CredentialManagerMsg_AcknowledgeStore::ID; + const uint32_t kMsgID = CredentialManagerMsg_AcknowledgeStore::ID; const IPC::Message* message = process()->sink().GetFirstMessageMatching(kMsgID); EXPECT_TRUE(message); @@ -386,7 +389,7 @@ TEST_F(CredentialManagerDispatcherTest, dispatcher()->OnStore(kRequestId, info); - const uint32 kMsgID = CredentialManagerMsg_AcknowledgeStore::ID; + const uint32_t kMsgID = CredentialManagerMsg_AcknowledgeStore::ID; const IPC::Message* message = process()->sink().GetFirstMessageMatching(kMsgID); EXPECT_TRUE(message); @@ -413,7 +416,7 @@ TEST_F(CredentialManagerDispatcherTest, dispatcher()->OnRequireUserMediation(kRequestId); RunAllPendingTasks(); - const uint32 kMsgID = + const uint32_t kMsgID = CredentialManagerMsg_AcknowledgeRequireUserMediation::ID; const IPC::Message* message = process()->sink().GetFirstMessageMatching(kMsgID); @@ -478,7 +481,7 @@ TEST_F(CredentialManagerDispatcherTest, RunAllPendingTasks(); - const uint32 kMsgID = CredentialManagerMsg_SendCredential::ID; + const uint32_t kMsgID = CredentialManagerMsg_SendCredential::ID; const IPC::Message* message = process()->sink().GetFirstMessageMatching(kMsgID); EXPECT_TRUE(message); @@ -504,7 +507,7 @@ TEST_F(CredentialManagerDispatcherTest, RunAllPendingTasks(); - const uint32 kMsgID = CredentialManagerMsg_SendCredential::ID; + const uint32_t kMsgID = CredentialManagerMsg_SendCredential::ID; const IPC::Message* message = process()->sink().GetFirstMessageMatching(kMsgID); EXPECT_TRUE(message); @@ -528,7 +531,7 @@ TEST_F(CredentialManagerDispatcherTest, RunAllPendingTasks(); - const uint32 kMsgID = CredentialManagerMsg_SendCredential::ID; + const uint32_t kMsgID = CredentialManagerMsg_SendCredential::ID; const IPC::Message* message = process()->sink().GetFirstMessageMatching(kMsgID); EXPECT_TRUE(message); @@ -546,7 +549,7 @@ TEST_F( RunAllPendingTasks(); - const uint32 kMsgID = CredentialManagerMsg_SendCredential::ID; + const uint32_t kMsgID = CredentialManagerMsg_SendCredential::ID; const IPC::Message* message = process()->sink().GetFirstMessageMatching(kMsgID); EXPECT_TRUE(message); @@ -593,7 +596,7 @@ TEST_F(CredentialManagerDispatcherTest, RunAllPendingTasks(); - const uint32 kMsgID = CredentialManagerMsg_SendCredential::ID; + const uint32_t kMsgID = CredentialManagerMsg_SendCredential::ID; const IPC::Message* message = process()->sink().GetFirstMessageMatching(kMsgID); EXPECT_TRUE(message); @@ -620,7 +623,7 @@ TEST_F(CredentialManagerDispatcherTest, RunAllPendingTasks(); - const uint32 kMsgID = CredentialManagerMsg_SendCredential::ID; + const uint32_t kMsgID = CredentialManagerMsg_SendCredential::ID; const IPC::Message* message = process()->sink().GetFirstMessageMatching(kMsgID); EXPECT_TRUE(message); @@ -649,7 +652,7 @@ TEST_F(CredentialManagerDispatcherTest, RunAllPendingTasks(); - const uint32 kMsgID = CredentialManagerMsg_SendCredential::ID; + const uint32_t kMsgID = CredentialManagerMsg_SendCredential::ID; const IPC::Message* message = process()->sink().GetFirstMessageMatching(kMsgID); EXPECT_TRUE(message); @@ -676,7 +679,7 @@ TEST_F(CredentialManagerDispatcherTest, dispatcher()->OnRequestCredential(kRequestId, false, federations); // Check that the second request triggered a rejection. - uint32 kMsgID = CredentialManagerMsg_RejectCredentialRequest::ID; + uint32_t kMsgID = CredentialManagerMsg_RejectCredentialRequest::ID; const IPC::Message* message = process()->sink().GetFirstMessageMatching(kMsgID); EXPECT_TRUE(message); @@ -762,7 +765,7 @@ TEST_F(CredentialManagerDispatcherTest, IncognitoZeroClickRequestCredential) { RunAllPendingTasks(); - const uint32 kMsgID = CredentialManagerMsg_SendCredential::ID; + const uint32_t kMsgID = CredentialManagerMsg_SendCredential::ID; const IPC::Message* message = process()->sink().GetFirstMessageMatching(kMsgID); ASSERT_TRUE(message); diff --git a/components/password_manager/content/browser/password_manager_internals_service_factory.h b/components/password_manager/content/browser/password_manager_internals_service_factory.h index 1ef2c04..769854e 100644 --- a/components/password_manager/content/browser/password_manager_internals_service_factory.h +++ b/components/password_manager/content/browser/password_manager_internals_service_factory.h @@ -5,6 +5,7 @@ #ifndef COMPONENTS_PASSWORD_MANAGER_CONTENT_BROWSER_PASSWORD_MANAGER_INTERNALS_SERVICE_FACTORY_H_ #define COMPONENTS_PASSWORD_MANAGER_CONTENT_BROWSER_PASSWORD_MANAGER_INTERNALS_SERVICE_FACTORY_H_ +#include "base/macros.h" #include "base/memory/singleton.h" #include "components/keyed_service/content/browser_context_keyed_service_factory.h" diff --git a/components/password_manager/content/renderer/credential_manager_client.cc b/components/password_manager/content/renderer/credential_manager_client.cc index 5d3aab9..2d887ad 100644 --- a/components/password_manager/content/renderer/credential_manager_client.cc +++ b/components/password_manager/content/renderer/credential_manager_client.cc @@ -4,6 +4,8 @@ #include "components/password_manager/content/renderer/credential_manager_client.h" +#include <stddef.h> + #include "components/password_manager/content/common/credential_manager_content_utils.h" #include "components/password_manager/content/common/credential_manager_messages.h" #include "components/password_manager/core/common/credential_manager_types.h" diff --git a/components/password_manager/content/renderer/credential_manager_client.h b/components/password_manager/content/renderer/credential_manager_client.h index a31bff4..81f3ed2 100644 --- a/components/password_manager/content/renderer/credential_manager_client.h +++ b/components/password_manager/content/renderer/credential_manager_client.h @@ -5,9 +5,9 @@ #ifndef COMPONENTS_PASSWORD_MANAGER_CONTENT_RENDERER_CREDENTIAL_MANAGER_CLIENT_H_ #define COMPONENTS_PASSWORD_MANAGER_CONTENT_RENDERER_CREDENTIAL_MANAGER_CLIENT_H_ -#include "base/basictypes.h" #include "base/compiler_specific.h" #include "base/id_map.h" +#include "base/macros.h" #include "content/public/renderer/render_view_observer.h" #include "ipc/ipc_listener.h" #include "third_party/WebKit/public/platform/WebCredentialManagerClient.h" diff --git a/components/password_manager/content/renderer/credential_manager_client_browsertest.cc b/components/password_manager/content/renderer/credential_manager_client_browsertest.cc index 9fb27fc..0fda08b 100644 --- a/components/password_manager/content/renderer/credential_manager_client_browsertest.cc +++ b/components/password_manager/content/renderer/credential_manager_client_browsertest.cc @@ -2,6 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#include <stdint.h> + #include "components/password_manager/content/common/credential_manager_messages.h" #include "components/password_manager/content/renderer/credential_manager_client.h" #include "content/public/test/render_view_test.h" @@ -46,7 +48,7 @@ class CredentialManagerClientTest : public content::RenderViewTest { // returns false, and the |request_id| is set to -1. // // Clears any pending messages upon return. - bool ExtractRequestId(uint32 message_id, int& request_id) { + bool ExtractRequestId(uint32_t message_id, int& request_id) { request_id = -1; const IPC::Message* message = sink().GetFirstMessageMatching(message_id); if (!message) diff --git a/components/password_manager/core/browser/affiliated_match_helper.cc b/components/password_manager/core/browser/affiliated_match_helper.cc index 5c04f4b..3ab4b0e 100644 --- a/components/password_manager/core/browser/affiliated_match_helper.cc +++ b/components/password_manager/core/browser/affiliated_match_helper.cc @@ -30,7 +30,7 @@ bool IsAndroidApplicationCredential(const autofill::PasswordForm& form, } // namespace // static -const int64 AffiliatedMatchHelper::kInitializationDelayOnStartupInSeconds; +const int64_t AffiliatedMatchHelper::kInitializationDelayOnStartupInSeconds; AffiliatedMatchHelper::AffiliatedMatchHelper( PasswordStore* password_store, diff --git a/components/password_manager/core/browser/affiliated_match_helper.h b/components/password_manager/core/browser/affiliated_match_helper.h index db1960d..a13e9ea 100644 --- a/components/password_manager/core/browser/affiliated_match_helper.h +++ b/components/password_manager/core/browser/affiliated_match_helper.h @@ -5,6 +5,8 @@ #ifndef COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_AFFILIATED_MATCH_HELPER_H_ #define COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_AFFILIATED_MATCH_HELPER_H_ +#include <stdint.h> + #include <string> #include <vector> @@ -99,7 +101,7 @@ class AffiliatedMatchHelper : public PasswordStore::Observer, // much, but also low enough that the user be able log-in shortly after // browser start-up into web sites using Android credentials. // TODO(engedy): See if we can tie this instead to some meaningful event. - static const int64 kInitializationDelayOnStartupInSeconds = 8; + static const int64_t kInitializationDelayOnStartupInSeconds = 8; private: // Reads all autofillable credentials from the password store and starts diff --git a/components/password_manager/core/browser/affiliated_match_helper_unittest.cc b/components/password_manager/core/browser/affiliated_match_helper_unittest.cc index 946678d..2e9a8f4 100644 --- a/components/password_manager/core/browser/affiliated_match_helper_unittest.cc +++ b/components/password_manager/core/browser/affiliated_match_helper_unittest.cc @@ -4,6 +4,8 @@ #include "components/password_manager/core/browser/affiliated_match_helper.h" +#include <stddef.h> + #include "base/macros.h" #include "base/memory/ref_counted.h" #include "base/memory/scoped_ptr.h" diff --git a/components/password_manager/core/browser/affiliation_backend.h b/components/password_manager/core/browser/affiliation_backend.h index 030061ae..63ca56c 100644 --- a/components/password_manager/core/browser/affiliation_backend.h +++ b/components/password_manager/core/browser/affiliation_backend.h @@ -5,6 +5,8 @@ #ifndef COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_AFFILIATION_BACKEND_H_ #define COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_AFFILIATION_BACKEND_H_ +#include <stddef.h> + #include <map> #include <vector> diff --git a/components/password_manager/core/browser/affiliation_backend_unittest.cc b/components/password_manager/core/browser/affiliation_backend_unittest.cc index 5660deb..d19e53d 100644 --- a/components/password_manager/core/browser/affiliation_backend_unittest.cc +++ b/components/password_manager/core/browser/affiliation_backend_unittest.cc @@ -4,6 +4,8 @@ #include "components/password_manager/core/browser/affiliation_backend.h" +#include <stddef.h> + #include "base/files/file_path.h" #include "base/files/file_util.h" #include "base/macros.h" diff --git a/components/password_manager/core/browser/affiliation_database.cc b/components/password_manager/core/browser/affiliation_database.cc index bab8f36..2b56955 100644 --- a/components/password_manager/core/browser/affiliation_database.cc +++ b/components/password_manager/core/browser/affiliation_database.cc @@ -4,6 +4,8 @@ #include "components/password_manager/core/browser/affiliation_database.h" +#include <stdint.h> + #include "base/bind.h" #include "base/files/file_path.h" #include "sql/connection.h" @@ -94,9 +96,9 @@ void AffiliationDatabase::GetAllAffiliations( "WHERE m.set_id = c.id " "ORDER BY c.id")); - int64 last_eq_class_id = 0; + int64_t last_eq_class_id = 0; while (statement.Step()) { - int64 eq_class_id = statement.ColumnInt64(2); + int64_t eq_class_id = statement.ColumnInt64(2); if (results->empty() || eq_class_id != last_eq_class_id) { results->push_back(AffiliatedFacetsWithUpdateTime()); last_eq_class_id = eq_class_id; @@ -124,7 +126,7 @@ void AffiliationDatabase::DeleteAffiliationsForFacet( if (!statement_lookup.Step()) return; - int64 eq_class_id = statement_lookup.ColumnInt64(0); + int64_t eq_class_id = statement_lookup.ColumnInt64(0); // Children will get deleted due to 'ON DELETE CASCADE'. sql::Statement statement_parent(sql_connection_->GetCachedStatement( @@ -174,7 +176,7 @@ bool AffiliationDatabase::Store( if (!statement_parent.Run()) return false; - int64 eq_class_id = sql_connection_->GetLastInsertRowId(); + int64_t eq_class_id = sql_connection_->GetLastInsertRowId(); for (const FacetURI& uri : affiliated_facets.facets) { statement_child.Reset(true); statement_child.BindString(0, uri.canonical_spec()); diff --git a/components/password_manager/core/browser/affiliation_database_unittest.cc b/components/password_manager/core/browser/affiliation_database_unittest.cc index 4734392..920281f 100644 --- a/components/password_manager/core/browser/affiliation_database_unittest.cc +++ b/components/password_manager/core/browser/affiliation_database_unittest.cc @@ -4,8 +4,11 @@ #include "components/password_manager/core/browser/affiliation_database.h" +#include <stdint.h> + #include "base/files/file_util.h" #include "base/files/scoped_temp_dir.h" +#include "base/macros.h" #include "sql/test/scoped_error_ignorer.h" #include "sql/test/test_helpers.h" #include "testing/gmock/include/gmock/gmock.h" @@ -25,9 +28,9 @@ const char kTestFacetURI6[] = "https://zeta.example.com"; const char kTestAndroidFacetURI[] = "android://hash@com.example.android"; -const int64 kTestTimeUs1 = 1000000; -const int64 kTestTimeUs2 = 2000000; -const int64 kTestTimeUs3 = 3000000; +const int64_t kTestTimeUs1 = 1000000; +const int64_t kTestTimeUs2 = 2000000; +const int64_t kTestTimeUs3 = 3000000; void ExpectEquivalenceClassesAreEqual( const AffiliatedFacetsWithUpdateTime& expectation, diff --git a/components/password_manager/core/browser/affiliation_fetch_throttler.h b/components/password_manager/core/browser/affiliation_fetch_throttler.h index fedce6a..e793d0d 100644 --- a/components/password_manager/core/browser/affiliation_fetch_throttler.h +++ b/components/password_manager/core/browser/affiliation_fetch_throttler.h @@ -5,6 +5,8 @@ #ifndef COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_AFFILIATION_FETCH_THROTTLER_H_ #define COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_AFFILIATION_FETCH_THROTTLER_H_ +#include <stdint.h> + #include "base/gtest_prod_util.h" #include "base/macros.h" #include "base/memory/ref_counted.h" diff --git a/components/password_manager/core/browser/affiliation_fetch_throttler_unittest.cc b/components/password_manager/core/browser/affiliation_fetch_throttler_unittest.cc index 5175745..17d5d54 100644 --- a/components/password_manager/core/browser/affiliation_fetch_throttler_unittest.cc +++ b/components/password_manager/core/browser/affiliation_fetch_throttler_unittest.cc @@ -4,6 +4,9 @@ #include "components/password_manager/core/browser/affiliation_fetch_throttler.h" +#include <stddef.h> +#include <stdint.h> + #include <cmath> #include "base/callback.h" diff --git a/components/password_manager/core/browser/affiliation_fetcher.cc b/components/password_manager/core/browser/affiliation_fetcher.cc index 943724b..b37378b 100644 --- a/components/password_manager/core/browser/affiliation_fetcher.cc +++ b/components/password_manager/core/browser/affiliation_fetcher.cc @@ -4,6 +4,8 @@ #include "components/password_manager/core/browser/affiliation_fetcher.h" +#include <stddef.h> + #include "base/metrics/histogram_macros.h" #include "base/metrics/sparse_histogram.h" #include "components/password_manager/core/browser/affiliation_api.pb.h" diff --git a/components/password_manager/core/browser/affiliation_fetcher_unittest.cc b/components/password_manager/core/browser/affiliation_fetcher_unittest.cc index 31ad398..6c8aacb 100644 --- a/components/password_manager/core/browser/affiliation_fetcher_unittest.cc +++ b/components/password_manager/core/browser/affiliation_fetcher_unittest.cc @@ -4,6 +4,7 @@ #include "components/password_manager/core/browser/affiliation_fetcher.h" +#include "base/macros.h" #include "base/test/null_task_runner.h" #include "components/password_manager/core/browser/affiliation_api.pb.h" #include "net/url_request/test_url_fetcher_factory.h" diff --git a/components/password_manager/core/browser/affiliation_utils.h b/components/password_manager/core/browser/affiliation_utils.h index 2a5f553..d4a177a 100644 --- a/components/password_manager/core/browser/affiliation_utils.h +++ b/components/password_manager/core/browser/affiliation_utils.h @@ -48,6 +48,8 @@ #include <string> #include <vector> +#include <stddef.h> + #include "base/containers/hash_tables.h" #include "base/logging.h" #include "base/strings/utf_string_conversions.h" diff --git a/components/password_manager/core/browser/browser_save_password_progress_logger.h b/components/password_manager/core/browser/browser_save_password_progress_logger.h index cba6c88..2545c6a 100644 --- a/components/password_manager/core/browser/browser_save_password_progress_logger.h +++ b/components/password_manager/core/browser/browser_save_password_progress_logger.h @@ -7,6 +7,7 @@ #include <string> +#include "base/macros.h" #include "components/autofill/core/common/save_password_progress_logger.h" namespace password_manager { diff --git a/components/password_manager/core/browser/credential_manager_password_form_manager.cc b/components/password_manager/core/browser/credential_manager_password_form_manager.cc index 1547977..61b7949 100644 --- a/components/password_manager/core/browser/credential_manager_password_form_manager.cc +++ b/components/password_manager/core/browser/credential_manager_password_form_manager.cc @@ -4,6 +4,7 @@ #include "components/password_manager/core/browser/credential_manager_password_form_manager.h" +#include "base/macros.h" #include "components/autofill/core/common/password_form.h" #include "components/password_manager/core/browser/password_manager_client.h" #include "components/password_manager/core/browser/password_store.h" diff --git a/components/password_manager/core/browser/credential_manager_password_form_manager.h b/components/password_manager/core/browser/credential_manager_password_form_manager.h index 09ee7ac..db7b419 100644 --- a/components/password_manager/core/browser/credential_manager_password_form_manager.h +++ b/components/password_manager/core/browser/credential_manager_password_form_manager.h @@ -5,6 +5,7 @@ #ifndef COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_CREDENTIAL_MANAGER_PASSWORD_FORM_MANAGER_H_ #define COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_CREDENTIAL_MANAGER_PASSWORD_FORM_MANAGER_H_ +#include "base/macros.h" #include "base/memory/weak_ptr.h" #include "components/password_manager/core/browser/password_form_manager.h" diff --git a/components/password_manager/core/browser/credential_manager_pending_request_task.h b/components/password_manager/core/browser/credential_manager_pending_request_task.h index 0cc84da..7ba9ea3 100644 --- a/components/password_manager/core/browser/credential_manager_pending_request_task.h +++ b/components/password_manager/core/browser/credential_manager_pending_request_task.h @@ -10,6 +10,7 @@ #include <vector> #include "base/callback_forward.h" +#include "base/macros.h" #include "base/memory/scoped_vector.h" #include "components/password_manager/core/browser/password_store_consumer.h" #include "url/gurl.h" diff --git a/components/password_manager/core/browser/credential_manager_pending_require_user_mediation_task.h b/components/password_manager/core/browser/credential_manager_pending_require_user_mediation_task.h index adbccbc..8bc8b02 100644 --- a/components/password_manager/core/browser/credential_manager_pending_require_user_mediation_task.h +++ b/components/password_manager/core/browser/credential_manager_pending_require_user_mediation_task.h @@ -8,6 +8,7 @@ #include <set> #include <string> +#include "base/macros.h" #include "base/memory/scoped_vector.h" #include "components/password_manager/core/browser/password_store_consumer.h" diff --git a/components/password_manager/core/browser/credentials_filter.h b/components/password_manager/core/browser/credentials_filter.h index c95f64f..2b336de 100644 --- a/components/password_manager/core/browser/credentials_filter.h +++ b/components/password_manager/core/browser/credentials_filter.h @@ -5,6 +5,7 @@ #ifndef COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_CREDENTIALS_FILTER_H_ #define COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_CREDENTIALS_FILTER_H_ +#include "base/macros.h" #include "base/memory/scoped_vector.h" #include "components/autofill/core/common/password_form.h" diff --git a/components/password_manager/core/browser/export/csv_writer_unittest.cc b/components/password_manager/core/browser/export/csv_writer_unittest.cc index 62842c1..eb89d5a 100644 --- a/components/password_manager/core/browser/export/csv_writer_unittest.cc +++ b/components/password_manager/core/browser/export/csv_writer_unittest.cc @@ -4,6 +4,7 @@ #include "components/password_manager/core/browser/export/csv_writer.h" +#include "base/macros.h" #include "build/build_config.h" #include "testing/gtest/include/gtest/gtest.h" diff --git a/components/password_manager/core/browser/facet_manager_unittest.cc b/components/password_manager/core/browser/facet_manager_unittest.cc index 01ae885..aa94a5a 100644 --- a/components/password_manager/core/browser/facet_manager_unittest.cc +++ b/components/password_manager/core/browser/facet_manager_unittest.cc @@ -4,6 +4,8 @@ #include "components/password_manager/core/browser/facet_manager.h" +#include <stddef.h> + #include "base/bind.h" #include "base/bind_helpers.h" #include "base/location.h" diff --git a/components/password_manager/core/browser/import/csv_reader.cc b/components/password_manager/core/browser/import/csv_reader.cc index aa21071..4916068 100644 --- a/components/password_manager/core/browser/import/csv_reader.cc +++ b/components/password_manager/core/browser/import/csv_reader.cc @@ -4,7 +4,10 @@ #include "components/password_manager/core/browser/import/csv_reader.h" +#include <stddef.h> + #include "base/logging.h" +#include "base/macros.h" #include "base/strings/string_util.h" #include "third_party/re2/src/re2/re2.h" diff --git a/components/password_manager/core/browser/log_router_unittest.cc b/components/password_manager/core/browser/log_router_unittest.cc index 479448b..1af1bf4 100644 --- a/components/password_manager/core/browser/log_router_unittest.cc +++ b/components/password_manager/core/browser/log_router_unittest.cc @@ -4,6 +4,7 @@ #include "components/password_manager/core/browser/log_router.h" +#include "base/macros.h" #include "components/password_manager/core/browser/log_receiver.h" #include "components/password_manager/core/browser/stub_log_manager.h" #include "testing/gmock/include/gmock/gmock.h" diff --git a/components/password_manager/core/browser/login_database.cc b/components/password_manager/core/browser/login_database.cc index 50861a3..525ddb4 100644 --- a/components/password_manager/core/browser/login_database.cc +++ b/components/password_manager/core/browser/login_database.cc @@ -4,12 +4,16 @@ #include "components/password_manager/core/browser/login_database.h" +#include <stddef.h> +#include <stdint.h> + #include <algorithm> #include <limits> #include "base/bind.h" #include "base/files/file_path.h" #include "base/logging.h" +#include "base/macros.h" #include "base/metrics/histogram_macros.h" #include "base/metrics/sparse_histogram.h" #include "base/pickle.h" @@ -17,6 +21,7 @@ #include "base/strings/string_util.h" #include "base/strings/stringprintf.h" #include "base/time/time.h" +#include "build/build_config.h" #include "components/autofill/core/common/password_form.h" #include "components/password_manager/core/browser/affiliation_utils.h" #include "components/password_manager/core/browser/password_manager_client.h" @@ -992,7 +997,7 @@ bool LoginDatabase::RemoveLoginsCreatedBetween(base::Time delete_begin, "DELETE FROM logins WHERE " "date_created >= ? AND date_created < ?")); s.BindInt64(0, delete_begin.ToInternalValue()); - s.BindInt64(1, delete_end.is_null() ? std::numeric_limits<int64>::max() + s.BindInt64(1, delete_end.is_null() ? std::numeric_limits<int64_t>::max() : delete_end.ToInternalValue()); return s.Run(); @@ -1160,7 +1165,7 @@ bool LoginDatabase::GetLoginsCreatedBetween( "WHERE date_created >= ? AND date_created < ?" "ORDER BY origin_url")); s.BindInt64(0, begin.ToInternalValue()); - s.BindInt64(1, end.is_null() ? std::numeric_limits<int64>::max() + s.BindInt64(1, end.is_null() ? std::numeric_limits<int64_t>::max() : end.ToInternalValue()); return StatementToForms(&s, nullptr, forms); diff --git a/components/password_manager/core/browser/login_database.h b/components/password_manager/core/browser/login_database.h index b032d53..2a465d8 100644 --- a/components/password_manager/core/browser/login_database.h +++ b/components/password_manager/core/browser/login_database.h @@ -10,9 +10,11 @@ #include "base/compiler_specific.h" #include "base/files/file_path.h" +#include "base/macros.h" #include "base/memory/scoped_vector.h" #include "base/pickle.h" #include "base/strings/string16.h" +#include "build/build_config.h" #include "components/password_manager/core/browser/password_store.h" #include "components/password_manager/core/browser/password_store_change.h" #include "components/password_manager/core/browser/psl_matching_helper.h" diff --git a/components/password_manager/core/browser/login_database_ios.cc b/components/password_manager/core/browser/login_database_ios.cc index cbd3455..68812c2 100644 --- a/components/password_manager/core/browser/login_database_ios.cc +++ b/components/password_manager/core/browser/login_database_ios.cc @@ -5,6 +5,7 @@ #include "components/password_manager/core/browser/login_database.h" #import <Security/Security.h> +#include <stddef.h> #include "base/base64.h" #include "base/logging.h" diff --git a/components/password_manager/core/browser/login_database_ios_unittest.cc b/components/password_manager/core/browser/login_database_ios_unittest.cc index 06b6442..60facfc 100644 --- a/components/password_manager/core/browser/login_database_ios_unittest.cc +++ b/components/password_manager/core/browser/login_database_ios_unittest.cc @@ -5,6 +5,7 @@ #include "components/password_manager/core/browser/login_database.h" #include <Security/Security.h> +#include <stddef.h> #include "base/files/scoped_temp_dir.h" #include "base/ios/ios_util.h" diff --git a/components/password_manager/core/browser/login_database_unittest.cc b/components/password_manager/core/browser/login_database_unittest.cc index a69f586..abd0ada 100644 --- a/components/password_manager/core/browser/login_database_unittest.cc +++ b/components/password_manager/core/browser/login_database_unittest.cc @@ -4,9 +4,9 @@ #include "components/password_manager/core/browser/login_database.h" +#include <stddef.h> #include <stdint.h> -#include "base/basictypes.h" #include "base/files/file_util.h" #include "base/files/scoped_temp_dir.h" #include "base/memory/scoped_ptr.h" @@ -17,6 +17,7 @@ #include "base/strings/utf_string_conversions.h" #include "base/test/histogram_tester.h" #include "base/time/time.h" +#include "build/build_config.h" #include "components/autofill/core/common/password_form.h" #include "components/password_manager/core/browser/psl_matching_helper.h" #include "sql/connection.h" diff --git a/components/password_manager/core/browser/mock_affiliated_match_helper.h b/components/password_manager/core/browser/mock_affiliated_match_helper.h index ca09e38..b86d8f1 100644 --- a/components/password_manager/core/browser/mock_affiliated_match_helper.h +++ b/components/password_manager/core/browser/mock_affiliated_match_helper.h @@ -5,6 +5,7 @@ #ifndef COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_MOCK_AFFILIATED_MATCH_HELPER_H_ #define COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_MOCK_AFFILIATED_MATCH_HELPER_H_ +#include "base/macros.h" #include "components/password_manager/core/browser/affiliated_match_helper.h" #include "testing/gmock/include/gmock/gmock.h" #include "testing/gtest/include/gtest/gtest.h" diff --git a/components/password_manager/core/browser/password_autofill_manager.cc b/components/password_manager/core/browser/password_autofill_manager.cc index 9e8f777..570a244 100644 --- a/components/password_manager/core/browser/password_autofill_manager.cc +++ b/components/password_manager/core/browser/password_autofill_manager.cc @@ -4,6 +4,8 @@ #include "components/password_manager/core/browser/password_autofill_manager.h" +#include <stddef.h> + #include <algorithm> #include <vector> diff --git a/components/password_manager/core/browser/password_autofill_manager.h b/components/password_manager/core/browser/password_autofill_manager.h index 9e8095e..5bdaac7 100644 --- a/components/password_manager/core/browser/password_autofill_manager.h +++ b/components/password_manager/core/browser/password_autofill_manager.h @@ -8,6 +8,7 @@ #include <map> #include "base/i18n/rtl.h" +#include "base/macros.h" #include "components/autofill/core/browser/autofill_client.h" #include "components/autofill/core/browser/autofill_popup_delegate.h" #include "components/autofill/core/common/password_form_fill_data.h" diff --git a/components/password_manager/core/browser/password_form_manager.cc b/components/password_manager/core/browser/password_form_manager.cc index e55627a..7a4f649 100644 --- a/components/password_manager/core/browser/password_form_manager.cc +++ b/components/password_manager/core/browser/password_form_manager.cc @@ -4,6 +4,8 @@ #include "components/password_manager/core/browser/password_form_manager.h" +#include <stddef.h> + #include <algorithm> #include <map> #include <set> @@ -12,6 +14,7 @@ #include "base/metrics/histogram_macros.h" #include "base/strings/string_split.h" #include "base/strings/string_util.h" +#include "build/build_config.h" #include "components/autofill/core/browser/autofill_manager.h" #include "components/autofill/core/browser/form_structure.h" #include "components/autofill/core/browser/validation.h" diff --git a/components/password_manager/core/browser/password_form_manager.h b/components/password_manager/core/browser/password_form_manager.h index 376b390..aa2a792 100644 --- a/components/password_manager/core/browser/password_form_manager.h +++ b/components/password_manager/core/browser/password_form_manager.h @@ -11,6 +11,7 @@ #include "build/build_config.h" +#include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "base/memory/scoped_vector.h" #include "base/memory/weak_ptr.h" diff --git a/components/password_manager/core/browser/password_form_manager_unittest.cc b/components/password_manager/core/browser/password_form_manager_unittest.cc index eb2a46c..06e4cdb 100644 --- a/components/password_manager/core/browser/password_form_manager_unittest.cc +++ b/components/password_manager/core/browser/password_form_manager_unittest.cc @@ -4,6 +4,7 @@ #include <map> +#include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "base/prefs/pref_registry_simple.h" #include "base/prefs/pref_service.h" @@ -11,6 +12,7 @@ #include "base/run_loop.h" #include "base/strings/utf_string_conversions.h" #include "base/test/histogram_tester.h" +#include "build/build_config.h" #include "components/autofill/core/browser/autofill_manager.h" #include "components/autofill/core/browser/test_autofill_client.h" #include "components/autofill/core/browser/test_autofill_driver.h" diff --git a/components/password_manager/core/browser/password_generation_manager.h b/components/password_manager/core/browser/password_generation_manager.h index 7b31c70..6f2fe47 100644 --- a/components/password_manager/core/browser/password_generation_manager.h +++ b/components/password_manager/core/browser/password_generation_manager.h @@ -7,7 +7,7 @@ #include <vector> -#include "base/basictypes.h" +#include "base/macros.h" namespace autofill { class FormStructure; diff --git a/components/password_manager/core/browser/password_manager.cc b/components/password_manager/core/browser/password_manager.cc index e1e15dd..bd85173 100644 --- a/components/password_manager/core/browser/password_manager.cc +++ b/components/password_manager/core/browser/password_manager.cc @@ -4,6 +4,8 @@ #include "components/password_manager/core/browser/password_manager.h" +#include <stddef.h> + #include <map> #include "base/command_line.h" @@ -13,6 +15,7 @@ #include "base/strings/string_util.h" #include "base/strings/utf_string_conversions.h" #include "base/threading/platform_thread.h" +#include "build/build_config.h" #include "components/autofill/core/browser/autofill_field.h" #include "components/autofill/core/browser/form_structure.h" #include "components/autofill/core/common/form_data_predictions.h" diff --git a/components/password_manager/core/browser/password_manager.h b/components/password_manager/core/browser/password_manager.h index 410bf33..b24a87c 100644 --- a/components/password_manager/core/browser/password_manager.h +++ b/components/password_manager/core/browser/password_manager.h @@ -9,10 +9,12 @@ #include <vector> #include "base/callback.h" +#include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "base/memory/scoped_vector.h" #include "base/observer_list.h" #include "base/stl_util.h" +#include "build/build_config.h" #include "components/autofill/core/common/password_form.h" #include "components/autofill/core/common/password_form_fill_data.h" #include "components/password_manager/core/browser/login_model.h" diff --git a/components/password_manager/core/browser/password_manager_client.cc b/components/password_manager/core/browser/password_manager_client.cc index 8781ac3..b597e9c 100644 --- a/components/password_manager/core/browser/password_manager_client.cc +++ b/components/password_manager/core/browser/password_manager_client.cc @@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#include "base/macros.h" #include "components/password_manager/core/browser/password_manager_client.h" namespace password_manager { diff --git a/components/password_manager/core/browser/password_manager_client.h b/components/password_manager/core/browser/password_manager_client.h index 9b0cda6..8816bf0 100644 --- a/components/password_manager/core/browser/password_manager_client.h +++ b/components/password_manager/core/browser/password_manager_client.h @@ -6,6 +6,7 @@ #define COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_PASSWORD_MANAGER_CLIENT_H_ #include "base/callback.h" +#include "base/macros.h" #include "base/memory/scoped_vector.h" #include "components/autofill/core/common/password_form.h" #include "components/password_manager/core/browser/credentials_filter.h" diff --git a/components/password_manager/core/browser/password_manager_internals_service.h b/components/password_manager/core/browser/password_manager_internals_service.h index 688e617..922b0cd 100644 --- a/components/password_manager/core/browser/password_manager_internals_service.h +++ b/components/password_manager/core/browser/password_manager_internals_service.h @@ -7,6 +7,7 @@ #include <string> +#include "base/macros.h" #include "components/keyed_service/core/keyed_service.h" #include "components/password_manager/core/browser/log_router.h" diff --git a/components/password_manager/core/browser/password_manager_metrics_util.cc b/components/password_manager/core/browser/password_manager_metrics_util.cc index e649faf..9474a62 100644 --- a/components/password_manager/core/browser/password_manager_metrics_util.cc +++ b/components/password_manager/core/browser/password_manager_metrics_util.cc @@ -4,7 +4,7 @@ #include "components/password_manager/core/browser/password_manager_metrics_util.h" -#include "base/basictypes.h" +#include "base/macros.h" #include "base/metrics/histogram_macros.h" #include "base/numerics/safe_conversions.h" #include "base/prefs/pref_service.h" diff --git a/components/password_manager/core/browser/password_manager_metrics_util.h b/components/password_manager/core/browser/password_manager_metrics_util.h index ce844ee..37e7f24 100644 --- a/components/password_manager/core/browser/password_manager_metrics_util.h +++ b/components/password_manager/core/browser/password_manager_metrics_util.h @@ -5,6 +5,8 @@ #ifndef COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_PASSWORD_MANAGER_METRICS_UTIL_H_ #define COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_PASSWORD_MANAGER_METRICS_UTIL_H_ +#include <stddef.h> + #include <string> class PrefService; diff --git a/components/password_manager/core/browser/password_manager_metrics_util_unittest.cc b/components/password_manager/core/browser/password_manager_metrics_util_unittest.cc index d71aa3d..da7b44a 100644 --- a/components/password_manager/core/browser/password_manager_metrics_util_unittest.cc +++ b/components/password_manager/core/browser/password_manager_metrics_util_unittest.cc @@ -4,6 +4,8 @@ #include "components/password_manager/core/browser/password_manager_metrics_util.h" +#include <stddef.h> + #include <map> #include "base/macros.h" diff --git a/components/password_manager/core/browser/password_manager_settings_migration_experiment_unittest.cc b/components/password_manager/core/browser/password_manager_settings_migration_experiment_unittest.cc index e521ea2..3c924d7 100644 --- a/components/password_manager/core/browser/password_manager_settings_migration_experiment_unittest.cc +++ b/components/password_manager/core/browser/password_manager_settings_migration_experiment_unittest.cc @@ -4,6 +4,7 @@ #include "components/password_manager/core/browser/password_manager_settings_migration_experiment.h" +#include "base/macros.h" #include "base/metrics/field_trial.h" #include "testing/gmock/include/gmock/gmock.h" #include "testing/gtest/include/gtest/gtest.h" diff --git a/components/password_manager/core/browser/password_manager_unittest.cc b/components/password_manager/core/browser/password_manager_unittest.cc index dc5f37f..fb3fdc7 100644 --- a/components/password_manager/core/browser/password_manager_unittest.cc +++ b/components/password_manager/core/browser/password_manager_unittest.cc @@ -8,6 +8,7 @@ #include <vector> #include "base/command_line.h" +#include "base/macros.h" #include "base/message_loop/message_loop.h" #include "base/strings/string_util.h" #include "base/strings/utf_string_conversions.h" diff --git a/components/password_manager/core/browser/password_manager_util.h b/components/password_manager/core/browser/password_manager_util.h index ae683bf..a148d6e 100644 --- a/components/password_manager/core/browser/password_manager_util.h +++ b/components/password_manager/core/browser/password_manager_util.h @@ -7,7 +7,6 @@ #include <vector> -#include "base/basictypes.h" #include "base/callback.h" #include "base/memory/scoped_ptr.h" #include "base/memory/scoped_vector.h" diff --git a/components/password_manager/core/browser/password_store.cc b/components/password_manager/core/browser/password_store.cc index 4fe387e..12a36d8 100644 --- a/components/password_manager/core/browser/password_store.cc +++ b/components/password_manager/core/browser/password_store.cc @@ -9,6 +9,7 @@ #include "base/bind.h" #include "base/debug/dump_without_crashing.h" #include "base/location.h" +#include "base/macros.h" #include "base/metrics/histogram_macros.h" #include "base/stl_util.h" #include "base/thread_task_runner_handle.h" diff --git a/components/password_manager/core/browser/password_store.h b/components/password_manager/core/browser/password_store.h index 5b86f1e..9c0f5b2 100644 --- a/components/password_manager/core/browser/password_store.h +++ b/components/password_manager/core/browser/password_store.h @@ -10,6 +10,7 @@ #include "base/callback.h" #include "base/gtest_prod_util.h" +#include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "base/memory/scoped_vector.h" #include "base/observer_list_threadsafe.h" diff --git a/components/password_manager/core/browser/password_store_default.h b/components/password_manager/core/browser/password_store_default.h index 01f4a1c..c153d2c 100644 --- a/components/password_manager/core/browser/password_store_default.h +++ b/components/password_manager/core/browser/password_store_default.h @@ -8,6 +8,7 @@ #include <string> #include <vector> +#include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "components/password_manager/core/browser/login_database.h" #include "components/password_manager/core/browser/password_store.h" diff --git a/components/password_manager/core/browser/password_store_default_unittest.cc b/components/password_manager/core/browser/password_store_default_unittest.cc index b369d1c..0e2be84 100644 --- a/components/password_manager/core/browser/password_store_default_unittest.cc +++ b/components/password_manager/core/browser/password_store_default_unittest.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 "base/basictypes.h" #include "base/bind.h" #include "base/bind_helpers.h" #include "base/files/file_util.h" #include "base/files/scoped_temp_dir.h" +#include "base/macros.h" #include "base/prefs/pref_service.h" #include "base/run_loop.h" #include "base/stl_util.h" diff --git a/components/password_manager/core/browser/password_store_unittest.cc b/components/password_manager/core/browser/password_store_unittest.cc index e18aae5..07ce31b 100644 --- a/components/password_manager/core/browser/password_store_unittest.cc +++ b/components/password_manager/core/browser/password_store_unittest.cc @@ -7,15 +7,18 @@ // instead). We could special-case it, but it is easier to just have empty // passwords. This will not be needed anymore if crbug.com/466638 is fixed. -#include "base/basictypes.h" +#include <stddef.h> + #include "base/bind.h" #include "base/files/scoped_temp_dir.h" +#include "base/macros.h" #include "base/stl_util.h" #include "base/strings/string_util.h" #include "base/strings/utf_string_conversions.h" #include "base/synchronization/waitable_event.h" #include "base/thread_task_runner_handle.h" #include "base/time/time.h" +#include "build/build_config.h" #include "components/password_manager/core/browser/affiliated_match_helper.h" #include "components/password_manager/core/browser/affiliation_service.h" #include "components/password_manager/core/browser/mock_affiliated_match_helper.h" diff --git a/components/password_manager/core/browser/password_syncable_service.h b/components/password_manager/core/browser/password_syncable_service.h index 7a74ff0..547df40 100644 --- a/components/password_manager/core/browser/password_syncable_service.h +++ b/components/password_manager/core/browser/password_syncable_service.h @@ -8,6 +8,7 @@ #include <string> #include <vector> +#include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "base/threading/non_thread_safe.h" #include "components/password_manager/core/browser/password_store_change.h" diff --git a/components/password_manager/core/browser/password_syncable_service_unittest.cc b/components/password_manager/core/browser/password_syncable_service_unittest.cc index 7cbf476..7ca42ad 100644 --- a/components/password_manager/core/browser/password_syncable_service_unittest.cc +++ b/components/password_manager/core/browser/password_syncable_service_unittest.cc @@ -8,8 +8,8 @@ #include <string> #include <vector> -#include "base/basictypes.h" #include "base/location.h" +#include "base/macros.h" #include "base/memory/ref_counted.h" #include "base/memory/scoped_ptr.h" #include "base/message_loop/message_loop.h" diff --git a/components/password_manager/core/browser/psl_matching_helper.h b/components/password_manager/core/browser/psl_matching_helper.h index 1a75a69..9e9a10e 100644 --- a/components/password_manager/core/browser/psl_matching_helper.h +++ b/components/password_manager/core/browser/psl_matching_helper.h @@ -7,7 +7,6 @@ #include <string> -#include "base/basictypes.h" class GURL; diff --git a/components/password_manager/core/browser/psl_matching_helper_unittest.cc b/components/password_manager/core/browser/psl_matching_helper_unittest.cc index f87829e..01f4e8a 100644 --- a/components/password_manager/core/browser/psl_matching_helper_unittest.cc +++ b/components/password_manager/core/browser/psl_matching_helper_unittest.cc @@ -4,7 +4,9 @@ #include "components/password_manager/core/browser/psl_matching_helper.h" -#include "base/basictypes.h" +#include <stddef.h> + +#include "base/macros.h" #include "components/autofill/core/common/password_form.h" #include "testing/gtest/include/gtest/gtest.h" diff --git a/components/password_manager/core/browser/statistics_table.cc b/components/password_manager/core/browser/statistics_table.cc index 5b8e7bd..dd6ba35 100644 --- a/components/password_manager/core/browser/statistics_table.cc +++ b/components/password_manager/core/browser/statistics_table.cc @@ -4,6 +4,8 @@ #include "components/password_manager/core/browser/statistics_table.h" +#include <stdint.h> + #include <algorithm> #include <limits> @@ -130,7 +132,7 @@ bool StatisticsTable::RemoveStatsBetween(base::Time delete_begin, SQL_FROM_HERE, "DELETE FROM stats WHERE update_time >= ? AND update_time < ?")); s.BindInt64(0, delete_begin.ToInternalValue()); - s.BindInt64(1, delete_end.is_null() ? std::numeric_limits<int64>::max() + s.BindInt64(1, delete_end.is_null() ? std::numeric_limits<int64_t>::max() : delete_end.ToInternalValue()); return s.Run(); } diff --git a/components/password_manager/core/browser/stub_password_manager_client.h b/components/password_manager/core/browser/stub_password_manager_client.h index 81d07b3..450b02a 100644 --- a/components/password_manager/core/browser/stub_password_manager_client.h +++ b/components/password_manager/core/browser/stub_password_manager_client.h @@ -5,6 +5,7 @@ #ifndef COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_STUB_PASSWORD_MANAGER_CLIENT_H_ #define COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_STUB_PASSWORD_MANAGER_CLIENT_H_ +#include "base/macros.h" #include "components/password_manager/core/browser/password_manager_client.h" #include "components/password_manager/core/browser/stub_log_manager.h" diff --git a/components/password_manager/core/browser/stub_password_manager_driver.h b/components/password_manager/core/browser/stub_password_manager_driver.h index d0d3761..add7686 100644 --- a/components/password_manager/core/browser/stub_password_manager_driver.h +++ b/components/password_manager/core/browser/stub_password_manager_driver.h @@ -5,6 +5,7 @@ #ifndef COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_STUB_PASSWORD_MANAGER_DRIVER_H_ #define COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_STUB_PASSWORD_MANAGER_DRIVER_H_ +#include "base/macros.h" #include "components/password_manager/core/browser/password_manager_driver.h" namespace password_manager { diff --git a/components/password_manager/core/browser/test_password_store.cc b/components/password_manager/core/browser/test_password_store.cc index b29ec94..77df359 100644 --- a/components/password_manager/core/browser/test_password_store.cc +++ b/components/password_manager/core/browser/test_password_store.cc @@ -4,6 +4,8 @@ #include "components/password_manager/core/browser/test_password_store.h" +#include <stddef.h> + #include "base/thread_task_runner_handle.h" #include "components/autofill/core/common/password_form.h" #include "components/password_manager/core/browser/statistics_table.h" diff --git a/components/password_manager/core/browser/test_password_store.h b/components/password_manager/core/browser/test_password_store.h index 246f31a..51c5d05 100644 --- a/components/password_manager/core/browser/test_password_store.h +++ b/components/password_manager/core/browser/test_password_store.h @@ -9,6 +9,7 @@ #include <string> #include <vector> +#include "base/macros.h" #include "base/memory/ref_counted.h" #include "components/password_manager/core/browser/password_store.h" diff --git a/components/password_manager/core/browser/webdata/logins_table.cc b/components/password_manager/core/browser/webdata/logins_table.cc index 528cef7..4c6386f 100644 --- a/components/password_manager/core/browser/webdata/logins_table.cc +++ b/components/password_manager/core/browser/webdata/logins_table.cc @@ -7,6 +7,7 @@ #include <limits> #include "base/logging.h" +#include "build/build_config.h" #include "components/webdata/common/web_database.h" #include "sql/statement.h" diff --git a/components/password_manager/core/browser/webdata/logins_table.h b/components/password_manager/core/browser/webdata/logins_table.h index 55c40a3..85ce52a 100644 --- a/components/password_manager/core/browser/webdata/logins_table.h +++ b/components/password_manager/core/browser/webdata/logins_table.h @@ -8,6 +8,8 @@ #include <vector> #include "base/compiler_specific.h" +#include "base/macros.h" +#include "build/build_config.h" #include "components/webdata/common/web_database_table.h" #if defined(OS_WIN) diff --git a/components/password_manager/core/browser/webdata/password_web_data_service_win.h b/components/password_manager/core/browser/webdata/password_web_data_service_win.h index 12ae478..10c69bd 100644 --- a/components/password_manager/core/browser/webdata/password_web_data_service_win.h +++ b/components/password_manager/core/browser/webdata/password_web_data_service_win.h @@ -7,6 +7,7 @@ #include <vector> +#include "base/macros.h" #include "base/memory/ref_counted.h" #include "base/sequenced_task_runner_helpers.h" #include "components/webdata/common/web_data_results.h" diff --git a/components/password_manager/core/common/credential_manager_types.h b/components/password_manager/core/common/credential_manager_types.h index 41b4a08..7f7b170 100644 --- a/components/password_manager/core/common/credential_manager_types.h +++ b/components/password_manager/core/common/credential_manager_types.h @@ -5,9 +5,10 @@ #ifndef COMPONENTS_PASSWORD_MANAGER_CORE_COMMON_CREDENTIAL_MANAGER_TYPES_H_ #define COMPONENTS_PASSWORD_MANAGER_CORE_COMMON_CREDENTIAL_MANAGER_TYPES_H_ +#include <stddef.h> + #include <string> -#include "base/basictypes.h" #include "base/compiler_specific.h" #include "base/strings/string16.h" #include "url/gurl.h" diff --git a/components/password_manager/core/common/password_manager_pref_names.cc b/components/password_manager/core/common/password_manager_pref_names.cc index ae13ccb..5af91e9 100644 --- a/components/password_manager/core/common/password_manager_pref_names.cc +++ b/components/password_manager/core/common/password_manager_pref_names.cc @@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#include "build/build_config.h" #include "components/password_manager/core/common/password_manager_pref_names.h" namespace password_manager { diff --git a/components/password_manager/core/common/password_manager_pref_names.h b/components/password_manager/core/common/password_manager_pref_names.h index 83b9fb3..86a70b4 100644 --- a/components/password_manager/core/common/password_manager_pref_names.h +++ b/components/password_manager/core/common/password_manager_pref_names.h @@ -5,7 +5,7 @@ #ifndef COMPONENTS_PASSWORD_MANAGER_CORE_COMMON_PASSWORD_MANAGER_PREF_NAMES_H_ #define COMPONENTS_PASSWORD_MANAGER_CORE_COMMON_PASSWORD_MANAGER_PREF_NAMES_H_ -#include "base/basictypes.h" +#include "build/build_config.h" namespace password_manager { namespace prefs { diff --git a/components/password_manager/core/common/password_manager_ui.h b/components/password_manager/core/common/password_manager_ui.h index 8f828cd..91d1e64 100644 --- a/components/password_manager/core/common/password_manager_ui.h +++ b/components/password_manager/core/common/password_manager_ui.h @@ -5,7 +5,6 @@ #ifndef COMPONENTS_PASSWORD_MANAGER_CORE_COMMON_PASSWORD_MANAGER_UI_H_ #define COMPONENTS_PASSWORD_MANAGER_CORE_COMMON_PASSWORD_MANAGER_UI_H_ -#include "base/basictypes.h" namespace password_manager { diff --git a/components/password_manager/sync/browser/password_manager_setting_migrator_service.cc b/components/password_manager/sync/browser/password_manager_setting_migrator_service.cc index 8c6a767..1af5ba3 100644 --- a/components/password_manager/sync/browser/password_manager_setting_migrator_service.cc +++ b/components/password_manager/sync/browser/password_manager_setting_migrator_service.cc @@ -7,6 +7,7 @@ #include "base/bind.h" #include "base/bind_helpers.h" #include "base/metrics/histogram_macros.h" +#include "build/build_config.h" #include "components/password_manager/core/browser/password_manager_settings_migration_experiment.h" #include "components/password_manager/core/common/password_manager_pref_names.h" #include "components/sync_driver/sync_service.h" diff --git a/components/password_manager/sync/browser/password_manager_setting_migrator_service_unittest.cc b/components/password_manager/sync/browser/password_manager_setting_migrator_service_unittest.cc index 580a6cdd..0823b74 100644 --- a/components/password_manager/sync/browser/password_manager_setting_migrator_service_unittest.cc +++ b/components/password_manager/sync/browser/password_manager_setting_migrator_service_unittest.cc @@ -3,10 +3,12 @@ // found in the LICENSE file. #include "base/json/json_writer.h" +#include "base/macros.h" #include "base/metrics/field_trial.h" #include "base/prefs/pref_service.h" #include "base/test/histogram_tester.h" #include "base/values.h" +#include "build/build_config.h" #include "components/password_manager/core/browser/password_manager.h" #include "components/password_manager/core/common/password_manager_pref_names.h" #include "components/password_manager/sync/browser/password_manager_setting_migrator_service.h" diff --git a/components/password_manager/sync/browser/password_model_worker.h b/components/password_manager/sync/browser/password_model_worker.h index fa2cded..5a721d5 100644 --- a/components/password_manager/sync/browser/password_model_worker.h +++ b/components/password_manager/sync/browser/password_model_worker.h @@ -5,9 +5,9 @@ #ifndef COMPONENTS_PASSWORD_MANAGER_SYNC_BROWSER_PASSWORD_MODEL_WORKER_H_ #define COMPONENTS_PASSWORD_MANAGER_SYNC_BROWSER_PASSWORD_MODEL_WORKER_H_ -#include "base/basictypes.h" #include "base/callback_forward.h" #include "base/compiler_specific.h" +#include "base/macros.h" #include "base/memory/ref_counted.h" #include "sync/internal_api/public/engine/model_safe_worker.h" diff --git a/components/password_manager/sync/browser/password_sync_util_unittest.cc b/components/password_manager/sync/browser/password_sync_util_unittest.cc index 6115ea1..d1bfc44 100644 --- a/components/password_manager/sync/browser/password_sync_util_unittest.cc +++ b/components/password_manager/sync/browser/password_sync_util_unittest.cc @@ -4,6 +4,8 @@ #include "components/password_manager/sync/browser/password_sync_util.h" +#include <stddef.h> + #include "base/macros.h" #include "components/autofill/core/common/password_form.h" #include "components/password_manager/sync/browser/sync_username_test_base.h" diff --git a/components/password_manager/sync/browser/sync_credentials_filter.cc b/components/password_manager/sync/browser/sync_credentials_filter.cc index e97eca6..e5ea09c 100644 --- a/components/password_manager/sync/browser/sync_credentials_filter.cc +++ b/components/password_manager/sync/browser/sync_credentials_filter.cc @@ -7,6 +7,7 @@ #include <algorithm> #include "base/command_line.h" +#include "base/macros.h" #include "base/metrics/field_trial.h" #include "base/metrics/histogram_macros.h" #include "base/metrics/user_metrics.h" diff --git a/components/password_manager/sync/browser/sync_credentials_filter_unittest.cc b/components/password_manager/sync/browser/sync_credentials_filter_unittest.cc index 2cdaa09..1efcba1 100644 --- a/components/password_manager/sync/browser/sync_credentials_filter_unittest.cc +++ b/components/password_manager/sync/browser/sync_credentials_filter_unittest.cc @@ -4,6 +4,8 @@ #include "components/password_manager/sync/browser/sync_credentials_filter.h" +#include <stddef.h> + #include "base/bind.h" #include "base/bind_helpers.h" #include "base/command_line.h" diff --git a/components/pdf/browser/pdf_web_contents_helper.h b/components/pdf/browser/pdf_web_contents_helper.h index 8d805f0..1213a8d 100644 --- a/components/pdf/browser/pdf_web_contents_helper.h +++ b/components/pdf/browser/pdf_web_contents_helper.h @@ -8,6 +8,7 @@ #include <string> #include "base/callback.h" +#include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "content/public/browser/web_contents_observer.h" #include "content/public/browser/web_contents_user_data.h" diff --git a/components/pdf/renderer/pepper_pdf_host.h b/components/pdf/renderer/pepper_pdf_host.h index 9056fec..7787229 100644 --- a/components/pdf/renderer/pepper_pdf_host.h +++ b/components/pdf/renderer/pepper_pdf_host.h @@ -5,10 +5,12 @@ #ifndef COMPONENTS_PDF_RENDERER_PEPPER_PDF_HOST_H_ #define COMPONENTS_PDF_RENDERER_PEPPER_PDF_HOST_H_ +#include <stdint.h> + #include <string> -#include "base/basictypes.h" #include "base/compiler_specific.h" +#include "base/macros.h" #include "base/strings/string16.h" #include "ipc/ipc_platform_file.h" #include "ppapi/c/ppb_image_data.h" diff --git a/components/pdf_viewer/pdf_viewer.cc b/components/pdf_viewer/pdf_viewer.cc index 870be0c..a542c3a 100644 --- a/components/pdf_viewer/pdf_viewer.cc +++ b/components/pdf_viewer/pdf_viewer.cc @@ -2,9 +2,13 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#include <stddef.h> +#include <stdint.h> + #include "base/bind.h" #include "base/callback.h" #include "base/containers/hash_tables.h" +#include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "components/bitmap_uploader/bitmap_uploader.h" #include "components/mus/common/types.h" diff --git a/components/plugins/renderer/loadable_plugin_placeholder.h b/components/plugins/renderer/loadable_plugin_placeholder.h index 6cd4ad8..bc5114e 100644 --- a/components/plugins/renderer/loadable_plugin_placeholder.h +++ b/components/plugins/renderer/loadable_plugin_placeholder.h @@ -5,6 +5,7 @@ #ifndef COMPONENTS_PLUGINS_RENDERER_LOADABLE_PLUGIN_PLACEHOLDER_H_ #define COMPONENTS_PLUGINS_RENDERER_LOADABLE_PLUGIN_PLACEHOLDER_H_ +#include "base/macros.h" #include "base/memory/weak_ptr.h" #include "base/timer/timer.h" #include "components/plugins/renderer/plugin_placeholder.h" diff --git a/components/plugins/renderer/mobile_youtube_plugin.cc b/components/plugins/renderer/mobile_youtube_plugin.cc index f2ec9d6..4b77abd5 100644 --- a/components/plugins/renderer/mobile_youtube_plugin.cc +++ b/components/plugins/renderer/mobile_youtube_plugin.cc @@ -4,6 +4,8 @@ #include "components/plugins/renderer/mobile_youtube_plugin.h" +#include <stddef.h> + #include "base/bind.h" #include "base/bind_helpers.h" #include "base/strings/string_piece.h" diff --git a/components/plugins/renderer/mobile_youtube_plugin.h b/components/plugins/renderer/mobile_youtube_plugin.h index 9d46700..7def319 100644 --- a/components/plugins/renderer/mobile_youtube_plugin.h +++ b/components/plugins/renderer/mobile_youtube_plugin.h @@ -5,6 +5,7 @@ #ifndef COMPONENTS_PLUGINS_RENDERER_MOBILE_YOUTUBE_PLUGIN_H_ #define COMPONENTS_PLUGINS_RENDERER_MOBILE_YOUTUBE_PLUGIN_H_ +#include "base/macros.h" #include "components/plugins/renderer/plugin_placeholder.h" namespace plugins { diff --git a/components/plugins/renderer/plugin_placeholder.h b/components/plugins/renderer/plugin_placeholder.h index 63a1d08..1be42e9 100644 --- a/components/plugins/renderer/plugin_placeholder.h +++ b/components/plugins/renderer/plugin_placeholder.h @@ -5,6 +5,7 @@ #ifndef COMPONENTS_PLUGINS_RENDERER_PLUGIN_PLACEHOLDER_H_ #define COMPONENTS_PLUGINS_RENDERER_PLUGIN_PLACEHOLDER_H_ +#include "base/macros.h" #include "base/memory/weak_ptr.h" #include "components/plugins/renderer/webview_plugin.h" #include "content/public/renderer/render_frame_observer.h" diff --git a/components/plugins/renderer/webview_plugin.cc b/components/plugins/renderer/webview_plugin.cc index c670751..2869a77 100644 --- a/components/plugins/renderer/webview_plugin.cc +++ b/components/plugins/renderer/webview_plugin.cc @@ -4,6 +4,8 @@ #include "components/plugins/renderer/webview_plugin.h" +#include <stddef.h> + #include "base/message_loop/message_loop.h" #include "base/metrics/histogram_macros.h" #include "base/numerics/safe_conversions.h" diff --git a/components/power/origin_power_map.h b/components/power/origin_power_map.h index 7592a2b..037f717 100644 --- a/components/power/origin_power_map.h +++ b/components/power/origin_power_map.h @@ -8,6 +8,7 @@ #include <map> #include "base/callback_list.h" +#include "base/macros.h" #include "components/keyed_service/core/keyed_service.h" #include "url/gurl.h" diff --git a/components/power/origin_power_map_factory.h b/components/power/origin_power_map_factory.h index 652a103..a21ee6b4 100644 --- a/components/power/origin_power_map_factory.h +++ b/components/power/origin_power_map_factory.h @@ -5,6 +5,7 @@ #ifndef COMPONENTS_POWER_ORIGIN_POWER_MAP_FACTORY_H_ #define COMPONENTS_POWER_ORIGIN_POWER_MAP_FACTORY_H_ +#include "base/macros.h" #include "base/memory/singleton.h" #include "components/keyed_service/content/browser_context_keyed_service_factory.h" diff --git a/components/power/origin_power_map_unittest.cc b/components/power/origin_power_map_unittest.cc index 0cf2981..fad9490 100644 --- a/components/power/origin_power_map_unittest.cc +++ b/components/power/origin_power_map_unittest.cc @@ -4,6 +4,8 @@ #include "components/power/origin_power_map.h" +#include <stddef.h> + #include "testing/gtest/include/gtest/gtest.h" namespace power { diff --git a/components/precache/content/precache_manager.cc b/components/precache/content/precache_manager.cc index cf340f4..d38db70 100644 --- a/components/precache/content/precache_manager.cc +++ b/components/precache/content/precache_manager.cc @@ -176,7 +176,7 @@ void PrecacheManager::RecordStatsForFetch(const GURL& url, const GURL& referrer, const base::TimeDelta& latency, const base::Time& fetch_time, - int64 size, + int64_t size, bool was_cached) { DCHECK_CURRENTLY_ON(BrowserThread::UI); @@ -198,7 +198,7 @@ void PrecacheManager::RecordStatsForFetchInternal( const GURL& url, const base::TimeDelta& latency, const base::Time& fetch_time, - int64 size, + int64_t size, bool was_cached, int host_rank) { if (is_precaching_) { diff --git a/components/precache/content/precache_manager.h b/components/precache/content/precache_manager.h index eaba966..2735f98 100644 --- a/components/precache/content/precache_manager.h +++ b/components/precache/content/precache_manager.h @@ -5,6 +5,9 @@ #ifndef COMPONENTS_PRECACHE_CONTENT_PRECACHE_MANAGER_H_ #define COMPONENTS_PRECACHE_CONTENT_PRECACHE_MANAGER_H_ +#include <stddef.h> +#include <stdint.h> + #include <list> #include <string> #include <utility> @@ -12,6 +15,7 @@ #include "base/callback.h" #include "base/compiler_specific.h" +#include "base/macros.h" #include "base/memory/ref_counted.h" #include "base/memory/scoped_ptr.h" #include "base/memory/weak_ptr.h" @@ -94,7 +98,7 @@ class PrecacheManager : public KeyedService, const GURL& referrer, const base::TimeDelta& latency, const base::Time& fetch_time, - int64 size, + int64_t size, bool was_cached); // Posts a task to the DB thread to delete all history entries from the @@ -129,7 +133,7 @@ class PrecacheManager : public KeyedService, void RecordStatsForFetchInternal(const GURL& url, const base::TimeDelta& latency, const base::Time& fetch_time, - int64 size, + int64_t size, bool was_cached, int host_rank); diff --git a/components/precache/content/precache_manager_unittest.cc b/components/precache/content/precache_manager_unittest.cc index 90724d9..1de6105 100644 --- a/components/precache/content/precache_manager_unittest.cc +++ b/components/precache/content/precache_manager_unittest.cc @@ -4,11 +4,12 @@ #include "components/precache/content/precache_manager.h" +#include <stddef.h> + #include <map> #include <set> #include <string> -#include "base/basictypes.h" #include "base/bind.h" #include "base/callback.h" #include "base/command_line.h" diff --git a/components/precache/core/precache_database.cc b/components/precache/core/precache_database.cc index 2b99111..42b110e 100644 --- a/components/precache/core/precache_database.cc +++ b/components/precache/core/precache_database.cc @@ -91,7 +91,7 @@ void PrecacheDatabase::ClearHistory() { void PrecacheDatabase::RecordURLPrefetch(const GURL& url, const base::TimeDelta& latency, const base::Time& fetch_time, - int64 size, + int64_t size, bool was_cached) { UMA_HISTOGRAM_TIMES("Precache.Latency.Prefetch", latency); @@ -134,7 +134,7 @@ void PrecacheDatabase::RecordURLPrefetch(const GURL& url, void PrecacheDatabase::RecordURLNonPrefetch(const GURL& url, const base::TimeDelta& latency, const base::Time& fetch_time, - int64 size, + int64_t size, bool was_cached, int host_rank, bool is_connection_cellular) { diff --git a/components/precache/core/precache_database.h b/components/precache/core/precache_database.h index 6aa341c..7c74f47 100644 --- a/components/precache/core/precache_database.h +++ b/components/precache/core/precache_database.h @@ -5,12 +5,14 @@ #ifndef COMPONENTS_PRECACHE_CORE_PRECACHE_DATABASE_H_ #define COMPONENTS_PRECACHE_CORE_PRECACHE_DATABASE_H_ +#include <stdint.h> + #include <string> #include <vector> -#include "base/basictypes.h" #include "base/callback.h" #include "base/containers/hash_tables.h" +#include "base/macros.h" #include "base/memory/ref_counted.h" #include "base/memory/scoped_ptr.h" #include "base/threading/thread_checker.h" @@ -53,7 +55,7 @@ class PrecacheDatabase : public base::RefCountedThreadSafe<PrecacheDatabase> { void RecordURLPrefetch(const GURL& url, const base::TimeDelta& latency, const base::Time& fetch_time, - int64 size, + int64_t size, bool was_cached); // Report precache-related metrics in response to a URL being fetched, where @@ -62,7 +64,7 @@ class PrecacheDatabase : public base::RefCountedThreadSafe<PrecacheDatabase> { void RecordURLNonPrefetch(const GURL& url, const base::TimeDelta& latency, const base::Time& fetch_time, - int64 size, + int64_t size, bool was_cached, int host_rank, bool is_connection_cellular); diff --git a/components/precache/core/precache_database_unittest.cc b/components/precache/core/precache_database_unittest.cc index 19d26d3b..65a4dae 100644 --- a/components/precache/core/precache_database_unittest.cc +++ b/components/precache/core/precache_database_unittest.cc @@ -4,6 +4,8 @@ #include "components/precache/core/precache_database.h" +#include <stdint.h> + #include <map> #include "base/containers/hash_tables.h" @@ -28,7 +30,7 @@ const GURL kURL("http://url.com"); const base::TimeDelta kLatency = base::TimeDelta::FromMilliseconds(5); const base::Time kFetchTime = base::Time() + base::TimeDelta::FromHours(1000); const base::Time kOldFetchTime = kFetchTime - base::TimeDelta::FromDays(1); -const int64 kSize = 5000; +const int64_t kSize = 5000; std::map<GURL, base::Time> BuildURLTableMap(const GURL& url, const base::Time& precache_time) { @@ -74,26 +76,29 @@ class PrecacheDatabaseTest : public testing::Test { void RecordPrecacheFromNetwork(const GURL& url, base::TimeDelta latency, const base::Time& fetch_time, - int64 size); - void RecordPrecacheFromCache(const GURL& url, const base::Time& fetch_time, - int64 size); + int64_t size); + void RecordPrecacheFromCache(const GURL& url, + const base::Time& fetch_time, + int64_t size); void RecordFetchFromNetwork(const GURL& url, base::TimeDelta latency, const base::Time& fetch_time, - int64 size); + int64_t size); void RecordFetchFromNetwork(const GURL& url, base::TimeDelta latency, const base::Time& fetch_time, - int64 size, + int64_t size, int host_rank); void RecordFetchFromNetworkCellular(const GURL& url, base::TimeDelta latency, const base::Time& fetch_time, - int64 size); - void RecordFetchFromCache(const GURL& url, const base::Time& fetch_time, - int64 size); + int64_t size); + void RecordFetchFromCache(const GURL& url, + const base::Time& fetch_time, + int64_t size); void RecordFetchFromCacheCellular(const GURL& url, - const base::Time& fetch_time, int64 size); + const base::Time& fetch_time, + int64_t size); // Must be declared first so that it is destroyed last. base::ScopedTempDir scoped_temp_dir_; @@ -122,14 +127,14 @@ void PrecacheDatabaseTest::RecordPrecacheFromNetwork( const GURL& url, base::TimeDelta latency, const base::Time& fetch_time, - int64 size) { + int64_t size) { precache_database_->RecordURLPrefetch(url, latency, fetch_time, size, false /* was_cached */); } void PrecacheDatabaseTest::RecordPrecacheFromCache(const GURL& url, const base::Time& fetch_time, - int64 size) { + int64_t size) { precache_database_->RecordURLPrefetch(url, base::TimeDelta() /* latency */, fetch_time, size, true /* was_cached */); @@ -138,7 +143,7 @@ void PrecacheDatabaseTest::RecordPrecacheFromCache(const GURL& url, void PrecacheDatabaseTest::RecordFetchFromNetwork(const GURL& url, base::TimeDelta latency, const base::Time& fetch_time, - int64 size) { + int64_t size) { precache_database_->RecordURLNonPrefetch( url, latency, fetch_time, size, false /* was_cached */, history::kMaxTopHosts, false /* is_connection_cellular */); @@ -147,7 +152,7 @@ void PrecacheDatabaseTest::RecordFetchFromNetwork(const GURL& url, void PrecacheDatabaseTest::RecordFetchFromNetwork(const GURL& url, base::TimeDelta latency, const base::Time& fetch_time, - int64 size, + int64_t size, int host_rank) { precache_database_->RecordURLNonPrefetch(url, latency, fetch_time, size, false /* was_cached */, host_rank, @@ -158,7 +163,7 @@ void PrecacheDatabaseTest::RecordFetchFromNetworkCellular( const GURL& url, base::TimeDelta latency, const base::Time& fetch_time, - int64 size) { + int64_t size) { precache_database_->RecordURLNonPrefetch( url, latency, fetch_time, size, false /* was_cached */, history::kMaxTopHosts, true /* is_connection_cellular */); @@ -166,7 +171,7 @@ void PrecacheDatabaseTest::RecordFetchFromNetworkCellular( void PrecacheDatabaseTest::RecordFetchFromCache(const GURL& url, const base::Time& fetch_time, - int64 size) { + int64_t size) { precache_database_->RecordURLNonPrefetch( url, base::TimeDelta() /* latency */, fetch_time, size, true /* was_cached */, history::kMaxTopHosts, @@ -174,7 +179,9 @@ void PrecacheDatabaseTest::RecordFetchFromCache(const GURL& url, } void PrecacheDatabaseTest::RecordFetchFromCacheCellular( - const GURL& url, const base::Time& fetch_time, int64 size) { + const GURL& url, + const base::Time& fetch_time, + int64_t size) { precache_database_->RecordURLNonPrefetch( url, base::TimeDelta() /* latency */, fetch_time, size, true /* was_cached */, history::kMaxTopHosts, @@ -318,15 +325,15 @@ TEST_F(PrecacheDatabaseTest, DeleteExpiredPrecacheHistory) { TEST_F(PrecacheDatabaseTest, SampleInteraction) { const GURL kURL1("http://url1.com"); - const int64 kSize1 = 1; + const int64_t kSize1 = 1; const GURL kURL2("http://url2.com"); - const int64 kSize2 = 2; + const int64_t kSize2 = 2; const GURL kURL3("http://url3.com"); - const int64 kSize3 = 3; + const int64_t kSize3 = 3; const GURL kURL4("http://url4.com"); - const int64 kSize4 = 4; + const int64_t kSize4 = 4; const GURL kURL5("http://url5.com"); - const int64 kSize5 = 5; + const int64_t kSize5 = 5; RecordPrecacheFromNetwork(kURL1, kLatency, kFetchTime, kSize1); RecordPrecacheFromNetwork(kURL2, kLatency, kFetchTime, kSize2); diff --git a/components/precache/core/precache_fetcher.cc b/components/precache/core/precache_fetcher.cc index 65d598a..74c1dd4 100644 --- a/components/precache/core/precache_fetcher.cc +++ b/components/precache/core/precache_fetcher.cc @@ -338,7 +338,7 @@ void PrecacheFetcher::OnConfigFetchComplete(const URLFetcher& source) { // Attempt to fetch manifests for starting hosts up to the maximum top sites // count. If a manifest does not exist for a particular starting host, then // the fetch will fail, and that starting host will be ignored. - int64 rank = 0; + int64_t rank = 0; for (const std::string& host : starting_hosts_) { ++rank; if (rank > config.top_sites_count()) diff --git a/components/precache/core/precache_fetcher.h b/components/precache/core/precache_fetcher.h index c4f1673..6eca926 100644 --- a/components/precache/core/precache_fetcher.h +++ b/components/precache/core/precache_fetcher.h @@ -5,11 +5,12 @@ #ifndef COMPONENTS_PRECACHE_CORE_PRECACHE_FETCHER_H_ #define COMPONENTS_PRECACHE_CORE_PRECACHE_FETCHER_H_ +#include <stdint.h> + #include <list> #include <string> #include <vector> -#include "base/basictypes.h" #include "base/callback.h" #include "base/macros.h" #include "base/memory/ref_counted.h" @@ -171,8 +172,8 @@ class PrecacheFetcher::Fetcher : public net::URLFetcherDelegate { bool is_resource_request); ~Fetcher() override; void OnURLFetchComplete(const net::URLFetcher* source) override; - int64 response_bytes() const { return response_bytes_; } - int64 network_response_bytes() const { return network_response_bytes_; } + int64_t response_bytes() const { return response_bytes_; } + int64_t network_response_bytes() const { return network_response_bytes_; } private: enum class FetchStage { CACHE, NETWORK }; @@ -189,8 +190,8 @@ class PrecacheFetcher::Fetcher : public net::URLFetcherDelegate { // The url_fetcher_cache_ is kept alive until Fetcher destruction for testing. scoped_ptr<net::URLFetcher> url_fetcher_cache_; scoped_ptr<net::URLFetcher> url_fetcher_network_; - int64 response_bytes_; - int64 network_response_bytes_; + int64_t response_bytes_; + int64_t network_response_bytes_; DISALLOW_COPY_AND_ASSIGN(Fetcher); }; diff --git a/components/precache/core/precache_fetcher_unittest.cc b/components/precache/core/precache_fetcher_unittest.cc index ceffb4d..6bf89ba 100644 --- a/components/precache/core/precache_fetcher_unittest.cc +++ b/components/precache/core/precache_fetcher_unittest.cc @@ -8,7 +8,6 @@ #include <string> #include <vector> -#include "base/basictypes.h" #include "base/bind.h" #include "base/callback.h" #include "base/command_line.h" diff --git a/components/precache/core/precache_url_table.h b/components/precache/core/precache_url_table.h index edfc631..1e7d165 100644 --- a/components/precache/core/precache_url_table.h +++ b/components/precache/core/precache_url_table.h @@ -7,7 +7,7 @@ #include <map> -#include "base/basictypes.h" +#include "base/macros.h" #include "base/time/time.h" #include "url/gurl.h" diff --git a/components/precache/core/precache_url_table_unittest.cc b/components/precache/core/precache_url_table_unittest.cc index 51965b2..e7a04c6 100644 --- a/components/precache/core/precache_url_table_unittest.cc +++ b/components/precache/core/precache_url_table_unittest.cc @@ -6,7 +6,6 @@ #include <map> -#include "base/basictypes.h" #include "base/compiler_specific.h" #include "base/time/time.h" #include "sql/connection.h" diff --git a/components/pref_registry/pref_registry_syncable.cc b/components/pref_registry/pref_registry_syncable.cc index bb90417..ce15ea0 100644 --- a/components/pref_registry/pref_registry_syncable.cc +++ b/components/pref_registry/pref_registry_syncable.cc @@ -24,7 +24,7 @@ void PrefRegistrySyncable::SetSyncableRegistrationCallback( void PrefRegistrySyncable::OnPrefRegistered(const std::string& path, base::Value* default_value, - uint32 flags) { + uint32_t flags) { // Tests that |flags| does not contain both SYNCABLE_PREF and // SYNCABLE_PRIORITY_PREF flags at the same time. DCHECK(!(flags & PrefRegistrySyncable::SYNCABLE_PREF) || diff --git a/components/pref_registry/pref_registry_syncable.h b/components/pref_registry/pref_registry_syncable.h index 3a0b1d6..88c3b01 100644 --- a/components/pref_registry/pref_registry_syncable.h +++ b/components/pref_registry/pref_registry_syncable.h @@ -5,9 +5,12 @@ #ifndef COMPONENTS_PREF_REGISTRY_PREF_REGISTRY_SYNCABLE_H_ #define COMPONENTS_PREF_REGISTRY_PREF_REGISTRY_SYNCABLE_H_ +#include <stdint.h> + #include <string> #include "base/callback.h" +#include "base/macros.h" #include "base/prefs/pref_registry_simple.h" namespace base { @@ -42,7 +45,7 @@ class PrefRegistrySyncable : public PrefRegistrySimple { // should ever be specified. // // Note: These must NOT overlap with PrefRegistry::PrefRegistrationFlags. - enum PrefRegistrationFlags : uint32 { + enum PrefRegistrationFlags : uint32_t { // The pref will be synced. SYNCABLE_PREF = 1 << 0, @@ -53,7 +56,7 @@ class PrefRegistrySyncable : public PrefRegistrySimple { SYNCABLE_PRIORITY_PREF = 1 << 1, }; - typedef base::Callback<void(const std::string& path, uint32 flags)> + typedef base::Callback<void(const std::string& path, uint32_t flags)> SyncableRegistrationCallback; PrefRegistrySyncable(); @@ -77,7 +80,7 @@ class PrefRegistrySyncable : public PrefRegistrySimple { // PrefRegistrySimple overrides. void OnPrefRegistered(const std::string& path, base::Value* default_value, - uint32 flags) override; + uint32_t flags) override; SyncableRegistrationCallback callback_; diff --git a/components/pref_registry/testing_pref_service_syncable.h b/components/pref_registry/testing_pref_service_syncable.h index 22c8a57..e20f9cb 100644 --- a/components/pref_registry/testing_pref_service_syncable.h +++ b/components/pref_registry/testing_pref_service_syncable.h @@ -5,7 +5,7 @@ #ifndef COMPONENTS_PERF_REGISTRY_TESTING_PREF_SERVICE_SYNCABLE_H_ #define COMPONENTS_PERF_REGISTRY_TESTING_PREF_SERVICE_SYNCABLE_H_ -#include "base/basictypes.h" +#include "base/macros.h" #include "base/prefs/testing_pref_service.h" namespace user_prefs { diff --git a/components/printing/browser/print_manager.cc b/components/printing/browser/print_manager.cc index 7e80bef..0773ab4 100644 --- a/components/printing/browser/print_manager.cc +++ b/components/printing/browser/print_manager.cc @@ -4,6 +4,7 @@ #include "components/printing/browser/print_manager.h" +#include "build/build_config.h" #include "components/printing/common/print_messages.h" namespace printing { diff --git a/components/printing/browser/print_manager.h b/components/printing/browser/print_manager.h index ea24f51..40578c9 100644 --- a/components/printing/browser/print_manager.h +++ b/components/printing/browser/print_manager.h @@ -5,6 +5,8 @@ #ifndef COMPONENTS_PRINTING_BROWSER_PRINT_MANAGER_H_ #define COMPONENTS_PRINTING_BROWSER_PRINT_MANAGER_H_ +#include "base/macros.h" +#include "build/build_config.h" #include "content/public/browser/web_contents_observer.h" #if defined(OS_ANDROID) diff --git a/components/printing/common/print_messages.cc b/components/printing/common/print_messages.cc index 8853502..9fc71ac 100644 --- a/components/printing/common/print_messages.cc +++ b/components/printing/common/print_messages.cc @@ -2,7 +2,6 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "base/basictypes.h" #include "base/strings/string16.h" #include "ui/gfx/geometry/size.h" diff --git a/components/printing/common/print_messages.h b/components/printing/common/print_messages.h index 1458d3b..82e904e 100644 --- a/components/printing/common/print_messages.h +++ b/components/printing/common/print_messages.h @@ -5,11 +5,14 @@ // IPC messages for printing. // Multiply-included message file, hence no include guard. +#include <stdint.h> + #include <string> #include <vector> #include "base/memory/shared_memory.h" #include "base/values.h" +#include "build/build_config.h" #include "components/printing/common/printing_param_traits_macros.h" #include "ipc/ipc_message_macros.h" #include "printing/page_range.h" @@ -45,7 +48,7 @@ struct PrintMsg_Print_Params { int document_cookie; bool selection_only; bool supports_alpha_blend; - int32 preview_ui_id; + int32_t preview_ui_id; int preview_request_id; bool is_first_request; blink::WebPrintScalingOption print_scaling_option; @@ -432,7 +435,7 @@ IPC_MESSAGE_ROUTED1(PrintHostMsg_DidPreviewPage, // Asks the browser whether the print preview has been cancelled. IPC_SYNC_MESSAGE_ROUTED2_1(PrintHostMsg_CheckForCancel, - int32 /* PrintPreviewUI ID */, + int32_t /* PrintPreviewUI ID */, int /* request id */, bool /* print preview cancelled */) diff --git a/components/printing/renderer/print_web_view_helper.cc b/components/printing/renderer/print_web_view_helper.cc index 6164ca1..334c8a5 100644 --- a/components/printing/renderer/print_web_view_helper.cc +++ b/components/printing/renderer/print_web_view_helper.cc @@ -4,12 +4,16 @@ #include "components/printing/renderer/print_web_view_helper.h" +#include <stddef.h> +#include <stdint.h> + #include <string> #include "base/auto_reset.h" #include "base/json/json_writer.h" #include "base/location.h" #include "base/logging.h" +#include "base/macros.h" #include "base/metrics/histogram_macros.h" #include "base/process/process_handle.h" #include "base/single_thread_task_runner.h" @@ -17,6 +21,7 @@ #include "base/strings/stringprintf.h" #include "base/strings/utf_string_conversions.h" #include "base/thread_task_runner_handle.h" +#include "build/build_config.h" #include "components/printing/common/print_messages.h" #include "content/public/common/web_preferences.h" #include "content/public/renderer/render_frame.h" diff --git a/components/printing/renderer/print_web_view_helper.h b/components/printing/renderer/print_web_view_helper.h index 98a7567..0de51e5 100644 --- a/components/printing/renderer/print_web_view_helper.h +++ b/components/printing/renderer/print_web_view_helper.h @@ -9,10 +9,12 @@ #include "base/callback.h" #include "base/gtest_prod_util.h" +#include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "base/memory/shared_memory.h" #include "base/memory/weak_ptr.h" #include "base/time/time.h" +#include "build/build_config.h" #include "content/public/renderer/render_view_observer.h" #include "content/public/renderer/render_view_observer_tracker.h" #include "printing/pdf_metafile_skia.h" diff --git a/components/printing/renderer/print_web_view_helper_linux.cc b/components/printing/renderer/print_web_view_helper_linux.cc index fe84cbd..acc72ed 100644 --- a/components/printing/renderer/print_web_view_helper_linux.cc +++ b/components/printing/renderer/print_web_view_helper_linux.cc @@ -4,8 +4,11 @@ #include "components/printing/renderer/print_web_view_helper.h" +#include <stddef.h> + #include "base/logging.h" #include "base/memory/scoped_ptr.h" +#include "build/build_config.h" #include "components/printing/common/print_messages.h" #include "content/public/renderer/render_thread.h" #include "printing/metafile_skia_wrapper.h" diff --git a/components/printing/renderer/print_web_view_helper_pdf_win.cc b/components/printing/renderer/print_web_view_helper_pdf_win.cc index 1d07291..11401bf 100644 --- a/components/printing/renderer/print_web_view_helper_pdf_win.cc +++ b/components/printing/renderer/print_web_view_helper_pdf_win.cc @@ -4,6 +4,9 @@ #include "components/printing/renderer/print_web_view_helper.h" +#include <stddef.h> +#include <stdint.h> + #include "base/logging.h" #include "base/memory/scoped_ptr.h" #include "base/process/process_handle.h" diff --git a/components/printing/test/mock_printer.cc b/components/printing/test/mock_printer.cc index a832e9c..1ab67bc 100644 --- a/components/printing/test/mock_printer.cc +++ b/components/printing/test/mock_printer.cc @@ -4,11 +4,11 @@ #include "components/printing/test/mock_printer.h" -#include "base/basictypes.h" #include "base/files/file_util.h" #include "base/memory/shared_memory.h" #include "base/strings/string16.h" #include "base/strings/utf_string_conversions.h" +#include "build/build_config.h" #include "components/printing/common/print_messages.h" #include "ipc/ipc_message_utils.h" #include "printing/pdf_metafile_skia.h" @@ -43,11 +43,11 @@ void UpdateMargins(int margins_type, int dpi, PrintMsg_Print_Params* params) { } // namespace MockPrinterPage::MockPrinterPage(const void* source_data, - uint32 source_size, + uint32_t source_size, const printing::Image& image) : source_size_(source_size), image_(image) { // Create copies of the source data - source_data_.reset(new uint8[source_size]); + source_data_.reset(new uint8_t[source_size]); if (source_data_.get()) memcpy(source_data_.get(), source_data, source_size); } @@ -269,8 +269,8 @@ bool MockPrinter::SaveSource(unsigned int page, const base::FilePath& filepath) const { if (printer_status_ != PRINTER_READY || page >= pages_.size()) return false; - const uint8* source_data = pages_[page]->source_data(); - uint32 source_size = pages_[page]->source_size(); + const uint8_t* source_data = pages_[page]->source_data(); + uint32_t source_size = pages_[page]->source_size(); base::WriteFile(filepath, reinterpret_cast<const char*>(source_data), source_size); return true; diff --git a/components/printing/test/mock_printer.h b/components/printing/test/mock_printer.h index 9e828a7..c989d58 100644 --- a/components/printing/test/mock_printer.h +++ b/components/printing/test/mock_printer.h @@ -5,10 +5,12 @@ #ifndef COMPONENTS_PRINTING_TEST_MOCK_PRINTER_H_ #define COMPONENTS_PRINTING_TEST_MOCK_PRINTER_H_ +#include <stdint.h> + #include <string> #include <vector> -#include "base/basictypes.h" +#include "base/macros.h" #include "base/memory/ref_counted.h" #include "base/memory/scoped_ptr.h" #include "base/strings/string16.h" @@ -28,21 +30,21 @@ struct PrintHostMsg_DidPrintPage_Params; class MockPrinterPage : public base::RefCounted<MockPrinterPage> { public: MockPrinterPage(const void* source_data, - uint32 source_size, + uint32_t source_size, const printing::Image& image); int width() const { return image_.size().width(); } int height() const { return image_.size().height(); } - const uint8* source_data() const { return source_data_.get(); } - uint32 source_size() const { return source_size_; } + const uint8_t* source_data() const { return source_data_.get(); } + uint32_t source_size() const { return source_size_; } const printing::Image& image() const { return image_; } private: friend class base::RefCounted<MockPrinterPage>; virtual ~MockPrinterPage(); - uint32 source_size_; - scoped_ptr<uint8[]> source_data_; + uint32_t source_size_; + scoped_ptr<uint8_t[]> source_data_; printing::Image image_; DISALLOW_COPY_AND_ASSIGN(MockPrinterPage); @@ -98,8 +100,8 @@ class MockPrinter { int GetWidth(unsigned int page) const; int GetHeight(unsigned int page) const; bool GetBitmapChecksum(unsigned int page, std::string* checksum) const; - bool GetSource(unsigned int page, const void** data, uint32* size) const; - bool GetBitmap(unsigned int page, const void** data, uint32* size) const; + bool GetSource(unsigned int page, const void** data, uint32_t* size) const; + bool GetBitmap(unsigned int page, const void** data, uint32_t* size) const; bool SaveSource(unsigned int page, const base::FilePath& filepath) const; bool SaveBitmap(unsigned int page, const base::FilePath& filepath) const; diff --git a/components/printing/test/print_mock_render_thread.cc b/components/printing/test/print_mock_render_thread.cc index 74d9148..749a864 100644 --- a/components/printing/test/print_mock_render_thread.cc +++ b/components/printing/test/print_mock_render_thread.cc @@ -4,9 +4,12 @@ #include "components/printing/test/print_mock_render_thread.h" +#include <stddef.h> + #include <vector> #include "base/values.h" +#include "build/build_config.h" #include "components/printing/test/mock_printer.h" #include "ipc/ipc_sync_message.h" #include "printing/page_range.h" @@ -105,7 +108,7 @@ void PrintMockRenderThread::OnDidPreviewPage( print_preview_pages_remaining_--; } -void PrintMockRenderThread::OnCheckForCancel(int32 preview_ui_id, +void PrintMockRenderThread::OnCheckForCancel(int32_t preview_ui_id, int preview_request_id, bool* cancel) { *cancel = diff --git a/components/printing/test/print_mock_render_thread.h b/components/printing/test/print_mock_render_thread.h index a5efe2e..2eb6632 100644 --- a/components/printing/test/print_mock_render_thread.h +++ b/components/printing/test/print_mock_render_thread.h @@ -5,10 +5,14 @@ #ifndef COMPONENTS_PRINTING_TEST_PRINT_MOCK_RENDER_THREAD_H_ #define COMPONENTS_PRINTING_TEST_PRINT_MOCK_RENDER_THREAD_H_ +#include <stdint.h> + #include <string> #include "base/compiler_specific.h" +#include "base/macros.h" #include "base/single_thread_task_runner.h" +#include "build/build_config.h" #include "content/public/test/mock_render_thread.h" namespace base { @@ -78,7 +82,7 @@ class PrintMockRenderThread : public content::MockRenderThread { void OnDidGetPreviewPageCount( const PrintHostMsg_DidGetPreviewPageCount_Params& params); void OnDidPreviewPage(const PrintHostMsg_DidPreviewPage_Params& params); - void OnCheckForCancel(int32 preview_ui_id, + void OnCheckForCancel(int32_t preview_ui_id, int preview_request_id, bool* cancel); diff --git a/components/printing/test/print_web_view_helper_browsertest.cc b/components/printing/test/print_web_view_helper_browsertest.cc index c1eb584..ef09d5a 100644 --- a/components/printing/test/print_web_view_helper_browsertest.cc +++ b/components/printing/test/print_web_view_helper_browsertest.cc @@ -2,8 +2,12 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#include <stddef.h> + #include "base/command_line.h" +#include "base/macros.h" #include "base/run_loop.h" +#include "build/build_config.h" #include "components/printing/common/print_messages.h" #include "components/printing/renderer/print_web_view_helper.h" #include "components/printing/test/mock_printer.h" diff --git a/components/proximity_auth/ble/bluetooth_low_energy_connection.cc b/components/proximity_auth/ble/bluetooth_low_energy_connection.cc index 063d6de..a5ab4bb 100644 --- a/components/proximity_auth/ble/bluetooth_low_energy_connection.cc +++ b/components/proximity_auth/ble/bluetooth_low_energy_connection.cc @@ -170,15 +170,15 @@ void BluetoothLowEnergyConnection::SendMessageImpl( // [First write]: Build a header with the [send signal] + [size of the // message]. WriteRequest write_request = BuildWriteRequest( - ToByteVector(static_cast<uint32>(ControlSignal::kSendSignal)), - ToByteVector(static_cast<uint32>(serialized_msg.size())), false); + ToByteVector(static_cast<uint32_t>(ControlSignal::kSendSignal)), + ToByteVector(static_cast<uint32_t>(serialized_msg.size())), false); // [First write]: Fill the it with a prefix of |serialized_msg| up to // |max_chunk_size_|. size_t first_chunk_size = std::min( max_chunk_size_ - write_request.value.size(), serialized_msg.size()); - std::vector<uint8> bytes(serialized_msg.begin(), - serialized_msg.begin() + first_chunk_size); + std::vector<uint8_t> bytes(serialized_msg.begin(), + serialized_msg.begin() + first_chunk_size); write_request.value.insert(write_request.value.end(), bytes.begin(), bytes.end()); @@ -191,8 +191,8 @@ void BluetoothLowEnergyConnection::SendMessageImpl( // [Other write requests]: Each chunk has to include a deprecated signal: // |kFirstByteZero| as the first byte. int chunk_size = max_chunk_size_ - 1; - std::vector<uint8> kFirstByteZeroVector; - kFirstByteZeroVector.push_back(static_cast<uint8>(kFirstByteZero)); + std::vector<uint8_t> kFirstByteZeroVector; + kFirstByteZeroVector.push_back(static_cast<uint8_t>(kFirstByteZero)); int message_size = static_cast<int>(serialized_msg.size()); int start_index = first_chunk_size; @@ -203,8 +203,8 @@ void BluetoothLowEnergyConnection::SendMessageImpl( bool is_last_write_request = (end_index == message_size); write_request = BuildWriteRequest( kFirstByteZeroVector, - std::vector<uint8>(serialized_msg.begin() + start_index, - serialized_msg.begin() + end_index), + std::vector<uint8_t>(serialized_msg.begin() + start_index, + serialized_msg.begin() + end_index), is_last_write_request); WriteRemoteCharacteristic(write_request); start_index = end_index; @@ -246,7 +246,7 @@ void BluetoothLowEnergyConnection::DeviceRemoved(BluetoothAdapter* adapter, void BluetoothLowEnergyConnection::GattCharacteristicValueChanged( BluetoothAdapter* adapter, BluetoothGattCharacteristic* characteristic, - const std::vector<uint8>& value) { + const std::vector<uint8_t>& value) { DCHECK_EQ(adapter, adapter_.get()); if (sub_status() != SubStatus::WAITING_RESPONSE_SIGNAL && sub_status() != SubStatus::CONNECTED) @@ -286,7 +286,7 @@ void BluetoothLowEnergyConnection::GattCharacteristicValueChanged( << "Incoming data corrupted, expected message size not found."; return; } - std::vector<uint8> size(value.begin() + 4, value.begin() + 8); + std::vector<uint8_t> size(value.begin() + 4, value.begin() + 8); expected_number_of_incoming_bytes_ = static_cast<size_t>(ToUint32(size)); receiving_bytes_ = true; @@ -310,12 +310,11 @@ void BluetoothLowEnergyConnection::GattCharacteristicValueChanged( } BluetoothLowEnergyConnection::WriteRequest::WriteRequest( - const std::vector<uint8>& val, + const std::vector<uint8_t>& val, bool flag) : value(val), is_last_write_for_wire_message(flag), - number_of_failed_attempts(0) { -} + number_of_failed_attempts(0) {} BluetoothLowEnergyConnection::WriteRequest::~WriteRequest() {} @@ -456,8 +455,8 @@ void BluetoothLowEnergyConnection::SendInviteToConnectSignal() { WriteRequest write_request = BuildWriteRequest( ToByteVector( - static_cast<uint32>(ControlSignal::kInviteToConnectSignal)), - std::vector<uint8>(), false); + static_cast<uint32_t>(ControlSignal::kInviteToConnectSignal)), + std::vector<uint8_t>(), false); WriteRemoteCharacteristic(write_request); } @@ -525,10 +524,10 @@ void BluetoothLowEnergyConnection::OnWriteRemoteCharacteristicError( BluetoothLowEnergyConnection::WriteRequest BluetoothLowEnergyConnection::BuildWriteRequest( - const std::vector<uint8>& signal, - const std::vector<uint8>& bytes, + const std::vector<uint8_t>& signal, + const std::vector<uint8_t>& bytes, bool is_last_write_for_wire_message) { - std::vector<uint8> value(signal.begin(), signal.end()); + std::vector<uint8_t> value(signal.begin(), signal.end()); value.insert(value.end(), bytes.begin(), bytes.end()); return WriteRequest(value, is_last_write_for_wire_message); } @@ -594,19 +593,20 @@ BluetoothLowEnergyConnection::GetGattCharacteristic( // TODO(sacomoto): make this robust to byte ordering in both sides of the // SmartLock BLE socket. -uint32 BluetoothLowEnergyConnection::ToUint32(const std::vector<uint8>& bytes) { +uint32_t BluetoothLowEnergyConnection::ToUint32( + const std::vector<uint8_t>& bytes) { return bytes[0] | (bytes[1] << 8) | (bytes[2] << 16) | (bytes[3] << 24); } // TODO(sacomoto): make this robust to byte ordering in both sides of the // SmartLock BLE socket. -const std::vector<uint8> BluetoothLowEnergyConnection::ToByteVector( - const uint32 value) { - std::vector<uint8> bytes(4, 0); - bytes[0] = static_cast<uint8>(value); - bytes[1] = static_cast<uint8>(value >> 8); - bytes[2] = static_cast<uint8>(value >> 16); - bytes[3] = static_cast<uint8>(value >> 24); +const std::vector<uint8_t> BluetoothLowEnergyConnection::ToByteVector( + const uint32_t value) { + std::vector<uint8_t> bytes(4, 0); + bytes[0] = static_cast<uint8_t>(value); + bytes[1] = static_cast<uint8_t>(value >> 8); + bytes[2] = static_cast<uint8_t>(value >> 16); + bytes[3] = static_cast<uint8_t>(value >> 24); return bytes; } diff --git a/components/proximity_auth/ble/bluetooth_low_energy_connection.h b/components/proximity_auth/ble/bluetooth_low_energy_connection.h index a16a03a..2f62fee 100644 --- a/components/proximity_auth/ble/bluetooth_low_energy_connection.h +++ b/components/proximity_auth/ble/bluetooth_low_energy_connection.h @@ -5,6 +5,9 @@ #ifndef COMPONENTS_PROXIMITY_AUTH_BLE_BLUETOOTH_LOW_ENERGY_CONNECTION_H_ #define COMPONENTS_PROXIMITY_AUTH_BLE_BLUETOOTH_LOW_ENERGY_CONNECTION_H_ +#include <stddef.h> +#include <stdint.h> + #include <queue> #include <string> @@ -59,7 +62,7 @@ class BluetoothLowEnergyConnection : public Connection, public device::BluetoothAdapter::Observer { public: // Signals sent to the remote device to indicate connection related events. - enum class ControlSignal : uint32 { + enum class ControlSignal : uint32_t { kInviteToConnectSignal = 0, kInvitationResponseSignal = 1, kSendSignal = 2, @@ -124,7 +127,7 @@ class BluetoothLowEnergyConnection : public Connection, void GattCharacteristicValueChanged( device::BluetoothAdapter* adapter, device::BluetoothGattCharacteristic* characteristic, - const std::vector<uint8>& value) override; + const std::vector<uint8_t>& value) override; private: // Represents a request to write |value| to a some characteristic. @@ -134,10 +137,10 @@ class BluetoothLowEnergyConnection : public Connection, // a kSendSignal + the size of the WireMessage, and the second containing a // SendStatusSignal + the serialized WireMessage. struct WriteRequest { - WriteRequest(const std::vector<uint8>& val, bool flag); + WriteRequest(const std::vector<uint8_t>& val, bool flag); ~WriteRequest(); - std::vector<uint8> value; + std::vector<uint8_t> value; bool is_last_write_for_wire_message; int number_of_failed_attempts; }; @@ -215,8 +218,8 @@ class BluetoothLowEnergyConnection : public Connection, // Builds the value to be written on |to_peripheral_char_|. The value // corresponds to |signal| concatenated with |payload|. - WriteRequest BuildWriteRequest(const std::vector<uint8>& signal, - const std::vector<uint8>& bytes, + WriteRequest BuildWriteRequest(const std::vector<uint8_t>& signal, + const std::vector<uint8_t>& bytes, bool is_last_message_for_wire_message); // Prints the time elapsed since |Connect()| was called. @@ -234,11 +237,11 @@ class BluetoothLowEnergyConnection : public Connection, device::BluetoothGattCharacteristic* GetGattCharacteristic( const std::string& identifier); - // Convert the first 4 bytes from a byte vector to a uint32. - uint32 ToUint32(const std::vector<uint8>& bytes); + // Convert the first 4 bytes from a byte vector to a uint32_t. + uint32_t ToUint32(const std::vector<uint8_t>& bytes); - // Convert an uint32 to a byte vector. - const std::vector<uint8> ToByteVector(uint32 value); + // Convert an uint32_t to a byte vector. + const std::vector<uint8_t> ToByteVector(uint32_t value); // The Bluetooth adapter over which the Bluetooth connection will be made. scoped_refptr<device::BluetoothAdapter> adapter_; diff --git a/components/proximity_auth/ble/bluetooth_low_energy_connection_finder_unittest.cc b/components/proximity_auth/ble/bluetooth_low_energy_connection_finder_unittest.cc index 16d9338..8133260 100644 --- a/components/proximity_auth/ble/bluetooth_low_energy_connection_finder_unittest.cc +++ b/components/proximity_auth/ble/bluetooth_low_energy_connection_finder_unittest.cc @@ -7,6 +7,7 @@ #include <string> #include "base/bind.h" +#include "base/macros.h" #include "base/memory/ref_counted.h" #include "base/memory/scoped_ptr.h" #include "base/message_loop/message_loop.h" diff --git a/components/proximity_auth/ble/bluetooth_low_energy_connection_unittest.cc b/components/proximity_auth/ble/bluetooth_low_energy_connection_unittest.cc index 0c308c9..a24a7d7 100644 --- a/components/proximity_auth/ble/bluetooth_low_energy_connection_unittest.cc +++ b/components/proximity_auth/ble/bluetooth_low_energy_connection_unittest.cc @@ -4,7 +4,10 @@ #include "components/proximity_auth/ble/bluetooth_low_energy_connection.h" +#include <stdint.h> + #include "base/bind.h" +#include "base/macros.h" #include "base/memory/ref_counted.h" #include "base/memory/scoped_ptr.h" #include "base/message_loop/message_loop.h" @@ -269,9 +272,9 @@ class ProximityAuthBluetoothLowEnergyConnectionTest : public testing::Test { void ResponseSignalReceived(MockBluetoothLowEnergyConnection* connection) { // Written value contains only the // BluetoothLowEneryConnection::ControlSignal::kInviteToConnectSignal. - const std::vector<uint8> kInviteToConnectSignal = ToByteVector(static_cast< - uint32>( - BluetoothLowEnergyConnection::ControlSignal::kInviteToConnectSignal)); + const std::vector<uint8_t> kInviteToConnectSignal = ToByteVector( + static_cast<uint32_t>(BluetoothLowEnergyConnection::ControlSignal:: + kInviteToConnectSignal)); EXPECT_EQ(last_value_written_on_to_peripheral_char_, kInviteToConnectSignal); @@ -280,9 +283,9 @@ class ProximityAuthBluetoothLowEnergyConnectionTest : public testing::Test { // Received the // BluetoothLowEneryConnection::ControlSignal::kInvitationResponseSignal. - const std::vector<uint8> kInvitationResponseSignal = ToByteVector( - static_cast<uint32>(BluetoothLowEnergyConnection::ControlSignal:: - kInvitationResponseSignal)); + const std::vector<uint8_t> kInvitationResponseSignal = ToByteVector( + static_cast<uint32_t>(BluetoothLowEnergyConnection::ControlSignal:: + kInvitationResponseSignal)); connection->GattCharacteristicValueChanged( adapter_.get(), from_peripheral_char_.get(), kInvitationResponseSignal); @@ -318,28 +321,30 @@ class ProximityAuthBluetoothLowEnergyConnectionTest : public testing::Test { write_remote_characteristic_success_callback_.Run(); } - std::vector<uint8> CreateSendSignalWithSize(int message_size) { - std::vector<uint8> value = ToByteVector(static_cast<uint32>( + std::vector<uint8_t> CreateSendSignalWithSize(int message_size) { + std::vector<uint8_t> value = ToByteVector(static_cast<uint32_t>( BluetoothLowEnergyConnection::ControlSignal::kSendSignal)); - std::vector<uint8> size = ToByteVector(static_cast<uint32>(message_size)); + std::vector<uint8_t> size = + ToByteVector(static_cast<uint32_t>(message_size)); value.insert(value.end(), size.begin(), size.end()); return value; } - std::vector<uint8> CreateFirstCharacteristicValue(const std::string& message, - int size) { - std::vector<uint8> value(CreateSendSignalWithSize(size)); - std::vector<uint8> bytes(message.begin(), message.end()); + std::vector<uint8_t> CreateFirstCharacteristicValue( + const std::string& message, + int size) { + std::vector<uint8_t> value(CreateSendSignalWithSize(size)); + std::vector<uint8_t> bytes(message.begin(), message.end()); value.insert(value.end(), bytes.begin(), bytes.end()); return value; } - std::vector<uint8> ToByteVector(uint32 value) { - std::vector<uint8> bytes(4, 0); - bytes[0] = static_cast<uint8>(value); - bytes[1] = static_cast<uint8>(value >> 8); - bytes[2] = static_cast<uint8>(value >> 16); - bytes[3] = static_cast<uint8>(value >> 24); + std::vector<uint8_t> ToByteVector(uint32_t value) { + std::vector<uint8_t> bytes(4, 0); + bytes[0] = static_cast<uint8_t>(value); + bytes[1] = static_cast<uint8_t>(value >> 8); + bytes[2] = static_cast<uint8_t>(value >> 16); + bytes[3] = static_cast<uint8_t>(value >> 24); return bytes; } @@ -353,7 +358,7 @@ class ProximityAuthBluetoothLowEnergyConnectionTest : public testing::Test { scoped_ptr<device::MockBluetoothGattService> service_; scoped_ptr<device::MockBluetoothGattCharacteristic> to_peripheral_char_; scoped_ptr<device::MockBluetoothGattCharacteristic> from_peripheral_char_; - std::vector<uint8> last_value_written_on_to_peripheral_char_; + std::vector<uint8_t> last_value_written_on_to_peripheral_char_; device::MockBluetoothGattNotifySession* notify_session_alias_; scoped_ptr<MockBluetoothThrottler> bluetooth_throttler_; scoped_refptr<base::TestSimpleTaskRunner> task_runner_; @@ -489,9 +494,9 @@ TEST_F(ProximityAuthBluetoothLowEnergyConnectionTest, SaveArg<2>(&write_remote_characteristic_error_callback_))); for (int i = 0; i < kMaxNumberOfTries; i++) { - const std::vector<uint8> kInviteToConnectSignal = ToByteVector(static_cast< - uint32>( - BluetoothLowEnergyConnection::ControlSignal::kInviteToConnectSignal)); + const std::vector<uint8_t> kInviteToConnectSignal = ToByteVector( + static_cast<uint32_t>(BluetoothLowEnergyConnection::ControlSignal:: + kInviteToConnectSignal)); EXPECT_EQ(last_value_written_on_to_peripheral_char_, kInviteToConnectSignal); ASSERT_FALSE(write_remote_characteristic_error_callback_.is_null()); @@ -549,7 +554,7 @@ TEST_F(ProximityAuthBluetoothLowEnergyConnectionTest, message.substr(0, first_write_payload_size), message.size())); // Sending the remaining bytes. - std::vector<uint8> value; + std::vector<uint8_t> value; value.push_back(0); value.insert(value.end(), message.begin() + first_write_payload_size, message.end()); @@ -607,11 +612,11 @@ TEST_F(ProximityAuthBluetoothLowEnergyConnectionTest, // Expecting that |kSendSignal| + |message_size| was written in the first 8 // bytes. - std::vector<uint8> prefix( + std::vector<uint8_t> prefix( last_value_written_on_to_peripheral_char_.begin(), last_value_written_on_to_peripheral_char_.begin() + 8); EXPECT_EQ(prefix, CreateSendSignalWithSize(message_size)); - std::vector<uint8> bytes_received( + std::vector<uint8_t> bytes_received( last_value_written_on_to_peripheral_char_.begin() + 8, last_value_written_on_to_peripheral_char_.end()); @@ -629,7 +634,7 @@ TEST_F(ProximityAuthBluetoothLowEnergyConnectionTest, last_value_written_on_to_peripheral_char_.end()); // Expecting that the message was written. - std::vector<uint8> expected_value(message.begin(), message.end()); + std::vector<uint8_t> expected_value(message.begin(), message.end()); EXPECT_EQ(expected_value.size(), bytes_received.size()); EXPECT_EQ(expected_value, bytes_received); diff --git a/components/proximity_auth/ble/bluetooth_low_energy_device_whitelist_unittest.cc b/components/proximity_auth/ble/bluetooth_low_energy_device_whitelist_unittest.cc index 4db930d..54a74a0 100644 --- a/components/proximity_auth/ble/bluetooth_low_energy_device_whitelist_unittest.cc +++ b/components/proximity_auth/ble/bluetooth_low_energy_device_whitelist_unittest.cc @@ -8,6 +8,7 @@ #include <string> #include <vector> +#include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "base/prefs/testing_pref_service.h" #include "components/proximity_auth/ble/pref_names.h" diff --git a/components/proximity_auth/bluetooth_connection.h b/components/proximity_auth/bluetooth_connection.h index 63483ea..fc9d7aa 100644 --- a/components/proximity_auth/bluetooth_connection.h +++ b/components/proximity_auth/bluetooth_connection.h @@ -7,6 +7,7 @@ #include <string> +#include "base/macros.h" #include "base/memory/ref_counted.h" #include "base/memory/weak_ptr.h" #include "components/proximity_auth/connection.h" diff --git a/components/proximity_auth/bluetooth_connection_finder_unittest.cc b/components/proximity_auth/bluetooth_connection_finder_unittest.cc index 0d38111..36432af 100644 --- a/components/proximity_auth/bluetooth_connection_finder_unittest.cc +++ b/components/proximity_auth/bluetooth_connection_finder_unittest.cc @@ -5,6 +5,7 @@ #include "components/proximity_auth/bluetooth_connection_finder.h" #include "base/bind.h" +#include "base/macros.h" #include "base/memory/ref_counted.h" #include "base/memory/scoped_ptr.h" #include "base/message_loop/message_loop.h" diff --git a/components/proximity_auth/bluetooth_connection_unittest.cc b/components/proximity_auth/bluetooth_connection_unittest.cc index 7eb0491..d1f0430 100644 --- a/components/proximity_auth/bluetooth_connection_unittest.cc +++ b/components/proximity_auth/bluetooth_connection_unittest.cc @@ -4,6 +4,7 @@ #include "components/proximity_auth/bluetooth_connection.h" +#include "base/macros.h" #include "base/message_loop/message_loop.h" #include "base/numerics/safe_conversions.h" #include "base/run_loop.h" diff --git a/components/proximity_auth/bluetooth_throttler_impl_unittest.cc b/components/proximity_auth/bluetooth_throttler_impl_unittest.cc index 5daacc9..d65ad7d 100644 --- a/components/proximity_auth/bluetooth_throttler_impl_unittest.cc +++ b/components/proximity_auth/bluetooth_throttler_impl_unittest.cc @@ -4,6 +4,7 @@ #include "components/proximity_auth/bluetooth_throttler_impl.h" +#include "base/macros.h" #include "base/test/simple_test_tick_clock.h" #include "base/time/time.h" #include "components/proximity_auth/fake_connection.h" diff --git a/components/proximity_auth/bluetooth_util.cc b/components/proximity_auth/bluetooth_util.cc index 27b377c..ee2fca8 100644 --- a/components/proximity_auth/bluetooth_util.cc +++ b/components/proximity_auth/bluetooth_util.cc @@ -7,6 +7,7 @@ #include "components/proximity_auth/bluetooth_util.h" #include "base/callback.h" +#include "build/build_config.h" namespace proximity_auth { namespace bluetooth_util { diff --git a/components/proximity_auth/bluetooth_util_chromeos.cc b/components/proximity_auth/bluetooth_util_chromeos.cc index 6a281fd..3a87b33 100644 --- a/components/proximity_auth/bluetooth_util_chromeos.cc +++ b/components/proximity_auth/bluetooth_util_chromeos.cc @@ -4,7 +4,9 @@ #include "components/proximity_auth/bluetooth_util.h" +#include <stddef.h> #include <stdint.h> +#include <string.h> #include <sys/socket.h> #include <algorithm> #include <vector> diff --git a/components/proximity_auth/connection_unittest.cc b/components/proximity_auth/connection_unittest.cc index 76cfe54..80ea649 100644 --- a/components/proximity_auth/connection_unittest.cc +++ b/components/proximity_auth/connection_unittest.cc @@ -4,6 +4,7 @@ #include "components/proximity_auth/connection.h" +#include "base/macros.h" #include "components/proximity_auth/connection_observer.h" #include "components/proximity_auth/remote_device.h" #include "components/proximity_auth/wire_message.h" diff --git a/components/proximity_auth/cryptauth/cryptauth_access_token_fetcher_impl.h b/components/proximity_auth/cryptauth/cryptauth_access_token_fetcher_impl.h index af798ae..3c26db0 100644 --- a/components/proximity_auth/cryptauth/cryptauth_access_token_fetcher_impl.h +++ b/components/proximity_auth/cryptauth/cryptauth_access_token_fetcher_impl.h @@ -6,6 +6,7 @@ #define COMPONENTS_PROXIMITY_AUTH_CRYPTAUTH_ACCESS_TOKEN_FETCHER_IMPL_H #include "base/callback.h" +#include "base/macros.h" #include "components/proximity_auth/cryptauth/cryptauth_access_token_fetcher.h" #include "google_apis/gaia/oauth2_token_service.h" diff --git a/components/proximity_auth/cryptauth/cryptauth_access_token_fetcher_impl_unittest.cc b/components/proximity_auth/cryptauth/cryptauth_access_token_fetcher_impl_unittest.cc index 3fa70a5..893b318 100644 --- a/components/proximity_auth/cryptauth/cryptauth_access_token_fetcher_impl_unittest.cc +++ b/components/proximity_auth/cryptauth/cryptauth_access_token_fetcher_impl_unittest.cc @@ -7,6 +7,7 @@ #include <string> #include "base/bind.h" +#include "base/macros.h" #include "google_apis/gaia/fake_oauth2_token_service.h" #include "testing/gtest/include/gtest/gtest.h" diff --git a/components/proximity_auth/cryptauth/cryptauth_api_call_flow_unittest.cc b/components/proximity_auth/cryptauth/cryptauth_api_call_flow_unittest.cc index dadbfda..14e23b8 100644 --- a/components/proximity_auth/cryptauth/cryptauth_api_call_flow_unittest.cc +++ b/components/proximity_auth/cryptauth/cryptauth_api_call_flow_unittest.cc @@ -4,6 +4,7 @@ #include "components/proximity_auth/cryptauth/cryptauth_api_call_flow.h" +#include "base/macros.h" #include "base/test/test_simple_task_runner.h" #include "net/base/net_errors.h" #include "net/url_request/test_url_fetcher_factory.h" diff --git a/components/proximity_auth/cryptauth/cryptauth_client_impl.h b/components/proximity_auth/cryptauth/cryptauth_client_impl.h index 787254b..9820427 100644 --- a/components/proximity_auth/cryptauth/cryptauth_client_impl.h +++ b/components/proximity_auth/cryptauth/cryptauth_client_impl.h @@ -5,6 +5,7 @@ #ifndef COMPONENTS_PROXIMITY_AUTH_CRYPTAUTH_CLIENT_IMPL_H #define COMPONENTS_PROXIMITY_AUTH_CRYPTAUTH_CLIENT_IMPL_H +#include "base/macros.h" #include "base/memory/weak_ptr.h" #include "components/proximity_auth/cryptauth/cryptauth_access_token_fetcher.h" #include "components/proximity_auth/cryptauth/cryptauth_api_call_flow.h" diff --git a/components/proximity_auth/cryptauth/cryptauth_client_impl_unittest.cc b/components/proximity_auth/cryptauth/cryptauth_client_impl_unittest.cc index e071c55..21032f6 100644 --- a/components/proximity_auth/cryptauth/cryptauth_client_impl_unittest.cc +++ b/components/proximity_auth/cryptauth/cryptauth_client_impl_unittest.cc @@ -5,6 +5,7 @@ #include "components/proximity_auth/cryptauth/cryptauth_client_impl.h" #include "base/command_line.h" +#include "base/macros.h" #include "base/test/null_task_runner.h" #include "components/proximity_auth/cryptauth/cryptauth_access_token_fetcher.h" #include "components/proximity_auth/cryptauth/cryptauth_api_call_flow.h" diff --git a/components/proximity_auth/cryptauth/cryptauth_device_manager.cc b/components/proximity_auth/cryptauth/cryptauth_device_manager.cc index 2055322..f903597 100644 --- a/components/proximity_auth/cryptauth/cryptauth_device_manager.cc +++ b/components/proximity_auth/cryptauth/cryptauth_device_manager.cc @@ -4,6 +4,8 @@ #include "components/proximity_auth/cryptauth/cryptauth_device_manager.h" +#include <stddef.h> + #include "base/base64url.h" #include "base/prefs/pref_registry_simple.h" #include "base/prefs/pref_service.h" diff --git a/components/proximity_auth/cryptauth/cryptauth_device_manager.h b/components/proximity_auth/cryptauth/cryptauth_device_manager.h index a9286a8..05a1c92 100644 --- a/components/proximity_auth/cryptauth/cryptauth_device_manager.h +++ b/components/proximity_auth/cryptauth/cryptauth_device_manager.h @@ -5,6 +5,7 @@ #ifndef COMPONENTS_PROXIMITY_AUTH_CRYPTAUTH_CRYPTAUTH_DEVICE_MANAGER_H #define COMPONENTS_PROXIMITY_AUTH_CRYPTAUTH_CRYPTAUTH_DEVICE_MANAGER_H +#include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "base/memory/weak_ptr.h" #include "base/observer_list.h" diff --git a/components/proximity_auth/cryptauth/cryptauth_device_manager_unittest.cc b/components/proximity_auth/cryptauth/cryptauth_device_manager_unittest.cc index 3888ca2..7c1bde6 100644 --- a/components/proximity_auth/cryptauth/cryptauth_device_manager_unittest.cc +++ b/components/proximity_auth/cryptauth/cryptauth_device_manager_unittest.cc @@ -4,7 +4,10 @@ #include "components/proximity_auth/cryptauth/cryptauth_device_manager.h" +#include <stddef.h> + #include "base/base64url.h" +#include "base/macros.h" #include "base/memory/weak_ptr.h" #include "base/prefs/scoped_user_pref_update.h" #include "base/prefs/testing_pref_service.h" diff --git a/components/proximity_auth/cryptauth/cryptauth_enroller_impl_unittest.cc b/components/proximity_auth/cryptauth/cryptauth_enroller_impl_unittest.cc index ec369aa..6c79c53 100644 --- a/components/proximity_auth/cryptauth/cryptauth_enroller_impl_unittest.cc +++ b/components/proximity_auth/cryptauth/cryptauth_enroller_impl_unittest.cc @@ -5,6 +5,7 @@ #include "components/proximity_auth/cryptauth/cryptauth_enroller_impl.h" #include "base/bind.h" +#include "base/macros.h" #include "components/proximity_auth/cryptauth/cryptauth_enrollment_utils.h" #include "components/proximity_auth/cryptauth/fake_secure_message_delegate.h" #include "components/proximity_auth/cryptauth/mock_cryptauth_client.h" diff --git a/components/proximity_auth/cryptauth/cryptauth_enrollment_manager.h b/components/proximity_auth/cryptauth/cryptauth_enrollment_manager.h index dc8340eb..0b6fdc3 100644 --- a/components/proximity_auth/cryptauth/cryptauth_enrollment_manager.h +++ b/components/proximity_auth/cryptauth/cryptauth_enrollment_manager.h @@ -5,6 +5,7 @@ #ifndef COMPONENTS_PROXIMITY_AUTH_CRYPTAUTH_CRYPTAUTH_ENROLLMENT_MANAGER_H #define COMPONENTS_PROXIMITY_AUTH_CRYPTAUTH_CRYPTAUTH_ENROLLMENT_MANAGER_H +#include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "base/memory/weak_ptr.h" #include "base/observer_list.h" diff --git a/components/proximity_auth/cryptauth/cryptauth_enrollment_manager_unittest.cc b/components/proximity_auth/cryptauth/cryptauth_enrollment_manager_unittest.cc index 3704e17..9b29842 100644 --- a/components/proximity_auth/cryptauth/cryptauth_enrollment_manager_unittest.cc +++ b/components/proximity_auth/cryptauth/cryptauth_enrollment_manager_unittest.cc @@ -5,6 +5,7 @@ #include "components/proximity_auth/cryptauth/cryptauth_enrollment_manager.h" #include "base/base64url.h" +#include "base/macros.h" #include "base/memory/weak_ptr.h" #include "base/prefs/testing_pref_service.h" #include "base/test/simple_test_clock.h" diff --git a/components/proximity_auth/cryptauth/cryptauth_enrollment_utils.cc b/components/proximity_auth/cryptauth/cryptauth_enrollment_utils.cc index 177d4dd..d44cb76 100644 --- a/components/proximity_auth/cryptauth/cryptauth_enrollment_utils.cc +++ b/components/proximity_auth/cryptauth/cryptauth_enrollment_utils.cc @@ -5,6 +5,7 @@ #include "components/proximity_auth/cryptauth/cryptauth_enrollment_utils.h" #include <math.h> +#include <stddef.h> #include "base/base64url.h" #include "base/md5.h" @@ -20,7 +21,7 @@ int64_t HashStringToInt64(const std::string& string) { base::MD5Digest digest; base::MD5Final(&digest, &context); - // Fold the digest into an int64 value. |digest.a| is a 16-byte array, so we + // Fold the digest into an int64_t value. |digest.a| is a 16-byte array, so we // sum the two 8-byte halves of the digest to create the hash. int64_t hash = 0; for (size_t i = 0; i < sizeof(digest.a); ++i) { diff --git a/components/proximity_auth/cryptauth/cryptauth_enrollment_utils.h b/components/proximity_auth/cryptauth/cryptauth_enrollment_utils.h index 82730a3..0ca737c 100644 --- a/components/proximity_auth/cryptauth/cryptauth_enrollment_utils.h +++ b/components/proximity_auth/cryptauth/cryptauth_enrollment_utils.h @@ -14,8 +14,8 @@ namespace proximity_auth { std::string CalculateDeviceUserId(const std::string& device_id, const std::string& user_id); -// Hashes |string| to an int64 value. These int64 hashes are used to fill the -// GcmDeviceInfo proto to upload to CryptAuth. +// Hashes |string| to an int64_t value. These int64_t hashes are used to fill +// the GcmDeviceInfo proto to upload to CryptAuth. int64_t HashStringToInt64(const std::string& string); } // namespace proximity_auth diff --git a/components/proximity_auth/cryptauth/cryptauth_gcm_manager_impl_unittest.cc b/components/proximity_auth/cryptauth/cryptauth_gcm_manager_impl_unittest.cc index 9b93bca..89fbbd8 100644 --- a/components/proximity_auth/cryptauth/cryptauth_gcm_manager_impl_unittest.cc +++ b/components/proximity_auth/cryptauth/cryptauth_gcm_manager_impl_unittest.cc @@ -4,6 +4,7 @@ #include "components/proximity_auth/cryptauth/cryptauth_gcm_manager_impl.h" +#include "base/macros.h" #include "base/prefs/testing_pref_service.h" #include "components/gcm_driver/fake_gcm_driver.h" #include "components/gcm_driver/gcm_client.h" diff --git a/components/proximity_auth/cryptauth/fake_secure_message_delegate.cc b/components/proximity_auth/cryptauth/fake_secure_message_delegate.cc index 4251e19..0ed896e 100644 --- a/components/proximity_auth/cryptauth/fake_secure_message_delegate.cc +++ b/components/proximity_auth/cryptauth/fake_secure_message_delegate.cc @@ -4,6 +4,8 @@ #include "components/proximity_auth/cryptauth/fake_secure_message_delegate.h" +#include <stddef.h> + #include <algorithm> #include "base/callback.h" diff --git a/components/proximity_auth/cryptauth/fake_secure_message_delegate_unittest.cc b/components/proximity_auth/cryptauth/fake_secure_message_delegate_unittest.cc index 6c35a7fe..cde8b65 100644 --- a/components/proximity_auth/cryptauth/fake_secure_message_delegate_unittest.cc +++ b/components/proximity_auth/cryptauth/fake_secure_message_delegate_unittest.cc @@ -5,6 +5,7 @@ #include "components/proximity_auth/cryptauth/fake_secure_message_delegate.h" #include "base/bind.h" +#include "base/macros.h" #include "testing/gtest/include/gtest/gtest.h" namespace proximity_auth { diff --git a/components/proximity_auth/cryptauth/mock_sync_scheduler.h b/components/proximity_auth/cryptauth/mock_sync_scheduler.h index fe30467..160c9a7 100644 --- a/components/proximity_auth/cryptauth/mock_sync_scheduler.h +++ b/components/proximity_auth/cryptauth/mock_sync_scheduler.h @@ -5,6 +5,7 @@ #ifndef COMPONENTS_PROXIMITY_AUTH_CRYPTAUTH_MOCK_SYNC_SCHEDULER_H #define COMPONENTS_PROXIMITY_AUTH_CRYPTAUTH_MOCK_SYNC_SCHEDULER_H +#include "base/macros.h" #include "components/proximity_auth/cryptauth/sync_scheduler.h" #include "testing/gmock/include/gmock/gmock.h" diff --git a/components/proximity_auth/cryptauth/sync_scheduler.h b/components/proximity_auth/cryptauth/sync_scheduler.h index 7c108a2..55d516b 100644 --- a/components/proximity_auth/cryptauth/sync_scheduler.h +++ b/components/proximity_auth/cryptauth/sync_scheduler.h @@ -5,6 +5,7 @@ #ifndef COMPONENTS_PROXIMITY_AUTH_CRYPTAUTH_SYNC_SCHEDULER_H #define COMPONENTS_PROXIMITY_AUTH_CRYPTAUTH_SYNC_SCHEDULER_H +#include "base/macros.h" #include "base/memory/weak_ptr.h" #include "base/time/time.h" diff --git a/components/proximity_auth/cryptauth/sync_scheduler_impl.h b/components/proximity_auth/cryptauth/sync_scheduler_impl.h index dc6b94b..26a4712 100644 --- a/components/proximity_auth/cryptauth/sync_scheduler_impl.h +++ b/components/proximity_auth/cryptauth/sync_scheduler_impl.h @@ -5,6 +5,9 @@ #ifndef COMPONENTS_PROXIMITY_AUTH_CRYPTAUTH_CRYPTAUTH_SYNC_SCHEDULER_IMPL_H #define COMPONENTS_PROXIMITY_AUTH_CRYPTAUTH_CRYPTAUTH_SYNC_SCHEDULER_IMPL_H +#include <stddef.h> + +#include "base/macros.h" #include "base/timer/timer.h" #include "components/proximity_auth/cryptauth/sync_scheduler.h" diff --git a/components/proximity_auth/cryptauth/sync_scheduler_impl_unittest.cc b/components/proximity_auth/cryptauth/sync_scheduler_impl_unittest.cc index a88eb56..8b736ae 100644 --- a/components/proximity_auth/cryptauth/sync_scheduler_impl_unittest.cc +++ b/components/proximity_auth/cryptauth/sync_scheduler_impl_unittest.cc @@ -4,6 +4,7 @@ #include "components/proximity_auth/cryptauth/sync_scheduler_impl.h" +#include "base/macros.h" #include "base/timer/mock_timer.h" #include "testing/gtest/include/gtest/gtest.h" diff --git a/components/proximity_auth/cryptauth_enroller_factory_impl.h b/components/proximity_auth/cryptauth_enroller_factory_impl.h index cdeb016..f58f66d 100644 --- a/components/proximity_auth/cryptauth_enroller_factory_impl.h +++ b/components/proximity_auth/cryptauth_enroller_factory_impl.h @@ -5,6 +5,7 @@ #ifndef COMPONENTS_PROXIMITY_AUTH_CRYPTAUTH_ENROLLER_FACTORY_IMPL_H #define COMPONENTS_PROXIMITY_AUTH_CRYPTAUTH_ENROLLER_FACTORY_IMPL_H +#include "base/macros.h" #include "components/proximity_auth/cryptauth/cryptauth_enroller.h" #include "components/proximity_auth/proximity_auth_client.h" diff --git a/components/proximity_auth/device_to_device_authenticator_unittest.cc b/components/proximity_auth/device_to_device_authenticator_unittest.cc index 45b4849..e9512b7 100644 --- a/components/proximity_auth/device_to_device_authenticator_unittest.cc +++ b/components/proximity_auth/device_to_device_authenticator_unittest.cc @@ -6,6 +6,7 @@ #include "base/base64url.h" #include "base/bind.h" +#include "base/macros.h" #include "base/memory/scoped_vector.h" #include "base/rand_util.h" #include "base/timer/mock_timer.h" diff --git a/components/proximity_auth/device_to_device_operations_unittest.cc b/components/proximity_auth/device_to_device_operations_unittest.cc index 18fd7d0..ac025245 100644 --- a/components/proximity_auth/device_to_device_operations_unittest.cc +++ b/components/proximity_auth/device_to_device_operations_unittest.cc @@ -4,6 +4,7 @@ #include "base/base64url.h" #include "base/bind.h" +#include "base/macros.h" #include "components/proximity_auth/cryptauth/fake_secure_message_delegate.h" #include "components/proximity_auth/device_to_device_initiator_operations.h" #include "components/proximity_auth/device_to_device_responder_operations.h" diff --git a/components/proximity_auth/fake_connection.h b/components/proximity_auth/fake_connection.h index 8a8732d..4e873c0 100644 --- a/components/proximity_auth/fake_connection.h +++ b/components/proximity_auth/fake_connection.h @@ -5,6 +5,7 @@ #ifndef COMPONENTS_PROXIMITY_AUTH_FAKE_CONNECTION_H #define COMPONENTS_PROXIMITY_AUTH_FAKE_CONNECTION_H +#include "base/macros.h" #include "components/proximity_auth/connection.h" namespace proximity_auth { diff --git a/components/proximity_auth/fake_secure_context.cc b/components/proximity_auth/fake_secure_context.cc index f5d20d7..92e54b0 100644 --- a/components/proximity_auth/fake_secure_context.cc +++ b/components/proximity_auth/fake_secure_context.cc @@ -2,6 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#include <stddef.h> + #include "components/proximity_auth/fake_secure_context.h" namespace proximity_auth { diff --git a/components/proximity_auth/logging/log_buffer.h b/components/proximity_auth/logging/log_buffer.h index 46b335a..a7156c2 100644 --- a/components/proximity_auth/logging/log_buffer.h +++ b/components/proximity_auth/logging/log_buffer.h @@ -5,6 +5,8 @@ #ifndef COMPONENTS_PROXIMITY_AUTH_LOGGING_LOG_BUFFER_H #define COMPONENTS_PROXIMITY_AUTH_LOGGING_LOG_BUFFER_H +#include <stddef.h> + #include <list> #include "base/logging.h" diff --git a/components/proximity_auth/logging/logging.h b/components/proximity_auth/logging/logging.h index c0938d7..534ffd8 100644 --- a/components/proximity_auth/logging/logging.h +++ b/components/proximity_auth/logging/logging.h @@ -8,6 +8,7 @@ #include <sstream> #include "base/logging.h" +#include "base/macros.h" namespace proximity_auth { diff --git a/components/proximity_auth/logging/logging_unittest.cc b/components/proximity_auth/logging/logging_unittest.cc index 513436e..ea40af1 100644 --- a/components/proximity_auth/logging/logging_unittest.cc +++ b/components/proximity_auth/logging/logging_unittest.cc @@ -4,6 +4,8 @@ #include "components/proximity_auth/logging/logging.h" +#include <stddef.h> + #include "base/lazy_instance.h" #include "base/numerics/safe_conversions.h" #include "base/strings/string_number_conversions.h" diff --git a/components/proximity_auth/metrics.cc b/components/proximity_auth/metrics.cc index 1e38803..b8ceb1f 100644 --- a/components/proximity_auth/metrics.cc +++ b/components/proximity_auth/metrics.cc @@ -4,9 +4,12 @@ #include "components/proximity_auth/metrics.h" +#include <stdint.h> + #include <algorithm> #include "base/logging.h" +#include "base/macros.h" #include "base/md5.h" #include "base/metrics/histogram_macros.h" #include "base/metrics/sparse_histogram.h" @@ -17,24 +20,24 @@ namespace metrics { namespace { -// Converts the 4-byte prefix of an MD5 hash into a int32 value. -int32 DigestToInt32(const base::MD5Digest& digest) { - // First, copy to a uint32, since byte swapping and endianness conversions +// Converts the 4-byte prefix of an MD5 hash into a int32_t value. +int32_t DigestToInt32(const base::MD5Digest& digest) { + // First, copy to a uint32_t, since byte swapping and endianness conversions // expect unsigned integers. - uint32 unsigned_value; + uint32_t unsigned_value; DCHECK_GE(arraysize(digest.a), sizeof(unsigned_value)); memcpy(&unsigned_value, digest.a, sizeof(unsigned_value)); unsigned_value = base::ByteSwap(base::HostToNet32(unsigned_value)); - // Then copy the resulting bit pattern to an int32 to match the datatype that - // histograms expect. - int32 value; + // Then copy the resulting bit pattern to an int32_t to match the datatype + // that histograms expect. + int32_t value; memcpy(&value, &unsigned_value, sizeof(value)); return value; } // Returns a hash of the given |name|, encoded as a 32-bit signed integer. -int32 HashDeviceModelName(const std::string& name) { +int32_t HashDeviceModelName(const std::string& name) { base::MD5Digest digest; base::MD5Sum(name.c_str(), name.size(), &digest); return DigestToInt32(digest); diff --git a/components/proximity_auth/mock_proximity_auth_client.h b/components/proximity_auth/mock_proximity_auth_client.h index 331f9cb..3c164f6 100644 --- a/components/proximity_auth/mock_proximity_auth_client.h +++ b/components/proximity_auth/mock_proximity_auth_client.h @@ -8,6 +8,7 @@ #include <string> #include "base/callback.h" +#include "base/macros.h" #include "components/proximity_auth/cryptauth/cryptauth_client.h" #include "components/proximity_auth/cryptauth/cryptauth_device_manager.h" #include "components/proximity_auth/cryptauth/cryptauth_enrollment_manager.h" diff --git a/components/proximity_auth/proximity_auth_pref_manager_unittest.cc b/components/proximity_auth/proximity_auth_pref_manager_unittest.cc index 4abf11cb..17a9776 100644 --- a/components/proximity_auth/proximity_auth_pref_manager_unittest.cc +++ b/components/proximity_auth/proximity_auth_pref_manager_unittest.cc @@ -8,6 +8,7 @@ #include <string> #include <vector> +#include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "base/prefs/testing_pref_service.h" #include "components/proximity_auth/proximity_auth_pref_names.h" diff --git a/components/proximity_auth/remote_device_life_cycle_impl.h b/components/proximity_auth/remote_device_life_cycle_impl.h index 2ea351b..5746206 100644 --- a/components/proximity_auth/remote_device_life_cycle_impl.h +++ b/components/proximity_auth/remote_device_life_cycle_impl.h @@ -5,6 +5,7 @@ #ifndef COMPONENTS_PROXIMITY_AUTH_REMOTE_DEVICE_LIFE_CYCLE_IMPL_H #define COMPONENTS_PROXIMITY_AUTH_REMOTE_DEVICE_LIFE_CYCLE_IMPL_H +#include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "base/memory/weak_ptr.h" #include "base/observer_list.h" diff --git a/components/proximity_auth/remote_device_life_cycle_impl_unittest.cc b/components/proximity_auth/remote_device_life_cycle_impl_unittest.cc index 020e492..22945cc 100644 --- a/components/proximity_auth/remote_device_life_cycle_impl_unittest.cc +++ b/components/proximity_auth/remote_device_life_cycle_impl_unittest.cc @@ -4,7 +4,10 @@ #include "components/proximity_auth/remote_device_life_cycle_impl.h" +#include <stddef.h> + #include "base/callback.h" +#include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "base/test/test_simple_task_runner.h" #include "base/thread_task_runner_handle.h" diff --git a/components/proximity_auth/remote_device_loader_unittest.cc b/components/proximity_auth/remote_device_loader_unittest.cc index 1521ccb..bfc5e14 100644 --- a/components/proximity_auth/remote_device_loader_unittest.cc +++ b/components/proximity_auth/remote_device_loader_unittest.cc @@ -4,7 +4,10 @@ #include "components/proximity_auth/remote_device_loader.h" +#include <stddef.h> + #include "base/bind.h" +#include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "components/proximity_auth/cryptauth/fake_secure_message_delegate.h" #include "components/proximity_auth/proximity_auth_pref_manager.h" diff --git a/components/proximity_auth/screenlock_bridge.cc b/components/proximity_auth/screenlock_bridge.cc index 835317d..8a6b21b 100644 --- a/components/proximity_auth/screenlock_bridge.cc +++ b/components/proximity_auth/screenlock_bridge.cc @@ -5,6 +5,7 @@ #include "components/proximity_auth/screenlock_bridge.h" #include "base/strings/string16.h" +#include "build/build_config.h" #include "components/proximity_auth/logging/logging.h" #if defined(OS_CHROMEOS) diff --git a/components/proximity_auth/screenlock_bridge.h b/components/proximity_auth/screenlock_bridge.h index 0311569..4dfb27c 100644 --- a/components/proximity_auth/screenlock_bridge.h +++ b/components/proximity_auth/screenlock_bridge.h @@ -8,7 +8,6 @@ #include <memory> #include <string> -#include "base/basictypes.h" #include "base/lazy_instance.h" #include "base/macros.h" #include "base/memory/scoped_ptr.h" diff --git a/components/proximity_auth/throttled_bluetooth_connection_finder_unittest.cc b/components/proximity_auth/throttled_bluetooth_connection_finder_unittest.cc index 88cebd5..3cc6c5d 100644 --- a/components/proximity_auth/throttled_bluetooth_connection_finder_unittest.cc +++ b/components/proximity_auth/throttled_bluetooth_connection_finder_unittest.cc @@ -5,6 +5,7 @@ #include "components/proximity_auth/throttled_bluetooth_connection_finder.h" #include "base/bind.h" +#include "base/macros.h" #include "base/test/test_simple_task_runner.h" #include "base/time/time.h" #include "components/proximity_auth/bluetooth_connection_finder.h" diff --git a/components/proximity_auth/unlock_manager.cc b/components/proximity_auth/unlock_manager.cc index 3b6d1cd..fd206a7 100644 --- a/components/proximity_auth/unlock_manager.cc +++ b/components/proximity_auth/unlock_manager.cc @@ -10,6 +10,7 @@ #include "base/thread_task_runner_handle.h" #include "base/time/default_tick_clock.h" #include "base/time/time.h" +#include "build/build_config.h" #include "components/proximity_auth/logging/logging.h" #include "components/proximity_auth/messenger.h" #include "components/proximity_auth/metrics.h" diff --git a/components/proximity_auth/unlock_manager.h b/components/proximity_auth/unlock_manager.h index 696f0ec..d513a2c 100644 --- a/components/proximity_auth/unlock_manager.h +++ b/components/proximity_auth/unlock_manager.h @@ -8,6 +8,7 @@ #include "base/macros.h" #include "base/memory/ref_counted.h" #include "base/memory/weak_ptr.h" +#include "build/build_config.h" #include "components/proximity_auth/messenger_observer.h" #include "components/proximity_auth/proximity_auth_system.h" #include "components/proximity_auth/remote_device_life_cycle.h" diff --git a/components/proximity_auth/unlock_manager_unittest.cc b/components/proximity_auth/unlock_manager_unittest.cc index d6b3383..b72900d 100644 --- a/components/proximity_auth/unlock_manager_unittest.cc +++ b/components/proximity_auth/unlock_manager_unittest.cc @@ -9,6 +9,7 @@ #include "base/memory/scoped_ptr.h" #include "base/test/test_simple_task_runner.h" #include "base/thread_task_runner_handle.h" +#include "build/build_config.h" #include "components/proximity_auth/fake_secure_context.h" #include "components/proximity_auth/logging/logging.h" #include "components/proximity_auth/messenger.h" diff --git a/components/proximity_auth/webui/proximity_auth_webui_handler.h b/components/proximity_auth/webui/proximity_auth_webui_handler.h index ee79c0b..7428178 100644 --- a/components/proximity_auth/webui/proximity_auth_webui_handler.h +++ b/components/proximity_auth/webui/proximity_auth_webui_handler.h @@ -5,6 +5,7 @@ #ifndef COMPONENTS_PROXIMITY_AUTH_WEBUI_PROXIMITY_AUTH_WEBUI_HANDLER_H_ #define COMPONENTS_PROXIMITY_AUTH_WEBUI_PROXIMITY_AUTH_WEBUI_HANDLER_H_ +#include "base/macros.h" #include "base/memory/weak_ptr.h" #include "base/values.h" #include "components/proximity_auth/authenticator.h" diff --git a/components/proximity_auth/wire_message.cc b/components/proximity_auth/wire_message.cc index 3a64008..3b4865b 100644 --- a/components/proximity_auth/wire_message.cc +++ b/components/proximity_auth/wire_message.cc @@ -4,6 +4,9 @@ #include "components/proximity_auth/wire_message.h" +#include <stddef.h> +#include <stdint.h> + #include <limits> #include "base/base64url.h" diff --git a/components/proximity_auth/wire_message_unittest.cc b/components/proximity_auth/wire_message_unittest.cc index 512f480..878d419 100644 --- a/components/proximity_auth/wire_message_unittest.cc +++ b/components/proximity_auth/wire_message_unittest.cc @@ -4,6 +4,8 @@ #include "components/proximity_auth/wire_message.h" +#include <stdint.h> + #include "base/strings/string_util.h" #include "testing/gtest/include/gtest/gtest.h" diff --git a/components/proxy_config/pref_proxy_config_tracker.h b/components/proxy_config/pref_proxy_config_tracker.h index 77416e5..0142f8d 100644 --- a/components/proxy_config/pref_proxy_config_tracker.h +++ b/components/proxy_config/pref_proxy_config_tracker.h @@ -5,7 +5,7 @@ #ifndef COMPONENTS_PROXY_CONFIG_PREF_PROXY_CONFIG_TRACKER_H_ #define COMPONENTS_PROXY_CONFIG_PREF_PROXY_CONFIG_TRACKER_H_ -#include "base/basictypes.h" +#include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "components/proxy_config/proxy_config_export.h" diff --git a/components/proxy_config/pref_proxy_config_tracker_impl.cc b/components/proxy_config/pref_proxy_config_tracker_impl.cc index bc89c49..72a0860 100644 --- a/components/proxy_config/pref_proxy_config_tracker_impl.cc +++ b/components/proxy_config/pref_proxy_config_tracker_impl.cc @@ -4,6 +4,8 @@ #include "components/proxy_config/pref_proxy_config_tracker_impl.h" +#include <stddef.h> + #include "base/bind.h" #include "base/location.h" #include "base/metrics/histogram_macros.h" diff --git a/components/proxy_config/pref_proxy_config_tracker_impl.h b/components/proxy_config/pref_proxy_config_tracker_impl.h index 91a63bb..0f0aba1 100644 --- a/components/proxy_config/pref_proxy_config_tracker_impl.h +++ b/components/proxy_config/pref_proxy_config_tracker_impl.h @@ -5,7 +5,7 @@ #ifndef COMPONENTS_PROXY_CONFIG_PREF_PROXY_CONFIG_TRACKER_IMPL_H_ #define COMPONENTS_PROXY_CONFIG_PREF_PROXY_CONFIG_TRACKER_IMPL_H_ -#include "base/basictypes.h" +#include "base/macros.h" #include "base/memory/ref_counted.h" #include "base/memory/scoped_ptr.h" #include "base/observer_list.h" diff --git a/components/proxy_config/proxy_config_dictionary.cc b/components/proxy_config/proxy_config_dictionary.cc index 326dd13..1251ae6 100644 --- a/components/proxy_config/proxy_config_dictionary.cc +++ b/components/proxy_config/proxy_config_dictionary.cc @@ -4,7 +4,6 @@ #include "components/proxy_config/proxy_config_dictionary.h" -#include "base/basictypes.h" #include "base/logging.h" #include "base/values.h" #include "net/proxy/proxy_config.h" diff --git a/components/proxy_config/proxy_config_dictionary.h b/components/proxy_config/proxy_config_dictionary.h index 236a96b..f95ba74 100644 --- a/components/proxy_config/proxy_config_dictionary.h +++ b/components/proxy_config/proxy_config_dictionary.h @@ -7,7 +7,7 @@ #include <string> -#include "base/basictypes.h" +#include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "components/proxy_config/proxy_config_export.h" #include "components/proxy_config/proxy_prefs.h" diff --git a/components/proxy_config/proxy_prefs.cc b/components/proxy_config/proxy_prefs.cc index 215a451..bd5e6a6 100644 --- a/components/proxy_config/proxy_prefs.cc +++ b/components/proxy_config/proxy_prefs.cc @@ -4,8 +4,8 @@ #include "components/proxy_config/proxy_prefs.h" -#include "base/basictypes.h" #include "base/logging.h" +#include "base/macros.h" namespace ProxyPrefs { diff --git a/components/query_parser/query_parser.cc b/components/query_parser/query_parser.cc index bd9d095..7b5e4ee 100644 --- a/components/query_parser/query_parser.cc +++ b/components/query_parser/query_parser.cc @@ -10,6 +10,7 @@ #include "base/i18n/break_iterator.h" #include "base/i18n/case_conversion.h" #include "base/logging.h" +#include "base/macros.h" #include "base/stl_util.h" #include "base/strings/utf_string_conversions.h" diff --git a/components/query_parser/query_parser.h b/components/query_parser/query_parser.h index d251047..a6e2d22 100644 --- a/components/query_parser/query_parser.h +++ b/components/query_parser/query_parser.h @@ -5,9 +5,11 @@ #ifndef COMPONENTS_QUERY_PARSER_QUERY_PARSER_H_ #define COMPONENTS_QUERY_PARSER_QUERY_PARSER_H_ +#include <stddef.h> + #include <vector> -#include "base/basictypes.h" +#include "base/macros.h" #include "base/strings/string16.h" #include "components/query_parser/snippet.h" diff --git a/components/query_parser/query_parser_unittest.cc b/components/query_parser/query_parser_unittest.cc index 9a63d15..c99c639 100644 --- a/components/query_parser/query_parser_unittest.cc +++ b/components/query_parser/query_parser_unittest.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 "base/basictypes.h" +#include <stddef.h> + +#include "base/macros.h" #include "base/memory/scoped_vector.h" #include "base/strings/utf_string_conversions.h" #include "components/query_parser/query_parser.h" diff --git a/components/query_parser/snippet.cc b/components/query_parser/snippet.cc index 2276e4a..b4840c6 100644 --- a/components/query_parser/snippet.cc +++ b/components/query_parser/snippet.cc @@ -4,6 +4,8 @@ #include "components/query_parser/snippet.h" +#include <stdint.h> + #include <algorithm> #include "base/logging.h" @@ -153,8 +155,8 @@ bool IsNextMatchWithinSnippetWindow(icu::BreakIterator* bi, // heuristics to speed things up if necessary, but it's not likely that // we need to bother. bi->next(kSnippetContext); - int64 current = bi->current(); - return (next_match_start < static_cast<uint64>(current) || + int64_t current = bi->current(); + return (next_match_start < static_cast<uint64_t>(current) || current == icu::BreakIterator::DONE); } diff --git a/components/query_parser/snippet.h b/components/query_parser/snippet.h index e9096d93..b217901 100644 --- a/components/query_parser/snippet.h +++ b/components/query_parser/snippet.h @@ -8,6 +8,8 @@ #ifndef COMPONENTS_QUERY_PARSER_SNIPPET_H__ #define COMPONENTS_QUERY_PARSER_SNIPPET_H__ +#include <stddef.h> + #include <vector> #include "base/strings/string16.h" diff --git a/components/query_parser/snippet_unittest.cc b/components/query_parser/snippet_unittest.cc index 727734a..c96fad6 100644 --- a/components/query_parser/snippet_unittest.cc +++ b/components/query_parser/snippet_unittest.cc @@ -4,8 +4,11 @@ #include "components/query_parser/snippet.h" +#include <stddef.h> + #include <algorithm> +#include "base/macros.h" #include "base/strings/string_split.h" #include "base/strings/string_util.h" #include "base/strings/utf_string_conversions.h" diff --git a/components/rappor/bloom_filter.cc b/components/rappor/bloom_filter.cc index 6c6f654..bf4c874 100644 --- a/components/rappor/bloom_filter.cc +++ b/components/rappor/bloom_filter.cc @@ -4,6 +4,8 @@ #include "components/rappor/bloom_filter.h" +#include <stddef.h> + #include "base/logging.h" #include "third_party/smhasher/src/City.h" @@ -56,7 +58,7 @@ uint64_t GetBloomBits(uint32_t bytes_size, uint32_t hash_function_count, uint32_t hash_seed_offset, const std::string& str) { - // Make sure result fits in uint64. + // Make sure result fits in uint64_t. DCHECK_LE(bytes_size, 8u); uint64_t output = 0; const uint32_t bits_size = bytes_size * 8; diff --git a/components/rappor/bloom_filter.h b/components/rappor/bloom_filter.h index 20adfab..5559eb8 100644 --- a/components/rappor/bloom_filter.h +++ b/components/rappor/bloom_filter.h @@ -5,9 +5,10 @@ #ifndef COMPONENTS_RAPPOR_BLOOM_FILTER_H_ #define COMPONENTS_RAPPOR_BLOOM_FILTER_H_ +#include <stdint.h> + #include <string> -#include "base/basictypes.h" #include "base/macros.h" #include "components/rappor/byte_vector_utils.h" diff --git a/components/rappor/bloom_filter_unittest.cc b/components/rappor/bloom_filter_unittest.cc index a7ca069..8f9dbfa 100644 --- a/components/rappor/bloom_filter_unittest.cc +++ b/components/rappor/bloom_filter_unittest.cc @@ -4,6 +4,8 @@ #include "components/rappor/bloom_filter.h" +#include <stdint.h> + #include "components/rappor/byte_vector_utils.h" #include "testing/gtest/include/gtest/gtest.h" diff --git a/components/rappor/byte_vector_utils.h b/components/rappor/byte_vector_utils.h index f4c6b462..7377552 100644 --- a/components/rappor/byte_vector_utils.h +++ b/components/rappor/byte_vector_utils.h @@ -5,9 +5,11 @@ #ifndef COMPONENTS_RAPPOR_BYTE_VECTOR_UTILS_H_ #define COMPONENTS_RAPPOR_BYTE_VECTOR_UTILS_H_ +#include <stddef.h> +#include <stdint.h> + #include <vector> -#include "base/basictypes.h" #include "base/macros.h" #include "components/rappor/rappor_parameters.h" #include "crypto/hmac.h" diff --git a/components/rappor/log_uploader.cc b/components/rappor/log_uploader.cc index 97ad3e4..3e594a0 100644 --- a/components/rappor/log_uploader.cc +++ b/components/rappor/log_uploader.cc @@ -4,6 +4,9 @@ #include "components/rappor/log_uploader.h" +#include <stddef.h> +#include <stdint.h> + #include "base/metrics/histogram_macros.h" #include "base/metrics/sparse_histogram.h" #include "components/data_use_measurement/core/data_use_user_data.h" @@ -126,8 +129,8 @@ void LogUploader::StartScheduledUpload() { // static base::TimeDelta LogUploader::BackOffUploadInterval(base::TimeDelta interval) { DCHECK_GT(kBackoffMultiplier, 1.0); - interval = base::TimeDelta::FromMicroseconds(static_cast<int64>( - kBackoffMultiplier * interval.InMicroseconds())); + interval = base::TimeDelta::FromMicroseconds( + static_cast<int64_t>(kBackoffMultiplier * interval.InMicroseconds())); base::TimeDelta max_interval = base::TimeDelta::FromSeconds(kMaxBackoffIntervalSeconds); diff --git a/components/rappor/log_uploader_unittest.cc b/components/rappor/log_uploader_unittest.cc index 1bd9d62..48c69b4 100644 --- a/components/rappor/log_uploader_unittest.cc +++ b/components/rappor/log_uploader_unittest.cc @@ -5,6 +5,7 @@ #include "components/rappor/log_uploader.h" #include "base/compiler_specific.h" +#include "base/macros.h" #include "base/thread_task_runner_handle.h" #include "net/url_request/test_url_fetcher_factory.h" #include "net/url_request/url_request_test_util.h" diff --git a/components/rappor/rappor_metric.h b/components/rappor/rappor_metric.h index b36252d..6445679 100644 --- a/components/rappor/rappor_metric.h +++ b/components/rappor/rappor_metric.h @@ -5,9 +5,10 @@ #ifndef COMPONENTS_RAPPOR_RAPPOR_METRIC_H_ #define COMPONENTS_RAPPOR_RAPPOR_METRIC_H_ +#include <stdint.h> + #include <string> -#include "base/basictypes.h" #include "base/macros.h" #include "components/rappor/bloom_filter.h" #include "components/rappor/byte_vector_utils.h" diff --git a/components/rappor/rappor_prefs.h b/components/rappor/rappor_prefs.h index ba9d7fc..622ef43 100644 --- a/components/rappor/rappor_prefs.h +++ b/components/rappor/rappor_prefs.h @@ -5,9 +5,10 @@ #ifndef COMPONENTS_RAPPOR_RAPPOR_PREFS_H_ #define COMPONENTS_RAPPOR_RAPPOR_PREFS_H_ +#include <stdint.h> + #include <string> -#include "base/basictypes.h" class PrefService; class PrefRegistrySimple; diff --git a/components/rappor/rappor_prefs_unittest.cc b/components/rappor/rappor_prefs_unittest.cc index 410de1e..f64f454 100644 --- a/components/rappor/rappor_prefs_unittest.cc +++ b/components/rappor/rappor_prefs_unittest.cc @@ -4,7 +4,10 @@ #include "components/rappor/rappor_prefs.h" +#include <stdint.h> + #include "base/base64.h" +#include "base/macros.h" #include "base/prefs/testing_pref_service.h" #include "base/test/histogram_tester.h" #include "components/rappor/byte_vector_utils.h" diff --git a/components/rappor/rappor_service.h b/components/rappor/rappor_service.h index 677070d..8c42b71 100644 --- a/components/rappor/rappor_service.h +++ b/components/rappor/rappor_service.h @@ -5,10 +5,11 @@ #ifndef COMPONENTS_RAPPOR_RAPPOR_SERVICE_H_ #define COMPONENTS_RAPPOR_RAPPOR_SERVICE_H_ +#include <stdint.h> + #include <map> #include <string> -#include "base/basictypes.h" #include "base/callback.h" #include "base/macros.h" #include "base/memory/scoped_ptr.h" diff --git a/components/rappor/rappor_service_unittest.cc b/components/rappor/rappor_service_unittest.cc index 93a981a..75f0605 100644 --- a/components/rappor/rappor_service_unittest.cc +++ b/components/rappor/rappor_service_unittest.cc @@ -4,6 +4,9 @@ #include "components/rappor/rappor_service.h" +#include <stddef.h> +#include <stdint.h> + #include "base/base64.h" #include "base/metrics/metrics_hashes.h" #include "base/prefs/testing_pref_service.h" diff --git a/components/rappor/sample.cc b/components/rappor/sample.cc index 1603718..5b169d8 100644 --- a/components/rappor/sample.cc +++ b/components/rappor/sample.cc @@ -20,7 +20,7 @@ Sample::Sample(int32_t cohort_seed, const RapporParameters& parameters) : parameters_(parameters), bloom_offset_((cohort_seed % parameters_.num_cohorts) * parameters_.bloom_filter_hash_function_count) { - // Must use bloom filter size that fits in uint64. + // Must use bloom filter size that fits in uint64_t. DCHECK_LE(parameters_.bloom_filter_size_bytes, 8); } diff --git a/components/rappor/sample.h b/components/rappor/sample.h index ed4bda3e..7de0581 100644 --- a/components/rappor/sample.h +++ b/components/rappor/sample.h @@ -5,10 +5,12 @@ #ifndef COMPONENTS_RAPPOR_SAMPLE_H_ #define COMPONENTS_RAPPOR_SAMPLE_H_ +#include <stddef.h> +#include <stdint.h> + #include <map> #include <string> -#include "base/basictypes.h" #include "base/macros.h" #include "components/rappor/rappor_parameters.h" diff --git a/components/rappor/test_rappor_service.h b/components/rappor/test_rappor_service.h index 75c1574..6cb48f6 100644 --- a/components/rappor/test_rappor_service.h +++ b/components/rappor/test_rappor_service.h @@ -5,9 +5,13 @@ #ifndef COMPONENTS_RAPPOR_TEST_RAPPOR_SERVICE_H_ #define COMPONENTS_RAPPOR_TEST_RAPPOR_SERVICE_H_ +#include <stddef.h> +#include <stdint.h> + #include <map> #include <string> +#include "base/macros.h" #include "base/prefs/testing_pref_service.h" #include "components/rappor/rappor_service.h" #include "components/rappor/test_log_uploader.h" diff --git a/components/renderer_context_menu/context_menu_content_type.h b/components/renderer_context_menu/context_menu_content_type.h index b1c81b5..92d86a5 100644 --- a/components/renderer_context_menu/context_menu_content_type.h +++ b/components/renderer_context_menu/context_menu_content_type.h @@ -6,6 +6,7 @@ #define COMPONENTS_RENDERER_CONTEXT_MENU_CONTEXT_MENU_CONTENT_TYPE_H_ #include "base/callback.h" +#include "base/macros.h" #include "content/public/common/context_menu_params.h" #include "ui/base/models/simple_menu_model.h" diff --git a/components/renderer_context_menu/context_menu_delegate.h b/components/renderer_context_menu/context_menu_delegate.h index f592dcc..9ce0495 100644 --- a/components/renderer_context_menu/context_menu_delegate.h +++ b/components/renderer_context_menu/context_menu_delegate.h @@ -5,6 +5,7 @@ #ifndef COMPONENTS_RENDERER_CONTEXT_MENU_CONTEXT_MENU_DELEGATE_H_ #define COMPONENTS_RENDERER_CONTEXT_MENU_CONTEXT_MENU_DELEGATE_H_ +#include "base/macros.h" #include "base/memory/scoped_ptr.h" class RenderViewContextMenuBase; diff --git a/components/renderer_context_menu/render_view_context_menu_base.h b/components/renderer_context_menu/render_view_context_menu_base.h index 7f06ba9..52a4dff 100644 --- a/components/renderer_context_menu/render_view_context_menu_base.h +++ b/components/renderer_context_menu/render_view_context_menu_base.h @@ -5,9 +5,12 @@ #ifndef COMPONENTS_RENDERER_CONTEXT_MENU_RENDER_VIEW_CONTEXT_MENU_BASE_H_ #define COMPONENTS_RENDERER_CONTEXT_MENU_RENDER_VIEW_CONTEXT_MENU_BASE_H_ +#include <stddef.h> + #include <map> #include <string> +#include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "base/memory/scoped_vector.h" #include "base/observer_list.h" diff --git a/components/renderer_context_menu/views/toolkit_delegate_views.h b/components/renderer_context_menu/views/toolkit_delegate_views.h index cb20987..b570958 100644 --- a/components/renderer_context_menu/views/toolkit_delegate_views.h +++ b/components/renderer_context_menu/views/toolkit_delegate_views.h @@ -5,6 +5,7 @@ #ifndef COMPONENTS_RENDERER_CONTEXT_MENU_RENDER_TOOLKIT_DELEGATE_VIEWS_H_ #define COMPONENTS_RENDERER_CONTEXT_MENU_RENDER_TOOLKIT_DELEGATE_VIEWS_H_ +#include "base/macros.h" #include "components/renderer_context_menu/render_view_context_menu_base.h" #include "ui/base/ui_base_types.h" diff --git a/components/resource_provider/file_utils.cc b/components/resource_provider/file_utils.cc index b4be730..1b740369 100644 --- a/components/resource_provider/file_utils.cc +++ b/components/resource_provider/file_utils.cc @@ -4,10 +4,13 @@ #include "components/resource_provider/file_utils.h" +#include <stddef.h> + #include "base/files/file_path.h" #include "base/path_service.h" #include "base/strings/string_split.h" #include "base/strings/string_util.h" +#include "build/build_config.h" namespace resource_provider { namespace { diff --git a/components/resource_provider/file_utils_unittest.cc b/components/resource_provider/file_utils_unittest.cc index 0e33fe1..914eddd 100644 --- a/components/resource_provider/file_utils_unittest.cc +++ b/components/resource_provider/file_utils_unittest.cc @@ -4,7 +4,10 @@ #include "components/resource_provider/file_utils.h" +#include <stddef.h> + #include "base/files/file_path.h" +#include "base/macros.h" #include "base/path_service.h" #include "base/strings/string_util.h" #include "testing/gtest/include/gtest/gtest.h" diff --git a/components/resource_provider/public/cpp/resource_loader.cc b/components/resource_provider/public/cpp/resource_loader.cc index 023418b..0b1ea3b 100644 --- a/components/resource_provider/public/cpp/resource_loader.cc +++ b/components/resource_provider/public/cpp/resource_loader.cc @@ -4,6 +4,8 @@ #include "components/resource_provider/public/cpp/resource_loader.h" +#include <stddef.h> + #include "base/bind.h" #include "base/files/file.h" #include "mojo/application/public/cpp/application_impl.h" diff --git a/components/resource_provider/public/cpp/resource_loader.h b/components/resource_provider/public/cpp/resource_loader.h index 771d689..5f17652 100644 --- a/components/resource_provider/public/cpp/resource_loader.h +++ b/components/resource_provider/public/cpp/resource_loader.h @@ -10,7 +10,7 @@ #include <string> #include <vector> -#include "base/basictypes.h" +#include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "components/resource_provider/public/interfaces/resource_provider.mojom.h" #include "mojo/platform_handle/platform_handle.h" diff --git a/components/resource_provider/resource_provider_app.h b/components/resource_provider/resource_provider_app.h index 6b0a238..6bd9f9f 100644 --- a/components/resource_provider/resource_provider_app.h +++ b/components/resource_provider/resource_provider_app.h @@ -7,6 +7,7 @@ #include <map> +#include "base/macros.h" #include "components/resource_provider/public/interfaces/resource_provider.mojom.h" #include "mojo/application/public/cpp/application_delegate.h" #include "mojo/application/public/cpp/interface_factory.h" diff --git a/components/resource_provider/resource_provider_apptest.cc b/components/resource_provider/resource_provider_apptest.cc index a5fbcae..8e7c4d8 100644 --- a/components/resource_provider/resource_provider_apptest.cc +++ b/components/resource_provider/resource_provider_apptest.cc @@ -2,10 +2,12 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#include <stddef.h> #include <stdint.h> #include "base/containers/scoped_ptr_hash_map.h" #include "base/files/file.h" +#include "base/macros.h" #include "base/run_loop.h" #include "components/resource_provider/public/cpp/resource_loader.h" #include "components/resource_provider/public/interfaces/resource_provider.mojom.h" diff --git a/components/resource_provider/resource_provider_impl.cc b/components/resource_provider/resource_provider_impl.cc index 628c16a..8b0168a59 100644 --- a/components/resource_provider/resource_provider_impl.cc +++ b/components/resource_provider/resource_provider_impl.cc @@ -4,6 +4,8 @@ #include "components/resource_provider/resource_provider_impl.h" +#include <stddef.h> + #include "base/bind.h" #include "base/files/file_util.h" #include "base/location.h" diff --git a/components/resource_provider/resource_provider_impl.h b/components/resource_provider/resource_provider_impl.h index 8884a5b..8f319d3 100644 --- a/components/resource_provider/resource_provider_impl.h +++ b/components/resource_provider/resource_provider_impl.h @@ -6,6 +6,7 @@ #define COMPONENTS_RESOURCE_PROVIDER_RESOURCE_PROVIDER_IMPL_H_ #include "base/files/file_path.h" +#include "base/macros.h" #include "components/resource_provider/public/interfaces/resource_provider.mojom.h" namespace resource_provider { diff --git a/components/rlz/rlz_tracker.cc b/components/rlz/rlz_tracker.cc index 5531ce1..00b8dd9 100644 --- a/components/rlz/rlz_tracker.cc +++ b/components/rlz/rlz_tracker.cc @@ -15,6 +15,7 @@ #include "base/strings/string_util.h" #include "base/strings/utf_string_conversions.h" #include "base/trace_event/trace_event.h" +#include "build/build_config.h" #include "components/rlz/rlz_tracker_delegate.h" #include "net/http/http_util.h" diff --git a/components/rlz/rlz_tracker.h b/components/rlz/rlz_tracker.h index 9aa2356..aa7a4d0 100644 --- a/components/rlz/rlz_tracker.h +++ b/components/rlz/rlz_tracker.h @@ -8,12 +8,13 @@ #include <map> #include <string> -#include "base/basictypes.h" +#include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "base/memory/singleton.h" #include "base/strings/string16.h" #include "base/threading/sequenced_worker_pool.h" #include "base/time/time.h" +#include "build/build_config.h" #include "rlz/lib/rlz_lib.h" namespace net { diff --git a/components/rlz/rlz_tracker_unittest.cc b/components/rlz/rlz_tracker_unittest.cc index ba505ee..e3e12e9 100644 --- a/components/rlz/rlz_tracker_unittest.cc +++ b/components/rlz/rlz_tracker_unittest.cc @@ -4,6 +4,7 @@ #include "components/rlz/rlz_tracker.h" +#include "base/macros.h" #include "base/memory/ref_counted.h" #include "base/memory/scoped_ptr.h" #include "base/message_loop/message_loop.h" @@ -11,6 +12,7 @@ #include "base/test/sequenced_worker_pool_owner.h" #include "base/thread_task_runner_handle.h" #include "base/time/time.h" +#include "build/build_config.h" #include "components/rlz/rlz_tracker_delegate.h" #include "net/url_request/url_request_test_util.h" #include "rlz/test/rlz_test_helpers.h" diff --git a/components/safe_browsing_db/prefix_set.cc b/components/safe_browsing_db/prefix_set.cc index f8a4f1a..b5c97d3 100644 --- a/components/safe_browsing_db/prefix_set.cc +++ b/components/safe_browsing_db/prefix_set.cc @@ -20,7 +20,7 @@ namespace { // |kMagic| should be reasonably unique, and not match itself across // endianness changes. I generated this value with: // md5 -qs chrome/browser/safe_browsing/prefix_set.cc | colrm 9 -static uint32 kMagic = 0x864088dd; +static uint32_t kMagic = 0x864088dd; // Version history: // Version 1: b6cb7cfe/r74487 by shess@chromium.org on 2011-02-10 @@ -28,17 +28,17 @@ static uint32 kMagic = 0x864088dd; // Version 3: dd07faf5/r268145 by shess@chromium.org on 2014-05-05 // Version 2 layout is identical to version 1. The sort order of |index_| -// changed from |int32| to |uint32| to match the change of |SBPrefix|. +// changed from |int32_t| to |uint32_t| to match the change of |SBPrefix|. // Version 3 adds storage for full hashes. -static uint32 kVersion = 3; -static uint32 kDeprecatedVersion = 2; // And lower. +static uint32_t kVersion = 3; +static uint32_t kDeprecatedVersion = 2; // And lower. typedef struct { - uint32 magic; - uint32 version; - uint32 index_size; - uint32 deltas_size; - uint32 full_hashes_size; + uint32_t magic; + uint32_t version; + uint32_t index_size; + uint32_t deltas_size; + uint32_t full_hashes_size; } FileHeader; // Common std::vector<> implementations add capacity by multiplying from the @@ -68,7 +68,7 @@ size_t EstimateFinalCount(SBPrefix current_prefix, size_t current_count) { // estimated_count / current_count == estimated_max / current_prefix // For large input sets, estimated_max of 2^32 is close enough. const size_t estimated_prefix_count = static_cast<size_t>( - (static_cast<uint64>(current_count) << 32) / current_prefix); + (static_cast<uint64_t>(current_count) << 32) / current_prefix); // The estimate has an error bar, if the final total is below the estimate, no // harm, but if it is above a capacity resize will happen at nearly 100%. Add @@ -88,7 +88,7 @@ PrefixSet::PrefixSet() { } PrefixSet::PrefixSet(IndexVector* index, - std::vector<uint16>* deltas, + std::vector<uint16_t>* deltas, std::vector<SBFullHash>* full_hashes) { DCHECK(index && deltas && full_hashes); index_.swap(*index); @@ -159,11 +159,11 @@ void PrefixSet::GetPrefixes(std::vector<SBPrefix>* prefixes) const { // static scoped_ptr<const PrefixSet> PrefixSet::LoadFile( const base::FilePath& filter_name) { - int64 size_64; + int64_t size_64; if (!base::GetFileSize(filter_name, &size_64)) return nullptr; using base::MD5Digest; - if (size_64 < static_cast<int64>(sizeof(FileHeader) + sizeof(MD5Digest))) + if (size_64 < static_cast<int64_t>(sizeof(FileHeader) + sizeof(MD5Digest))) return nullptr; base::ScopedFILE file(base::OpenFile(filter_name, "rb")); @@ -196,7 +196,7 @@ scoped_ptr<const PrefixSet> PrefixSet::LoadFile( IndexVector index; const size_t index_bytes = sizeof(index[0]) * header.index_size; - std::vector<uint16> deltas; + std::vector<uint16_t> deltas; const size_t deltas_bytes = sizeof(deltas[0]) * header.deltas_size; std::vector<SBFullHash> full_hashes; @@ -206,7 +206,7 @@ scoped_ptr<const PrefixSet> PrefixSet::LoadFile( // Check for bogus sizes before allocating any space. const size_t expected_bytes = sizeof(header) + index_bytes + deltas_bytes + full_hashes_bytes + sizeof(MD5Digest); - if (static_cast<int64>(expected_bytes) != size_64) + if (static_cast<int64_t>(expected_bytes) != size_64) return nullptr; // Read the index vector. Herb Sutter indicates that vectors are @@ -266,9 +266,9 @@ bool PrefixSet::WriteFile(const base::FilePath& filter_name) const { FileHeader header; header.magic = kMagic; header.version = kVersion; - header.index_size = static_cast<uint32>(index_.size()); - header.deltas_size = static_cast<uint32>(deltas_.size()); - header.full_hashes_size = static_cast<uint32>(full_hashes_.size()); + header.index_size = static_cast<uint32_t>(index_.size()); + header.deltas_size = static_cast<uint32_t>(deltas_.size()); + header.full_hashes_size = static_cast<uint32_t>(full_hashes_.size()); // Sanity check that the 32-bit values never mess things up. if (static_cast<size_t>(header.index_size) != index_.size() || @@ -345,7 +345,8 @@ bool PrefixSet::WriteFile(const base::FilePath& filter_name) const { } void PrefixSet::AddRun(SBPrefix index_prefix, - const uint16* run_begin, const uint16* run_end) { + const uint16_t* run_begin, + const uint16_t* run_end) { // Preempt organic capacity decisions for |delta_| once strong estimates can // be made. if (index_prefix > kEstimateThreshold && @@ -354,7 +355,7 @@ void PrefixSet::AddRun(SBPrefix index_prefix, } index_.push_back( - std::make_pair(index_prefix, static_cast<uint32>(deltas_.size()))); + std::make_pair(index_prefix, static_cast<uint32_t>(deltas_.size()))); deltas_.insert(deltas_.end(), run_begin, run_end); } @@ -400,7 +401,7 @@ void PrefixSetBuilder::EmitRun() { DCHECK(prefix_set_.get()); SBPrefix prev_prefix = buffer_[0]; - uint16 run[PrefixSet::kMaxRun]; + uint16_t run[PrefixSet::kMaxRun]; size_t run_pos = 0; size_t i; @@ -409,7 +410,7 @@ void PrefixSetBuilder::EmitRun() { // sorted_prefixes could be more than INT_MAX apart. DCHECK_GT(buffer_[i], prev_prefix); const unsigned delta = buffer_[i] - prev_prefix; - const uint16 delta16 = static_cast<uint16>(delta); + const uint16_t delta16 = static_cast<uint16_t>(delta); // Break the run if the delta doesn't fit. if (delta != static_cast<unsigned>(delta16)) diff --git a/components/safe_browsing_db/prefix_set.h b/components/safe_browsing_db/prefix_set.h index 5517105..3230341 100644 --- a/components/safe_browsing_db/prefix_set.h +++ b/components/safe_browsing_db/prefix_set.h @@ -49,6 +49,9 @@ #ifndef COMPONENTS_SAFE_BROWSING_DB_PREFIX_SET_H_ #define COMPONENTS_SAFE_BROWSING_DB_PREFIX_SET_H_ +#include <stddef.h> +#include <stdint.h> + #include <utility> #include <vector> @@ -105,14 +108,15 @@ class PrefixSet { static const size_t kMaxRun = 100; // Helpers to make |index_| easier to deal with. - typedef std::pair<SBPrefix, uint32> IndexPair; + typedef std::pair<SBPrefix, uint32_t> IndexPair; typedef std::vector<IndexPair> IndexVector; static bool PrefixLess(const IndexPair& a, const IndexPair& b); // Helper to let |PrefixSetBuilder| add a run of data. |index_prefix| is // added to |index_|, with the other elements added into |deltas_|. void AddRun(SBPrefix index_prefix, - const uint16* run_begin, const uint16* run_end); + const uint16_t* run_begin, + const uint16_t* run_end); // |true| if |prefix| is one of the prefixes passed to the set's builder. // Provided for testing purposes. @@ -127,7 +131,7 @@ class PrefixSet { // Helper for |LoadFile()|. Steals vector contents using |swap()|. PrefixSet(IndexVector* index, - std::vector<uint16>* deltas, + std::vector<uint16_t>* deltas, std::vector<SBFullHash>* full_hashes); // Top-level index of prefix to offset in |deltas_|. Each pair @@ -139,7 +143,7 @@ class PrefixSet { // Deltas which are added to the prefix in |index_| to generate // prefixes. Deltas are only valid between consecutive items from // |index_|, or the end of |deltas_| for the last |index_| pair. - std::vector<uint16> deltas_; + std::vector<uint16_t> deltas_; // Full hashes ordered by SBFullHashLess. std::vector<SBFullHash> full_hashes_; diff --git a/components/safe_browsing_db/prefix_set_unittest.cc b/components/safe_browsing_db/prefix_set_unittest.cc index d1de0db..0185afa 100644 --- a/components/safe_browsing_db/prefix_set_unittest.cc +++ b/components/safe_browsing_db/prefix_set_unittest.cc @@ -4,6 +4,10 @@ #include "components/safe_browsing_db/prefix_set.h" +#include <stddef.h> +#include <stdint.h> +#include <string.h> + #include <algorithm> #include <iterator> #include <set> @@ -19,6 +23,7 @@ #include "base/rand_util.h" #include "base/strings/string_number_conversions.h" #include "base/strings/string_util.h" +#include "build/build_config.h" #include "components/safe_browsing_db/util.h" #include "testing/gtest/include/gtest/gtest.h" #include "testing/platform_test.h" @@ -35,12 +40,12 @@ const SBPrefix kHighBitSet = 3u * 1000u * 1000u * 1000u; class PrefixSetTest : public PlatformTest { protected: // Constants for the v1 format. - static const size_t kMagicOffset = 0 * sizeof(uint32); - static const size_t kVersionOffset = 1 * sizeof(uint32); - static const size_t kIndexSizeOffset = 2 * sizeof(uint32); - static const size_t kDeltasSizeOffset = 3 * sizeof(uint32); - static const size_t kFullHashesSizeOffset = 4 * sizeof(uint32); - static const size_t kPayloadOffset = 5 * sizeof(uint32); + static const size_t kMagicOffset = 0 * sizeof(uint32_t); + static const size_t kVersionOffset = 1 * sizeof(uint32_t); + static const size_t kIndexSizeOffset = 2 * sizeof(uint32_t); + static const size_t kDeltasSizeOffset = 3 * sizeof(uint32_t); + static const size_t kFullHashesSizeOffset = 4 * sizeof(uint32_t); + static const size_t kPayloadOffset = 5 * sizeof(uint32_t); // Generate a set of random prefixes to share between tests. For // most tests this generation was a large fraction of the test time. @@ -52,9 +57,10 @@ class PrefixSetTest : public PlatformTest { // Distribute clusters of prefixes. for (size_t i = 0; i < 250; ++i) { // Unsigned for overflow characteristics. - const uint32 base = static_cast<uint32>(base::RandUint64()); + const uint32_t base = static_cast<uint32_t>(base::RandUint64()); for (size_t j = 0; j < 10; ++j) { - const uint32 delta = static_cast<uint32>(base::RandUint64() & 0xFFFF); + const uint32_t delta = + static_cast<uint32_t>(base::RandUint64() & 0xFFFF); const SBPrefix prefix = static_cast<SBPrefix>(base + delta); shared_prefixes_.push_back(prefix); } @@ -114,11 +120,11 @@ class PrefixSetTest : public PlatformTest { return true; } - // Helper function to read the uint32 value at |offset|, increment it + // Helper function to read the uint32_t value at |offset|, increment it // by |inc|, and write it back in place. |fp| should be opened in // r+ mode. static void IncrementIntAt(FILE* fp, long offset, int inc) { - uint32 value = 0; + uint32_t value = 0; ASSERT_NE(-1, fseek(fp, offset, SEEK_SET)); ASSERT_EQ(1U, fread(&value, sizeof(value), 1, fp)); @@ -159,11 +165,11 @@ class PrefixSetTest : public PlatformTest { ASSERT_EQ(file_size, ftell(fp)); } - // Open |filename| and increment the uint32 at |offset| by |inc|. + // Open |filename| and increment the uint32_t at |offset| by |inc|. // Then re-generate the checksum to account for the new contents. void ModifyAndCleanChecksum(const base::FilePath& filename, long offset, int inc) { - int64 size_64; + int64_t size_64; ASSERT_TRUE(base::GetFileSize(filename, &size_64)); base::ScopedFILE file(base::OpenFile(filename, "r+b")); @@ -171,7 +177,7 @@ class PrefixSetTest : public PlatformTest { CleanChecksum(file.get()); file.reset(); - int64 new_size_64; + int64_t new_size_64; ASSERT_TRUE(base::GetFileSize(filename, &new_size_64)); ASSERT_EQ(new_size_64, size_64); } @@ -535,7 +541,7 @@ TEST_F(PrefixSetTest, CorruptionDigest) { base::FilePath filename; ASSERT_TRUE(GetPrefixSetFile(&filename)); - int64 size_64; + int64_t size_64; ASSERT_TRUE(base::GetFileSize(filename, &size_64)); base::ScopedFILE file(base::OpenFile(filename, "r+b")); long digest_offset = static_cast<long>(size_64 - sizeof(base::MD5Digest)); @@ -568,15 +574,15 @@ TEST_F(PrefixSetTest, SizeTRecovery) { base::ScopedFILE file(base::OpenFile(filename, "r+b")); // Leave existing magic and version. - ASSERT_NE(-1, fseek(file.get(), sizeof(uint32) * 2, SEEK_SET)); + ASSERT_NE(-1, fseek(file.get(), sizeof(uint32_t) * 2, SEEK_SET)); // Indicate two index values and two deltas. - uint32 val = 2; + uint32_t val = 2; ASSERT_EQ(sizeof(val), fwrite(&val, 1, sizeof(val), file.get())); ASSERT_EQ(sizeof(val), fwrite(&val, 1, sizeof(val), file.get())); // Write two index values with 64-bit "size_t". - std::pair<SBPrefix, uint64> item; + std::pair<SBPrefix, uint64_t> item; memset(&item, 0, sizeof(item)); // Includes any padding. item.first = 17; item.second = 0; @@ -586,7 +592,7 @@ TEST_F(PrefixSetTest, SizeTRecovery) { ASSERT_EQ(sizeof(item), fwrite(&item, 1, sizeof(item), file.get())); // Write two delta values. - uint16 delta = 23; + uint16_t delta = 23; ASSERT_EQ(sizeof(delta), fwrite(&delta, 1, sizeof(delta), file.get())); ASSERT_EQ(sizeof(delta), fwrite(&delta, 1, sizeof(delta), file.get())); @@ -646,18 +652,18 @@ TEST_F(PrefixSetTest, ReadSigned) { base::ScopedFILE file(base::OpenFile(filename, "r+b")); // Leave existing magic. - ASSERT_NE(-1, fseek(file.get(), sizeof(uint32), SEEK_SET)); + ASSERT_NE(-1, fseek(file.get(), sizeof(uint32_t), SEEK_SET)); // Version 1. - uint32 version = 1; + uint32_t version = 1; ASSERT_EQ(sizeof(version), fwrite(&version, 1, sizeof(version), file.get())); // Indicate two index values and two deltas. - uint32 val = 2; + uint32_t val = 2; ASSERT_EQ(sizeof(val), fwrite(&val, 1, sizeof(val), file.get())); ASSERT_EQ(sizeof(val), fwrite(&val, 1, sizeof(val), file.get())); - std::pair<int32, uint32> item; + std::pair<int32_t, uint32_t> item; memset(&item, 0, sizeof(item)); // Includes any padding. item.first = -1000; item.second = 0; @@ -667,7 +673,7 @@ TEST_F(PrefixSetTest, ReadSigned) { ASSERT_EQ(sizeof(item), fwrite(&item, 1, sizeof(item), file.get())); // Write two delta values. - uint16 delta = 23; + uint16_t delta = 23; ASSERT_EQ(sizeof(delta), fwrite(&delta, 1, sizeof(delta), file.get())); ASSERT_EQ(sizeof(delta), fwrite(&delta, 1, sizeof(delta), file.get())); diff --git a/components/safe_browsing_db/util.cc b/components/safe_browsing_db/util.cc index 3183998..4fe1140 100644 --- a/components/safe_browsing_db/util.cc +++ b/components/safe_browsing_db/util.cc @@ -4,6 +4,9 @@ #include "components/safe_browsing_db/util.h" +#include <stddef.h> + +#include "base/macros.h" #include "base/strings/string_util.h" #include "crypto/sha2.h" #include "net/base/escape.h" diff --git a/components/safe_browsing_db/util.h b/components/safe_browsing_db/util.h index dfa38e88..daa202e 100644 --- a/components/safe_browsing_db/util.h +++ b/components/safe_browsing_db/util.h @@ -7,11 +7,12 @@ #ifndef COMPONENTS_SAFE_BROWSING_DB_UTIL_H_ #define COMPONENTS_SAFE_BROWSING_DB_UTIL_H_ +#include <stdint.h> + #include <cstring> #include <string> #include <vector> -#include "base/basictypes.h" #include "base/strings/string_piece.h" #include "base/time/time.h" @@ -50,7 +51,7 @@ enum SBThreatType { // A truncated hash's type. -typedef uint32 SBPrefix; +typedef uint32_t SBPrefix; // A full hash. union SBFullHash { diff --git a/components/safe_browsing_db/util_unittest.cc b/components/safe_browsing_db/util_unittest.cc index 44e514e..85f32a9 100644 --- a/components/safe_browsing_db/util_unittest.cc +++ b/components/safe_browsing_db/util_unittest.cc @@ -2,8 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#include <stddef.h> + #include <algorithm> +#include "base/macros.h" #include "base/strings/stringprintf.h" #include "components/safe_browsing_db/util.h" #include "testing/gtest/include/gtest/gtest.h" diff --git a/components/safe_json/android/component_jni_registrar.cc b/components/safe_json/android/component_jni_registrar.cc index f1f937b..9c7fb95 100644 --- a/components/safe_json/android/component_jni_registrar.cc +++ b/components/safe_json/android/component_jni_registrar.cc @@ -6,7 +6,7 @@ #include "base/android/jni_android.h" #include "base/android/jni_registrar.h" -#include "base/basictypes.h" +#include "base/macros.h" #include "components/safe_json/json_sanitizer.h" namespace safe_json { diff --git a/components/safe_json/json_sanitizer.cc b/components/safe_json/json_sanitizer.cc index 43ede85..3cffc52 100644 --- a/components/safe_json/json_sanitizer.cc +++ b/components/safe_json/json_sanitizer.cc @@ -13,9 +13,11 @@ #include "base/bind.h" #include "base/callback.h" #include "base/json/json_writer.h" +#include "base/macros.h" #include "base/memory/weak_ptr.h" #include "base/strings/string_util.h" #include "base/values.h" +#include "build/build_config.h" #include "components/safe_json/safe_json_parser.h" namespace safe_json { diff --git a/components/safe_json/json_sanitizer.h b/components/safe_json/json_sanitizer.h index 3f393d5..072cd75 100644 --- a/components/safe_json/json_sanitizer.h +++ b/components/safe_json/json_sanitizer.h @@ -9,7 +9,9 @@ #include "base/callback_forward.h" #include "base/compiler_specific.h" +#include "base/macros.h" #include "base/memory/scoped_ptr.h" +#include "build/build_config.h" #if defined(OS_ANDROID) #include <jni.h> diff --git a/components/safe_json/json_sanitizer_android.cc b/components/safe_json/json_sanitizer_android.cc index 900acab..f7f007b 100644 --- a/components/safe_json/json_sanitizer_android.cc +++ b/components/safe_json/json_sanitizer_android.cc @@ -8,6 +8,7 @@ #include "base/bind.h" #include "base/callback.h" #include "base/location.h" +#include "base/macros.h" #include "base/memory/weak_ptr.h" #include "base/strings/string_util.h" #include "base/threading/sequenced_task_runner_handle.h" diff --git a/components/safe_json/json_sanitizer_unittest.cc b/components/safe_json/json_sanitizer_unittest.cc index 0a75ad3..6571eb6 100644 --- a/components/safe_json/json_sanitizer_unittest.cc +++ b/components/safe_json/json_sanitizer_unittest.cc @@ -9,6 +9,7 @@ #include "base/message_loop/message_loop.h" #include "base/run_loop.h" #include "base/values.h" +#include "build/build_config.h" #include "components/safe_json/json_sanitizer.h" #include "components/safe_json/safe_json_parser.h" #include "testing/gtest/include/gtest/gtest.h" diff --git a/components/safe_json/safe_json_parser.cc b/components/safe_json/safe_json_parser.cc index 653800e..7d2bbfd 100644 --- a/components/safe_json/safe_json_parser.cc +++ b/components/safe_json/safe_json_parser.cc @@ -4,6 +4,8 @@ #include "components/safe_json/safe_json_parser.h" +#include "build/build_config.h" + #if defined(OS_ANDROID) #include "components/safe_json/safe_json_parser_android.h" #else diff --git a/components/safe_json/safe_json_parser.h b/components/safe_json/safe_json_parser.h index 704f068..962dfa6 100644 --- a/components/safe_json/safe_json_parser.h +++ b/components/safe_json/safe_json_parser.h @@ -7,7 +7,6 @@ #include <string> -#include "base/basictypes.h" #include "base/callback.h" #include "base/memory/scoped_ptr.h" diff --git a/components/safe_json/safe_json_parser_android.h b/components/safe_json/safe_json_parser_android.h index ba29698..3dc34b1 100644 --- a/components/safe_json/safe_json_parser_android.h +++ b/components/safe_json/safe_json_parser_android.h @@ -7,6 +7,7 @@ #include <memory> +#include "base/macros.h" #include "components/safe_json/safe_json_parser.h" namespace safe_json { diff --git a/components/safe_json/safe_json_parser_impl.h b/components/safe_json/safe_json_parser_impl.h index 277ee08..7b96c79 100644 --- a/components/safe_json/safe_json_parser_impl.h +++ b/components/safe_json/safe_json_parser_impl.h @@ -7,6 +7,7 @@ #include <string> +#include "base/macros.h" #include "base/memory/ref_counted.h" #include "base/memory/scoped_ptr.h" #include "components/safe_json/safe_json_parser.h" diff --git a/components/safe_json/testing_json_parser.h b/components/safe_json/testing_json_parser.h index 53bdb1d..4acde1f 100644 --- a/components/safe_json/testing_json_parser.h +++ b/components/safe_json/testing_json_parser.h @@ -5,6 +5,7 @@ #ifndef COMPONENTS_SAFE_JSON_TESTING_JSON_PARSER_H_ #define COMPONENTS_SAFE_JSON_TESTING_JSON_PARSER_H_ +#include "base/macros.h" #include "components/safe_json/safe_json_parser.h" namespace safe_json { diff --git a/components/scheduler/base/cancelable_closure_holder.h b/components/scheduler/base/cancelable_closure_holder.h index 47a277e0..5254cd4 100644 --- a/components/scheduler/base/cancelable_closure_holder.h +++ b/components/scheduler/base/cancelable_closure_holder.h @@ -6,6 +6,7 @@ #define COMPONENTS_SCHEDULER_BASE_CANCELABLE_CLOSURE_HOLDER_H_ #include "base/cancelable_callback.h" +#include "base/macros.h" namespace scheduler { diff --git a/components/scheduler/base/pollable_thread_safe_flag.h b/components/scheduler/base/pollable_thread_safe_flag.h index 0f9aa8e..8e37b69 100644 --- a/components/scheduler/base/pollable_thread_safe_flag.h +++ b/components/scheduler/base/pollable_thread_safe_flag.h @@ -6,6 +6,7 @@ #define COMPONENTS_SCHEDULER_BASE_POLLABLE_THREAD_SAFE_FLAG_H_ #include "base/atomicops.h" +#include "base/macros.h" #include "base/synchronization/lock.h" // A PollableThreadSafeFlag can be polled without requiring a lock, but can only diff --git a/components/scheduler/base/task_queue.h b/components/scheduler/base/task_queue.h index a9964d9..f8d2b55 100644 --- a/components/scheduler/base/task_queue.h +++ b/components/scheduler/base/task_queue.h @@ -5,6 +5,7 @@ #ifndef COMPONENTS_SCHEDULER_BASE_TASK_QUEUE_H_ #define COMPONENTS_SCHEDULER_BASE_TASK_QUEUE_H_ +#include "base/macros.h" #include "base/message_loop/message_loop.h" #include "base/single_thread_task_runner.h" #include "components/scheduler/scheduler_export.h" diff --git a/components/scheduler/base/task_queue_impl.h b/components/scheduler/base/task_queue_impl.h index 98977a2..e298abc 100644 --- a/components/scheduler/base/task_queue_impl.h +++ b/components/scheduler/base/task_queue_impl.h @@ -5,8 +5,11 @@ #ifndef CONTENT_RENDERER_SCHEDULER_BASE_TASK_QUEUE_IMPL_H_ #define CONTENT_RENDERER_SCHEDULER_BASE_TASK_QUEUE_IMPL_H_ +#include <stddef.h> + #include <set> +#include "base/macros.h" #include "base/pending_task.h" #include "base/threading/thread_checker.h" #include "base/trace_event/trace_event.h" diff --git a/components/scheduler/base/task_queue_manager_perftest.cc b/components/scheduler/base/task_queue_manager_perftest.cc index c1c6930..da1aa1e 100644 --- a/components/scheduler/base/task_queue_manager_perftest.cc +++ b/components/scheduler/base/task_queue_manager_perftest.cc @@ -4,6 +4,8 @@ #include "components/scheduler/base/task_queue_manager.h" +#include <stddef.h> + #include "base/bind.h" #include "base/threading/thread.h" #include "base/time/default_tick_clock.h" diff --git a/components/scheduler/base/task_queue_manager_unittest.cc b/components/scheduler/base/task_queue_manager_unittest.cc index b1b76d0..21cc6f1 100644 --- a/components/scheduler/base/task_queue_manager_unittest.cc +++ b/components/scheduler/base/task_queue_manager_unittest.cc @@ -4,6 +4,8 @@ #include "components/scheduler/base/task_queue_manager.h" +#include <stddef.h> + #include "base/location.h" #include "base/run_loop.h" #include "base/single_thread_task_runner.h" diff --git a/components/scheduler/base/task_queue_selector.h b/components/scheduler/base/task_queue_selector.h index c594657..c0703d1 100644 --- a/components/scheduler/base/task_queue_selector.h +++ b/components/scheduler/base/task_queue_selector.h @@ -5,9 +5,12 @@ #ifndef COMPONENTS_SCHEDULER_BASE_TASK_QUEUE_SELECTOR_H_ #define COMPONENTS_SCHEDULER_BASE_TASK_QUEUE_SELECTOR_H_ +#include <stddef.h> + #include <set> #include "base/compiler_specific.h" +#include "base/macros.h" #include "base/pending_task.h" #include "base/threading/thread_checker.h" #include "components/scheduler/base/work_queue_sets.h" diff --git a/components/scheduler/base/task_queue_selector_unittest.cc b/components/scheduler/base/task_queue_selector_unittest.cc index ad50960..1f1d0dc 100644 --- a/components/scheduler/base/task_queue_selector_unittest.cc +++ b/components/scheduler/base/task_queue_selector_unittest.cc @@ -4,7 +4,10 @@ #include "components/scheduler/base/task_queue_selector.h" +#include <stddef.h> + #include "base/bind.h" +#include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "base/pending_task.h" #include "components/scheduler/base/task_queue_impl.h" diff --git a/components/scheduler/base/test_always_fail_time_source.h b/components/scheduler/base/test_always_fail_time_source.h index 9a48d93..ec6e73d 100644 --- a/components/scheduler/base/test_always_fail_time_source.h +++ b/components/scheduler/base/test_always_fail_time_source.h @@ -5,6 +5,7 @@ #ifndef COMPONENTS_SCHEDULER_BASE_TEST_ALWAYS_FAIL_TIME_SOURCE_H_ #define COMPONENTS_SCHEDULER_BASE_TEST_ALWAYS_FAIL_TIME_SOURCE_H_ +#include "base/macros.h" #include "base/time/tick_clock.h" namespace scheduler { diff --git a/components/scheduler/base/test_time_source.h b/components/scheduler/base/test_time_source.h index a09e939..9ff57f0 100644 --- a/components/scheduler/base/test_time_source.h +++ b/components/scheduler/base/test_time_source.h @@ -5,6 +5,7 @@ #ifndef COMPONENTS_SCHEDULER_BASE_TEST_TIME_SOURCE_H_ #define COMPONENTS_SCHEDULER_BASE_TEST_TIME_SOURCE_H_ +#include "base/macros.h" #include "base/memory/ref_counted.h" #include "base/test/simple_test_tick_clock.h" #include "base/time/tick_clock.h" diff --git a/components/scheduler/base/time_domain_unittest.cc b/components/scheduler/base/time_domain_unittest.cc index 568d373..b863dd1 100644 --- a/components/scheduler/base/time_domain_unittest.cc +++ b/components/scheduler/base/time_domain_unittest.cc @@ -4,6 +4,7 @@ #include "components/scheduler/base/time_domain.h" +#include "base/macros.h" #include "base/test/simple_test_tick_clock.h" #include "cc/test/ordered_simple_task_runner.h" #include "components/scheduler/base/task_queue_impl.h" diff --git a/components/scheduler/base/work_queue.h b/components/scheduler/base/work_queue.h index fb101f2..d13b71c7 100644 --- a/components/scheduler/base/work_queue.h +++ b/components/scheduler/base/work_queue.h @@ -5,6 +5,8 @@ #ifndef CONTENT_RENDERER_SCHEDULER_BASE_WORK_QUEUE_H_ #define CONTENT_RENDERER_SCHEDULER_BASE_WORK_QUEUE_H_ +#include <stddef.h> + #include <set> #include "base/trace_event/trace_event.h" diff --git a/components/scheduler/base/work_queue_sets.h b/components/scheduler/base/work_queue_sets.h index fdb6fe4..63ba7a0 100644 --- a/components/scheduler/base/work_queue_sets.h +++ b/components/scheduler/base/work_queue_sets.h @@ -5,6 +5,8 @@ #ifndef COMPONENTS_SCHEDULER_BASE_WORK_QUEUE_SETS_H_ #define COMPONENTS_SCHEDULER_BASE_WORK_QUEUE_SETS_H_ +#include <stddef.h> + #include <map> #include <vector> diff --git a/components/scheduler/base/work_queue_sets_unittest.cc b/components/scheduler/base/work_queue_sets_unittest.cc index c5aef58..c7f5e86 100644 --- a/components/scheduler/base/work_queue_sets_unittest.cc +++ b/components/scheduler/base/work_queue_sets_unittest.cc @@ -4,6 +4,8 @@ #include "components/scheduler/base/work_queue_sets.h" +#include <stddef.h> + #include "components/scheduler/base/work_queue.h" #include "testing/gmock/include/gmock/gmock.h" diff --git a/components/scheduler/child/child_scheduler.h b/components/scheduler/child/child_scheduler.h index b74be4e..5b582c8 100644 --- a/components/scheduler/child/child_scheduler.h +++ b/components/scheduler/child/child_scheduler.h @@ -5,6 +5,7 @@ #ifndef COMPONENTS_SCHEDULER_CHILD_CHILD_SCHEDULER_H_ #define COMPONENTS_SCHEDULER_CHILD_CHILD_SCHEDULER_H_ +#include "base/macros.h" #include "base/message_loop/message_loop.h" #include "components/scheduler/base/task_queue.h" #include "components/scheduler/child/single_thread_idle_task_runner.h" diff --git a/components/scheduler/child/idle_helper.h b/components/scheduler/child/idle_helper.h index 5b67380..333c867 100644 --- a/components/scheduler/child/idle_helper.h +++ b/components/scheduler/child/idle_helper.h @@ -5,6 +5,7 @@ #ifndef COMPONENTS_SCHEDULER_CHILD_IDLE_HELPER_H_ #define COMPONENTS_SCHEDULER_CHILD_IDLE_HELPER_H_ +#include "base/macros.h" #include "base/message_loop/message_loop.h" #include "components/scheduler/base/cancelable_closure_holder.h" #include "components/scheduler/base/task_queue_selector.h" diff --git a/components/scheduler/child/idle_helper_unittest.cc b/components/scheduler/child/idle_helper_unittest.cc index 54c70e6..2269a07 100644 --- a/components/scheduler/child/idle_helper_unittest.cc +++ b/components/scheduler/child/idle_helper_unittest.cc @@ -5,6 +5,7 @@ #include "components/scheduler/child/idle_helper.h" #include "base/callback.h" +#include "base/macros.h" #include "base/test/simple_test_tick_clock.h" #include "cc/test/ordered_simple_task_runner.h" #include "components/scheduler/base/real_time_domain.h" diff --git a/components/scheduler/child/scheduler_helper.h b/components/scheduler/child/scheduler_helper.h index ee727f7..a104204 100644 --- a/components/scheduler/child/scheduler_helper.h +++ b/components/scheduler/child/scheduler_helper.h @@ -5,6 +5,9 @@ #ifndef COMPONENTS_SCHEDULER_CHILD_SCHEDULER_HELPER_H_ #define COMPONENTS_SCHEDULER_CHILD_SCHEDULER_HELPER_H_ +#include <stddef.h> + +#include "base/macros.h" #include "base/time/tick_clock.h" #include "components/scheduler/base/task_queue_manager.h" #include "components/scheduler/base/task_queue_selector.h" diff --git a/components/scheduler/child/scheduler_helper_unittest.cc b/components/scheduler/child/scheduler_helper_unittest.cc index 8f7a649..f8f0f5a 100644 --- a/components/scheduler/child/scheduler_helper_unittest.cc +++ b/components/scheduler/child/scheduler_helper_unittest.cc @@ -5,6 +5,7 @@ #include "components/scheduler/child/scheduler_helper.h" #include "base/callback.h" +#include "base/macros.h" #include "base/test/simple_test_tick_clock.h" #include "cc/test/ordered_simple_task_runner.h" #include "components/scheduler/base/task_queue.h" diff --git a/components/scheduler/child/single_thread_idle_task_runner.h b/components/scheduler/child/single_thread_idle_task_runner.h index 1c58282..0f5c731 100644 --- a/components/scheduler/child/single_thread_idle_task_runner.h +++ b/components/scheduler/child/single_thread_idle_task_runner.h @@ -7,6 +7,7 @@ #include "base/bind.h" #include "base/callback.h" +#include "base/macros.h" #include "base/memory/ref_counted.h" #include "base/single_thread_task_runner.h" #include "base/time/time.h" diff --git a/components/scheduler/child/webthread_impl_for_worker_scheduler_unittest.cc b/components/scheduler/child/webthread_impl_for_worker_scheduler_unittest.cc index 1f79c5c..6cdc497 100644 --- a/components/scheduler/child/webthread_impl_for_worker_scheduler_unittest.cc +++ b/components/scheduler/child/webthread_impl_for_worker_scheduler_unittest.cc @@ -4,6 +4,7 @@ #include "components/scheduler/child/webthread_impl_for_worker_scheduler.h" +#include "base/macros.h" #include "base/synchronization/waitable_event.h" #include "components/scheduler/child/web_scheduler_impl.h" #include "components/scheduler/child/worker_scheduler_impl.h" diff --git a/components/scheduler/child/worker_scheduler.h b/components/scheduler/child/worker_scheduler.h index a6163b6..b5bd250 100644 --- a/components/scheduler/child/worker_scheduler.h +++ b/components/scheduler/child/worker_scheduler.h @@ -5,6 +5,7 @@ #ifndef COMPONENTS_SCHEDULER_CHILD_WORKER_SCHEDULER_H_ #define COMPONENTS_SCHEDULER_CHILD_WORKER_SCHEDULER_H_ +#include "base/macros.h" #include "base/message_loop/message_loop.h" #include "components/scheduler/child/child_scheduler.h" #include "components/scheduler/child/single_thread_idle_task_runner.h" diff --git a/components/scheduler/child/worker_scheduler_impl.h b/components/scheduler/child/worker_scheduler_impl.h index e854cc9..83446cf 100644 --- a/components/scheduler/child/worker_scheduler_impl.h +++ b/components/scheduler/child/worker_scheduler_impl.h @@ -5,6 +5,7 @@ #ifndef COMPONENTS_SCHEDULER_CHILD_WORKER_SCHEDULER_IMPL_H_ #define COMPONENTS_SCHEDULER_CHILD_WORKER_SCHEDULER_IMPL_H_ +#include "base/macros.h" #include "components/scheduler/child/idle_helper.h" #include "components/scheduler/child/scheduler_helper.h" #include "components/scheduler/child/worker_scheduler.h" diff --git a/components/scheduler/child/worker_scheduler_impl_unittest.cc b/components/scheduler/child/worker_scheduler_impl_unittest.cc index 06792d4..4f00419 100644 --- a/components/scheduler/child/worker_scheduler_impl_unittest.cc +++ b/components/scheduler/child/worker_scheduler_impl_unittest.cc @@ -5,6 +5,7 @@ #include "components/scheduler/child/worker_scheduler_impl.h" #include "base/callback.h" +#include "base/macros.h" #include "base/strings/stringprintf.h" #include "base/test/simple_test_tick_clock.h" #include "cc/test/ordered_simple_task_runner.h" diff --git a/components/scheduler/renderer/idle_time_estimator.h b/components/scheduler/renderer/idle_time_estimator.h index af00fbb..3664a38 100644 --- a/components/scheduler/renderer/idle_time_estimator.h +++ b/components/scheduler/renderer/idle_time_estimator.h @@ -5,6 +5,7 @@ #ifndef COMPONENTS_SCHEDULER_RENDERER_IDLE_TIME_ESTIMATOR_H_ #define COMPONENTS_SCHEDULER_RENDERER_IDLE_TIME_ESTIMATOR_H_ +#include "base/macros.h" #include "base/message_loop/message_loop.h" #include "base/time/tick_clock.h" #include "cc/base/rolling_time_delta_history.h" diff --git a/components/scheduler/renderer/render_widget_signals_unittest.cpp b/components/scheduler/renderer/render_widget_signals_unittest.cpp index 3086dd8..e167a8d 100644 --- a/components/scheduler/renderer/render_widget_signals_unittest.cpp +++ b/components/scheduler/renderer/render_widget_signals_unittest.cpp @@ -4,6 +4,7 @@ #include "components/scheduler/renderer/render_widget_signals.h" +#include "base/macros.h" #include "components/scheduler/renderer/render_widget_scheduling_state.h" #include "testing/gmock/include/gmock/gmock.h" #include "testing/gtest/include/gtest/gtest.h" diff --git a/components/scheduler/renderer/renderer_scheduler.h b/components/scheduler/renderer/renderer_scheduler.h index ef6621a..b9a542b 100644 --- a/components/scheduler/renderer/renderer_scheduler.h +++ b/components/scheduler/renderer/renderer_scheduler.h @@ -5,6 +5,7 @@ #ifndef COMPONENTS_SCHEDULER_RENDERER_RENDERER_SCHEDULER_H_ #define COMPONENTS_SCHEDULER_RENDERER_RENDERER_SCHEDULER_H_ +#include "base/macros.h" #include "base/message_loop/message_loop.h" #include "components/scheduler/child/child_scheduler.h" #include "components/scheduler/child/single_thread_idle_task_runner.h" diff --git a/components/scheduler/renderer/renderer_scheduler_impl.h b/components/scheduler/renderer/renderer_scheduler_impl.h index 31b549b..00dd103 100644 --- a/components/scheduler/renderer/renderer_scheduler_impl.h +++ b/components/scheduler/renderer/renderer_scheduler_impl.h @@ -6,6 +6,7 @@ #define COMPONENTS_SCHEDULER_RENDERER_RENDERER_SCHEDULER_IMPL_H_ #include "base/atomicops.h" +#include "base/macros.h" #include "base/synchronization/lock.h" #include "components/scheduler/base/pollable_thread_safe_flag.h" #include "components/scheduler/child/idle_helper.h" diff --git a/components/scheduler/renderer/renderer_scheduler_impl_unittest.cc b/components/scheduler/renderer/renderer_scheduler_impl_unittest.cc index ce48b4c..d11fcf9 100644 --- a/components/scheduler/renderer/renderer_scheduler_impl_unittest.cc +++ b/components/scheduler/renderer/renderer_scheduler_impl_unittest.cc @@ -5,6 +5,7 @@ #include "components/scheduler/renderer/renderer_scheduler_impl.h" #include "base/callback.h" +#include "base/macros.h" #include "base/test/simple_test_tick_clock.h" #include "cc/output/begin_frame_args.h" #include "cc/test/ordered_simple_task_runner.h" diff --git a/components/scheduler/renderer/task_cost_estimator.h b/components/scheduler/renderer/task_cost_estimator.h index fa0f4c4..c4e43c4 100644 --- a/components/scheduler/renderer/task_cost_estimator.h +++ b/components/scheduler/renderer/task_cost_estimator.h @@ -5,6 +5,7 @@ #ifndef COMPONENTS_SCHEDULER_RENDERER_TASK_COST_ESTIMATOR_H_ #define COMPONENTS_SCHEDULER_RENDERER_TASK_COST_ESTIMATOR_H_ +#include "base/macros.h" #include "base/message_loop/message_loop.h" #include "base/time/time.h" #include "cc/base/rolling_time_delta_history.h" diff --git a/components/scheduler/renderer/throttling_helper_unittest.cc b/components/scheduler/renderer/throttling_helper_unittest.cc index ff82aa3..cc2df55 100644 --- a/components/scheduler/renderer/throttling_helper_unittest.cc +++ b/components/scheduler/renderer/throttling_helper_unittest.cc @@ -4,7 +4,10 @@ #include "components/scheduler/renderer/throttling_helper.h" +#include <stddef.h> + #include "base/callback.h" +#include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "base/test/simple_test_tick_clock.h" #include "cc/test/ordered_simple_task_runner.h" diff --git a/components/scheduler/renderer/webthread_impl_for_renderer_scheduler_unittest.cc b/components/scheduler/renderer/webthread_impl_for_renderer_scheduler_unittest.cc index c19e75e..98d8798 100644 --- a/components/scheduler/renderer/webthread_impl_for_renderer_scheduler_unittest.cc +++ b/components/scheduler/renderer/webthread_impl_for_renderer_scheduler_unittest.cc @@ -4,7 +4,10 @@ #include "components/scheduler/renderer/webthread_impl_for_renderer_scheduler.h" +#include <stddef.h> + #include "base/location.h" +#include "base/macros.h" #include "base/run_loop.h" #include "base/single_thread_task_runner.h" #include "base/test/simple_test_tick_clock.h" diff --git a/components/scheduler/test/lazy_scheduler_message_loop_delegate_for_tests.h b/components/scheduler/test/lazy_scheduler_message_loop_delegate_for_tests.h index 84fd46d..0fca7f5 100644 --- a/components/scheduler/test/lazy_scheduler_message_loop_delegate_for_tests.h +++ b/components/scheduler/test/lazy_scheduler_message_loop_delegate_for_tests.h @@ -5,6 +5,7 @@ #ifndef COMPONENTS_SCHEDULER_TEST_LAZY_SCHEDULER_MESSAGE_LOOP_DELEGATE_FOR_TESTS_H_ #define COMPONENTS_SCHEDULER_TEST_LAZY_SCHEDULER_MESSAGE_LOOP_DELEGATE_FOR_TESTS_H_ +#include "base/macros.h" #include "base/message_loop/message_loop.h" #include "base/time/tick_clock.h" #include "components/scheduler/child/scheduler_tqm_delegate.h" diff --git a/components/search/search.cc b/components/search/search.cc index 1d0d6ada..807e476 100644 --- a/components/search/search.cc +++ b/components/search/search.cc @@ -4,12 +4,15 @@ #include "components/search/search.h" +#include <stddef.h> + #include "base/command_line.h" #include "base/metrics/field_trial.h" #include "base/strings/string_number_conversions.h" #include "base/strings/string_split.h" #include "base/strings/string_util.h" #include "base/strings/utf_string_conversions.h" +#include "build/build_config.h" #include "components/google/core/browser/google_util.h" #include "components/search/search_switches.h" #include "components/search_engines/template_url.h" @@ -29,13 +32,13 @@ namespace { const char kEmbeddedPageVersionFlagName[] = "espv"; #if defined(OS_IOS) -const uint64 kEmbeddedPageVersionDefault = 1; +const uint64_t kEmbeddedPageVersionDefault = 1; #elif defined(OS_ANDROID) -const uint64 kEmbeddedPageVersionDefault = 1; +const uint64_t kEmbeddedPageVersionDefault = 1; // Use this variant to enable EmbeddedSearch SearchBox API in the results page. -const uint64 kEmbeddedSearchEnabledVersion = 2; +const uint64_t kEmbeddedSearchEnabledVersion = 2; #else -const uint64 kEmbeddedPageVersionDefault = 2; +const uint64_t kEmbeddedPageVersionDefault = 2; #endif // Constants for the field trial name and group prefix. @@ -83,7 +86,7 @@ bool IsInstantExtendedAPIEnabled() { // Determine what embedded search page version to request from the user's // default search provider. If 0, the embedded search UI should not be enabled. -uint64 EmbeddedSearchPageVersion() { +uint64_t EmbeddedSearchPageVersion() { #if defined(OS_ANDROID) if (base::CommandLine::ForCurrentProcess()->HasSwitch( switches::kEnableEmbeddedSearchAPI)) { @@ -143,12 +146,12 @@ std::string GetStringValueForFlagWithDefault(const std::string& flag, return default_value; } -// Given a FieldTrialFlags object, returns the uint64 value of the provided +// Given a FieldTrialFlags object, returns the uint64_t value of the provided // flag. -uint64 GetUInt64ValueForFlagWithDefault(const std::string& flag, - uint64 default_value, - const FieldTrialFlags& flags) { - uint64 value; +uint64_t GetUInt64ValueForFlagWithDefault(const std::string& flag, + uint64_t default_value, + const FieldTrialFlags& flags) { + uint64_t value; std::string str_value = GetStringValueForFlagWithDefault(flag, std::string(), flags); if (base::StringToUint64(str_value, &value)) diff --git a/components/search/search.h b/components/search/search.h index 2ce6204..3907f85 100644 --- a/components/search/search.h +++ b/components/search/search.h @@ -5,11 +5,12 @@ #ifndef COMPONENTS_SEARCH_SEARCH_H_ #define COMPONENTS_SEARCH_SEARCH_H_ +#include <stdint.h> + #include <string> #include <utility> #include <vector> -#include "base/basictypes.h" #include "base/strings/string16.h" #include "base/strings/string_split.h" @@ -28,7 +29,7 @@ bool IsInstantExtendedAPIEnabled(); // Returns the value to pass to the &espv CGI parameter when loading the // embedded search page from the user's default search provider. Returns 0 if // the Instant Extended API is not enabled. -uint64 EmbeddedSearchPageVersion(); +uint64_t EmbeddedSearchPageVersion(); // Type for a collection of experiment configuration parameters. typedef base::StringPairs FieldTrialFlags; @@ -49,12 +50,12 @@ std::string GetStringValueForFlagWithDefault(const std::string& flag, const std::string& default_value, const FieldTrialFlags& flags); -// Given a FieldTrialFlags object, returns the uint64 value of the provided +// Given a FieldTrialFlags object, returns the uint64_t value of the provided // flag. // Exposed for testing only. -uint64 GetUInt64ValueForFlagWithDefault(const std::string& flag, - uint64 default_value, - const FieldTrialFlags& flags); +uint64_t GetUInt64ValueForFlagWithDefault(const std::string& flag, + uint64_t default_value, + const FieldTrialFlags& flags); // Given a FieldTrialFlags object, returns the bool value of the provided flag. // Exposed for testing only. diff --git a/components/search/search_switches.cc b/components/search/search_switches.cc index d3b80da..6d4b47d 100644 --- a/components/search/search_switches.cc +++ b/components/search/search_switches.cc @@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#include "build/build_config.h" #include "components/search/search_switches.h" namespace switches { diff --git a/components/search/search_unittest.cc b/components/search/search_unittest.cc index 4a5db38..76b8bce 100644 --- a/components/search/search_unittest.cc +++ b/components/search/search_unittest.cc @@ -6,6 +6,7 @@ #include "base/metrics/field_trial.h" #include "base/metrics/statistics_recorder.h" +#include "build/build_config.h" #include "components/variations/entropy_provider.h" #include "testing/gtest/include/gtest/gtest.h" diff --git a/components/search_engines/default_search_manager.cc b/components/search_engines/default_search_manager.cc index 000a071..8a96d8d 100644 --- a/components/search_engines/default_search_manager.cc +++ b/components/search_engines/default_search_manager.cc @@ -4,6 +4,9 @@ #include "components/search_engines/default_search_manager.h" +#include <stddef.h> +#include <stdint.h> + #include <algorithm> #include <utility> @@ -354,13 +357,13 @@ void DefaultSearchManager::LoadDefaultSearchEngineFromPrefs() { url_dict->GetString(kDateCreated, &date_created_str); url_dict->GetString(kLastModified, &last_modified_str); - int64 date_created = 0; + int64_t date_created = 0; if (base::StringToInt64(date_created_str, &date_created)) { prefs_default_search_->date_created = base::Time::FromInternalValue(date_created); } - int64 last_modified = 0; + int64_t last_modified = 0; if (base::StringToInt64(date_created_str, &last_modified)) { prefs_default_search_->last_modified = base::Time::FromInternalValue(last_modified); diff --git a/components/search_engines/default_search_manager_unittest.cc b/components/search_engines/default_search_manager_unittest.cc index df60ee5..25fe02c 100644 --- a/components/search_engines/default_search_manager_unittest.cc +++ b/components/search_engines/default_search_manager_unittest.cc @@ -2,7 +2,10 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#include <stddef.h> + #include "base/files/scoped_temp_dir.h" +#include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "base/strings/string_split.h" #include "base/strings/string_util.h" diff --git a/components/search_engines/default_search_policy_handler.cc b/components/search_engines/default_search_policy_handler.cc index 38df010..6e6172d 100644 --- a/components/search_engines/default_search_policy_handler.cc +++ b/components/search_engines/default_search_policy_handler.cc @@ -4,6 +4,9 @@ #include "components/search_engines/default_search_policy_handler.h" +#include <stddef.h> + +#include "base/macros.h" #include "base/prefs/pref_value_map.h" #include "base/stl_util.h" #include "base/strings/string_number_conversions.h" diff --git a/components/search_engines/default_search_policy_handler.h b/components/search_engines/default_search_policy_handler.h index 5b1a88a..e406ca2 100644 --- a/components/search_engines/default_search_policy_handler.h +++ b/components/search_engines/default_search_policy_handler.h @@ -7,6 +7,7 @@ #include <vector> +#include "base/macros.h" #include "components/policy/core/browser/configuration_policy_handler.h" namespace policy { diff --git a/components/search_engines/default_search_pref_migration.cc b/components/search_engines/default_search_pref_migration.cc index 0abcd43..bf1835a 100644 --- a/components/search_engines/default_search_pref_migration.cc +++ b/components/search_engines/default_search_pref_migration.cc @@ -4,6 +4,9 @@ #include "components/search_engines/default_search_pref_migration.h" +#include <stddef.h> +#include <stdint.h> + #include "base/bind.h" #include "base/bind_helpers.h" #include "base/logging.h" @@ -82,7 +85,7 @@ scoped_ptr<TemplateURLData> LoadDefaultSearchProviderFromLegacyPrefs( std::string id_string = prefs->GetString(prefs::kDefaultSearchProviderID); if (!id_string.empty()) { - int64 value; + int64_t value; base::StringToInt64(id_string, &value); default_provider_data->id = value; } diff --git a/components/search_engines/default_search_pref_migration_unittest.cc b/components/search_engines/default_search_pref_migration_unittest.cc index 73d9d0b..d2d1510 100644 --- a/components/search_engines/default_search_pref_migration_unittest.cc +++ b/components/search_engines/default_search_pref_migration_unittest.cc @@ -4,6 +4,8 @@ #include "components/search_engines/default_search_pref_migration.h" +#include <stddef.h> + #include <string> #include "base/compiler_specific.h" diff --git a/components/search_engines/default_search_pref_test_util.h b/components/search_engines/default_search_pref_test_util.h index 53484e6..095abd4 100644 --- a/components/search_engines/default_search_pref_test_util.h +++ b/components/search_engines/default_search_pref_test_util.h @@ -7,7 +7,6 @@ #include <string> -#include "base/basictypes.h" #include "base/memory/scoped_ptr.h" #include "base/values.h" #include "components/search_engines/default_search_manager.h" diff --git a/components/search_engines/desktop_search_win_unittest.cc b/components/search_engines/desktop_search_win_unittest.cc index a49e3ef..6556cd8 100644 --- a/components/search_engines/desktop_search_win_unittest.cc +++ b/components/search_engines/desktop_search_win_unittest.cc @@ -4,6 +4,8 @@ #include "components/search_engines/desktop_search_win.h" +#include <stddef.h> + #include "base/macros.h" #include "base/strings/string16.h" #include "components/search_engines/testing_search_terms_data.h" diff --git a/components/search_engines/detect_desktop_search_win_unittest.cc b/components/search_engines/detect_desktop_search_win_unittest.cc index e3477a6..d1c6ecd 100644 --- a/components/search_engines/detect_desktop_search_win_unittest.cc +++ b/components/search_engines/detect_desktop_search_win_unittest.cc @@ -4,6 +4,8 @@ #include "components/search_engines/detect_desktop_search_win.h" +#include <stddef.h> + #include "base/macros.h" #include "base/strings/string16.h" #include "components/search_engines/testing_search_terms_data.h" diff --git a/components/search_engines/keyword_table.cc b/components/search_engines/keyword_table.cc index 2964102..b7d56a1 100644 --- a/components/search_engines/keyword_table.cc +++ b/components/search_engines/keyword_table.cc @@ -4,6 +4,8 @@ #include "components/search_engines/keyword_table.h" +#include <stddef.h> + #include <set> #include "base/json/json_reader.h" @@ -253,12 +255,12 @@ bool KeywordTable::GetKeywords(Keywords* keywords) { return succeeded; } -bool KeywordTable::SetDefaultSearchProviderID(int64 id) { +bool KeywordTable::SetDefaultSearchProviderID(int64_t id) { return meta_table_->SetValue(kDefaultSearchProviderKey, id); } -int64 KeywordTable::GetDefaultSearchProviderID() { - int64 value = kInvalidTemplateURLID; +int64_t KeywordTable::GetDefaultSearchProviderID() { + int64_t value = kInvalidTemplateURLID; meta_table_->GetValue(kDefaultSearchProviderKey, &value); return value; } diff --git a/components/search_engines/keyword_table.h b/components/search_engines/keyword_table.h index ef45694..2ac8695 100644 --- a/components/search_engines/keyword_table.h +++ b/components/search_engines/keyword_table.h @@ -5,11 +5,14 @@ #ifndef COMPONENTS_SEARCH_ENGINES_KEYWORD_TABLE_H_ #define COMPONENTS_SEARCH_ENGINES_KEYWORD_TABLE_H_ +#include <stdint.h> + #include <string> #include <vector> #include "base/compiler_specific.h" #include "base/gtest_prod_util.h" +#include "base/macros.h" #include "base/strings/string16.h" #include "components/search_engines/template_url_id.h" #include "components/webdata/common/web_database_table.h" @@ -114,8 +117,8 @@ class KeywordTable : public WebDatabaseTable { bool GetKeywords(Keywords* keywords); // ID (TemplateURLData->id) of the default search provider. - bool SetDefaultSearchProviderID(int64 id); - int64 GetDefaultSearchProviderID(); + bool SetDefaultSearchProviderID(int64_t id); + int64_t GetDefaultSearchProviderID(); // Version of the built-in keywords. bool SetBuiltinKeywordVersion(int version); diff --git a/components/search_engines/keyword_table_unittest.cc b/components/search_engines/keyword_table_unittest.cc index 70c83fc..39b9aa2 100644 --- a/components/search_engines/keyword_table_unittest.cc +++ b/components/search_engines/keyword_table_unittest.cc @@ -6,6 +6,7 @@ #include <vector> #include "base/files/scoped_temp_dir.h" +#include "base/macros.h" #include "base/stl_util.h" #include "base/strings/string_number_conversions.h" #include "base/strings/utf_string_conversions.h" diff --git a/components/search_engines/keyword_web_data_service.h b/components/search_engines/keyword_web_data_service.h index 280a446..ea4baa1 100644 --- a/components/search_engines/keyword_web_data_service.h +++ b/components/search_engines/keyword_web_data_service.h @@ -5,6 +5,10 @@ #ifndef COMPONENTS_SEARCH_ENGINES_KEYWORD_WEB_DATA_SERVICE_H__ #define COMPONENTS_SEARCH_ENGINES_KEYWORD_WEB_DATA_SERVICE_H__ +#include <stddef.h> +#include <stdint.h> + +#include "base/macros.h" #include "base/memory/ref_counted.h" #include "components/search_engines/keyword_table.h" #include "components/search_engines/template_url_id.h" @@ -26,7 +30,7 @@ struct WDKeywordsResult { KeywordTable::Keywords keywords; // Identifies the ID of the TemplateURL that is the default search. A value of // 0 indicates there is no default search provider. - int64 default_search_provider_id; + int64_t default_search_provider_id; // Version of the built-in keywords. A value of 0 indicates a first run. int builtin_keyword_version; }; diff --git a/components/search_engines/search_engine_data_type_controller.h b/components/search_engines/search_engine_data_type_controller.h index 60a9da3..5ec3119 100644 --- a/components/search_engines/search_engine_data_type_controller.h +++ b/components/search_engines/search_engine_data_type_controller.h @@ -7,6 +7,7 @@ #include <string> +#include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "components/search_engines/template_url_service.h" #include "components/sync_driver/ui_data_type_controller.h" diff --git a/components/search_engines/search_host_to_urls_map.h b/components/search_engines/search_host_to_urls_map.h index 6c580b5..0235ce5 100644 --- a/components/search_engines/search_host_to_urls_map.h +++ b/components/search_engines/search_host_to_urls_map.h @@ -9,7 +9,7 @@ #include <set> #include <string> -#include "base/basictypes.h" +#include "base/macros.h" #include "components/search_engines/template_url_service.h" // Holds the host to template url mappings for the search providers. WARNING: diff --git a/components/search_engines/search_host_to_urls_map_unittest.cc b/components/search_engines/search_host_to_urls_map_unittest.cc index 1e79294..7c635cd 100644 --- a/components/search_engines/search_host_to_urls_map_unittest.cc +++ b/components/search_engines/search_host_to_urls_map_unittest.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 "base/basictypes.h" +#include <stddef.h> + +#include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "components/search_engines/search_host_to_urls_map.h" #include "components/search_engines/search_terms_data.h" diff --git a/components/search_engines/search_terms_data.h b/components/search_engines/search_terms_data.h index 96c8854..2cd5951 100644 --- a/components/search_engines/search_terms_data.h +++ b/components/search_engines/search_terms_data.h @@ -7,8 +7,8 @@ #include <string> -#include "base/basictypes.h" #include "base/compiler_specific.h" +#include "base/macros.h" #include "base/strings/string16.h" // All data needed by TemplateURLRef::ReplaceSearchTerms which typically may diff --git a/components/search_engines/template_url.cc b/components/search_engines/template_url.cc index 4bc4891..b5baebe 100644 --- a/components/search_engines/template_url.cc +++ b/components/search_engines/template_url.cc @@ -7,12 +7,12 @@ #include <string> #include <vector> -#include "base/basictypes.h" #include "base/command_line.h" #include "base/format_macros.h" #include "base/i18n/icu_string_conversions.h" #include "base/i18n/rtl.h" #include "base/logging.h" +#include "base/macros.h" #include "base/metrics/field_trial.h" #include "base/rand_util.h" #include "base/strings/string_number_conversions.h" @@ -21,6 +21,7 @@ #include "base/strings/string_util.h" #include "base/strings/stringprintf.h" #include "base/strings/utf_string_conversions.h" +#include "build/build_config.h" #include "components/google/core/browser/google_util.h" #include "components/metrics/proto/omnibox_input_type.pb.h" #include "components/search_engines/search_engines_switches.h" diff --git a/components/search_engines/template_url.h b/components/search_engines/template_url.h index 20919cf..1c377af6 100644 --- a/components/search_engines/template_url.h +++ b/components/search_engines/template_url.h @@ -5,11 +5,14 @@ #ifndef COMPONENTS_SEARCH_ENGINES_TEMPLATE_URL_H_ #define COMPONENTS_SEARCH_ENGINES_TEMPLATE_URL_H_ +#include <stddef.h> + #include <string> #include <utility> #include <vector> #include "base/gtest_prod_util.h" +#include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "base/time/time.h" #include "components/metrics/proto/omnibox_event.pb.h" diff --git a/components/search_engines/template_url_fetcher.cc b/components/search_engines/template_url_fetcher.cc index 4ff12d0..2389eda 100644 --- a/components/search_engines/template_url_fetcher.cc +++ b/components/search_engines/template_url_fetcher.cc @@ -4,6 +4,7 @@ #include "build/build_config.h" +#include "base/macros.h" #include "components/search_engines/template_url_fetcher.h" #include "base/strings/string_number_conversions.h" diff --git a/components/search_engines/template_url_fetcher.h b/components/search_engines/template_url_fetcher.h index 8607acb..d66dda8 100644 --- a/components/search_engines/template_url_fetcher.h +++ b/components/search_engines/template_url_fetcher.h @@ -6,6 +6,7 @@ #define COMPONENTS_SEARCH_ENGINES_TEMPLATE_URL_FETCHER_H_ #include "base/callback_forward.h" +#include "base/macros.h" #include "base/memory/ref_counted.h" #include "base/memory/scoped_ptr.h" #include "base/memory/scoped_vector.h" diff --git a/components/search_engines/template_url_fetcher_unittest.cc b/components/search_engines/template_url_fetcher_unittest.cc index d0ddf9a..1dd5c59 100644 --- a/components/search_engines/template_url_fetcher_unittest.cc +++ b/components/search_engines/template_url_fetcher_unittest.cc @@ -2,10 +2,13 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#include <stddef.h> + #include <string> #include "base/callback_helpers.h" #include "base/files/file_util.h" +#include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "base/message_loop/message_loop.h" #include "base/path_service.h" diff --git a/components/search_engines/template_url_parser.cc b/components/search_engines/template_url_parser.cc index a09403d..1b7ebf2 100644 --- a/components/search_engines/template_url_parser.cc +++ b/components/search_engines/template_url_parser.cc @@ -4,11 +4,14 @@ #include "components/search_engines/template_url_parser.h" +#include <string.h> + #include <algorithm> #include <map> #include <vector> #include "base/logging.h" +#include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "base/strings/string_number_conversions.h" #include "base/strings/string_util.h" diff --git a/components/search_engines/template_url_parser.h b/components/search_engines/template_url_parser.h index f48c8f1..ead5906 100644 --- a/components/search_engines/template_url_parser.h +++ b/components/search_engines/template_url_parser.h @@ -5,9 +5,11 @@ #ifndef COMPONENTS_SEARCH_ENGINES_TEMPLATE_URL_PARSER_H_ #define COMPONENTS_SEARCH_ENGINES_TEMPLATE_URL_PARSER_H_ +#include <stddef.h> + #include <string> -#include "base/basictypes.h" +#include "base/macros.h" class SearchTermsData; class TemplateURL; diff --git a/components/search_engines/template_url_parser_unittest.cc b/components/search_engines/template_url_parser_unittest.cc index 1e7dc02..ceef65a 100644 --- a/components/search_engines/template_url_parser_unittest.cc +++ b/components/search_engines/template_url_parser_unittest.cc @@ -4,6 +4,7 @@ #include "base/files/file_util.h" #include "base/logging.h" +#include "base/macros.h" #include "base/path_service.h" #include "base/strings/utf_string_conversions.h" #include "chrome/common/chrome_paths.h" diff --git a/components/search_engines/template_url_prepopulate_data.cc b/components/search_engines/template_url_prepopulate_data.cc index 3edbcd4..4b15de4 100644 --- a/components/search_engines/template_url_prepopulate_data.cc +++ b/components/search_engines/template_url_prepopulate_data.cc @@ -9,12 +9,14 @@ #endif #include "base/logging.h" +#include "base/macros.h" #include "base/prefs/pref_service.h" #include "base/stl_util.h" #include "base/strings/string16.h" #include "base/strings/string_piece.h" #include "base/strings/string_util.h" #include "base/strings/utf_string_conversions.h" +#include "build/build_config.h" #include "components/google/core/browser/google_util.h" #include "components/pref_registry/pref_registry_syncable.h" #include "components/search_engines/prepopulated_engines.h" diff --git a/components/search_engines/template_url_prepopulate_data_unittest.cc b/components/search_engines/template_url_prepopulate_data_unittest.cc index 68bf84c..d7e6e45 100644 --- a/components/search_engines/template_url_prepopulate_data_unittest.cc +++ b/components/search_engines/template_url_prepopulate_data_unittest.cc @@ -2,8 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#include <stddef.h> + #include "base/command_line.h" #include "base/files/scoped_temp_dir.h" +#include "base/macros.h" #include "base/memory/scoped_vector.h" #include "base/strings/utf_string_conversions.h" #include "components/google/core/browser/google_switches.h" diff --git a/components/search_engines/template_url_service.h b/components/search_engines/template_url_service.h index 3797657..cec2251 100644 --- a/components/search_engines/template_url_service.h +++ b/components/search_engines/template_url_service.h @@ -5,6 +5,8 @@ #ifndef COMPONENTS_SEARCH_ENGINES_TEMPLATE_URL_SERVICE_H_ #define COMPONENTS_SEARCH_ENGINES_TEMPLATE_URL_SERVICE_H_ +#include <stddef.h> + #include <list> #include <map> #include <set> @@ -13,6 +15,7 @@ #include "base/callback_list.h" #include "base/gtest_prod_util.h" +#include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "base/observer_list.h" #include "base/prefs/pref_change_registrar.h" diff --git a/components/search_engines/template_url_service_sync_unittest.cc b/components/search_engines/template_url_service_sync_unittest.cc index 8d10dfc..68f3737 100644 --- a/components/search_engines/template_url_service_sync_unittest.cc +++ b/components/search_engines/template_url_service_sync_unittest.cc @@ -2,6 +2,9 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#include <stddef.h> + +#include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "base/memory/scoped_vector.h" #include "base/run_loop.h" diff --git a/components/search_engines/template_url_service_unittest.cc b/components/search_engines/template_url_service_unittest.cc index 6b85a57..a0e3ab2 100644 --- a/components/search_engines/template_url_service_unittest.cc +++ b/components/search_engines/template_url_service_unittest.cc @@ -4,9 +4,12 @@ #include "components/search_engines/template_url_service.h" +#include <stddef.h> + #include "base/bind.h" #include "base/bind_helpers.h" #include "base/callback.h" +#include "base/macros.h" #include "base/memory/ref_counted.h" #include "base/memory/scoped_ptr.h" #include "base/run_loop.h" diff --git a/components/search_engines/template_url_service_util_unittest.cc b/components/search_engines/template_url_service_util_unittest.cc index 9f944c5..00b2439 100644 --- a/components/search_engines/template_url_service_util_unittest.cc +++ b/components/search_engines/template_url_service_util_unittest.cc @@ -2,6 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#include <stddef.h> + #include "base/memory/scoped_vector.h" #include "base/strings/string_util.h" #include "base/strings/utf_string_conversions.h" diff --git a/components/search_engines/template_url_unittest.cc b/components/search_engines/template_url_unittest.cc index 2c941f7..8a0227b 100644 --- a/components/search_engines/template_url_unittest.cc +++ b/components/search_engines/template_url_unittest.cc @@ -2,8 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#include <stddef.h> + #include "base/base_paths.h" #include "base/command_line.h" +#include "base/macros.h" #include "base/strings/string_number_conversions.h" #include "base/strings/string_util.h" #include "base/strings/utf_string_conversions.h" diff --git a/components/search_engines/testing_search_terms_data.h b/components/search_engines/testing_search_terms_data.h index 132d522..b03c71b 100644 --- a/components/search_engines/testing_search_terms_data.h +++ b/components/search_engines/testing_search_terms_data.h @@ -5,6 +5,7 @@ #ifndef COMPONENTS_SEARCH_ENGINES_TESTING_SEARCH_TERMS_DATA_H_ #define COMPONENTS_SEARCH_ENGINES_TESTING_SEARCH_TERMS_DATA_H_ +#include "base/macros.h" #include "components/search_engines/search_terms_data.h" class TestingSearchTermsData : public SearchTermsData { diff --git a/components/search_engines/util.cc b/components/search_engines/util.cc index 01c9597..1247ce2 100644 --- a/components/search_engines/util.cc +++ b/components/search_engines/util.cc @@ -4,6 +4,9 @@ #include "components/search_engines/util.h" +#include <stddef.h> +#include <stdint.h> + #include <map> #include <set> #include <string> @@ -142,7 +145,7 @@ void RemoveDuplicatePrepopulateIDs( // If not found, returns NULL. TemplateURL* GetTemplateURLByID( const TemplateURLService::TemplateURLVector& template_urls, - int64 id) { + int64_t id) { for (TemplateURLService::TemplateURLVector::const_iterator i( template_urls.begin()); i != template_urls.end(); ++i) { if ((*i)->id() == id) { diff --git a/components/search_provider_logos/google_logo_api.cc b/components/search_provider_logos/google_logo_api.cc index 227f9c9..3f001f5 100644 --- a/components/search_provider_logos/google_logo_api.cc +++ b/components/search_provider_logos/google_logo_api.cc @@ -4,6 +4,8 @@ #include "components/search_provider_logos/google_logo_api.h" +#include <stdint.h> + #include <algorithm> #include "base/base64.h" @@ -118,7 +120,7 @@ scoped_ptr<EncodedLogo> GoogleParseLogoResponse( int time_to_live_ms; if (logo_dict->GetInteger("time_to_live", &time_to_live_ms)) { time_to_live = base::TimeDelta::FromMilliseconds( - std::min(static_cast<int64>(time_to_live_ms), kMaxTimeToLiveMS)); + std::min(static_cast<int64_t>(time_to_live_ms), kMaxTimeToLiveMS)); logo->metadata.can_show_after_expiration = false; } else { time_to_live = base::TimeDelta::FromMilliseconds(kMaxTimeToLiveMS); diff --git a/components/search_provider_logos/logo_cache.cc b/components/search_provider_logos/logo_cache.cc index 6f0ae36..4ceb6d8 100644 --- a/components/search_provider_logos/logo_cache.cc +++ b/components/search_provider_logos/logo_cache.cc @@ -4,6 +4,9 @@ #include "components/search_provider_logos/logo_cache.h" +#include <stddef.h> +#include <stdint.h> + #include "base/files/file_util.h" #include "base/json/json_reader.h" #include "base/json/json_writer.h" @@ -27,7 +30,7 @@ bool GetTimeValue(const base::DictionaryValue& dict, const std::string& key, base::Time* time) { std::string str; - int64 internal_time_value; + int64_t internal_time_value; if (dict.GetString(key, &str) && base::StringToInt64(str, &internal_time_value)) { *time = base::Time::FromInternalValue(internal_time_value); @@ -39,7 +42,7 @@ bool GetTimeValue(const base::DictionaryValue& dict, void SetTimeValue(base::DictionaryValue& dict, const std::string& key, const base::Time& time) { - int64 internal_time_value = time.ToInternalValue(); + int64_t internal_time_value = time.ToInternalValue(); dict.SetString(key, base::Int64ToString(internal_time_value)); } diff --git a/components/search_provider_logos/logo_cache.h b/components/search_provider_logos/logo_cache.h index de3230d..82fb57f 100644 --- a/components/search_provider_logos/logo_cache.h +++ b/components/search_provider_logos/logo_cache.h @@ -10,6 +10,7 @@ #include "base/callback.h" #include "base/files/file_path.h" #include "base/gtest_prod_util.h" +#include "base/macros.h" #include "base/memory/ref_counted.h" #include "base/memory/ref_counted_memory.h" #include "base/memory/scoped_ptr.h" diff --git a/components/search_provider_logos/logo_cache_unittest.cc b/components/search_provider_logos/logo_cache_unittest.cc index 7ed3447..744d9f1 100644 --- a/components/search_provider_logos/logo_cache_unittest.cc +++ b/components/search_provider_logos/logo_cache_unittest.cc @@ -4,6 +4,9 @@ #include "components/search_provider_logos/logo_cache.h" +#include <stddef.h> +#include <stdint.h> + #include <string> #include "base/bind.h" @@ -90,7 +93,7 @@ void ExpectLogosEqual(const EncodedLogo& expected_logo, // Removes 1 byte from the end of the file at |path|. void ShortenFile(base::FilePath path) { base::File file(path, base::File::FLAG_OPEN | base::File::FLAG_WRITE); - int64 file_length = file.GetLength(); + int64_t file_length = file.GetLength(); ASSERT_NE(file_length, 0); file.SetLength(file_length - 1); } diff --git a/components/search_provider_logos/logo_common.h b/components/search_provider_logos/logo_common.h index 86b5700..36577e7 100644 --- a/components/search_provider_logos/logo_common.h +++ b/components/search_provider_logos/logo_common.h @@ -5,6 +5,8 @@ #ifndef COMPONENTS_SEARCH_PROVIDER_LOGOS_LOGO_COMMON_H_ #define COMPONENTS_SEARCH_PROVIDER_LOGOS_LOGO_COMMON_H_ +#include <stdint.h> + #include <string> #include "base/memory/ref_counted.h" @@ -15,7 +17,7 @@ namespace search_provider_logos { // The maximum number of milliseconds that a logo can be cached. -extern const int64 kMaxTimeToLiveMS; +extern const int64_t kMaxTimeToLiveMS; struct LogoMetadata { LogoMetadata(); diff --git a/components/search_provider_logos/logo_tracker.cc b/components/search_provider_logos/logo_tracker.cc index fc98897..43536fe 100644 --- a/components/search_provider_logos/logo_tracker.cc +++ b/components/search_provider_logos/logo_tracker.cc @@ -20,7 +20,7 @@ namespace search_provider_logos { namespace { -const int64 kMaxDownloadBytes = 1024 * 1024; +const int64_t kMaxDownloadBytes = 1024 * 1024; //const int kDecodeLogoTimeoutSeconds = 30; @@ -320,8 +320,8 @@ void LogoTracker::OnURLFetchComplete(const net::URLFetcher* source) { } void LogoTracker::OnURLFetchDownloadProgress(const net::URLFetcher* source, - int64 current, - int64 total) { + int64_t current, + int64_t total) { if (total > kMaxDownloadBytes || current > kMaxDownloadBytes) { LOG(WARNING) << "Search provider logo exceeded download size limit"; ReturnToIdle(DOWNLOAD_OUTCOME_DOWNLOAD_FAILED); diff --git a/components/search_provider_logos/logo_tracker.h b/components/search_provider_logos/logo_tracker.h index d65d889..2a6ec21 100644 --- a/components/search_provider_logos/logo_tracker.h +++ b/components/search_provider_logos/logo_tracker.h @@ -5,11 +5,14 @@ #ifndef COMPONENTS_SEARCH_PROVIDER_LOGOS_LOGO_TRACKER_H_ #define COMPONENTS_SEARCH_PROVIDER_LOGOS_LOGO_TRACKER_H_ +#include <stdint.h> + #include <string> #include <vector> #include "base/callback.h" #include "base/files/file_path.h" +#include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "base/memory/weak_ptr.h" #include "base/observer_list.h" @@ -195,8 +198,8 @@ class LogoTracker : public net::URLFetcherDelegate { // net::URLFetcherDelegate: void OnURLFetchComplete(const net::URLFetcher* source) override; void OnURLFetchDownloadProgress(const net::URLFetcher* source, - int64 current, - int64 total) override; + int64_t current, + int64_t total) override; // The URL from which the logo is fetched. GURL logo_url_; diff --git a/components/search_provider_logos/logo_tracker_unittest.cc b/components/search_provider_logos/logo_tracker_unittest.cc index e84994b..b1a74f51 100644 --- a/components/search_provider_logos/logo_tracker_unittest.cc +++ b/components/search_provider_logos/logo_tracker_unittest.cc @@ -4,6 +4,7 @@ #include "components/search_provider_logos/logo_tracker.h" +#include <stddef.h> #include <stdint.h> #include <vector> diff --git a/components/security_interstitials/core/metrics_helper.h b/components/security_interstitials/core/metrics_helper.h index e610201..17b493d 100644 --- a/components/security_interstitials/core/metrics_helper.h +++ b/components/security_interstitials/core/metrics_helper.h @@ -7,6 +7,7 @@ #include <string> +#include "base/macros.h" #include "base/task/cancelable_task_tracker.h" #include "base/time/time.h" #include "components/rappor/rappor_service.h" diff --git a/components/service_tab_launcher/browser/android/service_tab_launcher.h b/components/service_tab_launcher/browser/android/service_tab_launcher.h index dffa3f9..f774893 100644 --- a/components/service_tab_launcher/browser/android/service_tab_launcher.h +++ b/components/service_tab_launcher/browser/android/service_tab_launcher.h @@ -8,6 +8,7 @@ #include "base/android/jni_android.h" #include "base/callback_forward.h" #include "base/id_map.h" +#include "base/macros.h" #include "base/memory/singleton.h" namespace content { diff --git a/components/service_tab_launcher/component_jni_registrar.cc b/components/service_tab_launcher/component_jni_registrar.cc index 69298f5..cb5b3c7 100644 --- a/components/service_tab_launcher/component_jni_registrar.cc +++ b/components/service_tab_launcher/component_jni_registrar.cc @@ -6,6 +6,7 @@ #include "base/android/jni_android.h" #include "base/android/jni_registrar.h" +#include "base/macros.h" #include "components/service_tab_launcher/browser/android/service_tab_launcher.h" namespace service_tab_launcher { diff --git a/components/session_manager/core/session_manager.cc b/components/session_manager/core/session_manager.cc index fe4669c..226f5dd 100644 --- a/components/session_manager/core/session_manager.cc +++ b/components/session_manager/core/session_manager.cc @@ -5,6 +5,7 @@ #include "components/session_manager/core/session_manager.h" #include "base/logging.h" +#include "build/build_config.h" #if defined(OS_CHROMEOS) #include "base/command_line.h" diff --git a/components/session_manager/core/session_manager.h b/components/session_manager/core/session_manager.h index fe2d50e..64a2132 100644 --- a/components/session_manager/core/session_manager.h +++ b/components/session_manager/core/session_manager.h @@ -5,6 +5,7 @@ #ifndef COMPONENTS_SESSION_MANAGER_CORE_SESSION_MANAGER_H_ #define COMPONENTS_SESSION_MANAGER_CORE_SESSION_MANAGER_H_ +#include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "components/session_manager/session_manager_export.h" diff --git a/components/sessions/content/content_live_tab.h b/components/sessions/content/content_live_tab.h index 14991fd..4d08f92 100644 --- a/components/sessions/content/content_live_tab.h +++ b/components/sessions/content/content_live_tab.h @@ -5,7 +5,7 @@ #ifndef COMPONENTS_SESSIONS_CONTENT_CONTENT_LIVE_TAB_H_ #define COMPONENTS_SESSIONS_CONTENT_CONTENT_LIVE_TAB_H_ -#include "base/basictypes.h" +#include "base/macros.h" #include "base/supports_user_data.h" #include "components/sessions/content/content_serialized_navigation_builder.h" #include "components/sessions/core/live_tab.h" diff --git a/components/sessions/content/content_serialized_navigation_driver.cc b/components/sessions/content/content_serialized_navigation_driver.cc index f3d9b00..a3305a8 100644 --- a/components/sessions/content/content_serialized_navigation_driver.cc +++ b/components/sessions/content/content_serialized_navigation_driver.cc @@ -5,6 +5,7 @@ #include "components/sessions/content/content_serialized_navigation_driver.h" #include "base/memory/singleton.h" +#include "build/build_config.h" #include "components/sessions/core/serialized_navigation_entry.h" #include "content/public/common/page_state.h" #include "content/public/common/referrer.h" diff --git a/components/sessions/core/base_session_service.h b/components/sessions/core/base_session_service.h index ffcc236..b770562 100644 --- a/components/sessions/core/base_session_service.h +++ b/components/sessions/core/base_session_service.h @@ -5,9 +5,9 @@ #ifndef COMPONENTS_SESSIONS_CORE_BASE_SESSION_SERVICE_H_ #define COMPONENTS_SESSIONS_CORE_BASE_SESSION_SERVICE_H_ -#include "base/basictypes.h" #include "base/callback.h" #include "base/files/file_path.h" +#include "base/macros.h" #include "base/memory/scoped_vector.h" #include "base/memory/weak_ptr.h" #include "base/task/cancelable_task_tracker.h" diff --git a/components/sessions/core/base_session_service_commands.cc b/components/sessions/core/base_session_service_commands.cc index f71eed6..ef273b2 100644 --- a/components/sessions/core/base_session_service_commands.cc +++ b/components/sessions/core/base_session_service_commands.cc @@ -4,6 +4,8 @@ #include "components/sessions/core/base_session_service_commands.h" +#include <stddef.h> + #include "base/pickle.h" #include "components/sessions/core/session_backend.h" #include "components/sessions/core/session_types.h" diff --git a/components/sessions/core/base_session_service_test_helper.h b/components/sessions/core/base_session_service_test_helper.h index a8092dd..438bbbd 100644 --- a/components/sessions/core/base_session_service_test_helper.h +++ b/components/sessions/core/base_session_service_test_helper.h @@ -5,8 +5,8 @@ #ifndef COMPONENTS_SESSIONS_CORE_BASE_SESSION_SERVICE_TEST_HELPER_H_ #define COMPONENTS_SESSIONS_CORE_BASE_SESSION_SERVICE_TEST_HELPER_H_ -#include "base/basictypes.h" #include "base/callback.h" +#include "base/macros.h" #include "base/memory/scoped_vector.h" #include "base/task/cancelable_task_tracker.h" diff --git a/components/sessions/core/in_memory_tab_restore_service.h b/components/sessions/core/in_memory_tab_restore_service.h index 3e69f1b..7cd162d 100644 --- a/components/sessions/core/in_memory_tab_restore_service.h +++ b/components/sessions/core/in_memory_tab_restore_service.h @@ -7,6 +7,7 @@ #include <vector> +#include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "components/sessions/core/sessions_export.h" #include "components/sessions/core/tab_restore_service.h" diff --git a/components/sessions/core/live_tab.h b/components/sessions/core/live_tab.h index f6be5e3..1f8e4b5 100644 --- a/components/sessions/core/live_tab.h +++ b/components/sessions/core/live_tab.h @@ -5,7 +5,6 @@ #ifndef COMPONENTS_SESSIONS_CORE_LIVE_TAB_H_ #define COMPONENTS_SESSIONS_CORE_LIVE_TAB_H_ -#include "base/basictypes.h" #include "components/sessions/core/serialized_navigation_entry.h" #include "components/sessions/core/sessions_export.h" #include "components/sessions/core/tab_restore_service.h" diff --git a/components/sessions/core/persistent_tab_restore_service.cc b/components/sessions/core/persistent_tab_restore_service.cc index 3231b04..fe68c7c 100644 --- a/components/sessions/core/persistent_tab_restore_service.cc +++ b/components/sessions/core/persistent_tab_restore_service.cc @@ -4,14 +4,17 @@ #include "components/sessions/core/persistent_tab_restore_service.h" -#include <cstring> // memcpy +#include <stddef.h> +#include <stdint.h> +#include <string.h> + #include <vector> -#include "base/basictypes.h" #include "base/bind.h" #include "base/compiler_specific.h" #include "base/files/file_path.h" #include "base/logging.h" +#include "base/macros.h" #include "base/memory/ref_counted.h" #include "base/memory/scoped_vector.h" #include "base/stl_util.h" @@ -30,7 +33,7 @@ namespace { // Only written if the tab is pinned. typedef bool PinnedStatePayload; -typedef int32 RestoredEntryPayload; +typedef int32_t RestoredEntryPayload; typedef std::map<SessionID::id_type, TabRestoreService::Entry*> IDToEntry; @@ -38,7 +41,7 @@ typedef std::map<SessionID::id_type, TabRestoreService::Entry*> IDToEntry; // used for backwards compat when it comes to reading the session files. struct SelectedNavigationInTabPayload { SessionID::id_type id; - int32 index; + int32_t index; }; // Payload used for the start of a window close. This is the old struct that is @@ -46,19 +49,19 @@ struct SelectedNavigationInTabPayload { // struct must be POD, because we memset the contents. struct WindowPayload { SessionID::id_type window_id; - int32 selected_tab_index; - int32 num_tabs; + int32_t selected_tab_index; + int32_t num_tabs; }; // Payload used for the start of a window close. This struct must be POD, // because we memset the contents. struct WindowPayload2 : WindowPayload { - int64 timestamp; + int64_t timestamp; }; // Payload used for the start of a tab close. struct SelectedNavigationInTabPayload2 : SelectedNavigationInTabPayload { - int64 timestamp; + int64_t timestamp; }; // Used to indicate what has loaded. @@ -166,7 +169,7 @@ class PersistentTabRestoreService::Delegate // Creates a tab close command. static scoped_ptr<SessionCommand> CreateSelectedNavigationInTabCommand( SessionID::id_type tab_id, - int32 index, + int32_t index, base::Time timestamp); // Creates a restore command. @@ -508,7 +511,7 @@ PersistentTabRestoreService::Delegate::CreateWindowCommand( scoped_ptr<SessionCommand> PersistentTabRestoreService::Delegate::CreateSelectedNavigationInTabCommand( SessionID::id_type tab_id, - int32 index, + int32_t index, base::Time timestamp) { SelectedNavigationInTabPayload2 payload; payload.id = tab_id; diff --git a/components/sessions/core/persistent_tab_restore_service.h b/components/sessions/core/persistent_tab_restore_service.h index 587d5af..2c43f1c 100644 --- a/components/sessions/core/persistent_tab_restore_service.h +++ b/components/sessions/core/persistent_tab_restore_service.h @@ -7,8 +7,8 @@ #include <vector> -#include "base/basictypes.h" #include "base/compiler_specific.h" +#include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "components/sessions/core/sessions_export.h" #include "components/sessions/core/tab_restore_service.h" diff --git a/components/sessions/core/serialized_navigation_entry.cc b/components/sessions/core/serialized_navigation_entry.cc index 746de64..8dfd8a2 100644 --- a/components/sessions/core/serialized_navigation_entry.cc +++ b/components/sessions/core/serialized_navigation_entry.cc @@ -4,6 +4,8 @@ #include "components/sessions/core/serialized_navigation_entry.h" +#include <stddef.h> + #include "base/pickle.h" #include "base/strings/utf_string_conversions.h" #include "components/sessions/core/serialized_navigation_driver.h" @@ -52,7 +54,7 @@ SerializedNavigationEntry SerializedNavigationEntry::FromSyncData( navigation.virtual_url_ = GURL(sync_data.virtual_url()); navigation.title_ = base::UTF8ToUTF16(sync_data.title()); - uint32 transition = 0; + uint32_t transition = 0; if (sync_data.has_page_transition()) { switch (sync_data.page_transition()) { case sync_pb::SyncEnums_PageTransition_LINK: @@ -293,7 +295,7 @@ bool SerializedNavigationEntry::ReadFromPickle(base::PickleIterator* iterator) { if (!iterator->ReadBool(&is_overriding_user_agent_)) is_overriding_user_agent_ = false; - int64 timestamp_internal_value = 0; + int64_t timestamp_internal_value = 0; if (iterator->ReadInt64(×tamp_internal_value)) { timestamp_ = base::Time::FromInternalValue(timestamp_internal_value); } else { diff --git a/components/sessions/core/serialized_navigation_entry.h b/components/sessions/core/serialized_navigation_entry.h index c0b01a08..7831ef4 100644 --- a/components/sessions/core/serialized_navigation_entry.h +++ b/components/sessions/core/serialized_navigation_entry.h @@ -5,11 +5,12 @@ #ifndef COMPONENTS_SESSIONS_CORE_SERIALIZED_NAVIGATION_ENTRY_H_ #define COMPONENTS_SESSIONS_CORE_SERIALIZED_NAVIGATION_ENTRY_H_ +#include <stdint.h> + #include <set> #include <string> #include <vector> -#include "base/basictypes.h" #include "base/memory/scoped_ptr.h" #include "base/strings/string16.h" #include "base/time/time.h" @@ -89,7 +90,7 @@ class SESSIONS_EXPORT SerializedNavigationEntry { return transition_type_; } bool has_post_data() const { return has_post_data_; } - int64 post_id() const { return post_id_; } + int64_t post_id() const { return post_id_; } const GURL& original_request_url() const { return original_request_url_; } bool is_overriding_user_agent() const { return is_overriding_user_agent_; } base::Time timestamp() const { return timestamp_; } @@ -126,7 +127,7 @@ class SESSIONS_EXPORT SerializedNavigationEntry { std::string encoded_page_state_; ui::PageTransition transition_type_; bool has_post_data_; - int64 post_id_; + int64_t post_id_; GURL original_request_url_; bool is_overriding_user_agent_; base::Time timestamp_; diff --git a/components/sessions/core/serialized_navigation_entry_test_helper.cc b/components/sessions/core/serialized_navigation_entry_test_helper.cc index 6d41e8a..638ffce 100644 --- a/components/sessions/core/serialized_navigation_entry_test_helper.cc +++ b/components/sessions/core/serialized_navigation_entry_test_helper.cc @@ -28,7 +28,7 @@ const ui::PageTransition kTransitionType = ui::PAGE_TRANSITION_HOME_PAGE | ui::PAGE_TRANSITION_CLIENT_REDIRECT); const bool kHasPostData = true; -const int64 kPostID = 100; +const int64_t kPostID = 100; const GURL kOriginalRequestURL = GURL("http://www.original-request.com"); const bool kIsOverridingUserAgent = true; const base::Time kTimestamp = syncer::ProtoTimeToTime(100); diff --git a/components/sessions/core/serialized_navigation_entry_test_helper.h b/components/sessions/core/serialized_navigation_entry_test_helper.h index 54f070f..ca415e1 100644 --- a/components/sessions/core/serialized_navigation_entry_test_helper.h +++ b/components/sessions/core/serialized_navigation_entry_test_helper.h @@ -5,9 +5,11 @@ #ifndef COMPONENTS_SESSIONS_SESSION_TYPES_TEST_HELPER_H_ #define COMPONENTS_SESSIONS_SESSION_TYPES_TEST_HELPER_H_ +#include <stdint.h> + #include <string> -#include "base/basictypes.h" +#include "base/macros.h" #include "base/strings/string16.h" #include "base/time/time.h" #include "ui/base/page_transition_types.h" @@ -33,7 +35,7 @@ extern const base::string16 kTitle; extern const std::string kEncodedPageState; extern const ui::PageTransition kTransitionType; extern const bool kHasPostData; -extern const int64 kPostID; +extern const int64_t kPostID; extern const GURL kOriginalRequestURL; extern const bool kIsOverridingUserAgent; extern const base::Time kTimestamp; diff --git a/components/sessions/core/serialized_navigation_entry_unittest.cc b/components/sessions/core/serialized_navigation_entry_unittest.cc index 727152e..6877934 100644 --- a/components/sessions/core/serialized_navigation_entry_unittest.cc +++ b/components/sessions/core/serialized_navigation_entry_unittest.cc @@ -4,10 +4,11 @@ #include "components/sessions/core/serialized_navigation_entry.h" +#include <stdint.h> + #include <cstddef> #include <string> -#include "base/basictypes.h" #include "base/memory/scoped_ptr.h" #include "base/pickle.h" #include "base/strings/string16.h" @@ -194,14 +195,14 @@ TEST(SerializedNavigationEntryTest, TransitionTypes) { SerializedNavigationEntry navigation = SerializedNavigationEntryTestHelper::CreateNavigationForTest(); - for (uint32 core_type = ui::PAGE_TRANSITION_LINK; + for (uint32_t core_type = ui::PAGE_TRANSITION_LINK; core_type != ui::PAGE_TRANSITION_LAST_CORE; ++core_type) { - // Because qualifier is a uint32, left shifting will eventually overflow + // Because qualifier is a uint32_t, left shifting will eventually overflow // and hit zero again. SERVER_REDIRECT, as the last qualifier and also // in place of the sign bit, is therefore the last transition before // breaking. - for (uint32 qualifier = ui::PAGE_TRANSITION_FORWARD_BACK; - qualifier != 0; qualifier <<= 1) { + for (uint32_t qualifier = ui::PAGE_TRANSITION_FORWARD_BACK; qualifier != 0; + qualifier <<= 1) { if (qualifier == 0x08000000) continue; // 0x08000000 is not a valid qualifier. ui::PageTransition transition = diff --git a/components/sessions/core/session_backend.cc b/components/sessions/core/session_backend.cc index 90b326d..d120962 100644 --- a/components/sessions/core/session_backend.cc +++ b/components/sessions/core/session_backend.cc @@ -4,31 +4,35 @@ #include "components/sessions/core/session_backend.h" +#include <stdint.h> + #include <limits> #include "base/files/file.h" #include "base/files/file_util.h" +#include "base/macros.h" #include "base/memory/scoped_vector.h" #include "base/metrics/histogram.h" #include "base/threading/thread_restrictions.h" +#include "build/build_config.h" using base::TimeTicks; namespace sessions { // File version number. -static const int32 kFileCurrentVersion = 1; +static const int32_t kFileCurrentVersion = 1; // The signature at the beginning of the file = SSNS (Sessions). -static const int32 kFileSignature = 0x53534E53; +static const int32_t kFileSignature = 0x53534E53; namespace { // The file header is the first bytes written to the file, // and is used to identify the file as one written by us. struct FileHeader { - int32 signature; - int32 version; + int32_t signature; + int32_t version; }; // SessionFileReader ---------------------------------------------------------- @@ -274,7 +278,7 @@ void SessionBackend::MoveCurrentSessionToLastSession() { if (base::PathExists(last_session_path)) base::DeleteFile(last_session_path, false); if (base::PathExists(current_session_path)) { - int64 file_size; + int64_t file_size; if (base::GetFileSize(current_session_path, &file_size)) { if (type_ == sessions::BaseSessionService::TAB_RESTORE) { UMA_HISTOGRAM_COUNTS("TabRestore.last_session_file_size", diff --git a/components/sessions/core/session_backend.h b/components/sessions/core/session_backend.h index aee3666..780bfd1 100644 --- a/components/sessions/core/session_backend.h +++ b/components/sessions/core/session_backend.h @@ -5,8 +5,11 @@ #ifndef COMPONENTS_SESSIONS_CORE_SESSION_BACKEND_H_ #define COMPONENTS_SESSIONS_CORE_SESSION_BACKEND_H_ +#include <stddef.h> + #include <vector> +#include "base/macros.h" #include "base/memory/ref_counted.h" #include "base/memory/scoped_ptr.h" #include "base/task/cancelable_task_tracker.h" diff --git a/components/sessions/core/session_backend_unittest.cc b/components/sessions/core/session_backend_unittest.cc index 56a233b..aad3ac9 100644 --- a/components/sessions/core/session_backend_unittest.cc +++ b/components/sessions/core/session_backend_unittest.cc @@ -2,8 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#include <stddef.h> + #include "base/files/file_util.h" #include "base/files/scoped_temp_dir.h" +#include "base/macros.h" #include "base/stl_util.h" #include "base/strings/string_util.h" #include "components/sessions/core/session_backend.h" diff --git a/components/sessions/core/session_command.h b/components/sessions/core/session_command.h index 5ba7b42..54d19e4 100644 --- a/components/sessions/core/session_command.h +++ b/components/sessions/core/session_command.h @@ -5,9 +5,12 @@ #ifndef COMPONENTS_SESSIONS_CORE_SESSION_COMMAND_H_ #define COMPONENTS_SESSIONS_CORE_SESSION_COMMAND_H_ +#include <stddef.h> +#include <stdint.h> + #include <string> -#include "base/basictypes.h" +#include "base/macros.h" #include "components/sessions/core/sessions_export.h" namespace base { @@ -30,10 +33,10 @@ class SESSIONS_EXPORT SessionCommand { public: // These get written to disk, so we define types for them. // Type for the identifier. - typedef uint8 id_type; + typedef uint8_t id_type; // Type for writing the size. - typedef uint16 size_type; + typedef uint16_t size_type; // Creates a session command with the specified id. This allocates a buffer // of size |size| that must be filled via contents(). diff --git a/components/sessions/core/session_id.h b/components/sessions/core/session_id.h index 77b4de7..d4c2645 100644 --- a/components/sessions/core/session_id.h +++ b/components/sessions/core/session_id.h @@ -5,13 +5,14 @@ #ifndef COMPONENTS_SESSIONS_CORE_SESSION_ID_H_ #define COMPONENTS_SESSIONS_CORE_SESSION_ID_H_ -#include "base/basictypes.h" +#include <stdint.h> + #include "components/sessions/core/sessions_export.h" // Uniquely identifies a tab or window for the duration of a session. class SESSIONS_EXPORT SessionID { public: - typedef int32 id_type; + typedef int32_t id_type; SessionID(); ~SessionID() {} diff --git a/components/sessions/core/session_service_commands.cc b/components/sessions/core/session_service_commands.cc index 924d314..c0828d7 100644 --- a/components/sessions/core/session_service_commands.cc +++ b/components/sessions/core/session_service_commands.cc @@ -4,6 +4,9 @@ #include "components/sessions/core/session_service_commands.h" +#include <stdint.h> +#include <string.h> + #include <vector> #include "base/pickle.h" @@ -45,32 +48,32 @@ namespace { // Various payload structures. struct ClosedPayload { SessionID::id_type id; - int64 close_time; + int64_t close_time; }; struct WindowBoundsPayload2 { SessionID::id_type window_id; - int32 x; - int32 y; - int32 w; - int32 h; + int32_t x; + int32_t y; + int32_t w; + int32_t h; bool is_maximized; }; struct WindowBoundsPayload3 { SessionID::id_type window_id; - int32 x; - int32 y; - int32 w; - int32 h; - int32 show_state; + int32_t x; + int32_t y; + int32_t w; + int32_t h; + int32_t show_state; }; typedef SessionID::id_type ActiveWindowPayload; struct IDAndIndexPayload { SessionID::id_type id; - int32 index; + int32_t index; }; typedef IDAndIndexPayload TabIndexInWindowPayload; @@ -92,7 +95,7 @@ struct PinnedStatePayload { struct LastActiveTimePayload { SessionID::id_type tab_id; - int64 last_active_time; + int64_t last_active_time; }; // Persisted versions of ui::WindowShowState that are written to disk and can @@ -683,7 +686,7 @@ scoped_ptr<SessionCommand> CreateSetWindowTypeCommand( SessionWindow::WindowType type) { WindowTypePayload payload = { 0 }; payload.id = window_id.id(); - payload.index = static_cast<int32>(type); + payload.index = static_cast<int32_t>(type); scoped_ptr<SessionCommand> command( new SessionCommand( kCommandSetWindowType, sizeof(payload))); memcpy(command->contents(), &payload, sizeof(payload)); diff --git a/components/sessions/core/session_service_commands.h b/components/sessions/core/session_service_commands.h index 91ff71b..6c51bf3 100644 --- a/components/sessions/core/session_service_commands.h +++ b/components/sessions/core/session_service_commands.h @@ -8,7 +8,6 @@ #include <map> #include <string> -#include "base/basictypes.h" #include "base/callback.h" #include "base/memory/scoped_vector.h" #include "base/memory/weak_ptr.h" diff --git a/components/sessions/core/session_types.cc b/components/sessions/core/session_types.cc index 4483afd..a035a41 100644 --- a/components/sessions/core/session_types.cc +++ b/components/sessions/core/session_types.cc @@ -4,7 +4,8 @@ #include "components/sessions/core/session_types.h" -#include "base/basictypes.h" +#include <stddef.h> + #include "base/stl_util.h" #include "components/sessions/core/session_command.h" diff --git a/components/sessions/core/session_types.h b/components/sessions/core/session_types.h index a21f4f5..31bc391 100644 --- a/components/sessions/core/session_types.h +++ b/components/sessions/core/session_types.h @@ -9,6 +9,7 @@ #include <string> #include <vector> +#include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "base/strings/string16.h" #include "base/time/time.h" diff --git a/components/sessions/core/session_types_unittest.cc b/components/sessions/core/session_types_unittest.cc index 22b12be..265e530 100644 --- a/components/sessions/core/session_types_unittest.cc +++ b/components/sessions/core/session_types_unittest.cc @@ -7,7 +7,6 @@ #include <cstddef> #include <string> -#include "base/basictypes.h" #include "base/strings/string_number_conversions.h" #include "base/strings/utf_string_conversions.h" #include "base/time/time.h" diff --git a/components/sessions/core/tab_restore_service_helper.cc b/components/sessions/core/tab_restore_service_helper.cc index 07651f9..129804c 100644 --- a/components/sessions/core/tab_restore_service_helper.cc +++ b/components/sessions/core/tab_restore_service_helper.cc @@ -4,6 +4,8 @@ #include "components/sessions/core/tab_restore_service_helper.h" +#include <stddef.h> + #include <algorithm> #include <iterator> diff --git a/components/sessions/core/tab_restore_service_helper.h b/components/sessions/core/tab_restore_service_helper.h index 8fa5c82..252adad 100644 --- a/components/sessions/core/tab_restore_service_helper.h +++ b/components/sessions/core/tab_restore_service_helper.h @@ -8,7 +8,7 @@ #include <set> #include <vector> -#include "base/basictypes.h" +#include "base/macros.h" #include "base/observer_list.h" #include "base/time/time.h" #include "components/sessions/core/session_id.h" diff --git a/components/sessions/ios/ios_live_tab.h b/components/sessions/ios/ios_live_tab.h index ced2923..645f880 100644 --- a/components/sessions/ios/ios_live_tab.h +++ b/components/sessions/ios/ios_live_tab.h @@ -5,7 +5,7 @@ #ifndef COMPONENTS_SESSIONS_IOS_IOS_LIVE_TAB_H_ #define COMPONENTS_SESSIONS_IOS_IOS_LIVE_TAB_H_ -#include "base/basictypes.h" +#include "base/macros.h" #include "base/supports_user_data.h" #include "components/sessions/core/live_tab.h" #include "components/sessions/ios/ios_serialized_navigation_builder.h" diff --git a/components/signin/core/account_id/account_id.h b/components/signin/core/account_id/account_id.h index 9f72030..eee99df 100644 --- a/components/signin/core/account_id/account_id.h +++ b/components/signin/core/account_id/account_id.h @@ -5,6 +5,8 @@ #ifndef COMPONENTS_SIGNIN_CORE_ACCOUNT_ID_ACCOUNT_ID_H_ #define COMPONENTS_SIGNIN_CORE_ACCOUNT_ID_ACCOUNT_ID_H_ +#include <stddef.h> + #include <string> #include "base/containers/hash_tables.h" diff --git a/components/signin/core/browser/about_signin_internals.cc b/components/signin/core/browser/about_signin_internals.cc index a144f84..8b14986 100644 --- a/components/signin/core/browser/about_signin_internals.cc +++ b/components/signin/core/browser/about_signin_internals.cc @@ -4,6 +4,8 @@ #include "components/signin/core/browser/about_signin_internals.h" +#include <stddef.h> + #include "base/command_line.h" #include "base/hash.h" #include "base/i18n/time_formatting.h" @@ -13,6 +15,7 @@ #include "base/strings/stringprintf.h" #include "base/strings/utf_string_conversions.h" #include "base/trace_event/trace_event.h" +#include "build/build_config.h" #include "components/pref_registry/pref_registry_syncable.h" #include "components/signin/core/browser/account_tracker_service.h" #include "components/signin/core/browser/profile_oauth2_token_service.h" diff --git a/components/signin/core/browser/about_signin_internals.h b/components/signin/core/browser/about_signin_internals.h index 10fb002..a7c3ff8 100644 --- a/components/signin/core/browser/about_signin_internals.h +++ b/components/signin/core/browser/about_signin_internals.h @@ -8,6 +8,7 @@ #include <map> #include <string> +#include "base/macros.h" #include "base/memory/linked_ptr.h" #include "base/memory/scoped_ptr.h" #include "base/observer_list.h" diff --git a/components/signin/core/browser/account_fetcher_service.cc b/components/signin/core/browser/account_fetcher_service.cc index 1e30dbc..83808b4 100644 --- a/components/signin/core/browser/account_fetcher_service.cc +++ b/components/signin/core/browser/account_fetcher_service.cc @@ -9,6 +9,7 @@ #include "base/prefs/pref_service.h" #include "base/profiler/scoped_tracker.h" #include "base/trace_event/trace_event.h" +#include "build/build_config.h" #include "components/pref_registry/pref_registry_syncable.h" #include "components/signin/core/browser/account_info_fetcher.h" #include "components/signin/core/browser/account_tracker_service.h" diff --git a/components/signin/core/browser/account_fetcher_service.h b/components/signin/core/browser/account_fetcher_service.h index 0545a4a..6cbb080 100644 --- a/components/signin/core/browser/account_fetcher_service.h +++ b/components/signin/core/browser/account_fetcher_service.h @@ -5,7 +5,10 @@ #ifndef COMPONENTS_SIGNIN_CORE_BROWSER_ACCOUNT_FETCHER_SERVICE_H_ #define COMPONENTS_SIGNIN_CORE_BROWSER_ACCOUNT_FETCHER_SERVICE_H_ +#include <stdint.h> + #include "base/containers/scoped_ptr_hash_map.h" +#include "base/macros.h" #include "base/threading/non_thread_safe.h" #include "base/timer/timer.h" #include "components/keyed_service/core/keyed_service.h" @@ -30,7 +33,7 @@ class AccountFetcherService : public KeyedService, public OAuth2TokenService::Observer, public base::NonThreadSafe { public: - // Name of the preference that tracks the int64 representation of the last + // Name of the preference that tracks the int64_t representation of the last // time the AccountTrackerService was updated. static const char kLastUpdatePref[]; diff --git a/components/signin/core/browser/account_info_fetcher.h b/components/signin/core/browser/account_info_fetcher.h index 3248aab..b47a976 100644 --- a/components/signin/core/browser/account_info_fetcher.h +++ b/components/signin/core/browser/account_info_fetcher.h @@ -5,6 +5,7 @@ #ifndef COMPONENTS_SIGNIN_CORE_BROWSER_ACCOUNT_INFO_FETCHER_H_ #define COMPONENTS_SIGNIN_CORE_BROWSER_ACCOUNT_INFO_FETCHER_H_ +#include "base/macros.h" #include "google_apis/gaia/gaia_auth_consumer.h" #include "google_apis/gaia/gaia_oauth_client.h" #include "google_apis/gaia/oauth2_token_service.h" diff --git a/components/signin/core/browser/account_reconcilor.cc b/components/signin/core/browser/account_reconcilor.cc index 3e140cc..89f073f 100644 --- a/components/signin/core/browser/account_reconcilor.cc +++ b/components/signin/core/browser/account_reconcilor.cc @@ -4,6 +4,8 @@ #include "components/signin/core/browser/account_reconcilor.h" +#include <stddef.h> + #include <algorithm> #include "base/bind.h" diff --git a/components/signin/core/browser/account_reconcilor.h b/components/signin/core/browser/account_reconcilor.h index ba6ec7c..2c9660c 100644 --- a/components/signin/core/browser/account_reconcilor.h +++ b/components/signin/core/browser/account_reconcilor.h @@ -11,10 +11,10 @@ #include <utility> #include <vector> -#include "base/basictypes.h" #include "base/callback_forward.h" #include "base/compiler_specific.h" #include "base/gtest_prod_util.h" +#include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "base/time/time.h" #include "components/content_settings/core/browser/content_settings_observer.h" diff --git a/components/signin/core/browser/account_tracker_service.cc b/components/signin/core/browser/account_tracker_service.cc index b57c585..624fafa 100644 --- a/components/signin/core/browser/account_tracker_service.cc +++ b/components/signin/core/browser/account_tracker_service.cc @@ -4,6 +4,8 @@ #include "components/signin/core/browser/account_tracker_service.h" +#include <stddef.h> + #include "base/callback.h" #include "base/command_line.h" #include "base/logging.h" @@ -12,6 +14,7 @@ #include "base/strings/string_split.h" #include "base/strings/utf_string_conversions.h" #include "base/trace_event/trace_event.h" +#include "build/build_config.h" #include "components/pref_registry/pref_registry_syncable.h" #include "components/signin/core/browser/signin_client.h" #include "components/signin/core/browser/signin_manager.h" diff --git a/components/signin/core/browser/account_tracker_service.h b/components/signin/core/browser/account_tracker_service.h index 81baaa8..d0eb9ca 100644 --- a/components/signin/core/browser/account_tracker_service.h +++ b/components/signin/core/browser/account_tracker_service.h @@ -10,6 +10,7 @@ #include <string> #include <vector> +#include "base/macros.h" #include "base/memory/ref_counted.h" #include "base/observer_list.h" #include "base/threading/non_thread_safe.h" diff --git a/components/signin/core/browser/android/component_jni_registrar.cc b/components/signin/core/browser/android/component_jni_registrar.cc index 2600b92..c164eeb 100644 --- a/components/signin/core/browser/android/component_jni_registrar.cc +++ b/components/signin/core/browser/android/component_jni_registrar.cc @@ -6,7 +6,7 @@ #include "base/android/jni_android.h" #include "base/android/jni_registrar.h" -#include "base/basictypes.h" +#include "base/macros.h" #include "components/signin/core/browser/child_account_info_fetcher_android.h" namespace signin { diff --git a/components/signin/core/browser/child_account_info_fetcher.h b/components/signin/core/browser/child_account_info_fetcher.h index 90dfaed..bf69dd8 100644 --- a/components/signin/core/browser/child_account_info_fetcher.h +++ b/components/signin/core/browser/child_account_info_fetcher.h @@ -7,6 +7,8 @@ #include <string> +#include "build/build_config.h" + #if defined(OS_ANDROID) #include <jni.h> #endif diff --git a/components/signin/core/browser/child_account_info_fetcher_impl.h b/components/signin/core/browser/child_account_info_fetcher_impl.h index 557c485..33ceae4 100644 --- a/components/signin/core/browser/child_account_info_fetcher_impl.h +++ b/components/signin/core/browser/child_account_info_fetcher_impl.h @@ -5,6 +5,7 @@ #ifndef COMPONENTS_SIGNIN_CORE_BROWSER_CHILD_ACCOUNT_INFO_FETCHER_IMPL_H_ #define COMPONENTS_SIGNIN_CORE_BROWSER_CHILD_ACCOUNT_INFO_FETCHER_IMPL_H_ +#include "base/macros.h" #include "base/threading/thread_checker.h" #include "base/timer/timer.h" #include "components/invalidation/public/invalidation_handler.h" diff --git a/components/signin/core/browser/device_activity_fetcher.h b/components/signin/core/browser/device_activity_fetcher.h index d8d768d..a9ff2f5 100644 --- a/components/signin/core/browser/device_activity_fetcher.h +++ b/components/signin/core/browser/device_activity_fetcher.h @@ -8,6 +8,7 @@ #include <string> #include <vector> +#include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "base/time/time.h" #include "base/timer/timer.h" diff --git a/components/signin/core/browser/fake_account_fetcher_service.h b/components/signin/core/browser/fake_account_fetcher_service.h index fb5d13f..73d68f2 100644 --- a/components/signin/core/browser/fake_account_fetcher_service.h +++ b/components/signin/core/browser/fake_account_fetcher_service.h @@ -5,6 +5,7 @@ #ifndef COMPONENTS_SIGNIN_CORE_BROWSER_FAKE_ACCOUNT_FETCHER_SERVICE_H_ #define COMPONENTS_SIGNIN_CORE_BROWSER_FAKE_ACCOUNT_FETCHER_SERVICE_H_ +#include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "components/signin/core/browser/account_fetcher_service.h" diff --git a/components/signin/core/browser/fake_profile_oauth2_token_service.h b/components/signin/core/browser/fake_profile_oauth2_token_service.h index c406156..5eda9c1 100644 --- a/components/signin/core/browser/fake_profile_oauth2_token_service.h +++ b/components/signin/core/browser/fake_profile_oauth2_token_service.h @@ -9,6 +9,7 @@ #include <vector> #include "base/compiler_specific.h" +#include "base/macros.h" #include "base/memory/weak_ptr.h" #include "components/signin/core/browser/profile_oauth2_token_service.h" diff --git a/components/signin/core/browser/fake_signin_manager.cc b/components/signin/core/browser/fake_signin_manager.cc index ee18b8d..0b59650 100644 --- a/components/signin/core/browser/fake_signin_manager.cc +++ b/components/signin/core/browser/fake_signin_manager.cc @@ -6,6 +6,7 @@ #include "base/callback_helpers.h" #include "base/prefs/pref_service.h" +#include "build/build_config.h" #include "components/signin/core/browser/account_tracker_service.h" #include "components/signin/core/browser/signin_metrics.h" diff --git a/components/signin/core/browser/fake_signin_manager.h b/components/signin/core/browser/fake_signin_manager.h index b12f48d..18b79aa 100644 --- a/components/signin/core/browser/fake_signin_manager.h +++ b/components/signin/core/browser/fake_signin_manager.h @@ -9,6 +9,7 @@ #include "base/compiler_specific.h" #include "base/memory/scoped_ptr.h" +#include "build/build_config.h" #include "components/signin/core/browser/signin_manager.h" #include "components/signin/core/browser/signin_metrics.h" diff --git a/components/signin/core/browser/gaia_cookie_manager_service.cc b/components/signin/core/browser/gaia_cookie_manager_service.cc index aa428fd..ecbad16 100644 --- a/components/signin/core/browser/gaia_cookie_manager_service.cc +++ b/components/signin/core/browser/gaia_cookie_manager_service.cc @@ -4,6 +4,8 @@ #include "components/signin/core/browser/gaia_cookie_manager_service.h" +#include <stddef.h> + #include <queue> #include <vector> diff --git a/components/signin/core/browser/gaia_cookie_manager_service.h b/components/signin/core/browser/gaia_cookie_manager_service.h index c50fb1b..17506a9 100644 --- a/components/signin/core/browser/gaia_cookie_manager_service.h +++ b/components/signin/core/browser/gaia_cookie_manager_service.h @@ -7,6 +7,7 @@ #include <deque> +#include "base/macros.h" #include "base/observer_list.h" #include "base/timer/timer.h" #include "components/signin/core/browser/signin_client.h" diff --git a/components/signin/core/browser/gaia_cookie_manager_service_unittest.cc b/components/signin/core/browser/gaia_cookie_manager_service_unittest.cc index 218dcb5..23a0b26 100644 --- a/components/signin/core/browser/gaia_cookie_manager_service_unittest.cc +++ b/components/signin/core/browser/gaia_cookie_manager_service_unittest.cc @@ -7,6 +7,7 @@ #include <vector> #include "base/location.h" +#include "base/macros.h" #include "base/memory/ref_counted.h" #include "base/memory/scoped_ptr.h" #include "base/message_loop/message_loop.h" diff --git a/components/signin/core/browser/profile_oauth2_token_service.h b/components/signin/core/browser/profile_oauth2_token_service.h index 6fb0004..199c790 100644 --- a/components/signin/core/browser/profile_oauth2_token_service.h +++ b/components/signin/core/browser/profile_oauth2_token_service.h @@ -7,6 +7,7 @@ #include <string> +#include "base/macros.h" #include "base/memory/linked_ptr.h" #include "components/keyed_service/core/keyed_service.h" #include "google_apis/gaia/oauth2_token_service.h" diff --git a/components/signin/core/browser/refresh_token_annotation_request.h b/components/signin/core/browser/refresh_token_annotation_request.h index 6ce66f3..a276697 100644 --- a/components/signin/core/browser/refresh_token_annotation_request.h +++ b/components/signin/core/browser/refresh_token_annotation_request.h @@ -7,6 +7,7 @@ #include "base/callback.h" #include "base/gtest_prod_util.h" +#include "base/macros.h" #include "base/threading/non_thread_safe.h" #include "google_apis/gaia/oauth2_api_call_flow.h" #include "google_apis/gaia/oauth2_token_service.h" diff --git a/components/signin/core/browser/signin_cookie_changed_subscription.h b/components/signin/core/browser/signin_cookie_changed_subscription.h index e87851f..5120ab9 100644 --- a/components/signin/core/browser/signin_cookie_changed_subscription.h +++ b/components/signin/core/browser/signin_cookie_changed_subscription.h @@ -5,6 +5,7 @@ #ifndef COMPONENTS_SIGNIN_CORE_BROWSER_SIGNIN_COOKIE_CHANGED_SUBSCRIPTION_H_ #define COMPONENTS_SIGNIN_CORE_BROWSER_SIGNIN_COOKIE_CHANGED_SUBSCRIPTION_H_ +#include "base/macros.h" #include "base/memory/weak_ptr.h" #include "base/threading/thread_checker.h" #include "components/signin/core/browser/signin_client.h" diff --git a/components/signin/core/browser/signin_error_controller.h b/components/signin/core/browser/signin_error_controller.h index d0e17c0..1f1182f 100644 --- a/components/signin/core/browser/signin_error_controller.h +++ b/components/signin/core/browser/signin_error_controller.h @@ -6,8 +6,8 @@ #define COMPONENTS_SIGNIN_CORE_BROWSER_SIGNIN_ERROR_CONTROLLER_H_ #include <set> -#include "base/basictypes.h" #include "base/compiler_specific.h" +#include "base/macros.h" #include "base/observer_list.h" #include "components/keyed_service/core/keyed_service.h" #include "google_apis/gaia/google_service_auth_error.h" diff --git a/components/signin/core/browser/signin_error_controller_unittest.cc b/components/signin/core/browser/signin_error_controller_unittest.cc index 6b7f1de..e731673 100644 --- a/components/signin/core/browser/signin_error_controller_unittest.cc +++ b/components/signin/core/browser/signin_error_controller_unittest.cc @@ -4,8 +4,11 @@ #include "components/signin/core/browser/signin_error_controller.h" +#include <stddef.h> + #include <functional> +#include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "components/signin/core/browser/fake_auth_status_provider.h" #include "testing/gtest/include/gtest/gtest.h" diff --git a/components/signin/core/browser/signin_header_helper.cc b/components/signin/core/browser/signin_header_helper.cc index 805cd1e..26c7c15 100644 --- a/components/signin/core/browser/signin_header_helper.cc +++ b/components/signin/core/browser/signin_header_helper.cc @@ -4,9 +4,13 @@ #include "components/signin/core/browser/signin_header_helper.h" +#include <stddef.h> + +#include "base/macros.h" #include "base/strings/string_number_conversions.h" #include "base/strings/string_split.h" #include "base/strings/stringprintf.h" +#include "build/build_config.h" #include "components/content_settings/core/browser/cookie_settings.h" #include "components/google/core/browser/google_util.h" #include "components/signin/core/common/profile_management_switches.h" diff --git a/components/signin/core/browser/signin_internals_util.h b/components/signin/core/browser/signin_internals_util.h index 4ffe7f6..ae1ce56 100644 --- a/components/signin/core/browser/signin_internals_util.h +++ b/components/signin/core/browser/signin_internals_util.h @@ -5,6 +5,8 @@ #ifndef COMPONENTS_SIGNIN_CORE_BROWSER_SIGNIN_INTERNALS_UTIL_H_ #define COMPONENTS_SIGNIN_CORE_BROWSER_SIGNIN_INTERNALS_UTIL_H_ +#include <stddef.h> + #include <map> #include <string> diff --git a/components/signin/core/browser/signin_manager.h b/components/signin/core/browser/signin_manager.h index d515808..f0e76c0 100644 --- a/components/signin/core/browser/signin_manager.h +++ b/components/signin/core/browser/signin_manager.h @@ -27,10 +27,12 @@ #include "base/compiler_specific.h" #include "base/gtest_prod_util.h" #include "base/logging.h" +#include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "base/observer_list.h" #include "base/prefs/pref_change_registrar.h" #include "base/prefs/pref_member.h" +#include "build/build_config.h" #include "components/keyed_service/core/keyed_service.h" #include "components/signin/core/browser/account_info.h" #include "components/signin/core/browser/account_tracker_service.h" diff --git a/components/signin/core/browser/signin_manager_base.h b/components/signin/core/browser/signin_manager_base.h index 27ea190..d99f5c1 100644 --- a/components/signin/core/browser/signin_manager_base.h +++ b/components/signin/core/browser/signin_manager_base.h @@ -27,6 +27,7 @@ #include "base/compiler_specific.h" #include "base/logging.h" +#include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "base/observer_list.h" #include "base/prefs/pref_change_registrar.h" diff --git a/components/signin/core/browser/signin_status_metrics_provider.h b/components/signin/core/browser/signin_status_metrics_provider.h index c966598..f6c16fd 100644 --- a/components/signin/core/browser/signin_status_metrics_provider.h +++ b/components/signin/core/browser/signin_status_metrics_provider.h @@ -5,7 +5,10 @@ #ifndef COMPONENTS_SIGNIN_CORE_BROWSER_SIGNIN_STATUS_METRICS_PROVIDER_H_ #define COMPONENTS_SIGNIN_CORE_BROWSER_SIGNIN_STATUS_METRICS_PROVIDER_H_ +#include <stddef.h> + #include "base/gtest_prod_util.h" +#include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "base/memory/weak_ptr.h" #include "base/scoped_observer.h" diff --git a/components/signin/core/browser/signin_status_metrics_provider_base.h b/components/signin/core/browser/signin_status_metrics_provider_base.h index 44f54a2..156a00f 100644 --- a/components/signin/core/browser/signin_status_metrics_provider_base.h +++ b/components/signin/core/browser/signin_status_metrics_provider_base.h @@ -5,6 +5,7 @@ #ifndef COMPONENTS_SIGNIN_CORE_BROWSER_SIGNIN_STATUS_METRICS_PROVIDER_BASE_H_ #define COMPONENTS_SIGNIN_CORE_BROWSER_SIGNIN_STATUS_METRICS_PROVIDER_BASE_H_ +#include "base/macros.h" #include "components/metrics/metrics_provider.h" // The base class for collecting login status of all opened profiles during one diff --git a/components/signin/core/browser/signin_status_metrics_provider_delegate.h b/components/signin/core/browser/signin_status_metrics_provider_delegate.h index 7aed685..f1c778b 100644 --- a/components/signin/core/browser/signin_status_metrics_provider_delegate.h +++ b/components/signin/core/browser/signin_status_metrics_provider_delegate.h @@ -5,6 +5,8 @@ #ifndef COMPONENTS_SIGNIN_CORE_BROWSER_SIGNIN_STATUS_METRICS_PROVIDER_DELEGATE_H_ #define COMPONENTS_SIGNIN_CORE_BROWSER_SIGNIN_STATUS_METRICS_PROVIDER_DELEGATE_H_ +#include <stddef.h> + #include <vector> #include "base/macros.h" diff --git a/components/signin/core/browser/signin_tracker.h b/components/signin/core/browser/signin_tracker.h index 6d9c7be..493f7f5 100644 --- a/components/signin/core/browser/signin_tracker.h +++ b/components/signin/core/browser/signin_tracker.h @@ -5,6 +5,7 @@ #ifndef COMPONENTS_SIGNIN_CORE_BROWSER_SIGNIN_TRACKER_H_ #define COMPONENTS_SIGNIN_CORE_BROWSER_SIGNIN_TRACKER_H_ +#include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "components/signin/core/browser/gaia_cookie_manager_service.h" #include "components/signin/core/browser/signin_manager.h" diff --git a/components/signin/core/browser/test_signin_client.h b/components/signin/core/browser/test_signin_client.h index 215430c..dd54eda 100644 --- a/components/signin/core/browser/test_signin_client.h +++ b/components/signin/core/browser/test_signin_client.h @@ -5,9 +5,9 @@ #ifndef COMPONENTS_SIGNIN_CORE_BROWSER_TEST_SIGNIN_CLIENT_H_ #define COMPONENTS_SIGNIN_CORE_BROWSER_TEST_SIGNIN_CLIENT_H_ -#include "base/basictypes.h" #include "base/compiler_specific.h" #include "base/files/scoped_temp_dir.h" +#include "base/macros.h" #include "base/memory/ref_counted.h" #include "base/memory/scoped_ptr.h" #include "components/signin/core/browser/signin_client.h" diff --git a/components/signin/core/browser/webdata/token_service_table.h b/components/signin/core/browser/webdata/token_service_table.h index 8cc7027..70cf20e 100644 --- a/components/signin/core/browser/webdata/token_service_table.h +++ b/components/signin/core/browser/webdata/token_service_table.h @@ -9,6 +9,7 @@ #include <string> #include "base/compiler_specific.h" +#include "base/macros.h" #include "components/webdata/common/web_database_table.h" class WebDatabase; diff --git a/components/signin/core/browser/webdata/token_service_table_unittest.cc b/components/signin/core/browser/webdata/token_service_table_unittest.cc index 619cdb1..fbb7346 100644 --- a/components/signin/core/browser/webdata/token_service_table_unittest.cc +++ b/components/signin/core/browser/webdata/token_service_table_unittest.cc @@ -3,8 +3,10 @@ // found in the LICENSE file. #include "base/files/scoped_temp_dir.h" +#include "base/macros.h" #include "base/strings/string_number_conversions.h" #include "base/time/time.h" +#include "build/build_config.h" #include "components/os_crypt/os_crypt.h" #include "components/signin/core/browser/webdata/token_service_table.h" #include "components/webdata/common/web_database.h" diff --git a/components/signin/core/browser/webdata/token_web_data.h b/components/signin/core/browser/webdata/token_web_data.h index 66a27aa..ceec9cd 100644 --- a/components/signin/core/browser/webdata/token_web_data.h +++ b/components/signin/core/browser/webdata/token_web_data.h @@ -16,6 +16,7 @@ #include "base/callback_forward.h" #include "base/files/file_path.h" #include "base/location.h" +#include "base/macros.h" #include "base/memory/ref_counted.h" #include "components/webdata/common/web_data_results.h" #include "components/webdata/common/web_data_service_base.h" diff --git a/components/signin/ios/browser/account_consistency_service.mm b/components/signin/ios/browser/account_consistency_service.mm index 2278ffb..39cc25d 100644 --- a/components/signin/ios/browser/account_consistency_service.mm +++ b/components/signin/ios/browser/account_consistency_service.mm @@ -9,6 +9,7 @@ #import "base/ios/weak_nsobject.h" #include "base/logging.h" #import "base/mac/foundation_util.h" +#include "base/macros.h" #include "base/prefs/scoped_user_pref_update.h" #include "base/strings/sys_string_conversions.h" #include "base/time/time.h" diff --git a/components/signin/ios/browser/fake_profile_oauth2_token_service_ios_delegate.h b/components/signin/ios/browser/fake_profile_oauth2_token_service_ios_delegate.h index b002649..ea98809 100644 --- a/components/signin/ios/browser/fake_profile_oauth2_token_service_ios_delegate.h +++ b/components/signin/ios/browser/fake_profile_oauth2_token_service_ios_delegate.h @@ -5,6 +5,7 @@ #ifndef COMPONENTS_SIGNIN_IOS_BROWSER_FAKE_PROFILE_OAUTH2_TOKEN_SERVICE_IOS_DELEGATE_H_ #define COMPONENTS_SIGNIN_IOS_BROWSER_FAKE_PROFILE_OAUTH2_TOKEN_SERVICE_IOS_DELEGATE_H_ +#include "base/macros.h" #include "base/threading/thread_checker.h" #include "components/signin/ios/browser/profile_oauth2_token_service_ios_delegate.h" diff --git a/components/signin/ios/browser/fake_profile_oauth2_token_service_ios_provider.h b/components/signin/ios/browser/fake_profile_oauth2_token_service_ios_provider.h index a622b8b..161ef68 100644 --- a/components/signin/ios/browser/fake_profile_oauth2_token_service_ios_provider.h +++ b/components/signin/ios/browser/fake_profile_oauth2_token_service_ios_provider.h @@ -9,6 +9,7 @@ #include <utility> #include <vector> +#include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "components/signin/ios/browser/profile_oauth2_token_service_ios_provider.h" diff --git a/components/signin/ios/browser/oauth2_token_service_observer_bridge.h b/components/signin/ios/browser/oauth2_token_service_observer_bridge.h index eab57c0..04d3896 100644 --- a/components/signin/ios/browser/oauth2_token_service_observer_bridge.h +++ b/components/signin/ios/browser/oauth2_token_service_observer_bridge.h @@ -7,6 +7,7 @@ #import <Foundation/Foundation.h> +#include "base/macros.h" #include "google_apis/gaia/oauth2_token_service.h" @protocol OAuth2TokenServiceObserverBridgeDelegate <NSObject> diff --git a/components/signin/ios/browser/profile_oauth2_token_service_ios_delegate.h b/components/signin/ios/browser/profile_oauth2_token_service_ios_delegate.h index 6df3f07..780f9ee 100644 --- a/components/signin/ios/browser/profile_oauth2_token_service_ios_delegate.h +++ b/components/signin/ios/browser/profile_oauth2_token_service_ios_delegate.h @@ -7,6 +7,7 @@ #include <string> #include "base/gtest_prod_util.h" +#include "base/macros.h" #include "base/memory/linked_ptr.h" #include "base/threading/thread_checker.h" #include "components/signin/core/browser/signin_error_controller.h" diff --git a/components/signin/ios/browser/profile_oauth2_token_service_ios_delegate.mm b/components/signin/ios/browser/profile_oauth2_token_service_ios_delegate.mm index 158bd76..3e7fa20 100644 --- a/components/signin/ios/browser/profile_oauth2_token_service_ios_delegate.mm +++ b/components/signin/ios/browser/profile_oauth2_token_service_ios_delegate.mm @@ -11,6 +11,7 @@ #include <vector> #include "base/bind.h" +#include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "base/message_loop/message_loop.h" #include "base/prefs/pref_service.h" diff --git a/components/ssl_config/ssl_config_service_manager_pref.cc b/components/ssl_config/ssl_config_service_manager_pref.cc index d9c567f..aaa7070 100644 --- a/components/ssl_config/ssl_config_service_manager_pref.cc +++ b/components/ssl_config/ssl_config_service_manager_pref.cc @@ -3,12 +3,14 @@ // found in the LICENSE file. #include "components/ssl_config/ssl_config_service_manager.h" +#include <stdint.h> + #include <algorithm> #include <string> #include <vector> -#include "base/basictypes.h" #include "base/bind.h" +#include "base/macros.h" #include "base/metrics/field_trial.h" #include "base/prefs/pref_change_registrar.h" #include "base/prefs/pref_member.h" @@ -48,14 +50,14 @@ std::vector<std::string> ListValueToStringVector(const base::ListValue* value) { // Parses a vector of cipher suite strings, returning a sorted vector // containing the underlying SSL/TLS cipher suites. Unrecognized/invalid // cipher suites will be ignored. -std::vector<uint16> ParseCipherSuites( +std::vector<uint16_t> ParseCipherSuites( const std::vector<std::string>& cipher_strings) { - std::vector<uint16> cipher_suites; + std::vector<uint16_t> cipher_suites; cipher_suites.reserve(cipher_strings.size()); for (std::vector<std::string>::const_iterator it = cipher_strings.begin(); it != cipher_strings.end(); ++it) { - uint16 cipher_suite = 0; + uint16_t cipher_suite = 0; if (!net::ParseSSLCipherString(*it, &cipher_suite)) { LOG(ERROR) << "Ignoring unrecognized or unparsable cipher suite: " << *it; continue; @@ -66,10 +68,10 @@ std::vector<uint16> ParseCipherSuites( return cipher_suites; } -// Returns the SSL protocol version (as a uint16) represented by a string. +// Returns the SSL protocol version (as a uint16_t) represented by a string. // Returns 0 if the string is invalid. -uint16 SSLProtocolVersionFromString(const std::string& version_str) { - uint16 version = 0; // Invalid. +uint16_t SSLProtocolVersionFromString(const std::string& version_str) { + uint16_t version = 0; // Invalid. if (version_str == switches::kSSLVersionTLSv1) { version = net::SSL_PROTOCOL_VERSION_TLS1; } else if (version_str == switches::kSSLVersionTLSv11) { @@ -175,7 +177,7 @@ class SSLConfigServiceManagerPref : public ssl_config::SSLConfigServiceManager { BooleanPrefMember rc4_enabled_; // The cached list of disabled SSL cipher suites. - std::vector<uint16> disabled_cipher_suites_; + std::vector<uint16_t> disabled_cipher_suites_; scoped_refptr<SSLConfigServicePref> ssl_config_service_; @@ -281,15 +283,15 @@ void SSLConfigServiceManagerPref::GetSSLConfigFromPrefs( config->version_min = net::kDefaultSSLVersionMin; config->version_max = net::kDefaultSSLVersionMax; config->version_fallback_min = net::kDefaultSSLVersionFallbackMin; - uint16 version_min = SSLProtocolVersionFromString(version_min_str); - uint16 version_max = SSLProtocolVersionFromString(version_max_str); - uint16 version_fallback_min = + uint16_t version_min = SSLProtocolVersionFromString(version_min_str); + uint16_t version_max = SSLProtocolVersionFromString(version_max_str); + uint16_t version_fallback_min = SSLProtocolVersionFromString(version_fallback_min_str); if (version_min) { config->version_min = version_min; } if (version_max) { - uint16 supported_version_max = config->version_max; + uint16_t supported_version_max = config->version_max; config->version_max = std::min(supported_version_max, version_max); } if (version_fallback_min) { diff --git a/components/ssl_errors/error_classification.cc b/components/ssl_errors/error_classification.cc index e1cc6d6..1397c1e 100644 --- a/components/ssl_errors/error_classification.cc +++ b/components/ssl_errors/error_classification.cc @@ -4,6 +4,8 @@ #include "components/ssl_errors/error_classification.h" +#include <stddef.h> + #include <vector> #include "base/build_time.h" @@ -12,6 +14,7 @@ #include "base/strings/string_split.h" #include "base/strings/utf_string_conversions.h" #include "base/time/time.h" +#include "build/build_config.h" #include "components/ssl_errors/error_info.h" #include "components/url_formatter/url_formatter.h" #include "net/base/net_util.h" diff --git a/components/ssl_errors/error_info.cc b/components/ssl_errors/error_info.cc index 625a31b..6eaaee0 100644 --- a/components/ssl_errors/error_info.cc +++ b/components/ssl_errors/error_info.cc @@ -4,7 +4,10 @@ #include "components/ssl_errors/error_info.h" +#include <stddef.h> + #include "base/i18n/message_formatter.h" +#include "base/macros.h" #include "base/strings/utf_string_conversions.h" #include "grit/components_strings.h" #include "net/base/escape.h" diff --git a/components/ssl_errors/error_info.h b/components/ssl_errors/error_info.h index 1b26be5..de1af8f 100644 --- a/components/ssl_errors/error_info.h +++ b/components/ssl_errors/error_info.h @@ -8,6 +8,7 @@ #include <string> #include <vector> +#include "base/macros.h" #include "base/strings/string16.h" #include "net/cert/cert_status_flags.h" #include "net/cert/x509_certificate.h" |