diff options
author | avi <avi@chromium.org> | 2015-12-25 17:09:38 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-12-26 01:10:32 +0000 |
commit | 6846aeff59836d8064ad90a934c60829575a970e (patch) | |
tree | 81582da159992a636983c3346fc291e5cb6151cb /chrome | |
parent | e4d7b6ff9e03d4d0ee39e270bd1ad5ddf0d6af5a (diff) | |
download | chromium_src-6846aeff59836d8064ad90a934c60829575a970e.zip chromium_src-6846aeff59836d8064ad90a934c60829575a970e.tar.gz chromium_src-6846aeff59836d8064ad90a934c60829575a970e.tar.bz2 |
Switch to standard integer types in chrome/browser/, part 2 of 4.
BUG=138542
TBR=thakis@chromium.org
Review URL: https://codereview.chromium.org/1550593002
Cr-Commit-Position: refs/heads/master@{#366879}
Diffstat (limited to 'chrome')
560 files changed, 1514 insertions, 660 deletions
diff --git a/chrome/browser/engagement/site_engagement_eviction_policy.cc b/chrome/browser/engagement/site_engagement_eviction_policy.cc index 1ede15c..314500c 100644 --- a/chrome/browser/engagement/site_engagement_eviction_policy.cc +++ b/chrome/browser/engagement/site_engagement_eviction_policy.cc @@ -19,10 +19,10 @@ namespace { const int kExpectedEngagementSites = 200; // Gets the quota that an origin deserves based on its site engagement. -int64 GetSoftQuotaForOrigin(const GURL& origin, - int score, - int total_engagement_points, - int64 global_quota) { +int64_t GetSoftQuotaForOrigin(const GURL& origin, + int score, + int total_engagement_points, + int64_t global_quota) { double quota_per_point = global_quota / std::max(kExpectedEngagementSites * SiteEngagementScore::kMaxPoints, @@ -35,8 +35,8 @@ GURL DoCalculateEvictionOrigin( const scoped_refptr<storage::SpecialStoragePolicy>& special_storage_policy, SiteEngagementScoreProvider* score_provider, const std::set<GURL>& exceptions, - const std::map<GURL, int64>& usage_map, - int64 global_quota) { + const std::map<GURL, int64_t>& usage_map, + int64_t global_quota) { // TODO(calamity): Integrate storage access frequency as an input to this // heuristic. @@ -49,7 +49,7 @@ GURL DoCalculateEvictionOrigin( // use based on its engagement and the global quota. The origin that most // exceeds its soft quota is chosen. GURL origin_to_evict; - int64 max_overuse = std::numeric_limits<int64>::min(); + int64_t max_overuse = std::numeric_limits<int64_t>::min(); int total_engagement_points = score_provider->GetTotalEngagementPoints(); for (const auto& usage : usage_map) { @@ -61,9 +61,10 @@ GURL DoCalculateEvictionOrigin( } // |overuse| can be negative if the soft quota exceeds the usage. - int64 overuse = usage.second - GetSoftQuotaForOrigin( - origin, score_provider->GetScore(origin), - total_engagement_points, global_quota); + int64_t overuse = + usage.second - + GetSoftQuotaForOrigin(origin, score_provider->GetScore(origin), + total_engagement_points, global_quota); if (overuse > max_overuse && !ContainsKey(exceptions, origin)) { max_overuse = overuse; origin_to_evict = origin; @@ -77,8 +78,8 @@ GURL GetSiteEngagementEvictionOriginOnUIThread( const scoped_refptr<storage::SpecialStoragePolicy>& special_storage_policy, content::BrowserContext* browser_context, const std::set<GURL>& exceptions, - const std::map<GURL, int64>& usage_map, - int64 global_quota) { + const std::map<GURL, int64_t>& usage_map, + int64_t global_quota) { DCHECK_CURRENTLY_ON(content::BrowserThread::UI); Profile* profile = Profile::FromBrowserContext(browser_context); @@ -118,8 +119,8 @@ SiteEngagementEvictionPolicy::~SiteEngagementEvictionPolicy() {} void SiteEngagementEvictionPolicy::GetEvictionOrigin( const scoped_refptr<storage::SpecialStoragePolicy>& special_storage_policy, const std::set<GURL>& exceptions, - const std::map<GURL, int64>& usage_map, - int64 global_quota, + const std::map<GURL, int64_t>& usage_map, + int64_t global_quota, const storage::GetOriginCallback& callback) { DCHECK_CURRENTLY_ON(content::BrowserThread::IO); @@ -136,8 +137,8 @@ GURL SiteEngagementEvictionPolicy::CalculateEvictionOriginForTests( const scoped_refptr<storage::SpecialStoragePolicy>& special_storage_policy, SiteEngagementScoreProvider* score_provider, const std::set<GURL>& exceptions, - const std::map<GURL, int64>& usage_map, - int64 global_quota) { + const std::map<GURL, int64_t>& usage_map, + int64_t global_quota) { return DoCalculateEvictionOrigin(special_storage_policy, score_provider, exceptions, usage_map, global_quota); } diff --git a/chrome/browser/engagement/site_engagement_eviction_policy.h b/chrome/browser/engagement/site_engagement_eviction_policy.h index 0b1baec..d160bee 100644 --- a/chrome/browser/engagement/site_engagement_eviction_policy.h +++ b/chrome/browser/engagement/site_engagement_eviction_policy.h @@ -5,6 +5,8 @@ #ifndef CHROME_BROWSER_ENGAGEMENT_SITE_ENGAGEMENT_EVICTION_POLICY_H_ #define CHROME_BROWSER_ENGAGEMENT_SITE_ENGAGEMENT_EVICTION_POLICY_H_ +#include <stdint.h> + #include <map> #include "base/macros.h" @@ -31,8 +33,8 @@ class SiteEngagementEvictionPolicy : public storage::QuotaEvictionPolicy { void GetEvictionOrigin(const scoped_refptr<storage::SpecialStoragePolicy>& special_storage_policy, const std::set<GURL>& exceptions, - const std::map<GURL, int64>& usage_map, - int64 global_quota, + const std::map<GURL, int64_t>& usage_map, + int64_t global_quota, const storage::GetOriginCallback& callback) override; private: @@ -43,8 +45,8 @@ class SiteEngagementEvictionPolicy : public storage::QuotaEvictionPolicy { special_storage_policy, SiteEngagementScoreProvider* score_provider, const std::set<GURL>& exceptions, - const std::map<GURL, int64>& usage_map, - int64 global_quota); + const std::map<GURL, int64_t>& usage_map, + int64_t global_quota); content::BrowserContext* const browser_context_; diff --git a/chrome/browser/engagement/site_engagement_eviction_policy_unittest.cc b/chrome/browser/engagement/site_engagement_eviction_policy_unittest.cc index abef52d..e621cae 100644 --- a/chrome/browser/engagement/site_engagement_eviction_policy_unittest.cc +++ b/chrome/browser/engagement/site_engagement_eviction_policy_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 <stdint.h> + #include "base/files/scoped_temp_dir.h" +#include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "base/memory/weak_ptr.h" #include "base/run_loop.h" @@ -18,7 +21,7 @@ namespace { -const int64 kGlobalQuota = 25 * 1024; +const int64_t kGlobalQuota = 25 * 1024; } // namespace @@ -57,14 +60,15 @@ class SiteEngagementEvictionPolicyTest : public testing::Test { ~SiteEngagementEvictionPolicyTest() override {} - GURL CalculateEvictionOriginWithExceptions(const std::map<GURL, int64>& usage, - const std::set<GURL>& exceptions) { + GURL CalculateEvictionOriginWithExceptions( + const std::map<GURL, int64_t>& usage, + const std::set<GURL>& exceptions) { return SiteEngagementEvictionPolicy::CalculateEvictionOriginForTests( storage_policy_, score_provider_.get(), exceptions, usage, kGlobalQuota); } - GURL CalculateEvictionOrigin(const std::map<GURL, int64>& usage) { + GURL CalculateEvictionOrigin(const std::map<GURL, int64_t>& usage) { return CalculateEvictionOriginWithExceptions(usage, std::set<GURL>()); } @@ -88,7 +92,7 @@ TEST_F(SiteEngagementEvictionPolicyTest, GetEvictionOrigin) { GURL url2("http://www.example.com"); GURL url3("http://www.spam.me"); - std::map<GURL, int64> usage; + std::map<GURL, int64_t> usage; usage[url1] = 10 * 1024; usage[url2] = 10 * 1024; usage[url3] = 10 * 1024; @@ -126,7 +130,7 @@ TEST_F(SiteEngagementEvictionPolicyTest, SpecialStoragePolicy) { GURL url1("http://www.google.com"); GURL url2("http://www.example.com"); - std::map<GURL, int64> usage; + std::map<GURL, int64_t> usage; usage[url1] = 10 * 1024; usage[url2] = 10 * 1024; @@ -148,7 +152,7 @@ TEST_F(SiteEngagementEvictionPolicyTest, Exceptions) { GURL url1("http://www.google.com"); GURL url2("http://www.example.com"); - std::map<GURL, int64> usage; + std::map<GURL, int64_t> usage; usage[url1] = 10 * 1024; usage[url2] = 10 * 1024; diff --git a/chrome/browser/engagement/site_engagement_service.cc b/chrome/browser/engagement/site_engagement_service.cc index 9c9b629..3d2fc72 100644 --- a/chrome/browser/engagement/site_engagement_service.cc +++ b/chrome/browser/engagement/site_engagement_service.cc @@ -4,6 +4,8 @@ #include "chrome/browser/engagement/site_engagement_service.h" +#include <stddef.h> + #include <algorithm> #include <cmath> #include <vector> diff --git a/chrome/browser/engagement/site_engagement_service_factory.h b/chrome/browser/engagement/site_engagement_service_factory.h index 40514ec..9537618 100644 --- a/chrome/browser/engagement/site_engagement_service_factory.h +++ b/chrome/browser/engagement/site_engagement_service_factory.h @@ -5,6 +5,7 @@ #ifndef CHROME_BROWSER_ENGAGEMENT_SITE_ENGAGEMENT_SERVICE_FACTORY_H_ #define CHROME_BROWSER_ENGAGEMENT_SITE_ENGAGEMENT_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/chrome/browser/engagement/site_engagement_service_unittest.cc b/chrome/browser/engagement/site_engagement_service_unittest.cc index f56503be..427f374 100644 --- a/chrome/browser/engagement/site_engagement_service_unittest.cc +++ b/chrome/browser/engagement/site_engagement_service_unittest.cc @@ -3,6 +3,7 @@ // found in the LICENSE file. #include "base/command_line.h" +#include "base/macros.h" #include "base/run_loop.h" #include "base/test/histogram_tester.h" #include "base/test/simple_test_clock.h" diff --git a/chrome/browser/enumerate_modules_model_unittest_win.cc b/chrome/browser/enumerate_modules_model_unittest_win.cc index 3be0ecd7..6f084d5 100644 --- a/chrome/browser/enumerate_modules_model_unittest_win.cc +++ b/chrome/browser/enumerate_modules_model_unittest_win.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/string_number_conversions.h" #include "base/strings/string_util.h" #include "base/strings/utf_string_conversions.h" diff --git a/chrome/browser/enumerate_modules_model_win.cc b/chrome/browser/enumerate_modules_model_win.cc index 1742f0f..fa34389 100644 --- a/chrome/browser/enumerate_modules_model_win.cc +++ b/chrome/browser/enumerate_modules_model_win.cc @@ -4,6 +4,8 @@ #include "chrome/browser/enumerate_modules_model_win.h" +#include <stddef.h> +#include <stdint.h> #include <Tlhelp32.h> #include <wintrust.h> #include <algorithm> @@ -14,6 +16,7 @@ #include "base/file_version_info_win.h" #include "base/files/file_path.h" #include "base/i18n/case_conversion.h" +#include "base/macros.h" #include "base/metrics/histogram.h" #include "base/strings/string_number_conversions.h" #include "base/strings/string_util.h" @@ -347,7 +350,7 @@ static void GenerateHash(const std::string& input, std::string* output) { return; } - uint8 hash[4]; + uint8_t hash[4]; crypto::SHA256HashString(input, hash, sizeof(hash)); *output = base::ToLowerASCII(base::HexEncode(hash, sizeof(hash))); } diff --git a/chrome/browser/enumerate_modules_model_win.h b/chrome/browser/enumerate_modules_model_win.h index adca0fb..d40a81e 100644 --- a/chrome/browser/enumerate_modules_model_win.h +++ b/chrome/browser/enumerate_modules_model_win.h @@ -9,6 +9,7 @@ #include <vector> #include "base/gtest_prod_util.h" +#include "base/macros.h" #include "base/memory/ref_counted.h" #include "base/memory/singleton.h" #include "base/strings/string16.h" diff --git a/chrome/browser/errorpage_browsertest.cc b/chrome/browser/errorpage_browsertest.cc index 08005f8..ee16bb8 100644 --- a/chrome/browser/errorpage_browsertest.cc +++ b/chrome/browser/errorpage_browsertest.cc @@ -7,6 +7,7 @@ #include "base/compiler_specific.h" #include "base/files/scoped_temp_dir.h" #include "base/logging.h" +#include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "base/memory/weak_ptr.h" #include "base/path_service.h" @@ -14,6 +15,7 @@ #include "base/strings/stringprintf.h" #include "base/strings/utf_string_conversions.h" #include "base/synchronization/lock.h" +#include "build/build_config.h" #include "chrome/browser/browsing_data/browsing_data_helper.h" #include "chrome/browser/browsing_data/browsing_data_remover.h" #include "chrome/browser/net/net_error_diagnostics_dialog.h" diff --git a/chrome/browser/extensions/api/image_writer_private/destroy_partitions_operation.cc b/chrome/browser/extensions/api/image_writer_private/destroy_partitions_operation.cc index 8b1c02e..d7b78ee 100644 --- a/chrome/browser/extensions/api/image_writer_private/destroy_partitions_operation.cc +++ b/chrome/browser/extensions/api/image_writer_private/destroy_partitions_operation.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 <string.h> + #include "base/files/file_util.h" #include "chrome/browser/extensions/api/image_writer_private/destroy_partitions_operation.h" #include "chrome/browser/extensions/api/image_writer_private/error_messages.h" diff --git a/chrome/browser/extensions/api/image_writer_private/test_utils.cc b/chrome/browser/extensions/api/image_writer_private/test_utils.cc index 3e56e2b..4b5b7d0 100644 --- a/chrome/browser/extensions/api/image_writer_private/test_utils.cc +++ b/chrome/browser/extensions/api/image_writer_private/test_utils.cc @@ -4,6 +4,8 @@ #include "chrome/browser/extensions/api/image_writer_private/test_utils.h" +#include <string.h> + #include "build/build_config.h" #if defined(OS_CHROMEOS) diff --git a/chrome/browser/extensions/api/music_manager_private/device_id_linux.cc b/chrome/browser/extensions/api/music_manager_private/device_id_linux.cc index 116fd2a..ee0411a 100644 --- a/chrome/browser/extensions/api/music_manager_private/device_id_linux.cc +++ b/chrome/browser/extensions/api/music_manager_private/device_id_linux.cc @@ -7,6 +7,7 @@ #include <ifaddrs.h> #include <net/if.h> #include <stddef.h> +#include <string.h> #include <sys/ioctl.h> #include <sys/socket.h> // Must be included before ifaddrs.h. diff --git a/chrome/browser/external_extension_browsertest.cc b/chrome/browser/external_extension_browsertest.cc index a9c2164..54eb79b 100644 --- a/chrome/browser/external_extension_browsertest.cc +++ b/chrome/browser/external_extension_browsertest.cc @@ -2,10 +2,14 @@ // 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/prefs/pref_service.h" #include "base/strings/string_util.h" #include "base/strings/utf_string_conversions.h" +#include "build/build_config.h" #include "chrome/browser/profiles/profile.h" #include "chrome/browser/ui/browser.h" #include "chrome/browser/ui/tabs/tab_strip_model.h" diff --git a/chrome/browser/external_protocol/external_protocol_handler.cc b/chrome/browser/external_protocol/external_protocol_handler.cc index cf8c99c..90b5428 100644 --- a/chrome/browser/external_protocol/external_protocol_handler.cc +++ b/chrome/browser/external_protocol/external_protocol_handler.cc @@ -4,10 +4,13 @@ #include "chrome/browser/external_protocol/external_protocol_handler.h" +#include <stddef.h> + #include <set> #include "base/bind.h" #include "base/logging.h" +#include "base/macros.h" #include "base/message_loop/message_loop.h" #include "base/prefs/pref_registry_simple.h" #include "base/prefs/pref_service.h" diff --git a/chrome/browser/external_protocol/external_protocol_handler.h b/chrome/browser/external_protocol/external_protocol_handler.h index 5124c5f..0dcef53 100644 --- a/chrome/browser/external_protocol/external_protocol_handler.h +++ b/chrome/browser/external_protocol/external_protocol_handler.h @@ -7,6 +7,7 @@ #include <string> +#include "base/macros.h" #include "chrome/browser/shell_integration.h" #include "ui/base/page_transition_types.h" diff --git a/chrome/browser/external_protocol/external_protocol_observer.h b/chrome/browser/external_protocol/external_protocol_observer.h index 56a653f..72a3b8f 100644 --- a/chrome/browser/external_protocol/external_protocol_observer.h +++ b/chrome/browser/external_protocol/external_protocol_observer.h @@ -5,6 +5,7 @@ #ifndef CHROME_BROWSER_EXTERNAL_PROTOCOL_EXTERNAL_PROTOCOL_OBSERVER_H_ #define CHROME_BROWSER_EXTERNAL_PROTOCOL_EXTERNAL_PROTOCOL_OBSERVER_H_ +#include "base/macros.h" #include "content/public/browser/web_contents_observer.h" #include "content/public/browser/web_contents_user_data.h" diff --git a/chrome/browser/fast_shutdown_browsertest.cc b/chrome/browser/fast_shutdown_browsertest.cc index 3a73d30..e507061 100644 --- a/chrome/browser/fast_shutdown_browsertest.cc +++ b/chrome/browser/fast_shutdown_browsertest.cc @@ -5,6 +5,8 @@ #include "base/bind.h" #include "base/command_line.h" #include "base/files/file_path.h" +#include "base/macros.h" +#include "build/build_config.h" #include "chrome/browser/chrome_notification_types.h" #include "chrome/browser/profiles/profile.h" #include "chrome/browser/ui/browser.h" diff --git a/chrome/browser/favicon/chrome_fallback_icon_client.cc b/chrome/browser/favicon/chrome_fallback_icon_client.cc index 09555e7e..5bff09e 100644 --- a/chrome/browser/favicon/chrome_fallback_icon_client.cc +++ b/chrome/browser/favicon/chrome_fallback_icon_client.cc @@ -4,6 +4,7 @@ #include "chrome/browser/favicon/chrome_fallback_icon_client.h" +#include "build/build_config.h" #include "grit/platform_locale_settings.h" #include "ui/base/l10n/l10n_util.h" diff --git a/chrome/browser/favicon/content_favicon_driver_browsertest.cc b/chrome/browser/favicon/content_favicon_driver_browsertest.cc index 0807918..bd4ac11 100644 --- a/chrome/browser/favicon/content_favicon_driver_browsertest.cc +++ b/chrome/browser/favicon/content_favicon_driver_browsertest.cc @@ -5,6 +5,7 @@ #include "components/favicon/content/content_favicon_driver.h" #include "base/location.h" +#include "base/macros.h" #include "base/memory/weak_ptr.h" #include "base/run_loop.h" #include "base/scoped_observer.h" diff --git a/chrome/browser/favicon/fallback_icon_service_factory.h b/chrome/browser/favicon/fallback_icon_service_factory.h index 2a3fc3a..5d37bb0 100644 --- a/chrome/browser/favicon/fallback_icon_service_factory.h +++ b/chrome/browser/favicon/fallback_icon_service_factory.h @@ -5,6 +5,7 @@ #ifndef CHROME_BROWSER_FAVICON_FALLBACK_ICON_SERVICE_FACTORY_H_ #define CHROME_BROWSER_FAVICON_FALLBACK_ICON_SERVICE_FACTORY_H_ +#include "base/macros.h" #include "components/keyed_service/content/browser_context_keyed_service_factory.h" namespace base { diff --git a/chrome/browser/favicon/favicon_service_factory.h b/chrome/browser/favicon/favicon_service_factory.h index ef629fe..5d8c7d1 100644 --- a/chrome/browser/favicon/favicon_service_factory.h +++ b/chrome/browser/favicon/favicon_service_factory.h @@ -5,6 +5,7 @@ #ifndef CHROME_BROWSER_FAVICON_FAVICON_SERVICE_FACTORY_H_ #define CHROME_BROWSER_FAVICON_FAVICON_SERVICE_FACTORY_H_ +#include "base/macros.h" #include "components/keyed_service/content/browser_context_keyed_service_factory.h" #include "components/keyed_service/core/service_access_type.h" diff --git a/chrome/browser/favicon/large_icon_service_factory.h b/chrome/browser/favicon/large_icon_service_factory.h index db5a167..574a119 100644 --- a/chrome/browser/favicon/large_icon_service_factory.h +++ b/chrome/browser/favicon/large_icon_service_factory.h @@ -5,6 +5,7 @@ #ifndef CHROME_BROWSER_FAVICON_LARGE_ICON_SERVICE_FACTORY_H_ #define CHROME_BROWSER_FAVICON_LARGE_ICON_SERVICE_FACTORY_H_ +#include "base/macros.h" #include "components/keyed_service/content/browser_context_keyed_service_factory.h" namespace base { diff --git a/chrome/browser/feedback/feedback_profile_observer.h b/chrome/browser/feedback/feedback_profile_observer.h index fe85195..0b174ac 100644 --- a/chrome/browser/feedback/feedback_profile_observer.h +++ b/chrome/browser/feedback/feedback_profile_observer.h @@ -5,8 +5,8 @@ #ifndef CHROME_BROWSER_FEEDBACK_FEEDBACK_PROFILE_OBSERVER_H_ #define CHROME_BROWSER_FEEDBACK_FEEDBACK_PROFILE_OBSERVER_H_ -#include "base/basictypes.h" #include "base/lazy_instance.h" +#include "base/macros.h" #include "content/public/browser/notification_observer.h" #include "content/public/browser/notification_registrar.h" diff --git a/chrome/browser/feedback/show_feedback_page.cc b/chrome/browser/feedback/show_feedback_page.cc index 6a5c858..4fc2449 100644 --- a/chrome/browser/feedback/show_feedback_page.cc +++ b/chrome/browser/feedback/show_feedback_page.cc @@ -4,6 +4,7 @@ #include <string> +#include "build/build_config.h" #include "chrome/browser/browser_process.h" #include "chrome/browser/extensions/api/feedback_private/feedback_private_api.h" #include "chrome/browser/profiles/profile.h" diff --git a/chrome/browser/feedback/system_logs/about_system_logs_fetcher.cc b/chrome/browser/feedback/system_logs/about_system_logs_fetcher.cc index c92fec5..c758743 100644 --- a/chrome/browser/feedback/system_logs/about_system_logs_fetcher.cc +++ b/chrome/browser/feedback/system_logs/about_system_logs_fetcher.cc @@ -6,6 +6,7 @@ #include "base/bind.h" #include "base/bind_helpers.h" +#include "build/build_config.h" #include "chrome/browser/feedback/system_logs/log_sources/chrome_internal_log_source.h" #include "chrome/browser/feedback/system_logs/log_sources/memory_details_log_source.h" #include "content/public/browser/browser_thread.h" diff --git a/chrome/browser/feedback/system_logs/about_system_logs_fetcher.h b/chrome/browser/feedback/system_logs/about_system_logs_fetcher.h index ef84516..708eec0 100644 --- a/chrome/browser/feedback/system_logs/about_system_logs_fetcher.h +++ b/chrome/browser/feedback/system_logs/about_system_logs_fetcher.h @@ -5,6 +5,7 @@ #ifndef CHROME_BROWSER_FEEDBACK_SYSTEM_LOGS_ABOUT_SYSTEM_LOGS_FETCHER_H_ #define CHROME_BROWSER_FEEDBACK_SYSTEM_LOGS_ABOUT_SYSTEM_LOGS_FETCHER_H_ +#include "base/macros.h" #include "chrome/browser/feedback/system_logs/system_logs_fetcher_base.h" namespace system_logs { diff --git a/chrome/browser/feedback/system_logs/log_sources/chrome_internal_log_source.cc b/chrome/browser/feedback/system_logs/log_sources/chrome_internal_log_source.cc index 809497a..0645b2a 100644 --- a/chrome/browser/feedback/system_logs/log_sources/chrome_internal_log_source.cc +++ b/chrome/browser/feedback/system_logs/log_sources/chrome_internal_log_source.cc @@ -7,6 +7,7 @@ #include "base/json/json_string_value_serializer.h" #include "base/prefs/pref_service.h" #include "base/sys_info.h" +#include "build/build_config.h" #include "chrome/browser/browser_process.h" #include "chrome/browser/metrics/chrome_metrics_service_accessor.h" #include "chrome/browser/profiles/profile_manager.h" diff --git a/chrome/browser/feedback/system_logs/log_sources/chrome_internal_log_source.h b/chrome/browser/feedback/system_logs/log_sources/chrome_internal_log_source.h index a369dcf..1b9203d 100644 --- a/chrome/browser/feedback/system_logs/log_sources/chrome_internal_log_source.h +++ b/chrome/browser/feedback/system_logs/log_sources/chrome_internal_log_source.h @@ -5,6 +5,8 @@ #ifndef CHROME_BROWSER_FEEDBACK_SYSTEM_LOGS_LOG_SOURCES_CHROME_INTERNAL_LOG_SOURCE_H_ #define CHROME_BROWSER_FEEDBACK_SYSTEM_LOGS_LOG_SOURCES_CHROME_INTERNAL_LOG_SOURCE_H_ +#include "base/macros.h" +#include "build/build_config.h" #include "chrome/browser/feedback/system_logs/system_logs_fetcher_base.h" namespace system_logs { diff --git a/chrome/browser/feedback/system_logs/log_sources/memory_details_log_source.cc b/chrome/browser/feedback/system_logs/log_sources/memory_details_log_source.cc index 39ca766..7b466e2 100644 --- a/chrome/browser/feedback/system_logs/log_sources/memory_details_log_source.cc +++ b/chrome/browser/feedback/system_logs/log_sources/memory_details_log_source.cc @@ -4,6 +4,7 @@ #include "chrome/browser/feedback/system_logs/log_sources/memory_details_log_source.h" +#include "base/macros.h" #include "chrome/browser/memory_details.h" #include "content/public/browser/browser_thread.h" diff --git a/chrome/browser/feedback/system_logs/log_sources/memory_details_log_source.h b/chrome/browser/feedback/system_logs/log_sources/memory_details_log_source.h index 55e9576..2ceef0a 100644 --- a/chrome/browser/feedback/system_logs/log_sources/memory_details_log_source.h +++ b/chrome/browser/feedback/system_logs/log_sources/memory_details_log_source.h @@ -5,6 +5,7 @@ #ifndef CHROME_BROWSER_FEEDBACK_SYSTEM_LOGS_LOG_SOURCES_MEMORY_DETAILS_LOG_SOURCE_H_ #define CHROME_BROWSER_FEEDBACK_SYSTEM_LOGS_LOG_SOURCES_MEMORY_DETAILS_LOG_SOURCE_H_ +#include "base/macros.h" #include "chrome/browser/feedback/system_logs/system_logs_fetcher_base.h" namespace system_logs { diff --git a/chrome/browser/feedback/system_logs/scrubbed_system_logs_fetcher.cc b/chrome/browser/feedback/system_logs/scrubbed_system_logs_fetcher.cc index 7b3f442..24aa8de 100644 --- a/chrome/browser/feedback/system_logs/scrubbed_system_logs_fetcher.cc +++ b/chrome/browser/feedback/system_logs/scrubbed_system_logs_fetcher.cc @@ -6,6 +6,7 @@ #include "base/bind.h" #include "base/bind_helpers.h" +#include "build/build_config.h" #include "chrome/browser/feedback/system_logs/log_sources/chrome_internal_log_source.h" #include "chrome/browser/feedback/system_logs/log_sources/memory_details_log_source.h" #include "content/public/browser/browser_thread.h" diff --git a/chrome/browser/feedback/system_logs/scrubbed_system_logs_fetcher.h b/chrome/browser/feedback/system_logs/scrubbed_system_logs_fetcher.h index 19c9077..40229f2 100644 --- a/chrome/browser/feedback/system_logs/scrubbed_system_logs_fetcher.h +++ b/chrome/browser/feedback/system_logs/scrubbed_system_logs_fetcher.h @@ -5,6 +5,7 @@ #ifndef CHROME_BROWSER_FEEDBACK_SYSTEM_LOGS_SCRUBBED_SYSTEM_LOGS_FETCHER_H_ #define CHROME_BROWSER_FEEDBACK_SYSTEM_LOGS_SCRUBBED_SYSTEM_LOGS_FETCHER_H_ +#include "base/macros.h" #include "chrome/browser/feedback/system_logs/system_logs_fetcher_base.h" namespace system_logs { diff --git a/chrome/browser/feedback/system_logs/system_logs_fetcher_base.h b/chrome/browser/feedback/system_logs/system_logs_fetcher_base.h index 521e15d..5f881e6 100644 --- a/chrome/browser/feedback/system_logs/system_logs_fetcher_base.h +++ b/chrome/browser/feedback/system_logs/system_logs_fetcher_base.h @@ -5,10 +5,13 @@ #ifndef CHROME_BROWSER_FEEDBACK_SYSTEM_LOGS_SYSTEM_LOGS_FETCHER_BASE_H_ #define CHROME_BROWSER_FEEDBACK_SYSTEM_LOGS_SYSTEM_LOGS_FETCHER_BASE_H_ +#include <stddef.h> + #include <map> #include <string> #include "base/callback.h" +#include "base/macros.h" #include "base/memory/scoped_vector.h" #include "base/memory/weak_ptr.h" diff --git a/chrome/browser/file_select_helper.cc b/chrome/browser/file_select_helper.cc index 63f19e3..72f121b 100644 --- a/chrome/browser/file_select_helper.cc +++ b/chrome/browser/file_select_helper.cc @@ -4,6 +4,8 @@ #include "chrome/browser/file_select_helper.h" +#include <stddef.h> + #include <string> #include <utility> @@ -13,6 +15,7 @@ #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 "chrome/browser/browser_process.h" #include "chrome/browser/platform_util.h" #include "chrome/browser/profiles/profile.h" diff --git a/chrome/browser/file_select_helper.h b/chrome/browser/file_select_helper.h index 3449a3d..f0669eb 100644 --- a/chrome/browser/file_select_helper.h +++ b/chrome/browser/file_select_helper.h @@ -10,7 +10,9 @@ #include "base/compiler_specific.h" #include "base/gtest_prod_util.h" +#include "base/macros.h" #include "base/memory/scoped_ptr.h" +#include "build/build_config.h" #include "content/public/browser/notification_observer.h" #include "content/public/browser/notification_registrar.h" #include "content/public/browser/web_contents_observer.h" diff --git a/chrome/browser/file_select_helper_unittest.cc b/chrome/browser/file_select_helper_unittest.cc index 823ccc0..90e8c3d 100644 --- a/chrome/browser/file_select_helper_unittest.cc +++ b/chrome/browser/file_select_helper_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/command_line.h" #include "base/files/file_path.h" #include "base/files/file_util.h" @@ -9,6 +11,7 @@ #include "base/macros.h" #include "base/path_service.h" #include "base/process/launch.h" +#include "build/build_config.h" #include "chrome/browser/file_select_helper.h" #include "chrome/common/chrome_paths.h" #include "testing/gtest/include/gtest/gtest.h" diff --git a/chrome/browser/first_run/first_run.cc b/chrome/browser/first_run/first_run.cc index a5838be..4d43f83 100644 --- a/chrome/browser/first_run/first_run.cc +++ b/chrome/browser/first_run/first_run.cc @@ -11,6 +11,7 @@ #include "base/files/file_path.h" #include "base/files/file_util.h" #include "base/lazy_instance.h" +#include "base/macros.h" #include "base/memory/ref_counted.h" #include "base/metrics/histogram.h" #include "base/path_service.h" @@ -75,7 +76,7 @@ namespace { // A bitfield formed from values in AutoImportState to record the state of // AutoImport. This is used in testing to verify import startup actions that // occur before an observer can be registered in the test. -uint16 g_auto_import_state = first_run::AUTO_IMPORT_NONE; +uint16_t g_auto_import_state = first_run::AUTO_IMPORT_NONE; // Flags for functions of similar name. bool g_should_show_welcome_page = false; @@ -236,7 +237,7 @@ void SetImportItem(PrefService* user_prefs, void ImportFromSourceProfile(ExternalProcessImporterHost* importer_host, const importer::SourceProfile& source_profile, Profile* target_profile, - uint16 items_to_import) { + uint16_t items_to_import) { ImportEndedObserver observer; importer_host->set_observer(&observer); importer_host->StartImportSettings(source_profile, @@ -829,7 +830,7 @@ void DoPostImportTasks(Profile* profile, bool make_chrome_default_for_user) { internal::DoPostImportPlatformSpecificTasks(profile); } -uint16 auto_import_state() { +uint16_t auto_import_state() { return g_auto_import_state; } diff --git a/chrome/browser/first_run/first_run.h b/chrome/browser/first_run/first_run.h index f9b46f0..59ffaad 100644 --- a/chrome/browser/first_run/first_run.h +++ b/chrome/browser/first_run/first_run.h @@ -5,10 +5,12 @@ #ifndef CHROME_BROWSER_FIRST_RUN_FIRST_RUN_H_ #define CHROME_BROWSER_FIRST_RUN_FIRST_RUN_H_ +#include <stdint.h> + #include <string> #include <vector> -#include "base/basictypes.h" +#include "build/build_config.h" class GURL; class Profile; @@ -155,7 +157,7 @@ void DoPostImportTasks(Profile* profile, bool make_chrome_default_for_user); // Returns the current state of AutoImport as recorded in a bitfield formed from // values in AutoImportState. -uint16 auto_import_state(); +uint16_t auto_import_state(); // Set a master preferences file path that overrides platform defaults. void SetMasterPrefsPathForTesting(const base::FilePath& master_prefs); diff --git a/chrome/browser/first_run/first_run_browsertest.cc b/chrome/browser/first_run/first_run_browsertest.cc index 716a1a9..b7ee537 100644 --- a/chrome/browser/first_run/first_run_browsertest.cc +++ b/chrome/browser/first_run/first_run_browsertest.cc @@ -12,6 +12,7 @@ #include "base/prefs/pref_service.h" #include "base/strings/string_util.h" #include "base/strings/utf_string_conversions.h" +#include "build/build_config.h" #include "chrome/browser/browser_process.h" #include "chrome/browser/extensions/component_loader.h" #include "chrome/browser/first_run/first_run.h" diff --git a/chrome/browser/first_run/first_run_internal_win.cc b/chrome/browser/first_run/first_run_internal_win.cc index d94e5e5..98dba61 100644 --- a/chrome/browser/first_run/first_run_internal_win.cc +++ b/chrome/browser/first_run/first_run_internal_win.cc @@ -6,6 +6,7 @@ #include <windows.h> #include <shellapi.h> +#include <stdint.h> #include "base/base_paths.h" #include "base/callback.h" @@ -124,7 +125,7 @@ void DoPostImportPlatformSpecificTasks(Profile* /* profile */) { // Delay the task slightly to give Chrome launch I/O priority while also // making sure shortcuts are created promptly to avoid annoying the user by // re-creating shortcuts he previously deleted. - static const int64 kTiggerActiveSetupDelaySeconds = 5; + static const int64_t kTiggerActiveSetupDelaySeconds = 5; base::FilePath chrome_exe; if (!PathService::Get(base::FILE_EXE, &chrome_exe)) { NOTREACHED(); diff --git a/chrome/browser/first_run/first_run_unittest.cc b/chrome/browser/first_run/first_run_unittest.cc index 0ec0c08..47d5d20 100644 --- a/chrome/browser/first_run/first_run_unittest.cc +++ b/chrome/browser/first_run/first_run_unittest.cc @@ -2,9 +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 "base/compiler_specific.h" #include "base/files/file_util.h" +#include "base/macros.h" #include "base/test/scoped_path_override.h" #include "base/values.h" #include "chrome/browser/first_run/first_run.h" diff --git a/chrome/browser/first_run/try_chrome_dialog_view.cc b/chrome/browser/first_run/try_chrome_dialog_view.cc index 5918776..66edef9 100644 --- a/chrome/browser/first_run/try_chrome_dialog_view.cc +++ b/chrome/browser/first_run/try_chrome_dialog_view.cc @@ -7,6 +7,7 @@ #include <shellapi.h> #include "base/logging.h" +#include "base/macros.h" #include "base/message_loop/message_loop.h" #include "base/strings/string16.h" #include "chrome/browser/process_singleton.h" diff --git a/chrome/browser/first_run/try_chrome_dialog_view.h b/chrome/browser/first_run/try_chrome_dialog_view.h index 5a0de80..16cb9c9 100644 --- a/chrome/browser/first_run/try_chrome_dialog_view.h +++ b/chrome/browser/first_run/try_chrome_dialog_view.h @@ -5,8 +5,10 @@ #ifndef CHROME_BROWSER_FIRST_RUN_TRY_CHROME_DIALOG_VIEW_H_ #define CHROME_BROWSER_FIRST_RUN_TRY_CHROME_DIALOG_VIEW_H_ -#include "base/basictypes.h" +#include <stddef.h> + #include "base/compiler_specific.h" +#include "base/macros.h" #include "ui/gfx/native_widget_types.h" #include "ui/views/controls/button/button.h" #include "ui/views/controls/link_listener.h" diff --git a/chrome/browser/first_run/try_chrome_dialog_view_browsertest.cc b/chrome/browser/first_run/try_chrome_dialog_view_browsertest.cc index aafa507..7cfa862 100644 --- a/chrome/browser/first_run/try_chrome_dialog_view_browsertest.cc +++ b/chrome/browser/first_run/try_chrome_dialog_view_browsertest.cc @@ -3,6 +3,7 @@ // found in the LICENSE file. #include "base/command_line.h" +#include "build/build_config.h" #include "chrome/common/chrome_result_codes.h" #include "chrome/common/chrome_switches.h" #include "chrome/test/base/in_process_browser_test.h" diff --git a/chrome/browser/first_run/upgrade_util_win.cc b/chrome/browser/first_run/upgrade_util_win.cc index 9854ef0..5725ba2 100644 --- a/chrome/browser/first_run/upgrade_util_win.cc +++ b/chrome/browser/first_run/upgrade_util_win.cc @@ -17,6 +17,7 @@ #include "base/files/file_path.h" #include "base/files/file_util.h" #include "base/logging.h" +#include "base/macros.h" #include "base/path_service.h" #include "base/prefs/pref_service.h" #include "base/process/launch.h" diff --git a/chrome/browser/font_family_cache.cc b/chrome/browser/font_family_cache.cc index cc42d93..63e41350 100644 --- a/chrome/browser/font_family_cache.cc +++ b/chrome/browser/font_family_cache.cc @@ -4,6 +4,8 @@ #include "chrome/browser/font_family_cache.h" +#include <stddef.h> + #include <map> #include "base/prefs/pref_service.h" diff --git a/chrome/browser/font_family_cache.h b/chrome/browser/font_family_cache.h index d5ff699..306cbf0 100644 --- a/chrome/browser/font_family_cache.h +++ b/chrome/browser/font_family_cache.h @@ -7,6 +7,7 @@ #include "base/containers/hash_tables.h" #include "base/gtest_prod_util.h" +#include "base/macros.h" #include "base/prefs/pref_change_registrar.h" #include "base/strings/string16.h" #include "base/supports_user_data.h" diff --git a/chrome/browser/font_family_cache_unittest.cc b/chrome/browser/font_family_cache_unittest.cc index 412f2bf..e16ed5f 100644 --- a/chrome/browser/font_family_cache_unittest.cc +++ b/chrome/browser/font_family_cache_unittest.cc @@ -4,6 +4,7 @@ #include "chrome/browser/font_family_cache.h" +#include "base/macros.h" #include "base/strings/utf_string_conversions.h" #include "chrome/test/base/testing_profile.h" #include "components/syncable_prefs/testing_pref_service_syncable.h" diff --git a/chrome/browser/geolocation/chrome_access_token_store.cc b/chrome/browser/geolocation/chrome_access_token_store.cc index 01cf53b..67f99ad 100644 --- a/chrome/browser/geolocation/chrome_access_token_store.cc +++ b/chrome/browser/geolocation/chrome_access_token_store.cc @@ -4,6 +4,8 @@ #include "chrome/browser/geolocation/chrome_access_token_store.h" +#include <stddef.h> + #include "base/bind.h" #include "base/prefs/pref_registry_simple.h" #include "base/prefs/pref_service.h" diff --git a/chrome/browser/geolocation/chrome_access_token_store.h b/chrome/browser/geolocation/chrome_access_token_store.h index 92d0791..8015c7e 100644 --- a/chrome/browser/geolocation/chrome_access_token_store.h +++ b/chrome/browser/geolocation/chrome_access_token_store.h @@ -5,6 +5,7 @@ #ifndef CHROME_BROWSER_GEOLOCATION_CHROME_ACCESS_TOKEN_STORE_H_ #define CHROME_BROWSER_GEOLOCATION_CHROME_ACCESS_TOKEN_STORE_H_ +#include "base/macros.h" #include "base/memory/ref_counted.h" #include "content/public/browser/access_token_store.h" diff --git a/chrome/browser/geolocation/geolocation_browsertest.cc b/chrome/browser/geolocation/geolocation_browsertest.cc index 52b0ce5..e6437ce 100644 --- a/chrome/browser/geolocation/geolocation_browsertest.cc +++ b/chrome/browser/geolocation/geolocation_browsertest.cc @@ -2,14 +2,18 @@ // 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/compiler_specific.h" +#include "base/macros.h" #include "base/strings/string_number_conversions.h" #include "base/strings/stringprintf.h" #include "base/strings/utf_string_conversions.h" #include "base/test/simple_test_clock.h" #include "base/time/clock.h" +#include "build/build_config.h" #include "chrome/browser/chrome_notification_types.h" #include "chrome/browser/content_settings/host_content_settings_map_factory.h" #include "chrome/browser/content_settings/tab_specific_content_settings.h" diff --git a/chrome/browser/geolocation/geolocation_permission_context.h b/chrome/browser/geolocation/geolocation_permission_context.h index a9e99ed..61fcd0a 100644 --- a/chrome/browser/geolocation/geolocation_permission_context.h +++ b/chrome/browser/geolocation/geolocation_permission_context.h @@ -6,6 +6,7 @@ #define CHROME_BROWSER_GEOLOCATION_GEOLOCATION_PERMISSION_CONTEXT_H_ #include "base/callback.h" +#include "base/macros.h" #include "chrome/browser/geolocation/geolocation_permission_context_extensions.h" #include "chrome/browser/permissions/permission_context_base.h" diff --git a/chrome/browser/geolocation/geolocation_permission_context_android.h b/chrome/browser/geolocation/geolocation_permission_context_android.h index 2391831..c4bb577 100644 --- a/chrome/browser/geolocation/geolocation_permission_context_android.h +++ b/chrome/browser/geolocation/geolocation_permission_context_android.h @@ -20,6 +20,7 @@ // infobars, etc.). // // Otherwise the permission is already decided. +#include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "base/memory/weak_ptr.h" #include "chrome/browser/geolocation/geolocation_permission_context.h" diff --git a/chrome/browser/geolocation/geolocation_permission_context_factory.h b/chrome/browser/geolocation/geolocation_permission_context_factory.h index 36c1ff2..9bc2834 100644 --- a/chrome/browser/geolocation/geolocation_permission_context_factory.h +++ b/chrome/browser/geolocation/geolocation_permission_context_factory.h @@ -5,6 +5,7 @@ #ifndef CHROME_BROWSER_GEOLOCATION_GEOLOCATION_PERMISSION_CONTEXT_FACTORY_H_ #define CHROME_BROWSER_GEOLOCATION_GEOLOCATION_PERMISSION_CONTEXT_FACTORY_H_ +#include "base/macros.h" #include "base/memory/singleton.h" #include "base/prefs/pref_service.h" #include "base/values.h" diff --git a/chrome/browser/geolocation/geolocation_permission_context_unittest.cc b/chrome/browser/geolocation/geolocation_permission_context_unittest.cc index 42273ac..3b2f58a 100644 --- a/chrome/browser/geolocation/geolocation_permission_context_unittest.cc +++ b/chrome/browser/geolocation/geolocation_permission_context_unittest.cc @@ -4,6 +4,8 @@ #include "chrome/browser/geolocation/geolocation_permission_context.h" +#include <stddef.h> + #include <set> #include <string> #include <utility> diff --git a/chrome/browser/global_keyboard_shortcuts_mac.h b/chrome/browser/global_keyboard_shortcuts_mac.h index b478005..be5223e 100644 --- a/chrome/browser/global_keyboard_shortcuts_mac.h +++ b/chrome/browser/global_keyboard_shortcuts_mac.h @@ -6,8 +6,7 @@ #define CHROME_BROWSER_GLOBAL_KEYBOARD_SHORTCUTS_MAC_H_ #include <Carbon/Carbon.h> // For unichar. - -#include "base/basictypes.h" +#include <stddef.h> @class NSEvent; diff --git a/chrome/browser/global_keyboard_shortcuts_mac.mm b/chrome/browser/global_keyboard_shortcuts_mac.mm index aa2d3ee..4bb3956 100644 --- a/chrome/browser/global_keyboard_shortcuts_mac.mm +++ b/chrome/browser/global_keyboard_shortcuts_mac.mm @@ -6,8 +6,8 @@ #import <AppKit/AppKit.h> -#include "base/basictypes.h" #include "base/logging.h" +#include "base/macros.h" #include "chrome/app/chrome_command_ids.h" #import "chrome/browser/ui/cocoa/nsmenuitem_additions.h" diff --git a/chrome/browser/global_keyboard_shortcuts_mac_unittest.mm b/chrome/browser/global_keyboard_shortcuts_mac_unittest.mm index e5d3463..df0e4eb 100644 --- a/chrome/browser/global_keyboard_shortcuts_mac_unittest.mm +++ b/chrome/browser/global_keyboard_shortcuts_mac_unittest.mm @@ -4,9 +4,11 @@ #include <AppKit/NSEvent.h> #include <Carbon/Carbon.h> +#include <stddef.h> #include "chrome/browser/global_keyboard_shortcuts_mac.h" +#include "base/macros.h" #include "chrome/app/chrome_command_ids.h" #include "testing/gtest/include/gtest/gtest.h" diff --git a/chrome/browser/google/chrome_google_url_tracker_client.h b/chrome/browser/google/chrome_google_url_tracker_client.h index 2e0d567..0d826ae 100644 --- a/chrome/browser/google/chrome_google_url_tracker_client.h +++ b/chrome/browser/google/chrome_google_url_tracker_client.h @@ -5,6 +5,7 @@ #ifndef CHROME_BROWSER_GOOGLE_CHROME_GOOGLE_URL_TRACKER_CLIENT_H_ #define CHROME_BROWSER_GOOGLE_CHROME_GOOGLE_URL_TRACKER_CLIENT_H_ +#include "base/macros.h" #include "components/google/core/browser/google_url_tracker_client.h" class Profile; diff --git a/chrome/browser/google/google_brand.cc b/chrome/browser/google/google_brand.cc index 516918d..5360948 100644 --- a/chrome/browser/google/google_brand.cc +++ b/chrome/browser/google/google_brand.cc @@ -6,9 +6,10 @@ #include <string> - +#include "base/macros.h" #include "base/strings/string_util.h" #include "base/strings/utf_string_conversions.h" +#include "build/build_config.h" #include "chrome/installer/util/google_update_settings.h" #if defined(OS_MACOSX) diff --git a/chrome/browser/google/google_brand.h b/chrome/browser/google/google_brand.h index a653f41..fa88dfd 100644 --- a/chrome/browser/google/google_brand.h +++ b/chrome/browser/google/google_brand.h @@ -12,7 +12,7 @@ #include <string> -#include "base/basictypes.h" +#include "base/macros.h" class GURL; @@ -47,6 +47,7 @@ class BrandForTesting { private: std::string brand_; + DISALLOW_COPY_AND_ASSIGN(BrandForTesting); }; diff --git a/chrome/browser/google/google_brand_chromeos.cc b/chrome/browser/google/google_brand_chromeos.cc index ddde682..6e30238 100644 --- a/chrome/browser/google/google_brand_chromeos.cc +++ b/chrome/browser/google/google_brand_chromeos.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/bind.h" #include "base/files/file_path.h" #include "base/files/file_util.h" diff --git a/chrome/browser/google/google_update_settings_posix.cc b/chrome/browser/google/google_update_settings_posix.cc index c75f806..7bdd568 100644 --- a/chrome/browser/google/google_update_settings_posix.cc +++ b/chrome/browser/google/google_update_settings_posix.cc @@ -10,6 +10,7 @@ #include "base/strings/string_util.h" #include "base/strings/utf_string_conversions.h" #include "base/synchronization/lock.h" +#include "build/build_config.h" #include "chrome/common/chrome_paths.h" #if defined(OS_MACOSX) diff --git a/chrome/browser/google/google_update_settings_unittest.cc b/chrome/browser/google/google_update_settings_unittest.cc index e1747cb..8b3572a 100644 --- a/chrome/browser/google/google_update_settings_unittest.cc +++ b/chrome/browser/google/google_update_settings_unittest.cc @@ -2,11 +2,12 @@ // 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/compiler_specific.h" #include "base/files/file_util.h" +#include "base/macros.h" #include "base/path_service.h" #include "base/test/scoped_path_override.h" +#include "build/build_config.h" #include "chrome/browser/google/google_brand.h" #include "chrome/common/chrome_paths.h" #include "chrome/installer/util/google_update_settings.h" diff --git a/chrome/browser/google/google_update_win.cc b/chrome/browser/google/google_update_win.cc index 0671501a..9f745ce 100644 --- a/chrome/browser/google/google_update_win.cc +++ b/chrome/browser/google/google_update_win.cc @@ -6,6 +6,8 @@ #include <atlbase.h> #include <atlcom.h> +#include <stdint.h> +#include <string.h> #include <vector> @@ -13,6 +15,7 @@ #include "base/callback.h" #include "base/files/file_path.h" #include "base/location.h" +#include "base/macros.h" #include "base/metrics/histogram.h" #include "base/metrics/sparse_histogram.h" #include "base/path_service.h" diff --git a/chrome/browser/google/google_update_win.h b/chrome/browser/google/google_update_win.h index df9c84a..0c4efac 100644 --- a/chrome/browser/google/google_update_win.h +++ b/chrome/browser/google/google_update_win.h @@ -5,7 +5,6 @@ #ifndef CHROME_BROWSER_GOOGLE_GOOGLE_UPDATE_WIN_H_ #define CHROME_BROWSER_GOOGLE_GOOGLE_UPDATE_WIN_H_ -#include "base/basictypes.h" #include "base/callback_forward.h" #include "base/memory/ref_counted.h" #include "base/memory/weak_ptr.h" diff --git a/chrome/browser/google/google_update_win_unittest.cc b/chrome/browser/google/google_update_win_unittest.cc index 1d16ff8..79d5d0d 100644 --- a/chrome/browser/google/google_update_win_unittest.cc +++ b/chrome/browser/google/google_update_win_unittest.cc @@ -12,6 +12,7 @@ #include "base/base_paths.h" #include "base/bind.h" +#include "base/macros.h" #include "base/memory/ref_counted.h" #include "base/path_service.h" #include "base/strings/stringprintf.h" diff --git a/chrome/browser/google/google_url_tracker_factory.h b/chrome/browser/google/google_url_tracker_factory.h index 9d999c6..7da6cfd 100644 --- a/chrome/browser/google/google_url_tracker_factory.h +++ b/chrome/browser/google/google_url_tracker_factory.h @@ -5,7 +5,7 @@ #ifndef CHROME_BROWSER_GOOGLE_GOOGLE_URL_TRACKER_FACTORY_H_ #define CHROME_BROWSER_GOOGLE_GOOGLE_URL_TRACKER_FACTORY_H_ -#include "base/basictypes.h" +#include "base/macros.h" #include "base/memory/singleton.h" #include "components/keyed_service/content/browser_context_keyed_service_factory.h" diff --git a/chrome/browser/gpu/gl_string_manager.cc b/chrome/browser/gpu/gl_string_manager.cc index f678ecb..d0149df 100644 --- a/chrome/browser/gpu/gl_string_manager.cc +++ b/chrome/browser/gpu/gl_string_manager.cc @@ -6,6 +6,7 @@ #include "base/prefs/pref_registry_simple.h" #include "base/prefs/pref_service.h" +#include "build/build_config.h" #include "chrome/browser/browser_process.h" #include "chrome/common/pref_names.h" #include "content/public/browser/gpu_data_manager.h" diff --git a/chrome/browser/gpu/gl_string_manager.h b/chrome/browser/gpu/gl_string_manager.h index f9eb97e..23d5d47 100644 --- a/chrome/browser/gpu/gl_string_manager.h +++ b/chrome/browser/gpu/gl_string_manager.h @@ -8,6 +8,7 @@ #include <string> #include "base/compiler_specific.h" +#include "base/macros.h" #include "content/public/browser/gpu_data_manager_observer.h" class PrefRegistrySimple; diff --git a/chrome/browser/gpu/gpu_feature_checker.cc b/chrome/browser/gpu/gpu_feature_checker.cc index e53dddd..3147d4e 100644 --- a/chrome/browser/gpu/gpu_feature_checker.cc +++ b/chrome/browser/gpu/gpu_feature_checker.cc @@ -5,6 +5,7 @@ #include "chrome/browser/gpu/gpu_feature_checker.h" #include "base/logging.h" +#include "build/build_config.h" #include "content/public/browser/browser_thread.h" #include "content/public/browser/gpu_data_manager.h" diff --git a/chrome/browser/gpu/gpu_feature_checker.h b/chrome/browser/gpu/gpu_feature_checker.h index 067ad30..873ca41 100644 --- a/chrome/browser/gpu/gpu_feature_checker.h +++ b/chrome/browser/gpu/gpu_feature_checker.h @@ -6,6 +6,7 @@ #define CHROME_BROWSER_GPU_GPU_FEATURE_CHECKER_H_ #include "base/callback.h" +#include "base/macros.h" #include "base/memory/ref_counted.h" #include "content/public/browser/gpu_data_manager_observer.h" #include "gpu/config/gpu_feature_type.h" diff --git a/chrome/browser/gpu/gpu_mode_manager.h b/chrome/browser/gpu/gpu_mode_manager.h index 8dd605b..a0c6d24 100644 --- a/chrome/browser/gpu/gpu_mode_manager.h +++ b/chrome/browser/gpu/gpu_mode_manager.h @@ -5,6 +5,7 @@ #ifndef CHROME_BROWSER_GPU_GPU_MODE_MANAGER_H_ #define CHROME_BROWSER_GPU_GPU_MODE_MANAGER_H_ +#include "base/macros.h" #include "base/prefs/pref_change_registrar.h" class PrefRegistrySimple; diff --git a/chrome/browser/gpu/three_d_api_observer.cc b/chrome/browser/gpu/three_d_api_observer.cc index e97e956..3d342955 100644 --- a/chrome/browser/gpu/three_d_api_observer.cc +++ b/chrome/browser/gpu/three_d_api_observer.cc @@ -4,6 +4,7 @@ #include "chrome/browser/gpu/three_d_api_observer.h" +#include "base/macros.h" #include "base/metrics/histogram.h" #include "chrome/browser/infobars/infobar_service.h" #include "chrome/browser/tab_contents/tab_util.h" diff --git a/chrome/browser/gpu/three_d_api_observer.h b/chrome/browser/gpu/three_d_api_observer.h index 1db487c..157175c 100644 --- a/chrome/browser/gpu/three_d_api_observer.h +++ b/chrome/browser/gpu/three_d_api_observer.h @@ -6,6 +6,7 @@ #define CHROME_BROWSER_GPU_THREE_D_API_OBSERVER_H_ #include "base/compiler_specific.h" +#include "base/macros.h" #include "content/public/browser/gpu_data_manager_observer.h" class ThreeDAPIObserver : public content::GpuDataManagerObserver { diff --git a/chrome/browser/guest_view/app_view/chrome_app_view_guest_delegate.h b/chrome/browser/guest_view/app_view/chrome_app_view_guest_delegate.h index 2826639..148e32a 100644 --- a/chrome/browser/guest_view/app_view/chrome_app_view_guest_delegate.h +++ b/chrome/browser/guest_view/app_view/chrome_app_view_guest_delegate.h @@ -5,6 +5,7 @@ #ifndef CHROME_BROWSER_GUEST_VIEW_APP_VIEW_CHROME_APP_VIEW_GUEST_DELEGATE_H_ #define CHROME_BROWSER_GUEST_VIEW_APP_VIEW_CHROME_APP_VIEW_GUEST_DELEGATE_H_ +#include "base/macros.h" #include "content/public/common/context_menu_params.h" #include "extensions/browser/guest_view/app_view/app_view_guest_delegate.h" diff --git a/chrome/browser/guest_view/chrome_guest_view_manager_delegate.cc b/chrome/browser/guest_view/chrome_guest_view_manager_delegate.cc index 886e2ea..e3cee47 100644 --- a/chrome/browser/guest_view/chrome_guest_view_manager_delegate.cc +++ b/chrome/browser/guest_view/chrome_guest_view_manager_delegate.cc @@ -4,6 +4,7 @@ #include "chrome/browser/guest_view/chrome_guest_view_manager_delegate.h" +#include "build/build_config.h" #include "chrome/browser/task_management/web_contents_tags.h" #if defined(OS_CHROMEOS) diff --git a/chrome/browser/guest_view/chrome_guest_view_manager_delegate.h b/chrome/browser/guest_view/chrome_guest_view_manager_delegate.h index 2b31108..447a34b 100644 --- a/chrome/browser/guest_view/chrome_guest_view_manager_delegate.h +++ b/chrome/browser/guest_view/chrome_guest_view_manager_delegate.h @@ -5,6 +5,7 @@ #ifndef CHROME_BROWSER_GUEST_VIEW_CHROME_GUEST_VIEW_MANAGER_DELEGATE_H_ #define CHROME_BROWSER_GUEST_VIEW_CHROME_GUEST_VIEW_MANAGER_DELEGATE_H_ +#include "base/macros.h" #include "extensions/browser/guest_view/extensions_guest_view_manager_delegate.h" namespace extensions { diff --git a/chrome/browser/guest_view/mime_handler_view/chrome_mime_handler_view_guest_delegate.h b/chrome/browser/guest_view/mime_handler_view/chrome_mime_handler_view_guest_delegate.h index 850e7bd..1a59017 100644 --- a/chrome/browser/guest_view/mime_handler_view/chrome_mime_handler_view_guest_delegate.h +++ b/chrome/browser/guest_view/mime_handler_view/chrome_mime_handler_view_guest_delegate.h @@ -5,6 +5,7 @@ #ifndef CHROME_BROWSER_GUEST_VIEW_MIME_HANDLER_VIEW_CHROME_MIME_HANDLER_VIEW_GUEST_DELEGATE_H_ #define CHROME_BROWSER_GUEST_VIEW_MIME_HANDLER_VIEW_CHROME_MIME_HANDLER_VIEW_GUEST_DELEGATE_H_ +#include "base/macros.h" #include "extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest_delegate.h" namespace content { diff --git a/chrome/browser/guest_view/web_view/chrome_web_view_guest_delegate.cc b/chrome/browser/guest_view/web_view/chrome_web_view_guest_delegate.cc index 7b1dda5..397aab4 100644 --- a/chrome/browser/guest_view/web_view/chrome_web_view_guest_delegate.cc +++ b/chrome/browser/guest_view/web_view/chrome_web_view_guest_delegate.cc @@ -5,6 +5,7 @@ #include "chrome/browser/guest_view/web_view/chrome_web_view_guest_delegate.h" +#include "build/build_config.h" #include "chrome/browser/extensions/chrome_extension_web_contents_observer.h" #include "chrome/browser/favicon/favicon_utils.h" #include "chrome/browser/profiles/profile.h" diff --git a/chrome/browser/guest_view/web_view/chrome_web_view_guest_delegate.h b/chrome/browser/guest_view/web_view/chrome_web_view_guest_delegate.h index d6101e7..5588ac8 100644 --- a/chrome/browser/guest_view/web_view/chrome_web_view_guest_delegate.h +++ b/chrome/browser/guest_view/web_view/chrome_web_view_guest_delegate.h @@ -5,6 +5,8 @@ #ifndef CHROME_BROWSER_GUEST_VIEW_WEB_VIEW_CHROME_WEB_VIEW_GUEST_DELEGATE_H_ #define CHROME_BROWSER_GUEST_VIEW_WEB_VIEW_CHROME_WEB_VIEW_GUEST_DELEGATE_H_ +#include "base/macros.h" +#include "build/build_config.h" #include "chrome/browser/extensions/api/web_view/chrome_web_view_internal_api.h" #include "extensions/browser/guest_view/web_view/web_view_guest.h" #include "extensions/browser/guest_view/web_view/web_view_guest_delegate.h" diff --git a/chrome/browser/guest_view/web_view/chrome_web_view_permission_helper_delegate.h b/chrome/browser/guest_view/web_view/chrome_web_view_permission_helper_delegate.h index 5f342b6..dfc4bd9 100644 --- a/chrome/browser/guest_view/web_view/chrome_web_view_permission_helper_delegate.h +++ b/chrome/browser/guest_view/web_view/chrome_web_view_permission_helper_delegate.h @@ -5,6 +5,7 @@ #ifndef CHROME_BROWSER_GUEST_VIEW_WEB_VIEW_CHROME_WEB_VIEW_PERMISSION_HELPER_DELEGATE_H_ #define CHROME_BROWSER_GUEST_VIEW_WEB_VIEW_CHROME_WEB_VIEW_PERMISSION_HELPER_DELEGATE_H_ +#include "base/macros.h" #include "components/content_settings/core/common/content_settings.h" #include "extensions/browser/guest_view/web_view/web_view_permission_helper.h" #include "extensions/browser/guest_view/web_view/web_view_permission_helper_delegate.h" diff --git a/chrome/browser/guest_view/web_view/context_menu_content_type_web_view.cc b/chrome/browser/guest_view/web_view/context_menu_content_type_web_view.cc index eb7fcca..743a375 100644 --- a/chrome/browser/guest_view/web_view/context_menu_content_type_web_view.cc +++ b/chrome/browser/guest_view/web_view/context_menu_content_type_web_view.cc @@ -5,6 +5,7 @@ #include "chrome/browser/guest_view/web_view/context_menu_content_type_web_view.h" #include "base/command_line.h" +#include "build/build_config.h" #include "chrome/common/channel_info.h" #include "chrome/common/chrome_switches.h" #include "components/version_info/version_info.h" diff --git a/chrome/browser/guest_view/web_view/context_menu_content_type_web_view.h b/chrome/browser/guest_view/web_view/context_menu_content_type_web_view.h index d412498..e70f57d 100644 --- a/chrome/browser/guest_view/web_view/context_menu_content_type_web_view.h +++ b/chrome/browser/guest_view/web_view/context_menu_content_type_web_view.h @@ -5,6 +5,7 @@ #ifndef CHROME_BROWSER_GUEST_VIEW_WEB_VIEW_CONTEXT_MENU_CONTENT_TYPE_WEB_VIEW_H_ #define CHROME_BROWSER_GUEST_VIEW_WEB_VIEW_CONTEXT_MENU_CONTENT_TYPE_WEB_VIEW_H_ +#include "base/macros.h" #include "components/renderer_context_menu/context_menu_content_type.h" namespace extensions { diff --git a/chrome/browser/hang_monitor/hung_window_detector.h b/chrome/browser/hang_monitor/hung_window_detector.h index 4404cec..1b8b3c3 100644 --- a/chrome/browser/hang_monitor/hung_window_detector.h +++ b/chrome/browser/hang_monitor/hung_window_detector.h @@ -5,6 +5,7 @@ #ifndef CHROME_BROWSER_HANG_MONITOR_HUNG_WINDOW_DETECTOR_H__ #define CHROME_BROWSER_HANG_MONITOR_HUNG_WINDOW_DETECTOR_H__ +#include "base/macros.h" #include "base/synchronization/lock.h" #include "chrome/common/worker_thread_ticker.h" diff --git a/chrome/browser/history/android/android_history_provider_service.h b/chrome/browser/history/android/android_history_provider_service.h index b4f1bf3..5e087e5 100644 --- a/chrome/browser/history/android/android_history_provider_service.h +++ b/chrome/browser/history/android/android_history_provider_service.h @@ -5,7 +5,10 @@ #ifndef CHROME_BROWSER_HISTORY_ANDROID_ANDROID_HISTORY_PROVIDER_SERVICE_H_ #define CHROME_BROWSER_HISTORY_ANDROID_ANDROID_HISTORY_PROVIDER_SERVICE_H_ +#include <stdint.h> + #include "base/callback.h" +#include "base/macros.h" #include "base/memory/ref_counted.h" #include "base/task/cancelable_task_tracker.h" #include "components/favicon_base/favicon_callback.h" @@ -34,7 +37,7 @@ class AndroidHistoryProviderService { // Callback invoked when a method inserting rows in the database complete. // The value is the new row id or 0 if the insertion failed. - typedef base::Callback<void(int64)> InsertCallback; + typedef base::Callback<void(int64_t)> InsertCallback; // Callback invoked when a method deleting rows in the database complete. // The value is the number of rows deleted or 0 if the deletion failed. diff --git a/chrome/browser/history/android/android_history_provider_service_unittest.cc b/chrome/browser/history/android/android_history_provider_service_unittest.cc index 4124971..836b3e9 100644 --- a/chrome/browser/history/android/android_history_provider_service_unittest.cc +++ b/chrome/browser/history/android/android_history_provider_service_unittest.cc @@ -4,6 +4,9 @@ #include "chrome/browser/history/android/android_history_provider_service.h" +#include <stdint.h> + +#include "base/macros.h" #include "base/strings/utf_string_conversions.h" #include "base/task/cancelable_task_tracker.h" #include "base/time/time.h" @@ -104,7 +107,7 @@ class CallbackHelper : public base::RefCountedThreadSafe<CallbackHelper> { return count_; } - void OnInserted(int64 id) { + void OnInserted(int64_t id) { success_ = id != 0; base::MessageLoop::current()->QuitWhenIdle(); } diff --git a/chrome/browser/history/android/android_provider_backend.h b/chrome/browser/history/android/android_provider_backend.h index 63e7b9c..9ddb3368 100644 --- a/chrome/browser/history/android/android_provider_backend.h +++ b/chrome/browser/history/android/android_provider_backend.h @@ -11,6 +11,7 @@ #include "base/containers/hash_tables.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/scoped_ptr.h" #include "base/supports_user_data.h" diff --git a/chrome/browser/history/android/android_provider_backend_unittest.cc b/chrome/browser/history/android/android_provider_backend_unittest.cc index cbd4daf..f361dd1 100644 --- a/chrome/browser/history/android/android_provider_backend_unittest.cc +++ b/chrome/browser/history/android/android_provider_backend_unittest.cc @@ -9,6 +9,7 @@ #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 "base/strings/stringprintf.h" #include "base/strings/utf_string_conversions.h" diff --git a/chrome/browser/history/android/bookmark_model_sql_handler.cc b/chrome/browser/history/android/bookmark_model_sql_handler.cc index 73fb8d8..3753743 100644 --- a/chrome/browser/history/android/bookmark_model_sql_handler.cc +++ b/chrome/browser/history/android/bookmark_model_sql_handler.cc @@ -5,6 +5,7 @@ #include "chrome/browser/history/android/bookmark_model_sql_handler.h" #include "base/logging.h" +#include "base/macros.h" #include "chrome/browser/bookmarks/bookmark_model_factory.h" #include "chrome/browser/profiles/profile_manager.h" #include "components/bookmarks/browser/bookmark_model.h" @@ -43,7 +44,7 @@ void BookmarkModelSQLHandler::Task::AddBookmarkToMobileFolder( void BookmarkModelSQLHandler::Task::AddBookmark(const GURL& url, const base::string16& title, - int64 parent_id) { + int64_t parent_id) { BookmarkModel* bookmark_model = GetBookmarkModel(); if (!bookmark_model) return; diff --git a/chrome/browser/history/android/bookmark_model_sql_handler.h b/chrome/browser/history/android/bookmark_model_sql_handler.h index 7f15600..ba16d93 100644 --- a/chrome/browser/history/android/bookmark_model_sql_handler.h +++ b/chrome/browser/history/android/bookmark_model_sql_handler.h @@ -5,6 +5,9 @@ #ifndef CHROME_BROWSER_HISTORY_ANDROID_BOOKMARK_MODEL_SQL_HANDLER_H_ #define CHROME_BROWSER_HISTORY_ANDROID_BOOKMARK_MODEL_SQL_HANDLER_H_ +#include <stdint.h> + +#include "base/macros.h" #include "components/history/core/browser/android/sql_handler.h" class Profile; @@ -51,7 +54,7 @@ class BookmarkModelSQLHandler : public SQLHandler { // Adds a bookmark with the given |url|, |title| and |parent_id|. void AddBookmark(const GURL& url, const base::string16& title, - int64 parent_id); + int64_t parent_id); // Removes the bookmark with the given |url|. void RemoveBookmark(const GURL& url); diff --git a/chrome/browser/history/android/sqlite_cursor.h b/chrome/browser/history/android/sqlite_cursor.h index f93514a..08d17b4 100644 --- a/chrome/browser/history/android/sqlite_cursor.h +++ b/chrome/browser/history/android/sqlite_cursor.h @@ -9,8 +9,8 @@ #include <vector> #include "base/android/scoped_java_ref.h" -#include "base/basictypes.h" #include "base/gtest_prod_util.h" +#include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "base/strings/string16.h" #include "base/synchronization/waitable_event.h" diff --git a/chrome/browser/history/android/sqlite_cursor_unittest.cc b/chrome/browser/history/android/sqlite_cursor_unittest.cc index 63b4d8ad..c29f61d 100644 --- a/chrome/browser/history/android/sqlite_cursor_unittest.cc +++ b/chrome/browser/history/android/sqlite_cursor_unittest.cc @@ -5,10 +5,12 @@ #include "chrome/browser/history/android/sqlite_cursor.h" #include <jni.h> +#include <stdint.h> #include "base/android/jni_android.h" #include "base/android/jni_array.h" #include "base/android/jni_string.h" +#include "base/macros.h" #include "base/strings/utf_string_conversions.h" #include "base/task/cancelable_task_tracker.h" #include "base/time/time.h" @@ -119,7 +121,7 @@ class CallbackHelper : public base::RefCountedThreadSafe<CallbackHelper> { return statement_; } - void OnInserted(int64 id) { + void OnInserted(int64_t id) { success_ = id != 0; base::MessageLoop::current()->QuitWhenIdle(); } @@ -207,7 +209,7 @@ TEST_F(SQLiteCursorTest, Run) { EXPECT_EQ(row.visit_count(), cursor->GetInt(env, NULL, 2)); base::android::ScopedJavaLocalRef<jbyteArray> data = cursor->GetBlob(env, NULL, 3); - std::vector<uint8> out; + std::vector<uint8_t> out; base::android::JavaByteArrayToByteVector(env, data.obj(), &out); EXPECT_EQ(data_bytes->data().size(), out.size()); EXPECT_EQ(data_bytes->data()[0], out[0]); diff --git a/chrome/browser/history/android/urls_sql_handler_unittest.cc b/chrome/browser/history/android/urls_sql_handler_unittest.cc index 623110b..2d1a9a0 100644 --- a/chrome/browser/history/android/urls_sql_handler_unittest.cc +++ b/chrome/browser/history/android/urls_sql_handler_unittest.cc @@ -6,6 +6,7 @@ #include "base/files/file_path.h" #include "base/files/scoped_temp_dir.h" +#include "base/macros.h" #include "base/strings/stringprintf.h" #include "base/strings/utf_string_conversions.h" #include "chrome/common/chrome_constants.h" diff --git a/chrome/browser/history/android/visit_sql_handler_unittest.cc b/chrome/browser/history/android/visit_sql_handler_unittest.cc index 723b0fe..6b22e6c 100644 --- a/chrome/browser/history/android/visit_sql_handler_unittest.cc +++ b/chrome/browser/history/android/visit_sql_handler_unittest.cc @@ -6,6 +6,7 @@ #include "base/files/file_path.h" #include "base/files/scoped_temp_dir.h" +#include "base/macros.h" #include "base/strings/stringprintf.h" #include "base/strings/utf_string_conversions.h" #include "chrome/common/chrome_constants.h" diff --git a/chrome/browser/history/chrome_history_backend_client.cc b/chrome/browser/history/chrome_history_backend_client.cc index 595994b..bbfcd1b 100644 --- a/chrome/browser/history/chrome_history_backend_client.cc +++ b/chrome/browser/history/chrome_history_backend_client.cc @@ -4,6 +4,7 @@ #include "chrome/browser/history/chrome_history_backend_client.h" +#include "build/build_config.h" #include "chrome/common/channel_info.h" #include "chrome/common/features.h" #include "components/bookmarks/browser/bookmark_model.h" diff --git a/chrome/browser/history/chrome_history_backend_client.h b/chrome/browser/history/chrome_history_backend_client.h index 96cc39c2..0a332ad 100644 --- a/chrome/browser/history/chrome_history_backend_client.h +++ b/chrome/browser/history/chrome_history_backend_client.h @@ -6,6 +6,7 @@ #define CHROME_BROWSER_HISTORY_CHROME_HISTORY_BACKEND_CLIENT_H_ #include "base/macros.h" +#include "build/build_config.h" #include "components/history/core/browser/history_backend_client.h" namespace bookmarks { diff --git a/chrome/browser/history/history_browsertest.cc b/chrome/browser/history/history_browsertest.cc index 6292d7c..edf2477 100644 --- a/chrome/browser/history/history_browsertest.cc +++ b/chrome/browser/history/history_browsertest.cc @@ -7,9 +7,11 @@ #include "base/bind.h" #include "base/command_line.h" #include "base/files/file_path.h" +#include "base/macros.h" #include "base/message_loop/message_loop.h" #include "base/prefs/pref_service.h" #include "base/strings/utf_string_conversions.h" +#include "build/build_config.h" #include "chrome/app/chrome_command_ids.h" #include "chrome/browser/history/history_service_factory.h" #include "chrome/browser/profiles/profile.h" diff --git a/chrome/browser/history/history_tab_helper.cc b/chrome/browser/history/history_tab_helper.cc index 20a3bb4..fdcb645 100644 --- a/chrome/browser/history/history_tab_helper.cc +++ b/chrome/browser/history/history_tab_helper.cc @@ -6,6 +6,7 @@ #include <utility> +#include "build/build_config.h" #include "chrome/browser/history/history_service_factory.h" #include "chrome/browser/prerender/prerender_contents.h" #include "chrome/browser/prerender/prerender_manager.h" diff --git a/chrome/browser/history/history_tab_helper.h b/chrome/browser/history/history_tab_helper.h index 2021e48..55a8f79 100644 --- a/chrome/browser/history/history_tab_helper.h +++ b/chrome/browser/history/history_tab_helper.h @@ -5,6 +5,7 @@ #ifndef CHROME_BROWSER_HISTORY_HISTORY_TAB_HELPER_H_ #define CHROME_BROWSER_HISTORY_HISTORY_TAB_HELPER_H_ +#include "base/macros.h" #include "base/memory/ref_counted.h" #include "base/time/time.h" #include "content/public/browser/web_contents_observer.h" diff --git a/chrome/browser/history/top_sites_factory.cc b/chrome/browser/history/top_sites_factory.cc index 6214d40..b85e843 100644 --- a/chrome/browser/history/top_sites_factory.cc +++ b/chrome/browser/history/top_sites_factory.cc @@ -4,9 +4,12 @@ #include "chrome/browser/history/top_sites_factory.h" +#include <stddef.h> + #include "base/bind.h" #include "base/macros.h" #include "base/memory/singleton.h" +#include "build/build_config.h" #include "chrome/browser/history/history_service_factory.h" #include "chrome/browser/history/history_utils.h" #include "chrome/browser/profiles/profile.h" diff --git a/chrome/browser/history/top_sites_factory.h b/chrome/browser/history/top_sites_factory.h index e561834..95d3aa2 100644 --- a/chrome/browser/history/top_sites_factory.h +++ b/chrome/browser/history/top_sites_factory.h @@ -7,6 +7,7 @@ #include <vector> +#include "base/macros.h" #include "base/memory/ref_counted.h" #include "components/keyed_service/content/refcounted_browser_context_keyed_service_factory.h" diff --git a/chrome/browser/history/web_history_service_factory.h b/chrome/browser/history/web_history_service_factory.h index 3b6515f..88ae583 100644 --- a/chrome/browser/history/web_history_service_factory.h +++ b/chrome/browser/history/web_history_service_factory.h @@ -5,6 +5,7 @@ #ifndef CHROME_BROWSER_HISTORY_WEB_HISTORY_SERVICE_FACTORY_H_ #define CHROME_BROWSER_HISTORY_WEB_HISTORY_SERVICE_FACTORY_H_ +#include "base/macros.h" #include "base/memory/singleton.h" #include "chrome/browser/profiles/profile.h" #include "components/keyed_service/content/browser_context_keyed_service_factory.h" diff --git a/chrome/browser/history/web_history_service_unittest.cc b/chrome/browser/history/web_history_service_unittest.cc index b656e19..491e634 100644 --- a/chrome/browser/history/web_history_service_unittest.cc +++ b/chrome/browser/history/web_history_service_unittest.cc @@ -5,6 +5,7 @@ #include "components/history/core/browser/web_history_service.h" #include "base/location.h" +#include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "base/run_loop.h" #include "base/single_thread_task_runner.h" diff --git a/chrome/browser/icon_loader.cc b/chrome/browser/icon_loader.cc index 9cb478f..4e66548 100644 --- a/chrome/browser/icon_loader.cc +++ b/chrome/browser/icon_loader.cc @@ -4,7 +4,6 @@ #include "chrome/browser/icon_loader.h" -#include "base/basictypes.h" #include "base/bind.h" #include "base/thread_task_runner_handle.h" #include "content/public/browser/browser_thread.h" diff --git a/chrome/browser/icon_loader.h b/chrome/browser/icon_loader.h index 52df888..a25532f 100644 --- a/chrome/browser/icon_loader.h +++ b/chrome/browser/icon_loader.h @@ -9,8 +9,8 @@ #include <string> -#include "base/basictypes.h" #include "base/files/file_path.h" +#include "base/macros.h" #include "base/memory/ref_counted.h" #include "base/memory/scoped_ptr.h" #include "base/single_thread_task_runner.h" diff --git a/chrome/browser/icon_loader_chromeos.cc b/chrome/browser/icon_loader_chromeos.cc index 603b2ff..8c3faa5 100644 --- a/chrome/browser/icon_loader_chromeos.cc +++ b/chrome/browser/icon_loader_chromeos.cc @@ -4,6 +4,8 @@ #include "chrome/browser/icon_loader.h" +#include <stddef.h> + #include <map> #include <string> #include <utility> @@ -11,6 +13,7 @@ #include "base/bind.h" #include "base/files/file_path.h" #include "base/lazy_instance.h" +#include "base/macros.h" #include "base/memory/ref_counted_memory.h" #include "base/message_loop/message_loop.h" #include "base/strings/string_util.h" diff --git a/chrome/browser/icon_manager.h b/chrome/browser/icon_manager.h index 0142381..0b5ec07 100644 --- a/chrome/browser/icon_manager.h +++ b/chrome/browser/icon_manager.h @@ -48,6 +48,7 @@ #include <map> #include "base/files/file_path.h" +#include "base/macros.h" #include "base/task/cancelable_task_tracker.h" #include "chrome/browser/icon_loader.h" #include "ui/gfx/image/image.h" diff --git a/chrome/browser/image_decoder.cc b/chrome/browser/image_decoder.cc index bd5ec1eb..c587695 100644 --- a/chrome/browser/image_decoder.cc +++ b/chrome/browser/image_decoder.cc @@ -6,6 +6,7 @@ #include "base/bind.h" #include "base/thread_task_runner_handle.h" +#include "build/build_config.h" #include "chrome/browser/browser_process.h" #include "chrome/common/chrome_utility_messages.h" #include "chrome/grit/generated_resources.h" diff --git a/chrome/browser/image_decoder.h b/chrome/browser/image_decoder.h index 13d903d..451019e 100644 --- a/chrome/browser/image_decoder.h +++ b/chrome/browser/image_decoder.h @@ -10,11 +10,13 @@ #include <vector> #include "base/lazy_instance.h" +#include "base/macros.h" #include "base/memory/ref_counted.h" #include "base/sequence_checker.h" #include "base/sequenced_task_runner.h" #include "base/synchronization/lock.h" #include "base/timer/timer.h" +#include "build/build_config.h" #include "content/public/browser/utility_process_host.h" #include "content/public/browser/utility_process_host_client.h" diff --git a/chrome/browser/image_decoder_browsertest.cc b/chrome/browser/image_decoder_browsertest.cc index d9350de..c9c43ca 100644 --- a/chrome/browser/image_decoder_browsertest.cc +++ b/chrome/browser/image_decoder_browsertest.cc @@ -4,6 +4,8 @@ #include "chrome/browser/image_decoder.h" +#include "base/macros.h" +#include "build/build_config.h" #include "chrome/grit/generated_resources.h" #include "chrome/test/base/in_process_browser_test.h" #include "content/public/browser/browser_child_process_observer.h" diff --git a/chrome/browser/image_holder.h b/chrome/browser/image_holder.h index b6c7410..2609eaa 100644 --- a/chrome/browser/image_holder.h +++ b/chrome/browser/image_holder.h @@ -6,6 +6,7 @@ #define CHROME_BROWSER_IMAGE_HOLDER_H_ #include "base/gtest_prod_util.h" +#include "base/macros.h" #include "base/memory/scoped_vector.h" #include "chrome/browser/bitmap_fetcher/bitmap_fetcher.h" #include "ui/gfx/image/image.h" diff --git a/chrome/browser/image_holder_unittest.cc b/chrome/browser/image_holder_unittest.cc index 03da2ca..11a64eb 100644 --- a/chrome/browser/image_holder_unittest.cc +++ b/chrome/browser/image_holder_unittest.cc @@ -4,6 +4,7 @@ #include <string> +#include "base/macros.h" #include "chrome/browser/image_holder.h" #include "content/public/test/test_browser_thread_bundle.h" #include "testing/gtest/include/gtest/gtest.h" diff --git a/chrome/browser/importer/edge_importer_browsertest_win.cc b/chrome/browser/importer/edge_importer_browsertest_win.cc index 09f2da6..848d3f6 100644 --- a/chrome/browser/importer/edge_importer_browsertest_win.cc +++ b/chrome/browser/importer/edge_importer_browsertest_win.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 <vector> #include "base/files/file_util.h" #include "base/files/scoped_temp_dir.h" +#include "base/macros.h" #include "base/message_loop/message_loop.h" #include "base/path_service.h" #include "base/strings/string16.h" diff --git a/chrome/browser/importer/external_process_importer_client.cc b/chrome/browser/importer/external_process_importer_client.cc index a44c18e..7e0c4fd 100644 --- a/chrome/browser/importer/external_process_importer_client.cc +++ b/chrome/browser/importer/external_process_importer_client.cc @@ -6,6 +6,7 @@ #include "base/bind.h" #include "base/strings/string_number_conversions.h" +#include "build/build_config.h" #include "chrome/browser/browser_process.h" #include "chrome/browser/importer/external_process_importer_host.h" #include "chrome/browser/importer/in_process_importer_bridge.h" @@ -24,7 +25,7 @@ using content::UtilityProcessHost; ExternalProcessImporterClient::ExternalProcessImporterClient( base::WeakPtr<ExternalProcessImporterHost> importer_host, const importer::SourceProfile& source_profile, - uint16 items, + uint16_t items, InProcessImporterBridge* bridge) : total_bookmarks_count_(0), total_history_rows_count_(0), diff --git a/chrome/browser/importer/external_process_importer_client.h b/chrome/browser/importer/external_process_importer_client.h index e5a0aa1..06553c0 100644 --- a/chrome/browser/importer/external_process_importer_client.h +++ b/chrome/browser/importer/external_process_importer_client.h @@ -5,13 +5,17 @@ #ifndef CHROME_BROWSER_IMPORTER_EXTERNAL_PROCESS_IMPORTER_CLIENT_H_ #define CHROME_BROWSER_IMPORTER_EXTERNAL_PROCESS_IMPORTER_CLIENT_H_ +#include <stddef.h> +#include <stdint.h> + #include <string> #include <vector> -#include "base/basictypes.h" #include "base/compiler_specific.h" +#include "base/macros.h" #include "base/memory/weak_ptr.h" #include "base/strings/string16.h" +#include "build/build_config.h" #include "chrome/common/importer/importer_autofill_form_data_entry.h" #include "chrome/common/importer/importer_data_types.h" #include "chrome/common/importer/importer_url_row.h" @@ -48,7 +52,7 @@ class ExternalProcessImporterClient : public content::UtilityProcessHostClient { ExternalProcessImporterClient( base::WeakPtr<ExternalProcessImporterHost> importer_host, const importer::SourceProfile& source_profile, - uint16 items, + uint16_t items, InProcessImporterBridge* bridge); // Launches the task to start the external process. @@ -147,7 +151,7 @@ class ExternalProcessImporterClient : public content::UtilityProcessHostClient { // Data to be passed from the importer host to the external importer. importer::SourceProfile source_profile_; - uint16 items_; + uint16_t items_; // Takes import data coming over IPC and delivers it to be written by the // ProfileWriter. diff --git a/chrome/browser/importer/external_process_importer_host.cc b/chrome/browser/importer/external_process_importer_host.cc index 5f8cfc9..6552f7f 100644 --- a/chrome/browser/importer/external_process_importer_host.cc +++ b/chrome/browser/importer/external_process_importer_host.cc @@ -45,7 +45,7 @@ void ExternalProcessImporterHost::Cancel() { void ExternalProcessImporterHost::StartImportSettings( const importer::SourceProfile& source_profile, Profile* target_profile, - uint16 items, + uint16_t items, ProfileWriter* writer) { // We really only support importing from one host at a time. DCHECK(!profile_); @@ -185,7 +185,7 @@ bool ExternalProcessImporterHost::CheckForFirefoxLock( return true; } -void ExternalProcessImporterHost::CheckForLoadedModels(uint16 items) { +void ExternalProcessImporterHost::CheckForLoadedModels(uint16_t items) { // A target profile must be loaded by StartImportSettings(). DCHECK(profile_); diff --git a/chrome/browser/importer/external_process_importer_host.h b/chrome/browser/importer/external_process_importer_host.h index 3dc6d4c..2c3c689 100644 --- a/chrome/browser/importer/external_process_importer_host.h +++ b/chrome/browser/importer/external_process_importer_host.h @@ -5,8 +5,10 @@ #ifndef CHROME_BROWSER_IMPORTER_EXTERNAL_PROCESS_IMPORTER_HOST_H_ #define CHROME_BROWSER_IMPORTER_EXTERNAL_PROCESS_IMPORTER_HOST_H_ -#include "base/basictypes.h" +#include <stdint.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" @@ -44,7 +46,7 @@ class ExternalProcessImporterHost virtual void StartImportSettings( const importer::SourceProfile& source_profile, Profile* target_profile, - uint16 items, + uint16_t items, ProfileWriter* writer); // When in headless mode, the importer will not show any warning dialog if @@ -109,7 +111,7 @@ class ExternalProcessImporterHost // Make sure BookmarkModel and TemplateURLService are loaded before import // process starts, if bookmarks and/or search engines are among the items // which are to be imported. - void CheckForLoadedModels(uint16 items); + void CheckForLoadedModels(uint16_t items); // True if UI is not to be shown. bool headless_; @@ -150,7 +152,7 @@ class ExternalProcessImporterHost importer::SourceProfile source_profile_; // Bitmask of items to be imported (see importer::ImportItem enum). - uint16 items_; + uint16_t items_; // True if the import process has been cancelled. bool cancelled_; diff --git a/chrome/browser/importer/firefox_importer_browsertest.cc b/chrome/browser/importer/firefox_importer_browsertest.cc index 05ca389..02d3bfd 100644 --- a/chrome/browser/importer/firefox_importer_browsertest.cc +++ b/chrome/browser/importer/firefox_importer_browsertest.cc @@ -2,15 +2,19 @@ // 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_path.h" #include "base/files/file_util.h" #include "base/files/scoped_temp_dir.h" +#include "base/macros.h" #include "base/message_loop/message_loop.h" #include "base/path_service.h" #include "base/stl_util.h" #include "base/strings/string16.h" #include "base/strings/string_util.h" #include "base/strings/utf_string_conversions.h" +#include "build/build_config.h" #include "chrome/browser/importer/external_process_importer_host.h" #include "chrome/browser/importer/importer_progress_observer.h" #include "chrome/browser/importer/importer_unittest_utils.h" diff --git a/chrome/browser/importer/firefox_profile_lock.cc b/chrome/browser/importer/firefox_profile_lock.cc index dab0381..a5afafc 100644 --- a/chrome/browser/importer/firefox_profile_lock.cc +++ b/chrome/browser/importer/firefox_profile_lock.cc @@ -6,6 +6,7 @@ #include "base/files/file_path.h" #include "base/threading/thread_restrictions.h" +#include "build/build_config.h" // This class is based on Firefox code in: // profile/dirserviceprovider/src/nsProfileLock.cpp diff --git a/chrome/browser/importer/firefox_profile_lock.h b/chrome/browser/importer/firefox_profile_lock.h index ff0d53c..b35d86d 100644 --- a/chrome/browser/importer/firefox_profile_lock.h +++ b/chrome/browser/importer/firefox_profile_lock.h @@ -11,9 +11,9 @@ #include <windows.h> #endif -#include "base/basictypes.h" #include "base/files/file_path.h" #include "base/gtest_prod_util.h" +#include "base/macros.h" // Firefox is designed to allow only one application to access its // profile at the same time. diff --git a/chrome/browser/importer/ie_importer_browsertest_win.cc b/chrome/browser/importer/ie_importer_browsertest_win.cc index 7bf6aa8..1113e37 100644 --- a/chrome/browser/importer/ie_importer_browsertest_win.cc +++ b/chrome/browser/importer/ie_importer_browsertest_win.cc @@ -9,6 +9,8 @@ #include <propvarutil.h> #include <shlguid.h> #include <shlobj.h> +#include <stddef.h> +#include <stdint.h> #include <urlhist.h> #include <algorithm> @@ -18,6 +20,7 @@ #include "base/compiler_specific.h" #include "base/files/file_util.h" #include "base/files/scoped_temp_dir.h" +#include "base/macros.h" #include "base/message_loop/message_loop.h" #include "base/stl_util.h" #include "base/strings/string16.h" @@ -125,8 +128,8 @@ bool CreateOrderBlob(const base::FilePath& favorites_folder, // Create a binary sequence for setting a specific order of favorites. // The format depends on the version of Shell32.dll, so we cannot embed // a binary constant here. - std::vector<uint8> blob(20, 0); - blob[16] = static_cast<uint8>(entries.size()); + std::vector<uint8_t> blob(20, 0); + blob[16] = static_cast<uint8_t>(entries.size()); for (size_t i = 0; i < entries.size(); ++i) { PIDLIST_ABSOLUTE id_list_full = ILCreateFromPath( @@ -137,9 +140,9 @@ bool CreateOrderBlob(const base::FilePath& favorites_folder, size_t id_list_size = id_list->mkid.cb + sizeof(id_list->mkid.cb); blob.resize(blob.size() + 8); - uint32 total_size = id_list_size + 8; + uint32_t total_size = id_list_size + 8; memcpy(&blob[blob.size() - 8], &total_size, 4); - uint32 sort_index = i; + uint32_t sort_index = i; memcpy(&blob[blob.size() - 4], &sort_index, 4); blob.resize(blob.size() + id_list_size); memcpy(&blob[blob.size() - id_list_size], id_list, id_list_size); @@ -223,7 +226,7 @@ class TestObserver : public ProfileWriter, IE7, }; - explicit TestObserver(uint16 importer_items, TestIEVersion ie_version) + explicit TestObserver(uint16_t importer_items, TestIEVersion ie_version) : ProfileWriter(NULL), bookmark_count_(0), history_count_(0), @@ -232,8 +235,7 @@ class TestObserver : public ProfileWriter, homepage_count_(0), ie7_password_count_(0), importer_items_(importer_items), - ie_version_(ie_version) { - } + ie_version_(ie_version) {} // importer::ImporterProgressObserver: void ImportStarted() override {} @@ -371,7 +373,7 @@ class TestObserver : public ProfileWriter, size_t favicon_count_; size_t homepage_count_; size_t ie7_password_count_; - uint16 importer_items_; + uint16_t importer_items_; TestIEVersion ie_version_; }; diff --git a/chrome/browser/importer/importer_list.cc b/chrome/browser/importer/importer_list.cc index be62f42..1524cac 100644 --- a/chrome/browser/importer/importer_list.cc +++ b/chrome/browser/importer/importer_list.cc @@ -4,7 +4,10 @@ #include "chrome/browser/importer/importer_list.h" +#include <stdint.h> + #include "base/bind.h" +#include "build/build_config.h" #include "chrome/browser/shell_integration.h" #include "chrome/common/importer/firefox_importer_utils.h" #include "chrome/common/importer/importer_bridge.h" @@ -63,7 +66,7 @@ void DetectBuiltinWindowsProfiles( #if defined(OS_MACOSX) void DetectSafariProfiles(std::vector<importer::SourceProfile>* profiles) { DCHECK_CURRENTLY_ON(BrowserThread::FILE); - uint16 items = importer::NONE; + uint16_t items = importer::NONE; if (!SafariImporterCanImport(base::mac::GetUserLibraryPath(), &items)) return; diff --git a/chrome/browser/importer/importer_list.h b/chrome/browser/importer/importer_list.h index 2a5e4d9..b7a2452 100644 --- a/chrome/browser/importer/importer_list.h +++ b/chrome/browser/importer/importer_list.h @@ -5,11 +5,13 @@ #ifndef CHROME_BROWSER_IMPORTER_IMPORTER_LIST_H_ #define CHROME_BROWSER_IMPORTER_IMPORTER_LIST_H_ +#include <stddef.h> + #include <string> #include <vector> -#include "base/basictypes.h" #include "base/callback_forward.h" +#include "base/macros.h" #include "base/memory/weak_ptr.h" #include "base/strings/string16.h" #include "chrome/common/importer/importer_data_types.h" diff --git a/chrome/browser/importer/importer_unittest_utils.h b/chrome/browser/importer/importer_unittest_utils.h index 7696565..75fa29b 100644 --- a/chrome/browser/importer/importer_unittest_utils.h +++ b/chrome/browser/importer/importer_unittest_utils.h @@ -5,7 +5,7 @@ #ifndef CHROME_BROWSER_IMPORTER_IMPORTER_UNITTEST_UTILS_H_ #define CHROME_BROWSER_IMPORTER_IMPORTER_UNITTEST_UTILS_H_ -#include "base/basictypes.h" +#include <stddef.h> struct ImportedBookmarkEntry; diff --git a/chrome/browser/importer/in_process_importer_bridge.cc b/chrome/browser/importer/in_process_importer_bridge.cc index 4098109..5504aee 100644 --- a/chrome/browser/importer/in_process_importer_bridge.cc +++ b/chrome/browser/importer/in_process_importer_bridge.cc @@ -4,10 +4,14 @@ #include "chrome/browser/importer/in_process_importer_bridge.h" +#include <stddef.h> + #include "base/bind.h" #include "base/files/file_util.h" +#include "base/macros.h" #include "base/strings/string_util.h" #include "base/strings/utf_string_conversions.h" +#include "build/build_config.h" #include "chrome/browser/importer/external_process_importer_host.h" #include "chrome/browser/search_engines/ui_thread_search_terms_data.h" #include "chrome/common/importer/imported_bookmark_entry.h" diff --git a/chrome/browser/importer/in_process_importer_bridge.h b/chrome/browser/importer/in_process_importer_bridge.h index ce09946..5662e4e 100644 --- a/chrome/browser/importer/in_process_importer_bridge.h +++ b/chrome/browser/importer/in_process_importer_bridge.h @@ -8,8 +8,8 @@ #include <string> #include <vector> -#include "base/basictypes.h" #include "base/compiler_specific.h" +#include "base/macros.h" #include "base/memory/weak_ptr.h" #include "build/build_config.h" #include "chrome/browser/importer/profile_writer.h" diff --git a/chrome/browser/importer/profile_writer.cc b/chrome/browser/importer/profile_writer.cc index b7a21ca..87d3b3f 100644 --- a/chrome/browser/importer/profile_writer.cc +++ b/chrome/browser/importer/profile_writer.cc @@ -4,6 +4,8 @@ #include "chrome/browser/importer/profile_writer.h" +#include <stddef.h> + #include <map> #include <set> #include <string> @@ -13,6 +15,7 @@ #include "base/strings/stringprintf.h" #include "base/strings/utf_string_conversions.h" #include "base/threading/thread.h" +#include "build/build_config.h" #include "chrome/browser/bookmarks/bookmark_model_factory.h" #include "chrome/browser/chrome_notification_types.h" #include "chrome/browser/favicon/favicon_service_factory.h" diff --git a/chrome/browser/importer/profile_writer.h b/chrome/browser/importer/profile_writer.h index fa326fb..cf2f103 100644 --- a/chrome/browser/importer/profile_writer.h +++ b/chrome/browser/importer/profile_writer.h @@ -7,7 +7,7 @@ #include <vector> -#include "base/basictypes.h" +#include "base/macros.h" #include "base/memory/ref_counted.h" #include "base/memory/scoped_vector.h" #include "base/strings/string16.h" diff --git a/chrome/browser/importer/profile_writer_unittest.cc b/chrome/browser/importer/profile_writer_unittest.cc index d49133e..37f2bc0 100644 --- a/chrome/browser/importer/profile_writer_unittest.cc +++ b/chrome/browser/importer/profile_writer_unittest.cc @@ -4,8 +4,11 @@ #include "chrome/browser/importer/profile_writer.h" +#include <stddef.h> + #include <string> +#include "base/macros.h" #include "base/strings/utf_string_conversions.h" #include "chrome/browser/bookmarks/bookmark_model_factory.h" #include "chrome/browser/history/history_service_factory.h" diff --git a/chrome/browser/infobars/infobar_service.h b/chrome/browser/infobars/infobar_service.h index 36732be..e2064b0 100644 --- a/chrome/browser/infobars/infobar_service.h +++ b/chrome/browser/infobars/infobar_service.h @@ -7,6 +7,7 @@ #include <vector> +#include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "components/infobars/core/infobar_manager.h" #include "content/public/browser/web_contents_observer.h" diff --git a/chrome/browser/infobars/infobars_browsertest.cc b/chrome/browser/infobars/infobars_browsertest.cc index 12fd7b5c..54aa634 100644 --- a/chrome/browser/infobars/infobars_browsertest.cc +++ b/chrome/browser/infobars/infobars_browsertest.cc @@ -3,6 +3,7 @@ // found in the LICENSE file. #include "base/command_line.h" +#include "build/build_config.h" #include "chrome/browser/chrome_notification_types.h" #include "chrome/browser/extensions/crx_installer.h" #include "chrome/browser/extensions/extension_install_prompt.h" diff --git a/chrome/browser/infobars/insecure_content_infobar_delegate.cc b/chrome/browser/infobars/insecure_content_infobar_delegate.cc index ef14ecd..2a79d97 100644 --- a/chrome/browser/infobars/insecure_content_infobar_delegate.cc +++ b/chrome/browser/infobars/insecure_content_infobar_delegate.cc @@ -4,6 +4,8 @@ #include "chrome/browser/infobars/insecure_content_infobar_delegate.h" +#include <stddef.h> + #include "base/metrics/histogram.h" #include "chrome/browser/infobars/infobar_service.h" #include "chrome/common/render_messages.h" diff --git a/chrome/browser/infobars/insecure_content_infobar_delegate.h b/chrome/browser/infobars/insecure_content_infobar_delegate.h index 4e1b0f7..84c0487 100644 --- a/chrome/browser/infobars/insecure_content_infobar_delegate.h +++ b/chrome/browser/infobars/insecure_content_infobar_delegate.h @@ -5,6 +5,7 @@ #ifndef CHROME_BROWSER_INFOBARS_INSECURE_CONTENT_INFOBAR_DELEGATE_H_ #define CHROME_BROWSER_INFOBARS_INSECURE_CONTENT_INFOBAR_DELEGATE_H_ +#include "base/macros.h" #include "components/infobars/core/confirm_infobar_delegate.h" class InfoBarService; diff --git a/chrome/browser/install_verification/win/imported_module_verification.cc b/chrome/browser/install_verification/win/imported_module_verification.cc index 2eebc99..2cfddf4 100644 --- a/chrome/browser/install_verification/win/imported_module_verification.cc +++ b/chrome/browser/install_verification/win/imported_module_verification.cc @@ -4,6 +4,7 @@ #include "chrome/browser/install_verification/win/imported_module_verification.h" +#include <stddef.h> #include <Windows.h> #include <algorithm> @@ -11,6 +12,7 @@ #include <string> #include <vector> #include "base/logging.h" +#include "base/macros.h" #include "base/strings/string16.h" #include "chrome/browser/install_verification/win/module_info.h" diff --git a/chrome/browser/install_verification/win/install_verification.cc b/chrome/browser/install_verification/win/install_verification.cc index c113dd2..6918ce1 100644 --- a/chrome/browser/install_verification/win/install_verification.cc +++ b/chrome/browser/install_verification/win/install_verification.cc @@ -4,6 +4,8 @@ #include "chrome/browser/install_verification/win/install_verification.h" +#include <stddef.h> + #include <set> #include <vector> diff --git a/chrome/browser/install_verification/win/loaded_modules_snapshot.cc b/chrome/browser/install_verification/win/loaded_modules_snapshot.cc index 33d620f..91a1a25 100644 --- a/chrome/browser/install_verification/win/loaded_modules_snapshot.cc +++ b/chrome/browser/install_verification/win/loaded_modules_snapshot.cc @@ -5,6 +5,7 @@ #include "chrome/browser/install_verification/win/loaded_modules_snapshot.h" #include <Psapi.h> +#include <stddef.h> #include "base/logging.h" diff --git a/chrome/browser/install_verification/win/loaded_modules_snapshot_unittest.cc b/chrome/browser/install_verification/win/loaded_modules_snapshot_unittest.cc index 0d716f4..074bccf 100644 --- a/chrome/browser/install_verification/win/loaded_modules_snapshot_unittest.cc +++ b/chrome/browser/install_verification/win/loaded_modules_snapshot_unittest.cc @@ -4,6 +4,7 @@ #include "chrome/browser/install_verification/win/loaded_modules_snapshot.h" +#include <stddef.h> #include <Windows.h> #include <algorithm> diff --git a/chrome/browser/install_verification/win/module_ids.cc b/chrome/browser/install_verification/win/module_ids.cc index 109c3c3..2eb0ca3 100644 --- a/chrome/browser/install_verification/win/module_ids.cc +++ b/chrome/browser/install_verification/win/module_ids.cc @@ -6,8 +6,8 @@ #include <utility> -#include "base/basictypes.h" #include "base/logging.h" +#include "base/macros.h" #include "base/strings/string_number_conversions.h" #include "base/strings/string_piece.h" #include "base/strings/string_tokenizer.h" diff --git a/chrome/browser/install_verification/win/module_ids.h b/chrome/browser/install_verification/win/module_ids.h index 22cea1d..e02373b 100644 --- a/chrome/browser/install_verification/win/module_ids.h +++ b/chrome/browser/install_verification/win/module_ids.h @@ -5,6 +5,8 @@ #ifndef CHROME_BROWSER_INSTALL_VERIFICATION_WIN_MODULE_IDS_H_ #define CHROME_BROWSER_INSTALL_VERIFICATION_WIN_MODULE_IDS_H_ +#include <stddef.h> + #include <map> #include <string> diff --git a/chrome/browser/install_verification/win/module_info.h b/chrome/browser/install_verification/win/module_info.h index 2da0b1a..cdc6aaf 100644 --- a/chrome/browser/install_verification/win/module_info.h +++ b/chrome/browser/install_verification/win/module_info.h @@ -5,6 +5,8 @@ #ifndef CHROME_BROWSER_INSTALL_VERIFICATION_WIN_MODULE_INFO_H_ #define CHROME_BROWSER_INSTALL_VERIFICATION_WIN_MODULE_INFO_H_ +#include <stdint.h> + #include "base/strings/string16.h" // Represents and facilitates operations on the address range corresponding to a diff --git a/chrome/browser/install_verification/win/module_list.h b/chrome/browser/install_verification/win/module_list.h index f5b1789..3497abe 100644 --- a/chrome/browser/install_verification/win/module_list.h +++ b/chrome/browser/install_verification/win/module_list.h @@ -5,12 +5,13 @@ #ifndef CHROME_BROWSER_INSTALL_VERIFICATION_WIN_MODULE_LIST_H_ #define CHROME_BROWSER_INSTALL_VERIFICATION_WIN_MODULE_LIST_H_ +#include <stddef.h> #include <Windows.h> #include <set> #include <vector> -#include "base/basictypes.h" +#include "base/macros.h" #include "base/memory/scoped_ptr.h" struct ModuleInfo; diff --git a/chrome/browser/install_verification/win/module_list_unittest.cc b/chrome/browser/install_verification/win/module_list_unittest.cc index 982f436..01ceb12 100644 --- a/chrome/browser/install_verification/win/module_list_unittest.cc +++ b/chrome/browser/install_verification/win/module_list_unittest.cc @@ -4,6 +4,7 @@ #include "chrome/browser/install_verification/win/module_list.h" +#include <stddef.h> #include <Windows.h> #include <vector> #include "base/bind.h" diff --git a/chrome/browser/install_verification/win/module_verification_common.h b/chrome/browser/install_verification/win/module_verification_common.h index 2f05618..de061a4 100644 --- a/chrome/browser/install_verification/win/module_verification_common.h +++ b/chrome/browser/install_verification/win/module_verification_common.h @@ -5,6 +5,8 @@ #ifndef CHROME_BROWSER_INSTALL_VERIFICATION_WIN_MODULE_VERIFICATION_COMMON_H_ #define CHROME_BROWSER_INSTALL_VERIFICATION_WIN_MODULE_VERIFICATION_COMMON_H_ +#include <stddef.h> + #include <set> #include <string> #include <vector> diff --git a/chrome/browser/install_verification/win/module_verification_test.h b/chrome/browser/install_verification/win/module_verification_test.h index 517ea36..9c19c8f 100644 --- a/chrome/browser/install_verification/win/module_verification_test.h +++ b/chrome/browser/install_verification/win/module_verification_test.h @@ -5,6 +5,8 @@ #ifndef CHROME_BROWSER_INSTALL_VERIFICATION_WIN_MODULE_VERIFICATION_TEST_H_ #define CHROME_BROWSER_INSTALL_VERIFICATION_WIN_MODULE_VERIFICATION_TEST_H_ +#include <stddef.h> + #include <set> #include "base/compiler_specific.h" #include "chrome/browser/install_verification/win/module_info.h" diff --git a/chrome/browser/interests/android/interests_service.cc b/chrome/browser/interests/android/interests_service.cc index e71366a..7da1aca 100644 --- a/chrome/browser/interests/android/interests_service.cc +++ b/chrome/browser/interests/android/interests_service.cc @@ -4,6 +4,8 @@ #include "chrome/browser/interests/android/interests_service.h" +#include <stddef.h> + #include "base/android/jni_android.h" #include "base/android/jni_array.h" #include "base/android/jni_string.h" diff --git a/chrome/browser/interests/android/interests_service.h b/chrome/browser/interests/android/interests_service.h index f1021c2..2e39fe4 100644 --- a/chrome/browser/interests/android/interests_service.h +++ b/chrome/browser/interests/android/interests_service.h @@ -8,6 +8,7 @@ #include <jni.h> #include "base/android/scoped_java_ref.h" +#include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "base/memory/weak_ptr.h" #include "chrome/browser/interests/interests_fetcher.h" diff --git a/chrome/browser/internal_auth.cc b/chrome/browser/internal_auth.cc index f97baec..33fed11 100644 --- a/chrome/browser/internal_auth.cc +++ b/chrome/browser/internal_auth.cc @@ -4,6 +4,7 @@ #include "chrome/browser/internal_auth.h" +#include <stddef.h> #include <stdint.h> #include <algorithm> @@ -12,6 +13,7 @@ #include "base/base64.h" #include "base/lazy_instance.h" +#include "base/macros.h" #include "base/rand_util.h" #include "base/strings/string_number_conversions.h" #include "base/strings/string_split.h" diff --git a/chrome/browser/internal_auth_unittest.cc b/chrome/browser/internal_auth_unittest.cc index 6f62104..f9dd932 100644 --- a/chrome/browser/internal_auth_unittest.cc +++ b/chrome/browser/internal_auth_unittest.cc @@ -4,6 +4,8 @@ #include "chrome/browser/internal_auth.h" +#include <stddef.h> + #include <algorithm> #include "base/lazy_instance.h" diff --git a/chrome/browser/interstitials/chrome_controller_client.cc b/chrome/browser/interstitials/chrome_controller_client.cc index 4b520a3..9f0857f 100644 --- a/chrome/browser/interstitials/chrome_controller_client.cc +++ b/chrome/browser/interstitials/chrome_controller_client.cc @@ -9,6 +9,7 @@ #include "base/files/file_util.h" #include "base/prefs/pref_service.h" #include "base/process/launch.h" +#include "build/build_config.h" #include "chrome/browser/browser_process.h" #include "chrome/browser/profiles/profile.h" #include "chrome/common/pref_names.h" diff --git a/chrome/browser/interstitials/chrome_metrics_helper.h b/chrome/browser/interstitials/chrome_metrics_helper.h index 0c82e84..5206a9e 100644 --- a/chrome/browser/interstitials/chrome_metrics_helper.h +++ b/chrome/browser/interstitials/chrome_metrics_helper.h @@ -7,6 +7,7 @@ #include <string> +#include "base/macros.h" #include "components/security_interstitials/core/metrics_helper.h" #include "url/gurl.h" diff --git a/chrome/browser/interstitials/security_interstitial_page.h b/chrome/browser/interstitials/security_interstitial_page.h index 471c1e2..9f6f290 100644 --- a/chrome/browser/interstitials/security_interstitial_page.h +++ b/chrome/browser/interstitials/security_interstitial_page.h @@ -5,6 +5,7 @@ #ifndef CHROME_BROWSER_INTERSTITIALS_SECURITY_INTERSTITIAL_PAGE_H_ #define CHROME_BROWSER_INTERSTITIALS_SECURITY_INTERSTITIAL_PAGE_H_ +#include "base/macros.h" #include "base/strings/string16.h" #include "content/public/browser/interstitial_page_delegate.h" #include "url/gurl.h" diff --git a/chrome/browser/intranet_redirect_detector.cc b/chrome/browser/intranet_redirect_detector.cc index b38977a..d744c32 100644 --- a/chrome/browser/intranet_redirect_detector.cc +++ b/chrome/browser/intranet_redirect_detector.cc @@ -4,6 +4,8 @@ #include "chrome/browser/intranet_redirect_detector.h" +#include <stddef.h> + #include "base/bind.h" #include "base/command_line.h" #include "base/location.h" diff --git a/chrome/browser/intranet_redirect_detector.h b/chrome/browser/intranet_redirect_detector.h index 58f23f1..d491d50 100644 --- a/chrome/browser/intranet_redirect_detector.h +++ b/chrome/browser/intranet_redirect_detector.h @@ -9,6 +9,7 @@ #include <string> #include <vector> +#include "base/macros.h" #include "base/memory/weak_ptr.h" #include "content/public/browser/notification_observer.h" #include "content/public/browser/notification_registrar.h" diff --git a/chrome/browser/invalidation/fake_invalidation_service.h b/chrome/browser/invalidation/fake_invalidation_service.h index 87a1f48..afc9086 100644 --- a/chrome/browser/invalidation/fake_invalidation_service.h +++ b/chrome/browser/invalidation/fake_invalidation_service.h @@ -8,8 +8,8 @@ #include <list> #include <utility> -#include "base/basictypes.h" #include "base/callback_forward.h" +#include "base/macros.h" #include "components/invalidation/impl/invalidator_registrar.h" #include "components/invalidation/impl/mock_ack_handler.h" #include "components/invalidation/public/invalidation_service.h" diff --git a/chrome/browser/invalidation/profile_invalidation_provider_factory.cc b/chrome/browser/invalidation/profile_invalidation_provider_factory.cc index 354106b..b4a2863 100644 --- a/chrome/browser/invalidation/profile_invalidation_provider_factory.cc +++ b/chrome/browser/invalidation/profile_invalidation_provider_factory.cc @@ -6,6 +6,7 @@ #include "base/memory/scoped_ptr.h" #include "base/prefs/pref_registry.h" +#include "build/build_config.h" #include "chrome/browser/browser_process.h" #include "chrome/browser/profiles/profile.h" #include "chrome/browser/services/gcm/gcm_profile_service_factory.h" diff --git a/chrome/browser/invalidation/profile_invalidation_provider_factory.h b/chrome/browser/invalidation/profile_invalidation_provider_factory.h index f40532d..71898c5 100644 --- a/chrome/browser/invalidation/profile_invalidation_provider_factory.h +++ b/chrome/browser/invalidation/profile_invalidation_provider_factory.h @@ -5,7 +5,7 @@ #ifndef CHROME_BROWSER_INVALIDATION_PROFILE_INVALIDATION_PROVIDER_FACTORY_H_ #define CHROME_BROWSER_INVALIDATION_PROFILE_INVALIDATION_PROVIDER_FACTORY_H_ -#include "base/basictypes.h" +#include "base/macros.h" #include "base/memory/singleton.h" #include "components/keyed_service/content/browser_context_keyed_service_factory.h" diff --git a/chrome/browser/invalidation/profile_invalidation_provider_factory_browsertest.cc b/chrome/browser/invalidation/profile_invalidation_provider_factory_browsertest.cc index 07a0f90..2147deeb 100644 --- a/chrome/browser/invalidation/profile_invalidation_provider_factory_browsertest.cc +++ b/chrome/browser/invalidation/profile_invalidation_provider_factory_browsertest.cc @@ -2,9 +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 "base/command_line.h" #include "base/compiler_specific.h" +#include "base/macros.h" #include "chrome/browser/chromeos/profiles/profile_helper.h" #include "chrome/browser/invalidation/profile_invalidation_provider_factory.h" #include "chrome/browser/profiles/profile.h" diff --git a/chrome/browser/io_thread.cc b/chrome/browser/io_thread.cc index 8808ac4..e0b8e11 100644 --- a/chrome/browser/io_thread.cc +++ b/chrome/browser/io_thread.cc @@ -15,6 +15,7 @@ #include "base/environment.h" #include "base/files/file_path.h" #include "base/logging.h" +#include "base/macros.h" #include "base/metrics/field_trial.h" #include "base/prefs/pref_registry_simple.h" #include "base/prefs/pref_service.h" diff --git a/chrome/browser/io_thread.h b/chrome/browser/io_thread.h index d95d7ee..8816ad4 100644 --- a/chrome/browser/io_thread.h +++ b/chrome/browser/io_thread.h @@ -5,19 +5,23 @@ #ifndef CHROME_BROWSER_IO_THREAD_H_ #define CHROME_BROWSER_IO_THREAD_H_ +#include <stddef.h> +#include <stdint.h> + #include <map> #include <set> #include <string> #include <vector> -#include "base/basictypes.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" #include "base/prefs/pref_member.h" #include "base/strings/string_piece.h" #include "base/time/time.h" +#include "build/build_config.h" #include "chrome/browser/net/chrome_network_delegate.h" #include "chrome/common/features.h" #include "components/ssl_config/ssl_config_service_manager.h" @@ -195,8 +199,8 @@ class IOThread : public content::BrowserThreadDelegate { scoped_ptr<net::HttpUserAgentSettings> http_user_agent_settings; scoped_ptr<net::NetworkQualityEstimator> network_quality_estimator; bool ignore_certificate_errors; - uint16 testing_fixed_http_port; - uint16 testing_fixed_https_port; + uint16_t testing_fixed_http_port; + uint16_t testing_fixed_https_port; Optional<bool> enable_tcp_fast_open_for_ssl; Optional<size_t> initial_max_spdy_concurrent_streams; diff --git a/chrome/browser/io_thread_unittest.cc b/chrome/browser/io_thread_unittest.cc index 8c2843e..25527cd 100644 --- a/chrome/browser/io_thread_unittest.cc +++ b/chrome/browser/io_thread_unittest.cc @@ -2,14 +2,18 @@ // 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/at_exit.h" #include "base/command_line.h" +#include "base/macros.h" #include "base/metrics/field_trial.h" #include "base/prefs/pref_registry_simple.h" #include "base/prefs/pref_service.h" #include "base/prefs/testing_pref_service.h" #include "base/run_loop.h" #include "base/test/mock_entropy_provider.h" +#include "build/build_config.h" #include "chrome/browser/io_thread.h" #include "chrome/common/chrome_switches.h" #include "chrome/common/pref_names.h" diff --git a/chrome/browser/jumplist_updater_win.h b/chrome/browser/jumplist_updater_win.h index 283a270..a6b2c58 100644 --- a/chrome/browser/jumplist_updater_win.h +++ b/chrome/browser/jumplist_updater_win.h @@ -7,11 +7,13 @@ #include <windows.h> #include <shobjidl.h> +#include <stddef.h> #include <string> #include <vector> #include "base/command_line.h" +#include "base/macros.h" #include "base/memory/ref_counted.h" #include "base/win/scoped_comptr.h" #include "third_party/skia/include/core/SkBitmap.h" diff --git a/chrome/browser/jumplist_win.cc b/chrome/browser/jumplist_win.cc index 91e536f..8b1e91b 100644 --- a/chrome/browser/jumplist_win.cc +++ b/chrome/browser/jumplist_win.cc @@ -8,6 +8,7 @@ #include "base/bind_helpers.h" #include "base/command_line.h" #include "base/files/file_util.h" +#include "base/macros.h" #include "base/path_service.h" #include "base/prefs/pref_change_registrar.h" #include "base/strings/string_util.h" diff --git a/chrome/browser/jumplist_win.h b/chrome/browser/jumplist_win.h index 5033d270..9133d36 100644 --- a/chrome/browser/jumplist_win.h +++ b/chrome/browser/jumplist_win.h @@ -5,12 +5,15 @@ #ifndef CHROME_BROWSER_JUMPLIST_WIN_H_ #define CHROME_BROWSER_JUMPLIST_WIN_H_ +#include <stddef.h> + #include <list> #include <string> #include <utility> #include <vector> #include "base/files/file_path.h" +#include "base/macros.h" #include "base/memory/weak_ptr.h" #include "base/synchronization/lock.h" #include "base/task/cancelable_task_tracker.h" diff --git a/chrome/browser/lifetime/application_lifetime.h b/chrome/browser/lifetime/application_lifetime.h index a0acd68..488f22c 100644 --- a/chrome/browser/lifetime/application_lifetime.h +++ b/chrome/browser/lifetime/application_lifetime.h @@ -6,6 +6,7 @@ #define CHROME_BROWSER_LIFETIME_APPLICATION_LIFETIME_H_ #include "base/compiler_specific.h" +#include "build/build_config.h" class Browser; diff --git a/chrome/browser/lifetime/application_lifetime_aura.cc b/chrome/browser/lifetime/application_lifetime_aura.cc index 9790d2ad..12c0613 100644 --- a/chrome/browser/lifetime/application_lifetime_aura.cc +++ b/chrome/browser/lifetime/application_lifetime_aura.cc @@ -5,6 +5,7 @@ #include "chrome/browser/lifetime/application_lifetime.h" #include "base/command_line.h" +#include "build/build_config.h" #include "chrome/browser/browser_process.h" #include "chrome/browser/notifications/notification_ui_manager.h" #include "chrome/common/chrome_switches.h" diff --git a/chrome/browser/lifetime/browser_close_manager.cc b/chrome/browser/lifetime/browser_close_manager.cc index cec51e0..3586251 100644 --- a/chrome/browser/lifetime/browser_close_manager.cc +++ b/chrome/browser/lifetime/browser_close_manager.cc @@ -4,6 +4,7 @@ #include "chrome/browser/lifetime/browser_close_manager.h" +#include "build/build_config.h" #include "chrome/browser/background/background_mode_manager.h" #include "chrome/browser/browser_process.h" #include "chrome/browser/browser_shutdown.h" diff --git a/chrome/browser/lifetime/browser_close_manager.h b/chrome/browser/lifetime/browser_close_manager.h index 0e2c4a7..6cec9fd 100644 --- a/chrome/browser/lifetime/browser_close_manager.h +++ b/chrome/browser/lifetime/browser_close_manager.h @@ -6,6 +6,7 @@ #define CHROME_BROWSER_LIFETIME_BROWSER_CLOSE_MANAGER_H_ #include "base/callback_forward.h" +#include "base/macros.h" #include "base/memory/ref_counted.h" class Browser; diff --git a/chrome/browser/lifetime/browser_close_manager_browsertest.cc b/chrome/browser/lifetime/browser_close_manager_browsertest.cc index 52515c0..bfe4591 100644 --- a/chrome/browser/lifetime/browser_close_manager_browsertest.cc +++ b/chrome/browser/lifetime/browser_close_manager_browsertest.cc @@ -6,6 +6,8 @@ #include "base/command_line.h" #include "base/files/scoped_temp_dir.h" +#include "base/macros.h" +#include "build/build_config.h" #include "chrome/browser/background/background_mode_manager.h" #include "chrome/browser/browser_process.h" #include "chrome/browser/browser_shutdown.h" diff --git a/chrome/browser/load_library_perf_test.cc b/chrome/browser/load_library_perf_test.cc index 7f400b4..5b4fe12 100644 --- a/chrome/browser/load_library_perf_test.cc +++ b/chrome/browser/load_library_perf_test.cc @@ -2,12 +2,16 @@ // 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/files/file_path.h" #include "base/files/file_util.h" #include "base/path_service.h" #include "base/scoped_native_library.h" #include "base/strings/utf_string_conversions.h" #include "base/time/time.h" +#include "build/build_config.h" #include "testing/gtest/include/gtest/gtest.h" #include "testing/perf/perf_test.h" #include "widevine_cdm_version.h" // In SHARED_INTERMEDIATE_DIR. @@ -19,7 +23,7 @@ void MeasureSizeAndTimeToLoadNativeLibrary(const base::FilePath& library_name) { base::FilePath library_path = output_dir.Append(library_name); ASSERT_TRUE(base::PathExists(library_path)) << library_path.value(); - int64 size = 0; + int64_t size = 0; ASSERT_TRUE(base::GetFileSize(library_path, &size)); perf_test::PrintResult("library_size", "", diff --git a/chrome/browser/local_discovery/cloud_device_list_unittest.cc b/chrome/browser/local_discovery/cloud_device_list_unittest.cc index 7f6b3cb..9351743 100644 --- a/chrome/browser/local_discovery/cloud_device_list_unittest.cc +++ b/chrome/browser/local_discovery/cloud_device_list_unittest.cc @@ -4,6 +4,8 @@ #include "chrome/browser/local_discovery/cloud_device_list.h" +#include <stddef.h> + #include <set> #include "base/json/json_reader.h" diff --git a/chrome/browser/local_discovery/cloud_print_printer_list_unittest.cc b/chrome/browser/local_discovery/cloud_print_printer_list_unittest.cc index 072cdc0..7a46b11 100644 --- a/chrome/browser/local_discovery/cloud_print_printer_list_unittest.cc +++ b/chrome/browser/local_discovery/cloud_print_printer_list_unittest.cc @@ -4,6 +4,8 @@ #include "chrome/browser/local_discovery/cloud_print_printer_list.h" +#include <stddef.h> + #include <set> #include "base/json/json_reader.h" diff --git a/chrome/browser/local_discovery/endpoint_resolver.cc b/chrome/browser/local_discovery/endpoint_resolver.cc index ad5f7c0..e211f77 100644 --- a/chrome/browser/local_discovery/endpoint_resolver.cc +++ b/chrome/browser/local_discovery/endpoint_resolver.cc @@ -6,6 +6,7 @@ #include "base/command_line.h" #include "base/debug/dump_without_crashing.h" +#include "build/build_config.h" #include "chrome/browser/local_discovery/service_discovery_shared_client.h" #include "chrome/common/chrome_switches.h" #include "net/base/ip_endpoint.h" @@ -66,7 +67,7 @@ void EndpointResolver::Start(const net::HostPortPair& address, } void EndpointResolver::DomainResolveComplete( - uint16 port, + uint16_t port, const ResultCallback& callback, bool success, const net::IPAddressNumber& address_ipv4, diff --git a/chrome/browser/local_discovery/endpoint_resolver.h b/chrome/browser/local_discovery/endpoint_resolver.h index 687c15b..3a200d5 100644 --- a/chrome/browser/local_discovery/endpoint_resolver.h +++ b/chrome/browser/local_discovery/endpoint_resolver.h @@ -5,6 +5,8 @@ #ifndef CHROME_BROWSER_LOCAL_DISCOVERY_ENDPOINT_RESOLVER_H_ #define CHROME_BROWSER_LOCAL_DISCOVERY_ENDPOINT_RESOLVER_H_ +#include <stdint.h> + #include <string> #include "base/callback.h" @@ -37,7 +39,7 @@ class EndpointResolver { ServiceResolver::RequestStatus result, const ServiceDescription& description); - void DomainResolveComplete(uint16 port, + void DomainResolveComplete(uint16_t port, const ResultCallback& callback, bool success, const net::IPAddressNumber& address_ipv4, diff --git a/chrome/browser/local_discovery/gcd_api_flow.h b/chrome/browser/local_discovery/gcd_api_flow.h index 6892a2c..b70109b 100644 --- a/chrome/browser/local_discovery/gcd_api_flow.h +++ b/chrome/browser/local_discovery/gcd_api_flow.h @@ -7,6 +7,7 @@ #include <string> +#include "base/macros.h" #include "google_apis/gaia/oauth2_token_service.h" #include "net/url_request/url_fetcher.h" #include "net/url_request/url_request_context_getter.h" diff --git a/chrome/browser/local_discovery/gcd_api_flow_impl.cc b/chrome/browser/local_discovery/gcd_api_flow_impl.cc index 7e23c1b..1f3d301 100644 --- a/chrome/browser/local_discovery/gcd_api_flow_impl.cc +++ b/chrome/browser/local_discovery/gcd_api_flow_impl.cc @@ -4,6 +4,8 @@ #include "chrome/browser/local_discovery/gcd_api_flow_impl.h" +#include <stddef.h> + #include "base/json/json_reader.h" #include "base/strings/string_number_conversions.h" #include "base/strings/stringprintf.h" diff --git a/chrome/browser/local_discovery/gcd_api_flow_impl.h b/chrome/browser/local_discovery/gcd_api_flow_impl.h index 6786e23..8b72a24 100644 --- a/chrome/browser/local_discovery/gcd_api_flow_impl.h +++ b/chrome/browser/local_discovery/gcd_api_flow_impl.h @@ -5,6 +5,7 @@ #ifndef CHROME_BROWSER_LOCAL_DISCOVERY_GCD_API_FLOW_IMPL_H_ #define CHROME_BROWSER_LOCAL_DISCOVERY_GCD_API_FLOW_IMPL_H_ +#include "base/macros.h" #include "chrome/browser/local_discovery/gcd_api_flow.h" #include "net/url_request/url_fetcher.h" #include "net/url_request/url_fetcher_delegate.h" diff --git a/chrome/browser/local_discovery/privet_http_impl.cc b/chrome/browser/local_discovery/privet_http_impl.cc index d0fe7ee..2d21601 100644 --- a/chrome/browser/local_discovery/privet_http_impl.cc +++ b/chrome/browser/local_discovery/privet_http_impl.cc @@ -4,6 +4,8 @@ #include "chrome/browser/local_discovery/privet_http_impl.h" +#include <stddef.h> + #include <algorithm> #include <vector> diff --git a/chrome/browser/local_discovery/privet_http_impl.h b/chrome/browser/local_discovery/privet_http_impl.h index 74699de..9a8eec9 100644 --- a/chrome/browser/local_discovery/privet_http_impl.h +++ b/chrome/browser/local_discovery/privet_http_impl.h @@ -10,6 +10,7 @@ #include "base/callback.h" #include "base/files/file_path.h" +#include "base/macros.h" #include "base/memory/ref_counted.h" #include "base/memory/weak_ptr.h" #include "chrome/browser/local_discovery/privet_http.h" diff --git a/chrome/browser/local_discovery/privet_local_printer_lister.cc b/chrome/browser/local_discovery/privet_local_printer_lister.cc index b2460ad..cddce18 100644 --- a/chrome/browser/local_discovery/privet_local_printer_lister.cc +++ b/chrome/browser/local_discovery/privet_local_printer_lister.cc @@ -4,6 +4,8 @@ #include "chrome/browser/local_discovery/privet_local_printer_lister.h" +#include <stddef.h> + #include <string> #include "chrome/browser/local_discovery/privet_constants.h" diff --git a/chrome/browser/local_discovery/privet_local_printer_lister_unittest.cc b/chrome/browser/local_discovery/privet_local_printer_lister_unittest.cc index 666ffb6..700335f 100644 --- a/chrome/browser/local_discovery/privet_local_printer_lister_unittest.cc +++ b/chrome/browser/local_discovery/privet_local_printer_lister_unittest.cc @@ -4,6 +4,9 @@ #include "chrome/browser/local_discovery/privet_local_printer_lister.h" +#include <stddef.h> +#include <stdint.h> + #include "base/run_loop.h" #include "base/thread_task_runner_handle.h" #include "chrome/browser/local_discovery/test_service_discovery_client.h" @@ -21,7 +24,7 @@ namespace local_discovery { namespace { -const uint8 kAnnouncePacket[] = { +const uint8_t kAnnouncePacket[] = { // Header 0x00, 0x00, // ID is zeroed out 0x80, 0x00, // Standard query response, no error @@ -69,7 +72,8 @@ const uint8 kAnnouncePacket[] = { 0x10, 0x00, 0x00, 0x10, // RDLENGTH is 16 0x01, 0x02, 0x03, 0x04, // 1.2.3.4 0x01, 0x02, 0x03, 0x04, 0x01, 0x02, 0x03, 0x04, 0x01, 0x02, - 0x03, 0x04, }; + 0x03, 0x04, +}; const char kInfoIsLocalPrinter[] = "{" "\"api\" : [ \"/privet/printer/submitdoc\" ]," @@ -137,7 +141,7 @@ class PrivetLocalPrinterListerTest : public testing::Test { return true; } - void SimulateReceive(const uint8* packet, size_t size) { + void SimulateReceive(const uint8_t* packet, size_t size) { test_service_discovery_client_->SimulateReceive(packet, size); base::RunLoop().RunUntilIdle(); } diff --git a/chrome/browser/local_discovery/privet_traffic_detector.cc b/chrome/browser/local_discovery/privet_traffic_detector.cc index e02f64c..687b6f1 100644 --- a/chrome/browser/local_discovery/privet_traffic_detector.cc +++ b/chrome/browser/local_discovery/privet_traffic_detector.cc @@ -4,7 +4,10 @@ #include "chrome/browser/local_discovery/privet_traffic_detector.h" +#include <stddef.h> + #include "base/location.h" +#include "base/macros.h" #include "base/metrics/histogram.h" #include "base/single_thread_task_runner.h" #include "base/sys_byteorder.h" diff --git a/chrome/browser/local_discovery/privet_traffic_detector.h b/chrome/browser/local_discovery/privet_traffic_detector.h index f1a64d0..0ff0d13 100644 --- a/chrome/browser/local_discovery/privet_traffic_detector.h +++ b/chrome/browser/local_discovery/privet_traffic_detector.h @@ -7,6 +7,7 @@ #include "base/callback.h" #include "base/cancelable_callback.h" +#include "base/macros.h" #include "content/public/browser/browser_thread.h" #include "net/base/address_family.h" #include "net/base/ip_endpoint.h" diff --git a/chrome/browser/local_discovery/privet_url_fetcher.h b/chrome/browser/local_discovery/privet_url_fetcher.h index 7b61142..f37722b 100644 --- a/chrome/browser/local_discovery/privet_url_fetcher.h +++ b/chrome/browser/local_discovery/privet_url_fetcher.h @@ -8,6 +8,7 @@ #include <string> #include "base/files/file_util.h" +#include "base/macros.h" #include "base/memory/weak_ptr.h" #include "base/values.h" #include "net/url_request/url_fetcher.h" diff --git a/chrome/browser/local_discovery/pwg_raster_converter.cc b/chrome/browser/local_discovery/pwg_raster_converter.cc index 75c4d5b..da56119 100644 --- a/chrome/browser/local_discovery/pwg_raster_converter.cc +++ b/chrome/browser/local_discovery/pwg_raster_converter.cc @@ -13,6 +13,7 @@ #include "base/files/scoped_temp_dir.h" #include "base/location.h" #include "base/logging.h" +#include "base/macros.h" #include "base/single_thread_task_runner.h" #include "chrome/common/chrome_utility_messages.h" #include "chrome/common/chrome_utility_printing_messages.h" diff --git a/chrome/browser/local_discovery/service_discovery_client_mac.h b/chrome/browser/local_discovery/service_discovery_client_mac.h index 573d630..ab14864 100644 --- a/chrome/browser/local_discovery/service_discovery_client_mac.h +++ b/chrome/browser/local_discovery/service_discovery_client_mac.h @@ -9,6 +9,7 @@ #include <string> #include "base/mac/scoped_nsobject.h" +#include "base/macros.h" #include "base/memory/weak_ptr.h" #include "base/single_thread_task_runner.h" #include "base/thread_task_runner_handle.h" diff --git a/chrome/browser/local_discovery/service_discovery_client_mac.mm b/chrome/browser/local_discovery/service_discovery_client_mac.mm index 1c7cd4a..ada73a8 100644 --- a/chrome/browser/local_discovery/service_discovery_client_mac.mm +++ b/chrome/browser/local_discovery/service_discovery_client_mac.mm @@ -7,6 +7,8 @@ #import <arpa/inet.h> #import <Foundation/Foundation.h> #import <net/if_dl.h> +#include <stddef.h> +#include <stdint.h> #include "base/debug/dump_without_crashing.h" #include "base/memory/singleton.h" @@ -100,7 +102,7 @@ void ParseTxtRecord(NSData* record, std::vector<std::string>* output) { const char* const record_end = record_bytes + [record length]; // TODO(justinlin): More strict bounds checking. while (record_bytes < record_end) { - uint8 size = *record_bytes++; + uint8_t size = *record_bytes++; if (size <= 0) continue; diff --git a/chrome/browser/local_discovery/service_discovery_client_mac_unittest.mm b/chrome/browser/local_discovery/service_discovery_client_mac_unittest.mm index ccb1085..20c6dc7 100644 --- a/chrome/browser/local_discovery/service_discovery_client_mac_unittest.mm +++ b/chrome/browser/local_discovery/service_discovery_client_mac_unittest.mm @@ -3,12 +3,14 @@ // found in the LICENSE file. #import <Cocoa/Cocoa.h> +#include <stdint.h> -#import "chrome/browser/ui/cocoa/cocoa_test_helper.h" #include "base/bind.h" #include "base/mac/scoped_nsobject.h" +#include "base/macros.h" #include "base/message_loop/message_loop.h" #include "chrome/browser/local_discovery/service_discovery_client_mac.h" +#import "chrome/browser/ui/cocoa/cocoa_test_helper.h" #include "chrome/common/local_discovery/service_discovery_client.h" #include "content/public/test/test_browser_thread_bundle.h" #include "net/base/ip_endpoint.h" @@ -118,7 +120,7 @@ TEST_F(ServiceDiscoveryClientMacTest, ServiceResolver) { base::Bind(&ServiceDiscoveryClientMacTest::OnResolveComplete, base::Unretained(this))); - const uint8 record_bytes[] = { 2, 'a', 'b', 3, 'd', '=', 'e' }; + const uint8_t record_bytes[] = {2, 'a', 'b', 3, 'd', '=', 'e'}; base::scoped_nsobject<TestNSNetService> test_service([[TestNSNetService alloc] initWithData:[[NSData alloc] initWithBytes:record_bytes length:arraysize(record_bytes)]]); diff --git a/chrome/browser/local_discovery/service_discovery_client_mdns.cc b/chrome/browser/local_discovery/service_discovery_client_mdns.cc index 7810bf2..eb76c53 100644 --- a/chrome/browser/local_discovery/service_discovery_client_mdns.cc +++ b/chrome/browser/local_discovery/service_discovery_client_mdns.cc @@ -4,9 +4,12 @@ #include "chrome/browser/local_discovery/service_discovery_client_mdns.h" +#include <stddef.h> + #include <vector> #include "base/location.h" +#include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "base/metrics/histogram.h" #include "base/single_thread_task_runner.h" diff --git a/chrome/browser/local_discovery/service_discovery_client_mdns.h b/chrome/browser/local_discovery/service_discovery_client_mdns.h index bf397f7..ab9bcb0 100644 --- a/chrome/browser/local_discovery/service_discovery_client_mdns.h +++ b/chrome/browser/local_discovery/service_discovery_client_mdns.h @@ -9,6 +9,7 @@ #include <string> #include "base/cancelable_callback.h" +#include "base/macros.h" #include "base/observer_list.h" #include "chrome/browser/local_discovery/service_discovery_shared_client.h" #include "chrome/common/local_discovery/service_discovery_client.h" diff --git a/chrome/browser/local_discovery/service_discovery_client_utility.h b/chrome/browser/local_discovery/service_discovery_client_utility.h index b9f9bec..3df9dfe 100644 --- a/chrome/browser/local_discovery/service_discovery_client_utility.h +++ b/chrome/browser/local_discovery/service_discovery_client_utility.h @@ -8,6 +8,7 @@ #include <string> #include "base/cancelable_callback.h" +#include "base/macros.h" #include "chrome/browser/local_discovery/service_discovery_shared_client.h" #include "chrome/common/local_discovery/service_discovery_client.h" #include "net/base/network_change_notifier.h" diff --git a/chrome/browser/local_discovery/service_discovery_device_lister.cc b/chrome/browser/local_discovery/service_discovery_device_lister.cc index e797ae0..a677b1217 100644 --- a/chrome/browser/local_discovery/service_discovery_device_lister.cc +++ b/chrome/browser/local_discovery/service_discovery_device_lister.cc @@ -9,6 +9,7 @@ #include "base/bind.h" #include "base/message_loop/message_loop.h" +#include "build/build_config.h" namespace local_discovery { diff --git a/chrome/browser/local_discovery/service_discovery_device_lister.h b/chrome/browser/local_discovery/service_discovery_device_lister.h index aead052e..ff83b79 100644 --- a/chrome/browser/local_discovery/service_discovery_device_lister.h +++ b/chrome/browser/local_discovery/service_discovery_device_lister.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/memory/weak_ptr.h" diff --git a/chrome/browser/local_discovery/service_discovery_host_client.cc b/chrome/browser/local_discovery/service_discovery_host_client.cc index 17d5b5d..2d5603a 100644 --- a/chrome/browser/local_discovery/service_discovery_host_client.cc +++ b/chrome/browser/local_discovery/service_discovery_host_client.cc @@ -4,9 +4,12 @@ #include "chrome/browser/local_discovery/service_discovery_host_client.h" +#include <stddef.h> + #include "base/location.h" #include "base/single_thread_task_runner.h" #include "base/thread_task_runner_handle.h" +#include "build/build_config.h" #include "chrome/common/local_discovery/local_discovery_messages.h" #include "chrome/grit/generated_resources.h" #include "content/public/browser/browser_thread.h" @@ -100,7 +103,7 @@ class ServiceDiscoveryHostClient::ServiceWatcherProxy : public ServiceWatcher { private: scoped_refptr<ServiceDiscoveryHostClient> host_; const std::string service_type_; - const uint64 id_; + const uint64_t id_; bool started_; }; @@ -135,7 +138,7 @@ class ServiceDiscoveryHostClient::ServiceResolverProxy private: scoped_refptr<ServiceDiscoveryHostClient> host_; const std::string service_name_; - const uint64 id_; + const uint64_t id_; bool started_; }; @@ -172,7 +175,7 @@ class ServiceDiscoveryHostClient::LocalDomainResolverProxy scoped_refptr<ServiceDiscoveryHostClient> host_; std::string domain_; net::AddressFamily address_family_; - const uint64 id_; + const uint64_t id_; bool started_; }; @@ -213,7 +216,7 @@ ServiceDiscoveryHostClient::CreateLocalDomainResolver( this, domain, address_family, callback)); } -uint64 ServiceDiscoveryHostClient::RegisterWatcherCallback( +uint64_t ServiceDiscoveryHostClient::RegisterWatcherCallback( const ServiceWatcher::UpdatedCallback& callback) { DCHECK_CURRENTLY_ON(BrowserThread::UI); DCHECK(!ContainsKey(service_watcher_callbacks_, current_id_ + 1)); @@ -221,7 +224,7 @@ uint64 ServiceDiscoveryHostClient::RegisterWatcherCallback( return current_id_; } -uint64 ServiceDiscoveryHostClient::RegisterResolverCallback( +uint64_t ServiceDiscoveryHostClient::RegisterResolverCallback( const ServiceResolver::ResolveCompleteCallback& callback) { DCHECK_CURRENTLY_ON(BrowserThread::UI); DCHECK(!ContainsKey(service_resolver_callbacks_, current_id_ + 1)); @@ -229,7 +232,7 @@ uint64 ServiceDiscoveryHostClient::RegisterResolverCallback( return current_id_; } -uint64 ServiceDiscoveryHostClient::RegisterLocalDomainResolverCallback( +uint64_t ServiceDiscoveryHostClient::RegisterLocalDomainResolverCallback( const LocalDomainResolver::IPAddressCallback& callback) { DCHECK_CURRENTLY_ON(BrowserThread::UI); DCHECK(!ContainsKey(domain_resolver_callbacks_, current_id_ + 1)); @@ -237,18 +240,18 @@ uint64 ServiceDiscoveryHostClient::RegisterLocalDomainResolverCallback( return current_id_; } -void ServiceDiscoveryHostClient::UnregisterWatcherCallback(uint64 id) { +void ServiceDiscoveryHostClient::UnregisterWatcherCallback(uint64_t id) { DCHECK_CURRENTLY_ON(BrowserThread::UI); service_watcher_callbacks_.erase(id); } -void ServiceDiscoveryHostClient::UnregisterResolverCallback(uint64 id) { +void ServiceDiscoveryHostClient::UnregisterResolverCallback(uint64_t id) { DCHECK_CURRENTLY_ON(BrowserThread::UI); service_resolver_callbacks_.erase(id); } void ServiceDiscoveryHostClient::UnregisterLocalDomainResolverCallback( - uint64 id) { + uint64_t id) { DCHECK_CURRENTLY_ON(BrowserThread::UI); domain_resolver_callbacks_.erase(id); } @@ -391,7 +394,7 @@ void ServiceDiscoveryHostClient::OnError() { } void ServiceDiscoveryHostClient::OnWatcherCallback( - uint64 id, + uint64_t id, ServiceWatcher::UpdateType update, const std::string& service_name) { DCHECK_CURRENTLY_ON(BrowserThread::IO); @@ -402,7 +405,7 @@ void ServiceDiscoveryHostClient::OnWatcherCallback( } void ServiceDiscoveryHostClient::OnResolverCallback( - uint64 id, + uint64_t id, ServiceResolver::RequestStatus status, const ServiceDescription& description) { DCHECK_CURRENTLY_ON(BrowserThread::IO); @@ -413,7 +416,7 @@ void ServiceDiscoveryHostClient::OnResolverCallback( } void ServiceDiscoveryHostClient::OnLocalDomainResolverCallback( - uint64 id, + uint64_t id, bool success, const net::IPAddressNumber& ip_address_ipv4, const net::IPAddressNumber& ip_address_ipv6) { @@ -425,7 +428,7 @@ void ServiceDiscoveryHostClient::OnLocalDomainResolverCallback( } void ServiceDiscoveryHostClient::RunWatcherCallback( - uint64 id, + uint64_t id, ServiceWatcher::UpdateType update, const std::string& service_name) { DCHECK_CURRENTLY_ON(BrowserThread::UI); @@ -435,7 +438,7 @@ void ServiceDiscoveryHostClient::RunWatcherCallback( } void ServiceDiscoveryHostClient::RunResolverCallback( - uint64 id, + uint64_t id, ServiceResolver::RequestStatus status, const ServiceDescription& description) { DCHECK_CURRENTLY_ON(BrowserThread::UI); @@ -445,7 +448,7 @@ void ServiceDiscoveryHostClient::RunResolverCallback( } void ServiceDiscoveryHostClient::RunLocalDomainResolverCallback( - uint64 id, + uint64_t id, bool success, const net::IPAddressNumber& ip_address_ipv4, const net::IPAddressNumber& ip_address_ipv6) { diff --git a/chrome/browser/local_discovery/service_discovery_host_client.h b/chrome/browser/local_discovery/service_discovery_host_client.h index bf12ae1..7849f31 100644 --- a/chrome/browser/local_discovery/service_discovery_host_client.h +++ b/chrome/browser/local_discovery/service_discovery_host_client.h @@ -5,13 +5,17 @@ #ifndef CHROME_BROWSER_LOCAL_DISCOVERY_SERVICE_DISCOVERY_HOST_CLIENT_H_ #define CHROME_BROWSER_LOCAL_DISCOVERY_SERVICE_DISCOVERY_HOST_CLIENT_H_ +#include <stdint.h> + #include <map> #include <string> #include <vector> +#include "base/macros.h" #include "base/memory/ref_counted.h" #include "base/memory/scoped_vector.h" #include "base/memory/weak_ptr.h" +#include "build/build_config.h" #include "chrome/common/local_discovery/service_discovery_client.h" #include "content/public/browser/utility_process_host_client.h" @@ -70,10 +74,10 @@ class ServiceDiscoveryHostClient class LocalDomainResolverProxy; friend class ServiceDiscoveryClientUtility; - typedef std::map<uint64, ServiceWatcher::UpdatedCallback> WatcherCallbacks; - typedef std::map<uint64, ServiceResolver::ResolveCompleteCallback> + typedef std::map<uint64_t, ServiceWatcher::UpdatedCallback> WatcherCallbacks; + typedef std::map<uint64_t, ServiceResolver::ResolveCompleteCallback> ResolverCallbacks; - typedef std::map<uint64, LocalDomainResolver::IPAddressCallback> + typedef std::map<uint64_t, LocalDomainResolver::IPAddressCallback> DomainResolverCallbacks; void StartOnIOThread(); @@ -88,50 +92,48 @@ class ServiceDiscoveryHostClient void Send(IPC::Message* msg); void SendOnIOThread(IPC::Message* msg); - uint64 RegisterWatcherCallback( + uint64_t RegisterWatcherCallback( const ServiceWatcher::UpdatedCallback& callback); - uint64 RegisterResolverCallback( + uint64_t RegisterResolverCallback( const ServiceResolver::ResolveCompleteCallback& callback); - uint64 RegisterLocalDomainResolverCallback( + uint64_t RegisterLocalDomainResolverCallback( const LocalDomainResolver::IPAddressCallback& callback); - void UnregisterWatcherCallback(uint64 id); - void UnregisterResolverCallback(uint64 id); - void UnregisterLocalDomainResolverCallback(uint64 id); + void UnregisterWatcherCallback(uint64_t id); + void UnregisterResolverCallback(uint64_t id); + void UnregisterLocalDomainResolverCallback(uint64_t id); // IPC Message handlers. void OnError(); - void OnWatcherCallback(uint64 id, + void OnWatcherCallback(uint64_t id, ServiceWatcher::UpdateType update, const std::string& service_name); - void OnResolverCallback(uint64 id, + void OnResolverCallback(uint64_t id, ServiceResolver::RequestStatus status, const ServiceDescription& description); - void OnLocalDomainResolverCallback(uint64 id, + void OnLocalDomainResolverCallback(uint64_t id, bool success, const net::IPAddressNumber& address_ipv4, const net::IPAddressNumber& address_ipv6); - // Runs watcher callback on owning thread. - void RunWatcherCallback(uint64 id, + void RunWatcherCallback(uint64_t id, ServiceWatcher::UpdateType update, const std::string& service_name); // Runs resolver callback on owning thread. - void RunResolverCallback(uint64 id, + void RunResolverCallback(uint64_t id, ServiceResolver::RequestStatus status, const ServiceDescription& description); // Runs local domain resolver callback on owning thread. - void RunLocalDomainResolverCallback(uint64 id, + void RunLocalDomainResolverCallback(uint64_t id, bool success, const net::IPAddressNumber& address_ipv4, const net::IPAddressNumber& address_ipv6); - base::WeakPtr<content::UtilityProcessHost> utility_host_; // Incrementing counter to assign ID to watchers and resolvers. - uint64 current_id_; + uint64_t current_id_; base::Closure error_callback_; WatcherCallbacks service_watcher_callbacks_; ResolverCallbacks service_resolver_callbacks_; diff --git a/chrome/browser/local_discovery/service_discovery_shared_client.cc b/chrome/browser/local_discovery/service_discovery_shared_client.cc index 7fd5901..4d8c9eb 100644 --- a/chrome/browser/local_discovery/service_discovery_shared_client.cc +++ b/chrome/browser/local_discovery/service_discovery_shared_client.cc @@ -4,6 +4,8 @@ #include "chrome/browser/local_discovery/service_discovery_shared_client.h" +#include "build/build_config.h" + #if defined(OS_WIN) #include "base/files/file_path.h" #include "base/metrics/histogram.h" diff --git a/chrome/browser/local_discovery/service_discovery_shared_client.h b/chrome/browser/local_discovery/service_discovery_shared_client.h index c71ce66..9ffe5ce 100644 --- a/chrome/browser/local_discovery/service_discovery_shared_client.h +++ b/chrome/browser/local_discovery/service_discovery_shared_client.h @@ -5,6 +5,7 @@ #ifndef CHROME_BROWSER_LOCAL_DISCOVERY_SERVICE_DISCOVERY_SHARED_CLIENT_H_ #define CHROME_BROWSER_LOCAL_DISCOVERY_SERVICE_DISCOVERY_SHARED_CLIENT_H_ +#include "base/macros.h" #include "chrome/common/local_discovery/service_discovery_client.h" #include "content/public/browser/browser_thread.h" diff --git a/chrome/browser/local_discovery/test_service_discovery_client.cc b/chrome/browser/local_discovery/test_service_discovery_client.cc index eb17506..477e45f 100644 --- a/chrome/browser/local_discovery/test_service_discovery_client.cc +++ b/chrome/browser/local_discovery/test_service_discovery_client.cc @@ -53,7 +53,7 @@ TestServiceDiscoveryClient::CreateLocalDomainResolver( domain, address_family, callback); } -void TestServiceDiscoveryClient::SimulateReceive(const uint8* packet, +void TestServiceDiscoveryClient::SimulateReceive(const uint8_t* packet, int size) { mock_socket_factory_.SimulateReceive(packet, size); } diff --git a/chrome/browser/local_discovery/test_service_discovery_client.h b/chrome/browser/local_discovery/test_service_discovery_client.h index caf5eec..4780f01 100644 --- a/chrome/browser/local_discovery/test_service_discovery_client.h +++ b/chrome/browser/local_discovery/test_service_discovery_client.h @@ -5,6 +5,8 @@ #ifndef CHROME_BROWSER_LOCAL_DISCOVERY_TEST_SERVICE_DISCOVERY_CLIENT_H_ #define CHROME_BROWSER_LOCAL_DISCOVERY_TEST_SERVICE_DISCOVERY_CLIENT_H_ +#include <stdint.h> + #include "chrome/browser/local_discovery/service_discovery_shared_client.h" #include "chrome/common/local_discovery/service_discovery_client.h" #include "net/dns/mdns_client.h" @@ -32,7 +34,7 @@ class TestServiceDiscoveryClient : public ServiceDiscoverySharedClient { MOCK_METHOD1(OnSendTo, void(const std::string& data)); - void SimulateReceive(const uint8* packet, int size); + void SimulateReceive(const uint8_t* packet, int size); private: ~TestServiceDiscoveryClient() override; diff --git a/chrome/browser/locale_tests_browsertest.cc b/chrome/browser/locale_tests_browsertest.cc index 6c57279..66472d9 100644 --- a/chrome/browser/locale_tests_browsertest.cc +++ b/chrome/browser/locale_tests_browsertest.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/environment.h" +#include "base/macros.h" #include "build/build_config.h" #include "chrome/test/base/in_process_browser_test.h" #include "ui/base/ui_base_switches.h" diff --git a/chrome/browser/mac/install_from_dmg.mm b/chrome/browser/mac/install_from_dmg.mm index c1d68ea..9ffd80f 100644 --- a/chrome/browser/mac/install_from_dmg.mm +++ b/chrome/browser/mac/install_from_dmg.mm @@ -18,7 +18,6 @@ #include <unistd.h> #include "base/auto_reset.h" -#include "base/basictypes.h" #include "base/command_line.h" #include "base/files/file_path.h" #include "base/logging.h" @@ -31,6 +30,7 @@ #include "base/mac/scoped_cftyperef.h" #include "base/mac/scoped_ioobject.h" #include "base/mac/scoped_nsautorelease_pool.h" +#include "base/macros.h" #include "base/strings/string_util.h" #include "base/strings/stringprintf.h" #include "base/strings/sys_string_conversions.h" diff --git a/chrome/browser/mac/keystone_glue.h b/chrome/browser/mac/keystone_glue.h index 1547975..912a1d9 100644 --- a/chrome/browser/mac/keystone_glue.h +++ b/chrome/browser/mac/keystone_glue.h @@ -10,6 +10,7 @@ #if defined(__OBJC__) #import <Foundation/Foundation.h> +#include <stdint.h> #include "base/mac/scoped_authorizationref.h" #import "base/mac/scoped_nsobject.h" diff --git a/chrome/browser/mac/keystone_registration.h b/chrome/browser/mac/keystone_registration.h index 3fa9197..72e52ed 100644 --- a/chrome/browser/mac/keystone_registration.h +++ b/chrome/browser/mac/keystone_registration.h @@ -7,6 +7,7 @@ #import <Foundation/Foundation.h> #include <Security/Authorization.h> +#include <stdint.h> // Declarations of the Keystone registration bits needed here. From // KSRegistration.h. diff --git a/chrome/browser/mac/mac_startup_profiler.h b/chrome/browser/mac/mac_startup_profiler.h index da36c60..d3ace2f 100644 --- a/chrome/browser/mac/mac_startup_profiler.h +++ b/chrome/browser/mac/mac_startup_profiler.h @@ -7,6 +7,7 @@ #include <map> +#include "base/macros.h" #include "base/memory/singleton.h" #include "base/time/time.h" diff --git a/chrome/browser/mac/relauncher.cc b/chrome/browser/mac/relauncher.cc index ecf6d87..40ea537 100644 --- a/chrome/browser/mac/relauncher.cc +++ b/chrome/browser/mac/relauncher.cc @@ -8,6 +8,7 @@ #include <AvailabilityMacros.h> #include <crt_externs.h> #include <dlfcn.h> +#include <stddef.h> #include <string.h> #include <sys/event.h> #include <sys/time.h> @@ -17,7 +18,6 @@ #include <string> #include <vector> -#include "base/basictypes.h" #include "base/files/file_util.h" #include "base/files/scoped_file.h" #include "base/logging.h" diff --git a/chrome/browser/manifest/manifest_icon_downloader.cc b/chrome/browser/manifest/manifest_icon_downloader.cc index ec1e2ec..ec8de3a 100644 --- a/chrome/browser/manifest/manifest_icon_downloader.cc +++ b/chrome/browser/manifest/manifest_icon_downloader.cc @@ -4,6 +4,8 @@ #include "chrome/browser/manifest/manifest_icon_downloader.h" +#include <stddef.h> + #include <limits> #include "chrome/browser/manifest/manifest_icon_selector.h" diff --git a/chrome/browser/manifest/manifest_icon_downloader.h b/chrome/browser/manifest/manifest_icon_downloader.h index 4ae7e63..4967ad5 100644 --- a/chrome/browser/manifest/manifest_icon_downloader.h +++ b/chrome/browser/manifest/manifest_icon_downloader.h @@ -7,8 +7,8 @@ #include <vector> -#include "base/basictypes.h" #include "base/callback_forward.h" +#include "base/macros.h" #include "third_party/skia/include/core/SkBitmap.h" namespace content { diff --git a/chrome/browser/manifest/manifest_icon_downloader_unittest.cc b/chrome/browser/manifest/manifest_icon_downloader_unittest.cc index a1a0857..18d69d1 100644 --- a/chrome/browser/manifest/manifest_icon_downloader_unittest.cc +++ b/chrome/browser/manifest/manifest_icon_downloader_unittest.cc @@ -7,6 +7,7 @@ #include <string> #include <vector> +#include "base/macros.h" #include "testing/gtest/include/gtest/gtest.h" class ManifestIconDownloaderTest : public testing::Test { diff --git a/chrome/browser/manifest/manifest_icon_selector.cc b/chrome/browser/manifest/manifest_icon_selector.cc index 21e0d46..26bbbe1 100644 --- a/chrome/browser/manifest/manifest_icon_selector.cc +++ b/chrome/browser/manifest/manifest_icon_selector.cc @@ -4,6 +4,8 @@ #include "chrome/browser/manifest/manifest_icon_selector.h" +#include <stddef.h> + #include <algorithm> #include <cmath> #include <limits> diff --git a/chrome/browser/manifest/manifest_icon_selector.h b/chrome/browser/manifest/manifest_icon_selector.h index a2b5c24..b3dc645 100644 --- a/chrome/browser/manifest/manifest_icon_selector.h +++ b/chrome/browser/manifest/manifest_icon_selector.h @@ -5,7 +5,7 @@ #ifndef CHROME_BROWSER_MANIFEST_MANIFEST_ICON_SELECTOR_H_ #define CHROME_BROWSER_MANIFEST_MANIFEST_ICON_SELECTOR_H_ -#include "base/basictypes.h" +#include "base/macros.h" #include "content/public/common/manifest.h" #include "url/gurl.h" diff --git a/chrome/browser/manifest/manifest_icon_selector_unittest.cc b/chrome/browser/manifest/manifest_icon_selector_unittest.cc index a6441c9..fbd3eb1 100644 --- a/chrome/browser/manifest/manifest_icon_selector_unittest.cc +++ b/chrome/browser/manifest/manifest_icon_selector_unittest.cc @@ -7,6 +7,7 @@ #include <string> #include <vector> +#include "base/macros.h" #include "base/strings/utf_string_conversions.h" #include "testing/gtest/include/gtest/gtest.h" #include "ui/gfx/screen.h" diff --git a/chrome/browser/media/android/remote/remote_media_player_bridge.h b/chrome/browser/media/android/remote/remote_media_player_bridge.h index 1ac23a5..50a3f9d 100644 --- a/chrome/browser/media/android/remote/remote_media_player_bridge.h +++ b/chrome/browser/media/android/remote/remote_media_player_bridge.h @@ -8,6 +8,7 @@ #include <jni.h> #include <vector> +#include "base/macros.h" #include "base/time/time.h" #include "base/timer/timer.h" #include "media/base/android/media_player_bridge.h" diff --git a/chrome/browser/media/android/remote/remote_media_player_manager.h b/chrome/browser/media/android/remote/remote_media_player_manager.h index 6c93f95..5983bb6 100644 --- a/chrome/browser/media/android/remote/remote_media_player_manager.h +++ b/chrome/browser/media/android/remote/remote_media_player_manager.h @@ -8,6 +8,7 @@ #include <set> #include <vector> +#include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "base/memory/scoped_vector.h" #include "chrome/browser/media/android/remote/remote_media_player_bridge.h" diff --git a/chrome/browser/media/android/router/media_router_android.cc b/chrome/browser/media/android/router/media_router_android.cc index e74446f..e20baca 100644 --- a/chrome/browser/media/android/router/media_router_android.cc +++ b/chrome/browser/media/android/router/media_router_android.cc @@ -188,7 +188,7 @@ void MediaRouterAndroid::SendRouteMessage( void MediaRouterAndroid::SendRouteBinaryMessage( const MediaRoute::Id& route_id, - scoped_ptr<std::vector<uint8>> data, + scoped_ptr<std::vector<uint8_t>> data, const SendRouteMessageCallback& callback) { int callback_id = message_callbacks_.Add(new SendRouteMessageCallback(callback)); diff --git a/chrome/browser/media/android/router/media_router_android.h b/chrome/browser/media/android/router/media_router_android.h index 8d3b26c..617ada1 100644 --- a/chrome/browser/media/android/router/media_router_android.h +++ b/chrome/browser/media/android/router/media_router_android.h @@ -6,10 +6,12 @@ #define CHROME_BROWSER_MEDIA_ANDROID_ROUTER_MEDIA_ROUTER_ANDROID_H_ #include <jni.h> +#include <stdint.h> #include "base/android/scoped_java_ref.h" #include "base/containers/scoped_ptr_hash_map.h" #include "base/id_map.h" +#include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "base/observer_list.h" #include "chrome/browser/media/router/media_router_base.h" @@ -49,7 +51,7 @@ class MediaRouterAndroid : public MediaRouterBase { const SendRouteMessageCallback& callback) override; void SendRouteBinaryMessage( const MediaRoute::Id& route_id, - scoped_ptr<std::vector<uint8>> data, + scoped_ptr<std::vector<uint8_t>> data, const SendRouteMessageCallback& callback) override; void AddIssue(const Issue& issue) override; void ClearIssue(const Issue::Id& issue_id) override; diff --git a/chrome/browser/media/cast_transport_host_filter.cc b/chrome/browser/media/cast_transport_host_filter.cc index 3f140734..f32b53e 100644 --- a/chrome/browser/media/cast_transport_host_filter.cc +++ b/chrome/browser/media/cast_transport_host_filter.cc @@ -50,19 +50,19 @@ bool CastTransportHostFilter::OnMessageReceived(const IPC::Message& message) { } void CastTransportHostFilter::ReceivedPacket( - int32 channel_id, + int32_t channel_id, scoped_ptr<media::cast::Packet> packet) { Send(new CastMsg_ReceivedPacket(channel_id, *packet)); } void CastTransportHostFilter::NotifyStatusChange( - int32 channel_id, + int32_t channel_id, media::cast::CastTransportStatus status) { Send(new CastMsg_NotifyStatusChange(channel_id, status)); } void CastTransportHostFilter::SendRawEvents( - int32 channel_id, + int32_t channel_id, scoped_ptr<std::vector<media::cast::FrameEvent>> frame_events, scoped_ptr<std::vector<media::cast::PacketEvent>> packet_events) { if (frame_events->empty() && packet_events->empty()) @@ -70,24 +70,23 @@ void CastTransportHostFilter::SendRawEvents( Send(new CastMsg_RawEvents(channel_id, *packet_events, *frame_events)); } -void CastTransportHostFilter::SendRtt(int32 channel_id, - uint32 ssrc, +void CastTransportHostFilter::SendRtt(int32_t channel_id, + uint32_t ssrc, base::TimeDelta rtt) { Send(new CastMsg_Rtt(channel_id, ssrc, rtt)); } void CastTransportHostFilter::SendCastMessage( - int32 channel_id, - uint32 ssrc, + int32_t channel_id, + uint32_t ssrc, const media::cast::RtcpCastMessage& cast_message) { Send(new CastMsg_RtcpCastMessage(channel_id, ssrc, cast_message)); } -void CastTransportHostFilter::OnNew( - int32 channel_id, - const net::IPEndPoint& local_end_point, - const net::IPEndPoint& remote_end_point, - const base::DictionaryValue& options) { +void CastTransportHostFilter::OnNew(int32_t channel_id, + const net::IPEndPoint& local_end_point, + const net::IPEndPoint& remote_end_point, + const base::DictionaryValue& options) { if (!power_save_blocker_) { DVLOG(1) << ("Preventing the application from being suspended while one or " "more transports are active for Cast Streaming."); @@ -123,7 +122,7 @@ void CastTransportHostFilter::OnNew( id_map_.AddWithID(sender.release(), channel_id); } -void CastTransportHostFilter::OnDelete(int32 channel_id) { +void CastTransportHostFilter::OnDelete(int32_t channel_id) { media::cast::CastTransportSender* sender = id_map_.Lookup(channel_id); if (sender) { id_map_.Remove(channel_id); @@ -141,7 +140,7 @@ void CastTransportHostFilter::OnDelete(int32 channel_id) { } void CastTransportHostFilter::OnInitializeAudio( - int32 channel_id, + int32_t channel_id, const media::cast::CastTransportRtpConfig& config) { media::cast::CastTransportSender* sender = id_map_.Lookup(channel_id); if (sender) { @@ -160,7 +159,7 @@ void CastTransportHostFilter::OnInitializeAudio( } void CastTransportHostFilter::OnInitializeVideo( - int32 channel_id, + int32_t channel_id, const media::cast::CastTransportRtpConfig& config) { media::cast::CastTransportSender* sender = id_map_.Lookup(channel_id); if (sender) { @@ -179,8 +178,8 @@ void CastTransportHostFilter::OnInitializeVideo( } void CastTransportHostFilter::OnInsertFrame( - int32 channel_id, - uint32 ssrc, + int32_t channel_id, + uint32_t ssrc, const media::cast::EncodedFrame& frame) { media::cast::CastTransportSender* sender = id_map_.Lookup(channel_id); if (sender) { @@ -192,8 +191,9 @@ void CastTransportHostFilter::OnInsertFrame( } void CastTransportHostFilter::OnCancelSendingFrames( - int32 channel_id, uint32 ssrc, - const std::vector<uint32>& frame_ids) { + int32_t channel_id, + uint32_t ssrc, + const std::vector<uint32_t>& frame_ids) { media::cast::CastTransportSender* sender = id_map_.Lookup(channel_id); if (sender) { sender->CancelSendingFrames(ssrc, frame_ids); @@ -204,8 +204,9 @@ void CastTransportHostFilter::OnCancelSendingFrames( } } -void CastTransportHostFilter::OnResendFrameForKickstart( - int32 channel_id, uint32 ssrc, uint32 frame_id) { +void CastTransportHostFilter::OnResendFrameForKickstart(int32_t channel_id, + uint32_t ssrc, + uint32_t frame_id) { media::cast::CastTransportSender* sender = id_map_.Lookup(channel_id); if (sender) { sender->ResendFrameForKickstart(ssrc, frame_id); @@ -217,10 +218,10 @@ void CastTransportHostFilter::OnResendFrameForKickstart( } void CastTransportHostFilter::OnSendSenderReport( - int32 channel_id, - uint32 ssrc, + int32_t channel_id, + uint32_t ssrc, base::TimeTicks current_time, - uint32 current_time_as_rtp_timestamp) { + uint32_t current_time_as_rtp_timestamp) { media::cast::CastTransportSender* sender = id_map_.Lookup(channel_id); if (sender) { sender->SendSenderReport(ssrc, @@ -233,7 +234,8 @@ void CastTransportHostFilter::OnSendSenderReport( } } -void CastTransportHostFilter::OnAddValidSsrc(int32 channel_id, uint32 ssrc) { +void CastTransportHostFilter::OnAddValidSsrc(int32_t channel_id, + uint32_t ssrc) { media::cast::CastTransportSender* sender = id_map_.Lookup(channel_id); if (sender) { sender->AddValidSsrc(ssrc); @@ -245,7 +247,7 @@ void CastTransportHostFilter::OnAddValidSsrc(int32 channel_id, uint32 ssrc) { } void CastTransportHostFilter::OnSendRtcpFromRtpReceiver( - int32 channel_id, + int32_t channel_id, const media::cast::SendRtcpFromRtpReceiver_Params& params) { media::cast::CastTransportSender* sender = id_map_.Lookup(channel_id); if (sender) { diff --git a/chrome/browser/media/cast_transport_host_filter.h b/chrome/browser/media/cast_transport_host_filter.h index 094d7e7..8fbf478 100644 --- a/chrome/browser/media/cast_transport_host_filter.h +++ b/chrome/browser/media/cast_transport_host_filter.h @@ -5,7 +5,10 @@ #ifndef CHROME_BROWSER_MEDIA_CAST_TRANSPORT_HOST_FILTER_H_ #define CHROME_BROWSER_MEDIA_CAST_TRANSPORT_HOST_FILTER_H_ +#include <stdint.h> + #include "base/id_map.h" +#include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "base/memory/weak_ptr.h" #include "base/time/default_tick_clock.h" @@ -27,53 +30,50 @@ class CastTransportHostFilter : public content::BrowserMessageFilter { private: ~CastTransportHostFilter() override; - void NotifyStatusChange( - int32 channel_id, - media::cast::CastTransportStatus result); + void NotifyStatusChange(int32_t channel_id, + media::cast::CastTransportStatus result); void SendRawEvents( - int32 channel_id, + int32_t channel_id, scoped_ptr<std::vector<media::cast::FrameEvent>> frame_events, scoped_ptr<std::vector<media::cast::PacketEvent>> packet_events); - void SendRtt(int32 channel_id, uint32 ssrc, base::TimeDelta rtt); - void SendCastMessage(int32 channel_id, - uint32 ssrc, + void SendRtt(int32_t channel_id, uint32_t ssrc, base::TimeDelta rtt); + void SendCastMessage(int32_t channel_id, + uint32_t ssrc, const media::cast::RtcpCastMessage& cast_message); - void ReceivedPacket(int32 channel_id, scoped_ptr<media::cast::Packet> packet); + void ReceivedPacket(int32_t channel_id, + scoped_ptr<media::cast::Packet> packet); // BrowserMessageFilter implementation. bool OnMessageReceived(const IPC::Message& message) override; // Forwarding functions. - void OnInitializeAudio( - int32 channel_id, - const media::cast::CastTransportRtpConfig& config); - void OnInitializeVideo( - int32 channel_id, - const media::cast::CastTransportRtpConfig& config); - void OnInsertFrame( - int32 channel_id, - uint32 ssrc, - const media::cast::EncodedFrame& frame); - void OnSendSenderReport( - int32 channel_id, - uint32 ssrc, - base::TimeTicks current_time, - uint32 current_time_as_rtp_timestamp); - void OnCancelSendingFrames(int32 channel_id, uint32 ssrc, - const std::vector<uint32>& frame_ids); - void OnResendFrameForKickstart(int32 channel_id, uint32 ssrc, - uint32 frame_id); - void OnAddValidSsrc(int32 channel_id, uint32 ssrc); + void OnInitializeAudio(int32_t channel_id, + const media::cast::CastTransportRtpConfig& config); + void OnInitializeVideo(int32_t channel_id, + const media::cast::CastTransportRtpConfig& config); + void OnInsertFrame(int32_t channel_id, + uint32_t ssrc, + const media::cast::EncodedFrame& frame); + void OnSendSenderReport(int32_t channel_id, + uint32_t ssrc, + base::TimeTicks current_time, + uint32_t current_time_as_rtp_timestamp); + void OnCancelSendingFrames(int32_t channel_id, + uint32_t ssrc, + const std::vector<uint32_t>& frame_ids); + void OnResendFrameForKickstart(int32_t channel_id, + uint32_t ssrc, + uint32_t frame_id); + void OnAddValidSsrc(int32_t channel_id, uint32_t ssrc); void OnSendRtcpFromRtpReceiver( - int32 channel_id, + int32_t channel_id, const media::cast::SendRtcpFromRtpReceiver_Params& params); - void OnNew( - int32 channel_id, - const net::IPEndPoint& local_end_point, - const net::IPEndPoint& remote_end_point, - const base::DictionaryValue& options); - void OnDelete(int32 channel_id); + void OnNew(int32_t channel_id, + const net::IPEndPoint& local_end_point, + const net::IPEndPoint& remote_end_point, + const base::DictionaryValue& options); + void OnDelete(int32_t channel_id); IDMap<media::cast::CastTransportSender, IDMapOwnPointer> id_map_; diff --git a/chrome/browser/media/cast_transport_host_filter_unittest.cc b/chrome/browser/media/cast_transport_host_filter_unittest.cc index 27aa970..e2da614 100644 --- a/chrome/browser/media/cast_transport_host_filter_unittest.cc +++ b/chrome/browser/media/cast_transport_host_filter_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 <stdint.h> + #include "base/callback.h" #include "base/message_loop/message_loop.h" #include "base/time/default_tick_clock.h" @@ -83,7 +85,7 @@ TEST_F(CastTransportHostFilterTest, NewMany) { TEST_F(CastTransportHostFilterTest, SimpleMessages) { // Create a cast transport sender. - const int32 kChannelId = 42; + const int32_t kChannelId = 42; CastHostMsg_New new_msg(kChannelId, receive_endpoint_, net::IPEndPoint(), @@ -129,7 +131,7 @@ TEST_F(CastTransportHostFilterTest, SimpleMessages) { kChannelId, 1, base::TimeTicks(), 2); FakeSend(rtcp_msg); - std::vector<uint32> frame_ids; + std::vector<uint32_t> frame_ids; frame_ids.push_back(1); CastHostMsg_CancelSendingFrames cancel_msg(kChannelId, 1, frame_ids); FakeSend(cancel_msg); diff --git a/chrome/browser/media/chrome_media_stream_infobar_browsertest.cc b/chrome/browser/media/chrome_media_stream_infobar_browsertest.cc index 05f8033..5b25b57 100644 --- a/chrome/browser/media/chrome_media_stream_infobar_browsertest.cc +++ b/chrome/browser/media/chrome_media_stream_infobar_browsertest.cc @@ -4,6 +4,7 @@ #include "base/command_line.h" #include "base/files/file_util.h" +#include "base/macros.h" #include "base/strings/stringprintf.h" #include "chrome/browser/chrome_notification_types.h" #include "chrome/browser/content_settings/host_content_settings_map_factory.h" diff --git a/chrome/browser/media/chrome_webrtc_apprtc_browsertest.cc b/chrome/browser/media/chrome_webrtc_apprtc_browsertest.cc index 26f1cfc..4821d4e 100644 --- a/chrome/browser/media/chrome_webrtc_apprtc_browsertest.cc +++ b/chrome/browser/media/chrome_webrtc_apprtc_browsertest.cc @@ -8,6 +8,7 @@ #include "base/process/launch.h" #include "base/rand_util.h" #include "base/strings/stringprintf.h" +#include "build/build_config.h" #include "chrome/browser/browser_process.h" #include "chrome/browser/infobars/infobar_responder.h" #include "chrome/browser/infobars/infobar_service.h" diff --git a/chrome/browser/media/chrome_webrtc_audio_quality_browsertest.cc b/chrome/browser/media/chrome_webrtc_audio_quality_browsertest.cc index c70a550..2c2a868 100644 --- a/chrome/browser/media/chrome_webrtc_audio_quality_browsertest.cc +++ b/chrome/browser/media/chrome_webrtc_audio_quality_browsertest.cc @@ -2,12 +2,15 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#include <stddef.h> + #include <ctime> #include "base/command_line.h" #include "base/files/file_enumerator.h" #include "base/files/file_util.h" #include "base/files/scoped_temp_dir.h" +#include "base/macros.h" #include "base/process/launch.h" #include "base/process/process.h" #include "base/scoped_native_library.h" @@ -15,6 +18,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 "chrome/browser/media/webrtc_browsertest_audio.h" #include "chrome/browser/media/webrtc_browsertest_base.h" #include "chrome/browser/media/webrtc_browsertest_common.h" diff --git a/chrome/browser/media/chrome_webrtc_browsertest.cc b/chrome/browser/media/chrome_webrtc_browsertest.cc index 035d337..925ae4a 100644 --- a/chrome/browser/media/chrome_webrtc_browsertest.cc +++ b/chrome/browser/media/chrome_webrtc_browsertest.cc @@ -4,6 +4,7 @@ #include "base/command_line.h" #include "base/strings/stringprintf.h" +#include "build/build_config.h" #include "chrome/browser/media/webrtc_browsertest_base.h" #include "chrome/browser/media/webrtc_browsertest_common.h" #include "chrome/browser/ui/browser.h" diff --git a/chrome/browser/media/chrome_webrtc_disable_encryption_flag_browsertest.cc b/chrome/browser/media/chrome_webrtc_disable_encryption_flag_browsertest.cc index 1f514ee..2c130f3 100644 --- a/chrome/browser/media/chrome_webrtc_disable_encryption_flag_browsertest.cc +++ b/chrome/browser/media/chrome_webrtc_disable_encryption_flag_browsertest.cc @@ -3,6 +3,8 @@ // found in the LICENSE file. #include "base/command_line.h" +#include "base/macros.h" +#include "build/build_config.h" #include "chrome/browser/media/webrtc_browsertest_base.h" #include "chrome/browser/media/webrtc_browsertest_common.h" #include "chrome/common/channel_info.h" diff --git a/chrome/browser/media/chrome_webrtc_simulcast_browsertest.cc b/chrome/browser/media/chrome_webrtc_simulcast_browsertest.cc index fea1b25..bd9e802a 100644 --- a/chrome/browser/media/chrome_webrtc_simulcast_browsertest.cc +++ b/chrome/browser/media/chrome_webrtc_simulcast_browsertest.cc @@ -5,6 +5,7 @@ #include "base/command_line.h" #include "base/files/file_path.h" #include "base/path_service.h" +#include "build/build_config.h" #include "chrome/browser/media/webrtc_browsertest_base.h" #include "chrome/browser/media/webrtc_browsertest_common.h" #include "chrome/browser/ui/browser.h" diff --git a/chrome/browser/media/chrome_webrtc_video_quality_browsertest.cc b/chrome/browser/media/chrome_webrtc_video_quality_browsertest.cc index 3fb0b19..6098fa3 100644 --- a/chrome/browser/media/chrome_webrtc_video_quality_browsertest.cc +++ b/chrome/browser/media/chrome_webrtc_video_quality_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 <stddef.h> + #include "base/base64.h" #include "base/command_line.h" #include "base/environment.h" @@ -15,6 +17,7 @@ #include "base/strings/stringprintf.h" #include "base/test/test_timeouts.h" #include "base/time/time.h" +#include "build/build_config.h" #include "chrome/browser/chrome_notification_types.h" #include "chrome/browser/infobars/infobar_service.h" #include "chrome/browser/media/webrtc_browsertest_base.h" diff --git a/chrome/browser/media/chrome_webrtc_webcam_browsertest.cc b/chrome/browser/media/chrome_webrtc_webcam_browsertest.cc index fc36cf8..4423d65 100644 --- a/chrome/browser/media/chrome_webrtc_webcam_browsertest.cc +++ b/chrome/browser/media/chrome_webrtc_webcam_browsertest.cc @@ -3,6 +3,7 @@ // found in the LICENSE file. #include "base/command_line.h" +#include "build/build_config.h" #include "chrome/browser/media/webrtc_browsertest_base.h" #include "chrome/browser/media/webrtc_browsertest_common.h" #include "chrome/browser/ui/browser.h" diff --git a/chrome/browser/media/desktop_capture_access_handler.cc b/chrome/browser/media/desktop_capture_access_handler.cc index 19e3c14..eebc17e 100644 --- a/chrome/browser/media/desktop_capture_access_handler.cc +++ b/chrome/browser/media/desktop_capture_access_handler.cc @@ -8,6 +8,7 @@ #include "base/strings/string_number_conversions.h" #include "base/strings/string_util.h" #include "base/strings/utf_string_conversions.h" +#include "build/build_config.h" #include "chrome/browser/media/desktop_streams_registry.h" #include "chrome/browser/media/media_capture_devices_dispatcher.h" #include "chrome/browser/ui/browser.h" diff --git a/chrome/browser/media/desktop_media_list.h b/chrome/browser/media/desktop_media_list.h index d8b2e23..86ac37c 100644 --- a/chrome/browser/media/desktop_media_list.h +++ b/chrome/browser/media/desktop_media_list.h @@ -5,7 +5,6 @@ #ifndef CHROME_BROWSER_MEDIA_DESKTOP_MEDIA_LIST_H_ #define CHROME_BROWSER_MEDIA_DESKTOP_MEDIA_LIST_H_ -#include "base/basictypes.h" #include "base/strings/string16.h" #include "base/time/time.h" #include "content/public/browser/desktop_media_id.h" diff --git a/chrome/browser/media/desktop_media_list_ash.cc b/chrome/browser/media/desktop_media_list_ash.cc index 7bbd85c..a9ab1a4 100644 --- a/chrome/browser/media/desktop_media_list_ash.cc +++ b/chrome/browser/media/desktop_media_list_ash.cc @@ -4,6 +4,8 @@ #include "chrome/browser/media/desktop_media_list_ash.h" +#include <stddef.h> + #include <set> #include "ash/shell.h" diff --git a/chrome/browser/media/desktop_media_list_ash.h b/chrome/browser/media/desktop_media_list_ash.h index cf8bfb1..476288d 100644 --- a/chrome/browser/media/desktop_media_list_ash.h +++ b/chrome/browser/media/desktop_media_list_ash.h @@ -5,7 +5,7 @@ #ifndef CHROME_BROWSER_MEDIA_DESKTOP_MEDIA_LIST_ASH_H_ #define CHROME_BROWSER_MEDIA_DESKTOP_MEDIA_LIST_ASH_H_ -#include "base/basictypes.h" +#include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "base/memory/weak_ptr.h" #include "base/sequenced_task_runner.h" diff --git a/chrome/browser/media/desktop_media_list_ash_unittest.cc b/chrome/browser/media/desktop_media_list_ash_unittest.cc index 49670b6..cf8d6f3 100644 --- a/chrome/browser/media/desktop_media_list_ash_unittest.cc +++ b/chrome/browser/media/desktop_media_list_ash_unittest.cc @@ -6,9 +6,11 @@ #include "ash/test/ash_test_base.h" #include "base/location.h" +#include "base/macros.h" #include "base/message_loop/message_loop.h" #include "base/single_thread_task_runner.h" #include "base/thread_task_runner_handle.h" +#include "build/build_config.h" #include "chrome/browser/media/desktop_media_list_observer.h" #include "testing/gmock/include/gmock/gmock.h" #include "testing/gtest/include/gtest/gtest.h" diff --git a/chrome/browser/media/desktop_media_picker.h b/chrome/browser/media/desktop_media_picker.h index eec141a..5262fc9 100644 --- a/chrome/browser/media/desktop_media_picker.h +++ b/chrome/browser/media/desktop_media_picker.h @@ -5,8 +5,8 @@ #ifndef CHROME_BROWSER_MEDIA_DESKTOP_MEDIA_PICKER_H_ #define CHROME_BROWSER_MEDIA_DESKTOP_MEDIA_PICKER_H_ -#include "base/basictypes.h" #include "base/callback_forward.h" +#include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "base/strings/string16.h" #include "content/public/browser/desktop_media_id.h" diff --git a/chrome/browser/media/desktop_streams_registry.cc b/chrome/browser/media/desktop_streams_registry.cc index bd21240..0957a93 100644 --- a/chrome/browser/media/desktop_streams_registry.cc +++ b/chrome/browser/media/desktop_streams_registry.cc @@ -6,6 +6,7 @@ #include "base/base64.h" #include "base/location.h" +#include "base/macros.h" #include "base/time/time.h" #include "content/public/browser/browser_thread.h" #include "crypto/random.h" diff --git a/chrome/browser/media/desktop_streams_registry.h b/chrome/browser/media/desktop_streams_registry.h index c497bd6..84a2db0 100644 --- a/chrome/browser/media/desktop_streams_registry.h +++ b/chrome/browser/media/desktop_streams_registry.h @@ -8,6 +8,7 @@ #include <map> #include <string> +#include "base/macros.h" #include "chrome/browser/media/desktop_media_list.h" #include "url/gurl.h" diff --git a/chrome/browser/media/encrypted_media_browsertest.cc b/chrome/browser/media/encrypted_media_browsertest.cc index d3b22239..8335be4 100644 --- a/chrome/browser/media/encrypted_media_browsertest.cc +++ b/chrome/browser/media/encrypted_media_browsertest.cc @@ -7,6 +7,7 @@ #include "base/path_service.h" #include "base/strings/utf_string_conversions.h" #include "base/win/windows_version.h" +#include "build/build_config.h" #include "chrome/browser/media/media_browsertest.h" #include "chrome/browser/media/test_license_server.h" #include "chrome/browser/media/wv_test_license_server_config.h" diff --git a/chrome/browser/media/encrypted_media_supported_types_browsertest.cc b/chrome/browser/media/encrypted_media_supported_types_browsertest.cc index 9a577d1..22150c3 100644 --- a/chrome/browser/media/encrypted_media_supported_types_browsertest.cc +++ b/chrome/browser/media/encrypted_media_supported_types_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 <stddef.h> + #include <string> #include <vector> @@ -12,6 +14,7 @@ #include "base/strings/utf_string_conversions.h" #include "base/threading/platform_thread.h" #include "base/time/time.h" +#include "build/build_config.h" #include "chrome/browser/ui/browser.h" #include "chrome/browser/ui/tabs/tab_strip_model.h" #include "chrome/common/chrome_paths.h" diff --git a/chrome/browser/media/media_capture_devices_dispatcher.cc b/chrome/browser/media/media_capture_devices_dispatcher.cc index 0d876f3..8d6c0f0 100644 --- a/chrome/browser/media/media_capture_devices_dispatcher.cc +++ b/chrome/browser/media/media_capture_devices_dispatcher.cc @@ -12,6 +12,7 @@ #include "base/strings/string_number_conversions.h" #include "base/strings/string_util.h" #include "base/strings/utf_string_conversions.h" +#include "build/build_config.h" #include "chrome/browser/media/desktop_streams_registry.h" #include "chrome/browser/media/media_access_handler.h" #include "chrome/browser/media/media_stream_capture_indicator.h" diff --git a/chrome/browser/media/media_capture_devices_dispatcher.h b/chrome/browser/media/media_capture_devices_dispatcher.h index 184510c7..13cd57b 100644 --- a/chrome/browser/media/media_capture_devices_dispatcher.h +++ b/chrome/browser/media/media_capture_devices_dispatcher.h @@ -10,6 +10,7 @@ #include <map> #include "base/callback.h" +#include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "base/memory/scoped_vector.h" #include "base/memory/singleton.h" diff --git a/chrome/browser/media/media_device_id_salt.h b/chrome/browser/media/media_device_id_salt.h index 1cf058b..8a84006 100644 --- a/chrome/browser/media/media_device_id_salt.h +++ b/chrome/browser/media/media_device_id_salt.h @@ -7,6 +7,7 @@ #include <string> +#include "base/macros.h" #include "base/memory/ref_counted.h" #include "base/prefs/pref_member.h" #include "components/pref_registry/pref_registry_syncable.h" diff --git a/chrome/browser/media/media_permission.h b/chrome/browser/media/media_permission.h index fcdcfa1..214a6cb 100644 --- a/chrome/browser/media/media_permission.h +++ b/chrome/browser/media/media_permission.h @@ -7,6 +7,7 @@ #include <string> +#include "base/macros.h" #include "components/content_settings/core/common/content_settings.h" #include "components/content_settings/core/common/content_settings_types.h" #include "content/public/common/media_stream_request.h" diff --git a/chrome/browser/media/media_stream_camera_permission_context_factory.h b/chrome/browser/media/media_stream_camera_permission_context_factory.h index 088ccbd..7a18c4b 100644 --- a/chrome/browser/media/media_stream_camera_permission_context_factory.h +++ b/chrome/browser/media/media_stream_camera_permission_context_factory.h @@ -5,6 +5,7 @@ #ifndef CHROME_BROWSER_MEDIA_MEDIA_STREAM_CAMERA_PERMISSION_CONTEXT_FACTORY_H_ #define CHROME_BROWSER_MEDIA_MEDIA_STREAM_CAMERA_PERMISSION_CONTEXT_FACTORY_H_ +#include "base/macros.h" #include "base/memory/singleton.h" #include "chrome/browser/permissions/permission_context_factory_base.h" #include "components/content_settings/core/common/content_settings_types.h" diff --git a/chrome/browser/media/media_stream_capture_indicator.cc b/chrome/browser/media/media_stream_capture_indicator.cc index aeafba0..400e011 100644 --- a/chrome/browser/media/media_stream_capture_indicator.cc +++ b/chrome/browser/media/media_stream_capture_indicator.cc @@ -4,9 +4,12 @@ #include "chrome/browser/media/media_stream_capture_indicator.h" +#include <stddef.h> + #include <string> #include "base/logging.h" +#include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "base/prefs/pref_service.h" #include "base/strings/utf_string_conversions.h" diff --git a/chrome/browser/media/media_stream_capture_indicator.h b/chrome/browser/media/media_stream_capture_indicator.h index f6391be..d37bd16 100644 --- a/chrome/browser/media/media_stream_capture_indicator.h +++ b/chrome/browser/media/media_stream_capture_indicator.h @@ -9,6 +9,7 @@ #include "base/callback_forward.h" #include "base/containers/scoped_ptr_hash_map.h" +#include "base/macros.h" #include "base/memory/ref_counted.h" #include "chrome/browser/status_icons/status_icon_menu_model.h" #include "content/public/common/media_stream_request.h" diff --git a/chrome/browser/media/media_stream_device_permission_context_unittest.cc b/chrome/browser/media/media_stream_device_permission_context_unittest.cc index 0cfdce3..9082e45 100644 --- a/chrome/browser/media/media_stream_device_permission_context_unittest.cc +++ b/chrome/browser/media/media_stream_device_permission_context_unittest.cc @@ -5,6 +5,8 @@ #include "chrome/browser/media/media_stream_device_permission_context.h" #include "base/bind.h" +#include "base/macros.h" +#include "build/build_config.h" #include "chrome/browser/content_settings/host_content_settings_map_factory.h" #include "chrome/browser/infobars/infobar_service.h" #include "chrome/browser/permissions/permission_request_id.h" diff --git a/chrome/browser/media/media_stream_device_permissions.cc b/chrome/browser/media/media_stream_device_permissions.cc index 71b77ae..1e70d21 100644 --- a/chrome/browser/media/media_stream_device_permissions.cc +++ b/chrome/browser/media/media_stream_device_permissions.cc @@ -4,6 +4,8 @@ #include "chrome/browser/media/media_stream_device_permissions.h" +#include <stddef.h> + #include "base/prefs/pref_service.h" #include "base/values.h" #include "chrome/browser/profiles/profile.h" diff --git a/chrome/browser/media/media_stream_devices_controller.h b/chrome/browser/media/media_stream_devices_controller.h index 21695ab..63b30c6c 100644 --- a/chrome/browser/media/media_stream_devices_controller.h +++ b/chrome/browser/media/media_stream_devices_controller.h @@ -8,6 +8,7 @@ #include <map> #include <string> +#include "base/macros.h" #include "chrome/browser/ui/website_settings/permission_bubble_request.h" #include "components/content_settings/core/common/content_settings.h" #include "content/public/browser/web_contents_delegate.h" diff --git a/chrome/browser/media/media_stream_infobar_delegate_android.cc b/chrome/browser/media/media_stream_infobar_delegate_android.cc index 04b4e9c..97162ef 100644 --- a/chrome/browser/media/media_stream_infobar_delegate_android.cc +++ b/chrome/browser/media/media_stream_infobar_delegate_android.cc @@ -4,6 +4,8 @@ #include "chrome/browser/media/media_stream_infobar_delegate_android.h" +#include <stddef.h> + #include "base/logging.h" #include "base/metrics/histogram.h" #include "base/strings/utf_string_conversions.h" diff --git a/chrome/browser/media/media_stream_mic_permission_context_factory.h b/chrome/browser/media/media_stream_mic_permission_context_factory.h index bacbc0e..dd24c76 100644 --- a/chrome/browser/media/media_stream_mic_permission_context_factory.h +++ b/chrome/browser/media/media_stream_mic_permission_context_factory.h @@ -5,6 +5,7 @@ #ifndef CHROME_BROWSER_MEDIA_MEDIA_STREAM_MIC_PERMISSION_CONTEXT_FACTORY_H_ #define CHROME_BROWSER_MEDIA_MEDIA_STREAM_MIC_PERMISSION_CONTEXT_FACTORY_H_ +#include "base/macros.h" #include "base/memory/singleton.h" #include "chrome/browser/permissions/permission_context_factory_base.h" #include "components/content_settings/core/common/content_settings_types.h" diff --git a/chrome/browser/media/midi_permission_context.h b/chrome/browser/media/midi_permission_context.h index aafb580..fe94d4b 100644 --- a/chrome/browser/media/midi_permission_context.h +++ b/chrome/browser/media/midi_permission_context.h @@ -5,6 +5,7 @@ #ifndef CHROME_BROWSER_MEDIA_MIDI_PERMISSION_CONTEXT_H_ #define CHROME_BROWSER_MEDIA_MIDI_PERMISSION_CONTEXT_H_ +#include "base/macros.h" #include "chrome/browser/permissions/permission_context_base.h" class GURL; diff --git a/chrome/browser/media/midi_permission_context_factory.h b/chrome/browser/media/midi_permission_context_factory.h index a148fe9..8407564 100644 --- a/chrome/browser/media/midi_permission_context_factory.h +++ b/chrome/browser/media/midi_permission_context_factory.h @@ -5,6 +5,7 @@ #ifndef CHROME_BROWSER_MEDIA_MIDI_PERMISSION_CONTEXT_FACTORY_H_ #define CHROME_BROWSER_MEDIA_MIDI_PERMISSION_CONTEXT_FACTORY_H_ +#include "base/macros.h" #include "base/memory/singleton.h" #include "chrome/browser/permissions/permission_context_factory_base.h" diff --git a/chrome/browser/media/midi_permission_context_unittest.cc b/chrome/browser/media/midi_permission_context_unittest.cc index 4919f75..77675ec 100644 --- a/chrome/browser/media/midi_permission_context_unittest.cc +++ b/chrome/browser/media/midi_permission_context_unittest.cc @@ -5,6 +5,8 @@ #include "chrome/browser/media/midi_permission_context.h" #include "base/bind.h" +#include "base/macros.h" +#include "build/build_config.h" #include "chrome/browser/content_settings/host_content_settings_map_factory.h" #include "chrome/browser/permissions/permission_request_id.h" #include "chrome/test/base/chrome_render_view_host_test_harness.h" diff --git a/chrome/browser/media/native_desktop_media_list.cc b/chrome/browser/media/native_desktop_media_list.cc index 32a8c0d9..3cf48db 100644 --- a/chrome/browser/media/native_desktop_media_list.cc +++ b/chrome/browser/media/native_desktop_media_list.cc @@ -4,12 +4,16 @@ #include "chrome/browser/media/native_desktop_media_list.h" +#include <stddef.h> +#include <stdint.h> + #include <map> #include <set> #include <sstream> #include "base/hash.h" #include "base/logging.h" +#include "base/macros.h" #include "base/strings/utf_string_conversions.h" #include "base/threading/sequenced_worker_pool.h" #include "chrome/browser/media/desktop_media_list_observer.h" @@ -34,7 +38,7 @@ const int kDefaultUpdatePeriod = 1000; // Returns a hash of a DesktopFrame content to detect when image for a desktop // media source has changed. -uint32 GetFrameHash(webrtc::DesktopFrame* frame) { +uint32_t GetFrameHash(webrtc::DesktopFrame* frame) { int data_size = frame->stride() * frame->size().height(); return base::SuperFastHash(reinterpret_cast<char*>(frame->data()), data_size); } @@ -49,7 +53,7 @@ gfx::ImageSkia ScaleDesktopFrame(scoped_ptr<webrtc::DesktopFrame> frame, result.allocN32Pixels(scaled_rect.width(), scaled_rect.height(), true); result.lockPixels(); - uint8* pixels_data = reinterpret_cast<uint8*>(result.getPixels()); + uint8_t* pixels_data = reinterpret_cast<uint8_t*>(result.getPixels()); libyuv::ARGBScale(frame->data(), frame->stride(), frame->size().width(), frame->size().height(), pixels_data, result.rowBytes(), @@ -94,7 +98,7 @@ class NativeDesktopMediaList::Worker content::DesktopMediaID::Id view_dialog_id); private: - typedef std::map<DesktopMediaID, uint32> ImageHashesMap; + typedef std::map<DesktopMediaID, uint32_t> ImageHashesMap; // webrtc::DesktopCapturer::Callback interface. webrtc::SharedMemory* CreateSharedMemory(size_t size) override; @@ -198,7 +202,7 @@ void NativeDesktopMediaList::Worker::Refresh( // |current_frame_| may be NULL if capture failed (e.g. because window has // been closed). if (current_frame_) { - uint32 frame_hash = GetFrameHash(current_frame_.get()); + uint32_t frame_hash = GetFrameHash(current_frame_.get()); new_image_hashes[source.id] = frame_hash; // Scale the image only if it has changed. diff --git a/chrome/browser/media/native_desktop_media_list.h b/chrome/browser/media/native_desktop_media_list.h index f576d51..ef34b3a 100644 --- a/chrome/browser/media/native_desktop_media_list.h +++ b/chrome/browser/media/native_desktop_media_list.h @@ -5,7 +5,7 @@ #ifndef CHROME_BROWSER_MEDIA_NATIVE_DESKTOP_MEDIA_LIST_H_ #define CHROME_BROWSER_MEDIA_NATIVE_DESKTOP_MEDIA_LIST_H_ -#include "base/basictypes.h" +#include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "base/memory/weak_ptr.h" #include "base/sequenced_task_runner.h" diff --git a/chrome/browser/media/native_desktop_media_list_unittest.cc b/chrome/browser/media/native_desktop_media_list_unittest.cc index a5925e9..2ab8ec4 100644 --- a/chrome/browser/media/native_desktop_media_list_unittest.cc +++ b/chrome/browser/media/native_desktop_media_list_unittest.cc @@ -4,7 +4,12 @@ #include "chrome/browser/media/native_desktop_media_list.h" +#include <stddef.h> +#include <stdint.h> +#include <string.h> + #include "base/location.h" +#include "base/macros.h" #include "base/message_loop/message_loop.h" #include "base/single_thread_task_runner.h" #include "base/strings/utf_string_conversions.h" diff --git a/chrome/browser/media/protected_media_identifier_permission_context.cc b/chrome/browser/media/protected_media_identifier_permission_context.cc index e045b64..d091bf6 100644 --- a/chrome/browser/media/protected_media_identifier_permission_context.cc +++ b/chrome/browser/media/protected_media_identifier_permission_context.cc @@ -7,6 +7,7 @@ #include "base/command_line.h" #include "base/prefs/pref_service.h" #include "base/strings/stringprintf.h" +#include "build/build_config.h" #include "chrome/browser/content_settings/tab_specific_content_settings.h" #include "chrome/browser/permissions/permission_util.h" #include "chrome/browser/profiles/profile.h" diff --git a/chrome/browser/media/protected_media_identifier_permission_context.h b/chrome/browser/media/protected_media_identifier_permission_context.h index 9513f0f..7762861 100644 --- a/chrome/browser/media/protected_media_identifier_permission_context.h +++ b/chrome/browser/media/protected_media_identifier_permission_context.h @@ -5,6 +5,8 @@ #ifndef CHROME_BROWSER_MEDIA_PROTECTED_MEDIA_IDENTIFIER_PERMISSION_CONTEXT_H_ #define CHROME_BROWSER_MEDIA_PROTECTED_MEDIA_IDENTIFIER_PERMISSION_CONTEXT_H_ +#include "base/macros.h" +#include "build/build_config.h" #include "chrome/browser/permissions/permission_context_base.h" #include "chrome/browser/permissions/permission_request_id.h" diff --git a/chrome/browser/media/protected_media_identifier_permission_context_factory.h b/chrome/browser/media/protected_media_identifier_permission_context_factory.h index c292d876..be2f6f5 100644 --- a/chrome/browser/media/protected_media_identifier_permission_context_factory.h +++ b/chrome/browser/media/protected_media_identifier_permission_context_factory.h @@ -5,6 +5,7 @@ #ifndef CHROME_BROWSER_MEDIA_PROTECTED_MEDIA_IDENTIFIER_PERMISSION_CONTEXT_FACTORY_H_ #define CHROME_BROWSER_MEDIA_PROTECTED_MEDIA_IDENTIFIER_PERMISSION_CONTEXT_FACTORY_H_ +#include "base/macros.h" #include "base/memory/singleton.h" #include "chrome/browser/permissions/permission_context_factory_base.h" diff --git a/chrome/browser/media/router/issue_manager.h b/chrome/browser/media/router/issue_manager.h index a180dcf..51af2de 100644 --- a/chrome/browser/media/router/issue_manager.h +++ b/chrome/browser/media/router/issue_manager.h @@ -5,9 +5,12 @@ #ifndef CHROME_BROWSER_MEDIA_ROUTER_ISSUE_MANAGER_H_ #define CHROME_BROWSER_MEDIA_ROUTER_ISSUE_MANAGER_H_ +#include <stddef.h> + #include <vector> #include "base/containers/hash_tables.h" +#include "base/macros.h" #include "base/observer_list.h" #include "base/threading/thread_checker.h" #include "chrome/browser/media/router/issue.h" diff --git a/chrome/browser/media/router/issue_manager_unittest.cc b/chrome/browser/media/router/issue_manager_unittest.cc index e0ad0f0..a331ccb 100644 --- a/chrome/browser/media/router/issue_manager_unittest.cc +++ b/chrome/browser/media/router/issue_manager_unittest.cc @@ -5,6 +5,7 @@ #include <string> #include <vector> +#include "base/macros.h" #include "chrome/browser/media/router/issue_manager.h" #include "testing/gmock/include/gmock/gmock.h" diff --git a/chrome/browser/media/router/issues_observer.h b/chrome/browser/media/router/issues_observer.h index 5b51e63..8753491 100644 --- a/chrome/browser/media/router/issues_observer.h +++ b/chrome/browser/media/router/issues_observer.h @@ -5,6 +5,7 @@ #ifndef CHROME_BROWSER_MEDIA_ROUTER_ISSUES_OBSERVER_H_ #define CHROME_BROWSER_MEDIA_ROUTER_ISSUES_OBSERVER_H_ +#include "base/macros.h" #include "chrome/browser/media/router/issue.h" namespace media_router { diff --git a/chrome/browser/media/router/media_router.h b/chrome/browser/media/router/media_router.h index 323b602..2de52f9 100644 --- a/chrome/browser/media/router/media_router.h +++ b/chrome/browser/media/router/media_router.h @@ -5,6 +5,8 @@ #ifndef CHROME_BROWSER_MEDIA_ROUTER_MEDIA_ROUTER_H_ #define CHROME_BROWSER_MEDIA_ROUTER_MEDIA_ROUTER_H_ +#include <stdint.h> + #include <string> #include <vector> @@ -116,7 +118,7 @@ class MediaRouter : public KeyedService { // This is called for Blob / ArrayBuffer / ArrayBufferView types. virtual void SendRouteBinaryMessage( const MediaRoute::Id& route_id, - scoped_ptr<std::vector<uint8>> data, + scoped_ptr<std::vector<uint8_t>> data, const SendRouteMessageCallback& callback) = 0; // Adds a new |issue|. diff --git a/chrome/browser/media/router/media_router_factory.cc b/chrome/browser/media/router/media_router_factory.cc index 22d24a4..245a5ce 100644 --- a/chrome/browser/media/router/media_router_factory.cc +++ b/chrome/browser/media/router/media_router_factory.cc @@ -4,7 +4,9 @@ #include "chrome/browser/media/router/media_router_factory.h" +#include "build/build_config.h" #include "components/keyed_service/content/browser_context_dependency_manager.h" + #if defined(OS_ANDROID) #include "chrome/browser/media/android/router/media_router_android.h" #else diff --git a/chrome/browser/media/router/media_router_factory.h b/chrome/browser/media/router/media_router_factory.h index 73e83a7..7d9081e 100644 --- a/chrome/browser/media/router/media_router_factory.h +++ b/chrome/browser/media/router/media_router_factory.h @@ -6,6 +6,7 @@ #define CHROME_BROWSER_MEDIA_ROUTER_MEDIA_ROUTER_FACTORY_H_ #include "base/lazy_instance.h" +#include "base/macros.h" #include "components/keyed_service/content/browser_context_keyed_service_factory.h" namespace content { diff --git a/chrome/browser/media/router/media_router_mojo_impl.cc b/chrome/browser/media/router/media_router_mojo_impl.cc index 980babd..1e7cd2c4 100644 --- a/chrome/browser/media/router/media_router_mojo_impl.cc +++ b/chrome/browser/media/router/media_router_mojo_impl.cc @@ -4,6 +4,8 @@ #include "chrome/browser/media/router/media_router_mojo_impl.h" +#include <stddef.h> + #include "base/bind.h" #include "base/guid.h" #include "base/logging.h" @@ -343,7 +345,7 @@ void MediaRouterMojoImpl::SendRouteMessage( void MediaRouterMojoImpl::SendRouteBinaryMessage( const MediaRoute::Id& route_id, - scoped_ptr<std::vector<uint8>> data, + scoped_ptr<std::vector<uint8_t>> data, const SendRouteMessageCallback& callback) { DCHECK(thread_checker_.CalledOnValidThread()); @@ -571,10 +573,10 @@ void MediaRouterMojoImpl::DoSendSessionMessage( void MediaRouterMojoImpl::DoSendSessionBinaryMessage( const MediaRoute::Id& route_id, - scoped_ptr<std::vector<uint8>> data, + scoped_ptr<std::vector<uint8_t>> data, const SendRouteMessageCallback& callback) { DVLOG_WITH_INSTANCE(1) << "SendRouteBinaryMessage " << route_id; - mojo::Array<uint8> mojo_array; + mojo::Array<uint8_t> mojo_array; mojo_array.Swap(data.get()); media_route_provider_->SendRouteBinaryMessage(route_id, mojo_array.Pass(), callback); diff --git a/chrome/browser/media/router/media_router_mojo_impl.h b/chrome/browser/media/router/media_router_mojo_impl.h index bf70ce3..31b246f 100644 --- a/chrome/browser/media/router/media_router_mojo_impl.h +++ b/chrome/browser/media/router/media_router_mojo_impl.h @@ -5,6 +5,8 @@ #ifndef CHROME_BROWSER_MEDIA_ROUTER_MEDIA_ROUTER_MOJO_IMPL_H_ #define CHROME_BROWSER_MEDIA_ROUTER_MEDIA_ROUTER_MOJO_IMPL_H_ +#include <stdint.h> + #include <deque> #include <map> #include <set> @@ -81,7 +83,7 @@ class MediaRouterMojoImpl : public MediaRouterBase, const SendRouteMessageCallback& callback) override; void SendRouteBinaryMessage( const MediaRoute::Id& route_id, - scoped_ptr<std::vector<uint8>> data, + scoped_ptr<std::vector<uint8_t>> data, const SendRouteMessageCallback& callback) override; void AddIssue(const Issue& issue) override; void ClearIssue(const Issue::Id& issue_id) override; @@ -218,7 +220,7 @@ class MediaRouterMojoImpl : public MediaRouterBase, const std::string& message, const SendRouteMessageCallback& callback); void DoSendSessionBinaryMessage(const MediaRoute::Id& route_id, - scoped_ptr<std::vector<uint8>> data, + scoped_ptr<std::vector<uint8_t>> data, const SendRouteMessageCallback& callback); void DoListenForRouteMessages(const MediaRoute::Id& route_id); void DoStopListeningForRouteMessages(const MediaRoute::Id& route_id); diff --git a/chrome/browser/media/router/media_router_mojo_impl_unittest.cc b/chrome/browser/media/router/media_router_mojo_impl_unittest.cc index eb2b547..06ee4ec 100644 --- a/chrome/browser/media/router/media_router_mojo_impl_unittest.cc +++ b/chrome/browser/media/router/media_router_mojo_impl_unittest.cc @@ -2,10 +2,14 @@ // 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 <string> #include "base/bind.h" #include "base/bind_helpers.h" +#include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "base/run_loop.h" #include "base/synchronization/waitable_event.h" @@ -59,7 +63,7 @@ const char kSinkName[] = "sinkName"; const char kPresentationId[] = "presentationId"; const char kOrigin[] = "http://origin/"; const int kInvalidTabId = -1; -const uint8 kBinaryMessage[] = {0x01, 0x02, 0x03, 0x04}; +const uint8_t kBinaryMessage[] = {0x01, 0x02, 0x03, 0x04}; bool ArePresentationSessionMessagesEqual( const content::PresentationSessionMessage* expected, @@ -574,13 +578,14 @@ TEST_F(MediaRouterMojoImplTest, SendRouteMessage) { } TEST_F(MediaRouterMojoImplTest, SendRouteBinaryMessage) { - scoped_ptr<std::vector<uint8>> expected_binary_data(new std::vector<uint8>( - kBinaryMessage, kBinaryMessage + arraysize(kBinaryMessage))); + scoped_ptr<std::vector<uint8_t>> expected_binary_data( + new std::vector<uint8_t>(kBinaryMessage, + kBinaryMessage + arraysize(kBinaryMessage))); EXPECT_CALL(mock_media_route_provider_, SendRouteBinaryMessageInternal(mojo::String(kRouteId), _, _)) .WillOnce(Invoke([]( - const MediaRoute::Id& route_id, const std::vector<uint8>& data, + const MediaRoute::Id& route_id, const std::vector<uint8_t>& data, const interfaces::MediaRouteProvider::SendRouteMessageCallback& cb) { EXPECT_EQ( 0, memcmp(kBinaryMessage, &(data[0]), arraysize(kBinaryMessage))); diff --git a/chrome/browser/media/router/media_router_mojo_test.h b/chrome/browser/media/router/media_router_mojo_test.h index dba0250..e56aa7c 100644 --- a/chrome/browser/media/router/media_router_mojo_test.h +++ b/chrome/browser/media/router/media_router_mojo_test.h @@ -7,6 +7,7 @@ #include <string> +#include "base/macros.h" #include "base/message_loop/message_loop.h" #include "chrome/browser/media/router/media_router_mojo_impl.h" #include "chrome/browser/media/router/mock_media_router.h" diff --git a/chrome/browser/media/router/media_router_type_converters.cc b/chrome/browser/media/router/media_router_type_converters.cc index 6541dbf..e2b0ad1 100644 --- a/chrome/browser/media/router/media_router_type_converters.cc +++ b/chrome/browser/media/router/media_router_type_converters.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 "chrome/browser/media/router/media_router_type_converters.h" using media_router::interfaces::IssuePtr; diff --git a/chrome/browser/media/router/media_router_type_converters_unittest.cc b/chrome/browser/media/router/media_router_type_converters_unittest.cc index 6838d00..aa7f64b 100644 --- a/chrome/browser/media/router/media_router_type_converters_unittest.cc +++ b/chrome/browser/media/router/media_router_type_converters_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 "chrome/browser/media/router/issue.h" #include "chrome/browser/media/router/media_router_type_converters.h" #include "chrome/browser/media/router/media_sink.h" diff --git a/chrome/browser/media/router/media_source.h b/chrome/browser/media/router/media_source.h index 8943f3f..288cb27 100644 --- a/chrome/browser/media/router/media_source.h +++ b/chrome/browser/media/router/media_source.h @@ -5,6 +5,8 @@ #ifndef CHROME_BROWSER_MEDIA_ROUTER_MEDIA_SOURCE_H_ #define CHROME_BROWSER_MEDIA_ROUTER_MEDIA_SOURCE_H_ +#include <stddef.h> + #include <ostream> #include <string> diff --git a/chrome/browser/media/router/mock_media_router.h b/chrome/browser/media/router/mock_media_router.h index 2b81ce8..933f62a 100644 --- a/chrome/browser/media/router/mock_media_router.h +++ b/chrome/browser/media/router/mock_media_router.h @@ -5,6 +5,8 @@ #ifndef CHROME_BROWSER_MEDIA_ROUTER_MOCK_MEDIA_ROUTER_H_ #define CHROME_BROWSER_MEDIA_ROUTER_MOCK_MEDIA_ROUTER_H_ +#include <stdint.h> + #include <string> #include <vector> @@ -43,13 +45,13 @@ class MockMediaRouter : public MediaRouter { const SendRouteMessageCallback& callback)); void SendRouteBinaryMessage( const MediaRoute::Id& route_id, - scoped_ptr<std::vector<uint8>> data, + scoped_ptr<std::vector<uint8_t>> data, const SendRouteMessageCallback& callback) override { SendRouteBinaryMessageInternal(route_id, data.get(), callback); } MOCK_METHOD3(SendRouteBinaryMessageInternal, void(const MediaRoute::Id& route_id, - std::vector<uint8>* data, + std::vector<uint8_t>* data, const SendRouteMessageCallback& callback)); MOCK_METHOD1(AddIssue, void(const Issue& issue)); MOCK_METHOD1(ClearIssue, void(const Issue::Id& issue_id)); diff --git a/chrome/browser/media/router/presentation_media_sinks_observer_unittest.cc b/chrome/browser/media/router/presentation_media_sinks_observer_unittest.cc index bbfa13b..21220b4 100644 --- a/chrome/browser/media/router/presentation_media_sinks_observer_unittest.cc +++ b/chrome/browser/media/router/presentation_media_sinks_observer_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/memory/scoped_ptr.h" #include "base/strings/stringprintf.h" #include "chrome/browser/media/router/media_source_helper.h" diff --git a/chrome/browser/media/router/test_helper.h b/chrome/browser/media/router/test_helper.h index 1d24214..2220beb 100644 --- a/chrome/browser/media/router/test_helper.h +++ b/chrome/browser/media/router/test_helper.h @@ -5,9 +5,13 @@ #ifndef CHROME_BROWSER_MEDIA_ROUTER_TEST_HELPER_H_ #define CHROME_BROWSER_MEDIA_ROUTER_TEST_HELPER_H_ +#include <stddef.h> +#include <stdint.h> + #include <string> #include <vector> +#include "base/macros.h" #include "chrome/browser/media/router/issues_observer.h" #include "chrome/browser/media/router/media_router.mojom.h" #include "chrome/browser/media/router/media_router_mojo_impl.h" @@ -107,13 +111,13 @@ class MockMediaRouteProvider : public interfaces::MediaRouteProvider { const SendRouteMessageCallback& callback)); void SendRouteBinaryMessage( const mojo::String& media_route_id, - mojo::Array<uint8> data, + mojo::Array<uint8_t> data, const SendRouteMessageCallback& callback) override { SendRouteBinaryMessageInternal(media_route_id, data.storage(), callback); } MOCK_METHOD3(SendRouteBinaryMessageInternal, void(const mojo::String& media_route_id, - const std::vector<uint8>& data, + const std::vector<uint8_t>& data, const SendRouteMessageCallback& callback)); MOCK_METHOD2(ListenForRouteMessages, void(const mojo::String& route_id, diff --git a/chrome/browser/media/test_license_server.h b/chrome/browser/media/test_license_server.h index 0fa77f4..2796dcc 100644 --- a/chrome/browser/media/test_license_server.h +++ b/chrome/browser/media/test_license_server.h @@ -6,6 +6,7 @@ #define CHROME_BROWSER_MEDIA_TEST_LICENSE_SERVER_H_ #include <string> +#include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "base/process/process.h" diff --git a/chrome/browser/media/test_license_server_config.h b/chrome/browser/media/test_license_server_config.h index e39c0e2..85a314a 100644 --- a/chrome/browser/media/test_license_server_config.h +++ b/chrome/browser/media/test_license_server_config.h @@ -6,8 +6,8 @@ #define CHROME_BROWSER_MEDIA_TEST_LICENSE_SERVER_CONFIG_H_ #include <string> -#include "base/basictypes.h" +#include "base/macros.h" namespace base { class CommandLine; diff --git a/chrome/browser/media/webrtc_browsertest_audio.cc b/chrome/browser/media/webrtc_browsertest_audio.cc index cf6a9cc..e9504ba 100644 --- a/chrome/browser/media/webrtc_browsertest_audio.cc +++ b/chrome/browser/media/webrtc_browsertest_audio.cc @@ -4,6 +4,8 @@ #include "chrome/browser/media/webrtc_browsertest_audio.h" +#include <stddef.h> + #include "base/files/file.h" #include "base/files/file_path.h" #include "media/audio/audio_parameters.h" diff --git a/chrome/browser/media/webrtc_browsertest_base.cc b/chrome/browser/media/webrtc_browsertest_base.cc index 8c9c944..01788c7 100644 --- a/chrome/browser/media/webrtc_browsertest_base.cc +++ b/chrome/browser/media/webrtc_browsertest_base.cc @@ -4,9 +4,13 @@ #include "chrome/browser/media/webrtc_browsertest_base.h" +#include <stddef.h> + #include "base/lazy_instance.h" +#include "base/macros.h" #include "base/strings/string_util.h" #include "base/strings/stringprintf.h" +#include "build/build_config.h" #include "chrome/browser/media/webrtc_browsertest_common.h" #include "chrome/browser/ui/browser.h" #include "chrome/browser/ui/browser_tabstrip.h" diff --git a/chrome/browser/media/webrtc_browsertest_base.h b/chrome/browser/media/webrtc_browsertest_base.h index 4f043573..486e1ee 100644 --- a/chrome/browser/media/webrtc_browsertest_base.h +++ b/chrome/browser/media/webrtc_browsertest_base.h @@ -7,6 +7,7 @@ #include <string> +#include "base/macros.h" #include "chrome/test/base/in_process_browser_test.h" namespace infobars { diff --git a/chrome/browser/media/webrtc_browsertest_common.cc b/chrome/browser/media/webrtc_browsertest_common.cc index 8d1b307..421446f 100644 --- a/chrome/browser/media/webrtc_browsertest_common.cc +++ b/chrome/browser/media/webrtc_browsertest_common.cc @@ -10,6 +10,7 @@ #include "base/strings/stringprintf.h" #include "base/test/test_timeouts.h" #include "base/time/time.h" +#include "build/build_config.h" #include "chrome/browser/profiles/profile.h" #include "chrome/browser/ui/browser_tabstrip.h" #include "chrome/common/chrome_paths.h" diff --git a/chrome/browser/media/webrtc_browsertest_perf.cc b/chrome/browser/media/webrtc_browsertest_perf.cc index 61ed08c1..e473559 100644 --- a/chrome/browser/media/webrtc_browsertest_perf.cc +++ b/chrome/browser/media/webrtc_browsertest_perf.cc @@ -4,6 +4,8 @@ #include "chrome/browser/media/webrtc_browsertest_perf.h" +#include <stddef.h> + #include "base/strings/stringprintf.h" #include "base/values.h" #include "chrome/test/base/in_process_browser_test.h" diff --git a/chrome/browser/media/webrtc_log_uploader.cc b/chrome/browser/media/webrtc_log_uploader.cc index 631bbff..dd72d87 100644 --- a/chrome/browser/media/webrtc_log_uploader.cc +++ b/chrome/browser/media/webrtc_log_uploader.cc @@ -4,6 +4,8 @@ #include "chrome/browser/media/webrtc_log_uploader.h" +#include <stddef.h> + #include "base/files/file_enumerator.h" #include "base/files/file_path.h" #include "base/files/file_util.h" @@ -13,6 +15,7 @@ #include "base/strings/string_split.h" #include "base/strings/stringprintf.h" #include "base/time/time.h" +#include "build/build_config.h" #include "chrome/browser/browser_process.h" #include "chrome/browser/media/media_url_constants.h" #include "chrome/browser/media/webrtc_log_list.h" @@ -29,7 +32,7 @@ using content::BrowserThread; namespace { const int kLogCountLimit = 5; -const uint32 kIntermediateCompressionBufferBytes = 256 * 1024; // 256 KB +const uint32_t kIntermediateCompressionBufferBytes = 256 * 1024; // 256 KB const int kLogListLimitLines = 50; const char kUploadContentType[] = "multipart/form-data"; @@ -313,9 +316,9 @@ void WebRtcLogUploader::OnURLFetchComplete( delete source; } -void WebRtcLogUploader::OnURLFetchUploadProgress( - const net::URLFetcher* source, int64 current, int64 total) { -} +void WebRtcLogUploader::OnURLFetchUploadProgress(const net::URLFetcher* source, + int64_t current, + int64_t total) {} void WebRtcLogUploader::SetupMultipart( std::string* post_data, @@ -384,9 +387,9 @@ void WebRtcLogUploader::CompressLog(std::string* compressed_log, Z_DEFAULT_STRATEGY); DCHECK_EQ(Z_OK, result); - uint8 intermediate_buffer[kIntermediateCompressionBufferBytes] = {0}; + uint8_t intermediate_buffer[kIntermediateCompressionBufferBytes] = {0}; ResizeForNextOutput(compressed_log, &stream); - uint32 read = 0; + uint32_t read = 0; PartialCircularBuffer read_buffer(buffer->Read()); do { diff --git a/chrome/browser/media/webrtc_log_uploader.h b/chrome/browser/media/webrtc_log_uploader.h index dfe1cb8..fa641c2 100644 --- a/chrome/browser/media/webrtc_log_uploader.h +++ b/chrome/browser/media/webrtc_log_uploader.h @@ -5,12 +5,14 @@ #ifndef CHROME_BROWSER_MEDIA_WEBRTC_LOG_UPLOADER_H_ #define CHROME_BROWSER_MEDIA_WEBRTC_LOG_UPLOADER_H_ +#include <stdint.h> + #include <map> #include <string> #include <vector> -#include "base/basictypes.h" #include "base/gtest_prod_util.h" +#include "base/macros.h" #include "base/threading/thread_checker.h" #include "chrome/browser/media/webrtc_logging_handler_host.h" #include "net/url_request/url_fetcher_delegate.h" @@ -104,8 +106,8 @@ class WebRtcLogUploader : public net::URLFetcherDelegate { // net::URLFetcherDelegate implementation. void OnURLFetchComplete(const net::URLFetcher* source) override; void OnURLFetchUploadProgress(const net::URLFetcher* source, - int64 current, - int64 total) override; + int64_t current, + int64_t total) override; // Sets up a multipart body to be uploaded. The body is produced according // to RFC 2046. diff --git a/chrome/browser/media/webrtc_log_uploader_unittest.cc b/chrome/browser/media/webrtc_log_uploader_unittest.cc index 0ab162a..1241b6a 100644 --- a/chrome/browser/media/webrtc_log_uploader_unittest.cc +++ b/chrome/browser/media/webrtc_log_uploader_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 <string> #include "base/files/file.h" diff --git a/chrome/browser/media/webrtc_log_util.cc b/chrome/browser/media/webrtc_log_util.cc index f9d3fbb..caae2a4 100644 --- a/chrome/browser/media/webrtc_log_util.cc +++ b/chrome/browser/media/webrtc_log_util.cc @@ -4,9 +4,12 @@ #include "chrome/browser/media/webrtc_log_util.h" +#include <stddef.h> + #include "base/files/file_enumerator.h" #include "base/files/file_util.h" #include "base/logging.h" +#include "base/macros.h" #include "base/time/time.h" #include "chrome/browser/browser_process.h" #include "chrome/browser/media/webrtc_log_list.h" diff --git a/chrome/browser/media/webrtc_logging_handler_host.cc b/chrome/browser/media/webrtc_logging_handler_host.cc index daa0acc..a87f390 100644 --- a/chrome/browser/media/webrtc_logging_handler_host.cc +++ b/chrome/browser/media/webrtc_logging_handler_host.cc @@ -15,6 +15,7 @@ #include "base/strings/string_number_conversions.h" #include "base/sys_info.h" #include "base/time/time.h" +#include "build/build_config.h" #include "chrome/browser/bad_message.h" #include "chrome/browser/browser_process.h" #include "chrome/browser/chromeos/settings/cros_settings.h" @@ -409,7 +410,7 @@ void WebRtcLoggingHandlerHost::StopRtpDump( rtp_dump_handler_->StopDump(type, callback); } -void WebRtcLoggingHandlerHost::OnRtpPacket(scoped_ptr<uint8[]> packet_header, +void WebRtcLoggingHandlerHost::OnRtpPacket(scoped_ptr<uint8_t[]> packet_header, size_t header_length, size_t packet_length, bool incoming) { @@ -427,7 +428,7 @@ void WebRtcLoggingHandlerHost::OnRtpPacket(scoped_ptr<uint8[]> packet_header, } void WebRtcLoggingHandlerHost::DumpRtpPacketOnIOThread( - scoped_ptr<uint8[]> packet_header, + scoped_ptr<uint8_t[]> packet_header, size_t header_length, size_t packet_length, bool incoming) { diff --git a/chrome/browser/media/webrtc_logging_handler_host.h b/chrome/browser/media/webrtc_logging_handler_host.h index d62d6cc..446d93c 100644 --- a/chrome/browser/media/webrtc_logging_handler_host.h +++ b/chrome/browser/media/webrtc_logging_handler_host.h @@ -5,8 +5,12 @@ #ifndef CHROME_BROWSER_MEDIA_WEBRTC_LOGGING_HANDLER_HOST_H_ #define CHROME_BROWSER_MEDIA_WEBRTC_LOGGING_HANDLER_HOST_H_ -#include "base/basictypes.h" +#include <stddef.h> +#include <stdint.h> + +#include "base/macros.h" #include "base/memory/shared_memory.h" +#include "build/build_config.h" #include "chrome/browser/media/rtp_dump_type.h" #include "chrome/browser/media/webrtc_rtp_dump_handler.h" #include "chrome/common/media/webrtc_logging_message_data.h" @@ -58,7 +62,7 @@ class WebRtcLogBuffer { private: base::ThreadChecker thread_checker_; - uint8 buffer_[kWebRtcLogSize]; + uint8_t buffer_[kWebRtcLogSize]; PartialCircularBuffer circular_; bool read_only_; }; @@ -145,7 +149,7 @@ class WebRtcLoggingHandlerHost : public content::BrowserMessageFilter { // Called when an RTP packet is sent or received. Must be called on the UI // thread. - void OnRtpPacket(scoped_ptr<uint8[]> packet_header, + void OnRtpPacket(scoped_ptr<uint8_t[]> packet_header, size_t header_length, size_t packet_length, bool incoming); @@ -245,7 +249,7 @@ class WebRtcLoggingHandlerHost : public content::BrowserMessageFilter { void DoStartRtpDump(RtpDumpType type, const GenericDoneCallback& callback); // Adds the packet to the dump on IO thread. - void DumpRtpPacketOnIOThread(scoped_ptr<uint8[]> packet_header, + void DumpRtpPacketOnIOThread(scoped_ptr<uint8_t[]> packet_header, size_t header_length, size_t packet_length, bool incoming); diff --git a/chrome/browser/media/webrtc_rtp_dump_handler.cc b/chrome/browser/media/webrtc_rtp_dump_handler.cc index 7fb2613..89df5a4 100644 --- a/chrome/browser/media/webrtc_rtp_dump_handler.cc +++ b/chrome/browser/media/webrtc_rtp_dump_handler.cc @@ -207,7 +207,7 @@ WebRtcRtpDumpHandler::ReleasedDumps WebRtcRtpDumpHandler::ReleaseDumps() { return ReleasedDumps(incoming_dump, outgoing_dump); } -void WebRtcRtpDumpHandler::OnRtpPacket(const uint8* packet_header, +void WebRtcRtpDumpHandler::OnRtpPacket(const uint8_t* packet_header, size_t header_length, size_t packet_length, bool incoming) { diff --git a/chrome/browser/media/webrtc_rtp_dump_handler.h b/chrome/browser/media/webrtc_rtp_dump_handler.h index 4c27bf4..a9fefad 100644 --- a/chrome/browser/media/webrtc_rtp_dump_handler.h +++ b/chrome/browser/media/webrtc_rtp_dump_handler.h @@ -5,9 +5,12 @@ #ifndef CHROME_BROWSER_MEDIA_WEBRTC_RTP_DUMP_HANDLER_H_ #define CHROME_BROWSER_MEDIA_WEBRTC_RTP_DUMP_HANDLER_H_ -#include "base/basictypes.h" +#include <stddef.h> +#include <stdint.h> + #include "base/callback.h" #include "base/files/file_path.h" +#include "base/macros.h" #include "base/memory/weak_ptr.h" #include "chrome/browser/media/rtp_dump_type.h" @@ -72,7 +75,7 @@ class WebRtcRtpDumpHandler { // Adds an RTP packet to the dump. The caller must make sure it's a valid RTP // packet. - void OnRtpPacket(const uint8* packet_header, + void OnRtpPacket(const uint8_t* packet_header, size_t header_length, size_t packet_length, bool incoming); diff --git a/chrome/browser/media/webrtc_rtp_dump_handler_unittest.cc b/chrome/browser/media/webrtc_rtp_dump_handler_unittest.cc index 6fefb3f..9694aab 100644 --- a/chrome/browser/media/webrtc_rtp_dump_handler_unittest.cc +++ b/chrome/browser/media/webrtc_rtp_dump_handler_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 <stdint.h> + #include "base/bind.h" #include "base/files/file_util.h" #include "base/files/scoped_temp_dir.h" @@ -31,7 +34,7 @@ class FakeDumpWriter : public WebRtcRtpDumpWriter { max_size_reached_callback_(max_size_reached_callback), end_dump_success_(end_dump_success) {} - void WriteRtpPacket(const uint8* packet_header, + void WriteRtpPacket(const uint8_t* packet_header, size_t header_length, size_t packet_length, bool incoming) override { @@ -163,7 +166,7 @@ TEST_F(WebRtcRtpDumpHandlerTest, StoppedWhenMaxSizeReached) { EXPECT_TRUE(handler_->StartDump(RTP_DUMP_INCOMING, &error)); - std::vector<uint8> buffer(100, 0); + std::vector<uint8_t> buffer(100, 0); handler_->OnRtpPacket(&buffer[0], buffer.size(), buffer.size(), true); base::RunLoop().RunUntilIdle(); @@ -173,7 +176,7 @@ TEST_F(WebRtcRtpDumpHandlerTest, StoppedWhenMaxSizeReached) { } TEST_F(WebRtcRtpDumpHandlerTest, PacketIgnoredIfDumpingNotStarted) { - std::vector<uint8> buffer(100, 0); + std::vector<uint8_t> buffer(100, 0); handler_->OnRtpPacket(&buffer[0], buffer.size(), buffer.size(), true); handler_->OnRtpPacket(&buffer[0], buffer.size(), buffer.size(), false); base::RunLoop().RunUntilIdle(); @@ -189,7 +192,7 @@ TEST_F(WebRtcRtpDumpHandlerTest, PacketIgnoredIfDumpingStopped) { base::Bind(&WebRtcRtpDumpHandlerTest::OnStopDumpFinished, base::Unretained(this))); - std::vector<uint8> buffer(100, 0); + std::vector<uint8_t> buffer(100, 0); handler_->OnRtpPacket(&buffer[0], buffer.size(), buffer.size(), true); base::RunLoop().RunUntilIdle(); } diff --git a/chrome/browser/media/webrtc_rtp_dump_writer.cc b/chrome/browser/media/webrtc_rtp_dump_writer.cc index 06e6e8b..a362142 100644 --- a/chrome/browser/media/webrtc_rtp_dump_writer.cc +++ b/chrome/browser/media/webrtc_rtp_dump_writer.cc @@ -4,9 +4,12 @@ #include "chrome/browser/media/webrtc_rtp_dump_writer.h" +#include <string.h> + #include "base/big_endian.h" #include "base/files/file_util.h" #include "base/logging.h" +#include "base/macros.h" #include "content/public/browser/browser_thread.h" #include "third_party/zlib/zlib.h" @@ -21,32 +24,32 @@ static const size_t kRtpDumpFileHeaderSize = 16; // In bytes. // A helper for writing the header of the dump file. void WriteRtpDumpFileHeaderBigEndian(base::TimeTicks start, - std::vector<uint8>* output) { + std::vector<uint8_t>* output) { size_t buffer_start_pos = output->size(); output->resize(output->size() + kRtpDumpFileHeaderSize); char* buffer = reinterpret_cast<char*>(&(*output)[buffer_start_pos]); base::TimeDelta delta = start - base::TimeTicks(); - uint32 start_sec = delta.InSeconds(); + uint32_t start_sec = delta.InSeconds(); base::WriteBigEndian(buffer, start_sec); buffer += sizeof(start_sec); - uint32 start_usec = + uint32_t start_usec = delta.InMilliseconds() * base::Time::kMicrosecondsPerMillisecond; base::WriteBigEndian(buffer, start_usec); buffer += sizeof(start_usec); // Network source, always 0. - base::WriteBigEndian(buffer, uint32(0)); - buffer += sizeof(uint32); + base::WriteBigEndian(buffer, uint32_t(0)); + buffer += sizeof(uint32_t); // UDP port, always 0. - base::WriteBigEndian(buffer, uint16(0)); - buffer += sizeof(uint16); + base::WriteBigEndian(buffer, uint16_t(0)); + buffer += sizeof(uint16_t); // 2 bytes padding. - base::WriteBigEndian(buffer, uint16(0)); + base::WriteBigEndian(buffer, uint16_t(0)); } // The header size for each packet dump. @@ -57,9 +60,9 @@ static const size_t kPacketDumpHeaderSize = 8; // In bytes. // |dump_length| is the length of the packet dump including this header. // |packet_length| is the length of the RTP packet header. void WritePacketDumpHeaderBigEndian(const base::TimeTicks& start, - uint16 dump_length, - uint16 packet_length, - std::vector<uint8>* output) { + uint16_t dump_length, + uint16_t packet_length, + std::vector<uint8_t>* output) { size_t buffer_start_pos = output->size(); output->resize(output->size() + kPacketDumpHeaderSize); @@ -71,15 +74,15 @@ void WritePacketDumpHeaderBigEndian(const base::TimeTicks& start, base::WriteBigEndian(buffer, packet_length); buffer += sizeof(packet_length); - uint32 elapsed = - static_cast<uint32>((base::TimeTicks::Now() - start).InMilliseconds()); + uint32_t elapsed = + static_cast<uint32_t>((base::TimeTicks::Now() - start).InMilliseconds()); base::WriteBigEndian(buffer, elapsed); } // Append |src_len| bytes from |src| to |dest|. -void AppendToBuffer(const uint8* src, +void AppendToBuffer(const uint8_t* src, size_t src_len, - std::vector<uint8>* dest) { + std::vector<uint8_t>* dest) { size_t old_dest_size = dest->size(); dest->resize(old_dest_size + src_len); memcpy(&(*dest)[old_dest_size], src, src_len); @@ -118,7 +121,7 @@ class WebRtcRtpDumpWriter::FileThreadWorker { // is true, the compression stream will be ended and the dump file cannot be // written to any more. void CompressAndWriteToFileOnFileThread( - scoped_ptr<std::vector<uint8> > buffer, + scoped_ptr<std::vector<uint8_t>> buffer, bool end_stream, FlushResult* result, size_t* bytes_written) { @@ -148,14 +151,14 @@ class WebRtcRtpDumpWriter::FileThreadWorker { private: // Helper for CompressAndWriteToFileOnFileThread to compress and write one // dump. - size_t CompressAndWriteBufferToFile(std::vector<uint8>* buffer, + size_t CompressAndWriteBufferToFile(std::vector<uint8_t>* buffer, FlushResult* result) { DCHECK(thread_checker_.CalledOnValidThread()); DCHECK(buffer->size()); *result = FLUSH_RESULT_SUCCESS; - std::vector<uint8> compressed_buffer; + std::vector<uint8_t> compressed_buffer; if (!Compress(buffer, &compressed_buffer)) { DVLOG(2) << "Compressing buffer failed."; *result = FLUSH_RESULT_FAILURE; @@ -189,7 +192,7 @@ class WebRtcRtpDumpWriter::FileThreadWorker { } // Compresses |input| into |output|. - bool Compress(std::vector<uint8>* input, std::vector<uint8>* output) { + bool Compress(std::vector<uint8_t>* input, std::vector<uint8_t>* output) { DCHECK(thread_checker_.CalledOnValidThread()); int result = Z_OK; @@ -216,7 +219,7 @@ class WebRtcRtpDumpWriter::FileThreadWorker { bool EndDumpFile() { DCHECK(thread_checker_.CalledOnValidThread()); - std::vector<uint8> output_buffer; + std::vector<uint8_t> output_buffer; output_buffer.resize(kMinimumGzipOutputBufferSize); stream_.next_in = NULL; @@ -274,7 +277,7 @@ WebRtcRtpDumpWriter::~WebRtcRtpDumpWriter() { DCHECK(success); } -void WebRtcRtpDumpWriter::WriteRtpPacket(const uint8* packet_header, +void WebRtcRtpDumpWriter::WriteRtpPacket(const uint8_t* packet_header, size_t header_length, size_t packet_length, bool incoming) { @@ -282,7 +285,7 @@ void WebRtcRtpDumpWriter::WriteRtpPacket(const uint8* packet_header, static const size_t kMaxInMemoryBufferSize = 65536; - std::vector<uint8>* dest_buffer = + std::vector<uint8_t>* dest_buffer = incoming ? &incoming_buffer_ : &outgoing_buffer_; // We use the capacity of the buffer to indicate if the buffer has been @@ -353,7 +356,7 @@ void WebRtcRtpDumpWriter::FlushBuffer(bool incoming, const FlushDoneCallback& callback) { DCHECK(thread_checker_.CalledOnValidThread()); - scoped_ptr<std::vector<uint8> > new_buffer(new std::vector<uint8>()); + scoped_ptr<std::vector<uint8_t>> new_buffer(new std::vector<uint8_t>()); if (incoming) { new_buffer->reserve(incoming_buffer_.capacity()); diff --git a/chrome/browser/media/webrtc_rtp_dump_writer.h b/chrome/browser/media/webrtc_rtp_dump_writer.h index 0901cc6..8124ced 100644 --- a/chrome/browser/media/webrtc_rtp_dump_writer.h +++ b/chrome/browser/media/webrtc_rtp_dump_writer.h @@ -5,9 +5,12 @@ #ifndef CHROME_BROWSER_MEDIA_WEBRTC_RTP_DUMP_WRITER_H_ #define CHROME_BROWSER_MEDIA_WEBRTC_RTP_DUMP_WRITER_H_ -#include "base/basictypes.h" +#include <stddef.h> +#include <stdint.h> + #include "base/callback.h" #include "base/files/file_path.h" +#include "base/macros.h" #include "base/memory/weak_ptr.h" #include "base/threading/thread_checker.h" #include "base/time/time.h" @@ -45,7 +48,7 @@ class WebRtcRtpDumpWriter { // Adds a RTP packet to the dump. The caller must make sure it's a valid RTP // packet. No validation is done by this method. - virtual void WriteRtpPacket(const uint8* packet_header, + virtual void WriteRtpPacket(const uint8_t* packet_header, size_t header_length, size_t packet_length, bool incoming); @@ -112,8 +115,8 @@ class WebRtcRtpDumpWriter { const base::Closure max_dump_size_reached_callback_; // The in-memory buffers for the uncompressed dumps. - std::vector<uint8> incoming_buffer_; - std::vector<uint8> outgoing_buffer_; + std::vector<uint8_t> incoming_buffer_; + std::vector<uint8_t> outgoing_buffer_; // The time when the first packet is dumped. base::TimeTicks start_time_; diff --git a/chrome/browser/media/webrtc_rtp_dump_writer_unittest.cc b/chrome/browser/media/webrtc_rtp_dump_writer_unittest.cc index ef4a60d..0ff08fc 100644 --- a/chrome/browser/media/webrtc_rtp_dump_writer_unittest.cc +++ b/chrome/browser/media/webrtc_rtp_dump_writer_unittest.cc @@ -2,6 +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 <stdint.h> +#include <string.h> + #include "base/big_endian.h" #include "base/bind.h" #include "base/files/file_util.h" @@ -21,9 +25,10 @@ static const size_t kMinimumRtpHeaderLength = 12; static void CreateFakeRtpPacketHeader(size_t csrc_count, size_t extension_header_count, - std::vector<uint8>* packet_header) { - packet_header->resize(kMinimumRtpHeaderLength + csrc_count * sizeof(uint32) + - (extension_header_count + 1) * sizeof(uint32)); + std::vector<uint8_t>* packet_header) { + packet_header->resize(kMinimumRtpHeaderLength + + csrc_count * sizeof(uint32_t) + + (extension_header_count + 1) * sizeof(uint32_t)); memset(&(*packet_header)[0], 0, packet_header->size()); @@ -37,9 +42,9 @@ static void CreateFakeRtpPacketHeader(size_t csrc_count, // Set extension length. size_t offset = kMinimumRtpHeaderLength + - (csrc_count & 0xf) * sizeof(uint32) + sizeof(uint16); + (csrc_count & 0xf) * sizeof(uint32_t) + sizeof(uint16_t); base::WriteBigEndian(reinterpret_cast<char*>(&(*packet_header)[offset]), - static_cast<uint16>(extension_header_count)); + static_cast<uint16_t>(extension_header_count)); } class WebRtcRtpDumpWriterTest : public testing::Test { @@ -91,7 +96,7 @@ class WebRtcRtpDumpWriterTest : public testing::Test { bool VerifyCompressedDump(std::string* dump, size_t expected_packet_count) { EXPECT_GT(dump->size(), 0U); - std::vector<uint8> decompressed_dump; + std::vector<uint8_t> decompressed_dump; EXPECT_TRUE(Decompress(dump, &decompressed_dump)); size_t actual_packet_count = 0; @@ -102,7 +107,7 @@ class WebRtcRtpDumpWriterTest : public testing::Test { } // Decompresses the |input| into |output|. - bool Decompress(std::string* input, std::vector<uint8>* output) { + bool Decompress(std::string* input, std::vector<uint8_t>* output) { z_stream stream = {0}; int result = inflateInit2(&stream, 15 + 16); @@ -127,10 +132,10 @@ class WebRtcRtpDumpWriterTest : public testing::Test { // Tries to read |dump| as a rtpplay dump file and returns the number of // packets found in the dump. - bool ReadDecompressedDump(const std::vector<uint8>& dump, + bool ReadDecompressedDump(const std::vector<uint8_t>& dump, size_t* packet_count) { static const char kFirstLine[] = "#!rtpplay1.0 0.0.0.0/0\n"; - static const size_t kDumpFileHeaderSize = 4 * sizeof(uint32); + static const size_t kDumpFileHeaderSize = 4 * sizeof(uint32_t); *packet_count = 0; size_t dump_pos = 0; @@ -167,37 +172,37 @@ class WebRtcRtpDumpWriterTest : public testing::Test { // Tries to read one packet dump starting at |dump| and returns the size of // the packet dump. - bool VerifyPacketDump(const uint8* dump, + bool VerifyPacketDump(const uint8_t* dump, size_t dump_length, size_t* packet_dump_length) { static const size_t kDumpHeaderLength = 8; size_t dump_pos = 0; base::ReadBigEndian(reinterpret_cast<const char*>(dump + dump_pos), - reinterpret_cast<uint16*>(packet_dump_length)); + reinterpret_cast<uint16_t*>(packet_dump_length)); if (*packet_dump_length < kDumpHeaderLength + kMinimumRtpHeaderLength) return false; EXPECT_GE(dump_length, *packet_dump_length); - dump_pos += sizeof(uint16); + dump_pos += sizeof(uint16_t); - uint16 rtp_packet_length = 0; + uint16_t rtp_packet_length = 0; base::ReadBigEndian(reinterpret_cast<const char*>(dump + dump_pos), &rtp_packet_length); if (rtp_packet_length < kMinimumRtpHeaderLength) return false; - dump_pos += sizeof(uint16); + dump_pos += sizeof(uint16_t); // Skips the elapsed time field. - dump_pos += sizeof(uint32); + dump_pos += sizeof(uint32_t); return IsValidRtpHeader(dump + dump_pos, *packet_dump_length - kDumpHeaderLength); } // Returns true if |header| is a valid RTP header. - bool IsValidRtpHeader(const uint8* header, size_t length) { + bool IsValidRtpHeader(const uint8_t* header, size_t length) { if ((header[0] & 0xC0) != 0x80) return false; @@ -207,7 +212,7 @@ class WebRtcRtpDumpWriterTest : public testing::Test { if (length < header_length_without_extn) return false; - uint16 extension_count = 0; + uint16_t extension_count = 0; base::ReadBigEndian( reinterpret_cast<const char*>(header + header_length_without_extn + 2), &extension_count); @@ -245,7 +250,7 @@ TEST_F(WebRtcRtpDumpWriterTest, NoDumpFileIfNoPacketDumped) { } TEST_F(WebRtcRtpDumpWriterTest, WriteAndFlushSmallSizeDump) { - std::vector<uint8> packet_header; + std::vector<uint8_t> packet_header; CreateFakeRtpPacketHeader(1, 2, &packet_header); writer_->WriteRtpPacket( @@ -280,7 +285,7 @@ TEST_F(WebRtcRtpDumpWriterTest, WriteOverMaxLimit) { base::Bind(&WebRtcRtpDumpWriterTest::OnMaxSizeReached, base::Unretained(this)))); - std::vector<uint8> packet_header; + std::vector<uint8_t> packet_header; CreateFakeRtpPacketHeader(3, 4, &packet_header); const size_t kPacketCount = 200; @@ -328,7 +333,7 @@ TEST_F(WebRtcRtpDumpWriterTest, DestroyWriterBeforeEndDumpCallback) { } TEST_F(WebRtcRtpDumpWriterTest, EndDumpsSeparately) { - std::vector<uint8> packet_header; + std::vector<uint8_t> packet_header; CreateFakeRtpPacketHeader(1, 2, &packet_header); writer_->WriteRtpPacket( diff --git a/chrome/browser/media/wv_test_license_server_config.cc b/chrome/browser/media/wv_test_license_server_config.cc index e9db611..a29dc9c 100644 --- a/chrome/browser/media/wv_test_license_server_config.cc +++ b/chrome/browser/media/wv_test_license_server_config.cc @@ -10,13 +10,13 @@ #include "base/path_service.h" #include "base/rand_util.h" #include "base/strings/stringprintf.h" +#include "build/build_config.h" #include "net/base/net_errors.h" #include "net/socket/tcp_server_socket.h" #include "net/test/python_utils.h" - -const uint16 kMinPort = 17000; -const uint16 kPortRangeSize = 1000; +const uint16_t kMinPort = 17000; +const uint16_t kPortRangeSize = 1000; // Widevine license server configuration files. const base::FilePath::CharType kKeysFileName[] = @@ -104,9 +104,9 @@ bool WVTestLicenseServerConfig::SelectServerPort() { // Instead of starting from kMinPort, use a random port within that range. net::IPAddressNumber address; net::ParseIPLiteralToNumber("127.0.0.1", &address); - uint16 start_seed = base::RandInt(0, kPortRangeSize); - uint16 try_port = 0; - for (uint16 i = 0; i < kPortRangeSize; ++i) { + uint16_t start_seed = base::RandInt(0, kPortRangeSize); + uint16_t try_port = 0; + for (uint16_t i = 0; i < kPortRangeSize; ++i) { try_port = kMinPort + (start_seed + i) % kPortRangeSize; net::NetLog::Source source; net::TCPServerSocket sock(NULL, source); diff --git a/chrome/browser/media/wv_test_license_server_config.h b/chrome/browser/media/wv_test_license_server_config.h index f7901bd..7b36e43 100644 --- a/chrome/browser/media/wv_test_license_server_config.h +++ b/chrome/browser/media/wv_test_license_server_config.h @@ -5,6 +5,9 @@ #ifndef CHROME_BROWSER_MEDIA_WV_TEST_LICENSE_SERVER_CONFIG_H_ #define CHROME_BROWSER_MEDIA_WV_TEST_LICENSE_SERVER_CONFIG_H_ +#include <stdint.h> + +#include "base/macros.h" #include "chrome/browser/media/test_license_server_config.h" // License configuration to run the Widevine test license server. @@ -21,7 +24,7 @@ class WVTestLicenseServerConfig : public TestLicenseServerConfig { private: // Server port. The port value should be set by calling SelectServerPort(). - uint16 port_; + uint16_t port_; // Retrieves the path for the WV license server root: // third_party/widevine/test/license_server/ diff --git a/chrome/browser/media_galleries/fileapi/av_scanning_file_validator.cc b/chrome/browser/media_galleries/fileapi/av_scanning_file_validator.cc index 8df32b6..5e6ec1f 100644 --- a/chrome/browser/media_galleries/fileapi/av_scanning_file_validator.cc +++ b/chrome/browser/media_galleries/fileapi/av_scanning_file_validator.cc @@ -14,6 +14,7 @@ #include "base/location.h" #include "base/logging.h" #include "base/strings/utf_string_conversions.h" +#include "build/build_config.h" #include "chrome/common/chrome_constants.h" #include "content/public/browser/browser_thread.h" diff --git a/chrome/browser/media_galleries/fileapi/av_scanning_file_validator.h b/chrome/browser/media_galleries/fileapi/av_scanning_file_validator.h index 262aac7..72dd8a5 100644 --- a/chrome/browser/media_galleries/fileapi/av_scanning_file_validator.h +++ b/chrome/browser/media_galleries/fileapi/av_scanning_file_validator.h @@ -5,7 +5,7 @@ #ifndef CHROME_BROWSER_MEDIA_GALLERIES_FILEAPI_AV_SCANNING_FILE_VALIDATOR_H_ #define CHROME_BROWSER_MEDIA_GALLERIES_FILEAPI_AV_SCANNING_FILE_VALIDATOR_H_ -#include "base/basictypes.h" +#include "base/macros.h" #include "storage/browser/fileapi/copy_or_move_file_validator.h" namespace base { diff --git a/chrome/browser/media_galleries/fileapi/device_media_async_file_util.cc b/chrome/browser/media_galleries/fileapi/device_media_async_file_util.cc index dbe46d2..0e8d56a 100644 --- a/chrome/browser/media_galleries/fileapi/device_media_async_file_util.cc +++ b/chrome/browser/media_galleries/fileapi/device_media_async_file_util.cc @@ -4,8 +4,11 @@ #include "chrome/browser/media_galleries/fileapi/device_media_async_file_util.h" +#include <stddef.h> + #include "base/callback.h" #include "base/files/file_util.h" +#include "base/macros.h" #include "base/single_thread_task_runner.h" #include "base/task_runner_util.h" #include "chrome/browser/media_galleries/fileapi/media_path_filter.h" @@ -408,7 +411,7 @@ void DeviceMediaAsyncFileUtil::Touch( void DeviceMediaAsyncFileUtil::Truncate( scoped_ptr<FileSystemOperationContext> context, const FileSystemURL& url, - int64 length, + int64_t length, const StatusCallback& callback) { DCHECK_CURRENTLY_ON(content::BrowserThread::IO); NOTIMPLEMENTED(); @@ -567,7 +570,7 @@ void DeviceMediaAsyncFileUtil::CreateSnapshotFile( scoped_ptr<storage::FileStreamReader> DeviceMediaAsyncFileUtil::GetFileStreamReader( const FileSystemURL& url, - int64 offset, + int64_t offset, const base::Time& expected_modification_time, storage::FileSystemContext* context) { MTPDeviceAsyncDelegate* delegate = GetMTPDeviceDelegate(url); diff --git a/chrome/browser/media_galleries/fileapi/device_media_async_file_util.h b/chrome/browser/media_galleries/fileapi/device_media_async_file_util.h index 5943db3..2a960d8 100644 --- a/chrome/browser/media_galleries/fileapi/device_media_async_file_util.h +++ b/chrome/browser/media_galleries/fileapi/device_media_async_file_util.h @@ -5,8 +5,11 @@ #ifndef CHROME_BROWSER_MEDIA_GALLERIES_FILEAPI_DEVICE_MEDIA_ASYNC_FILE_UTIL_H_ #define CHROME_BROWSER_MEDIA_GALLERIES_FILEAPI_DEVICE_MEDIA_ASYNC_FILE_UTIL_H_ +#include <stdint.h> + #include "base/files/file.h" #include "base/files/file_path.h" +#include "base/macros.h" #include "base/memory/ref_counted.h" #include "base/memory/scoped_ptr.h" #include "base/memory/weak_ptr.h" @@ -66,7 +69,7 @@ class DeviceMediaAsyncFileUtil : public storage::AsyncFileUtil { const StatusCallback& callback) override; void Truncate(scoped_ptr<storage::FileSystemOperationContext> context, const storage::FileSystemURL& url, - int64 length, + int64_t length, const StatusCallback& callback) override; void CopyFileLocal(scoped_ptr<storage::FileSystemOperationContext> context, const storage::FileSystemURL& src_url, @@ -106,7 +109,7 @@ class DeviceMediaAsyncFileUtil : public storage::AsyncFileUtil { // with reading this file are returned by the FileStreamReader itself. virtual scoped_ptr<storage::FileStreamReader> GetFileStreamReader( const storage::FileSystemURL& url, - int64 offset, + int64_t offset, const base::Time& expected_modification_time, storage::FileSystemContext* context); diff --git a/chrome/browser/media_galleries/fileapi/file_path_watcher_util.h b/chrome/browser/media_galleries/fileapi/file_path_watcher_util.h index bf158ac..09bd088 100644 --- a/chrome/browser/media_galleries/fileapi/file_path_watcher_util.h +++ b/chrome/browser/media_galleries/fileapi/file_path_watcher_util.h @@ -5,7 +5,6 @@ #ifndef CHROME_BROWSER_MEDIA_GALLERIES_FILEAPI_FILE_PATH_WATCHER_UTIL_H_ #define CHROME_BROWSER_MEDIA_GALLERIES_FILEAPI_FILE_PATH_WATCHER_UTIL_H_ -#include "base/basictypes.h" #include "base/callback_forward.h" #include "base/files/file_path.h" #include "base/files/file_path_watcher.h" diff --git a/chrome/browser/media_galleries/fileapi/iapps_data_provider.h b/chrome/browser/media_galleries/fileapi/iapps_data_provider.h index 65c4e21..7e7973f 100644 --- a/chrome/browser/media_galleries/fileapi/iapps_data_provider.h +++ b/chrome/browser/media_galleries/fileapi/iapps_data_provider.h @@ -9,10 +9,10 @@ #include <set> #include <string> -#include "base/basictypes.h" #include "base/callback_forward.h" #include "base/files/file_path.h" #include "base/files/file_path_watcher.h" +#include "base/macros.h" #include "base/memory/weak_ptr.h" namespace iapps { diff --git a/chrome/browser/media_galleries/fileapi/iapps_finder_impl.cc b/chrome/browser/media_galleries/fileapi/iapps_finder_impl.cc index adea47e..e9c1f0fa 100644 --- a/chrome/browser/media_galleries/fileapi/iapps_finder_impl.cc +++ b/chrome/browser/media_galleries/fileapi/iapps_finder_impl.cc @@ -6,6 +6,7 @@ #include "base/bind.h" #include "base/logging.h" +#include "build/build_config.h" #include "content/public/browser/browser_thread.h" namespace iapps { diff --git a/chrome/browser/media_galleries/fileapi/iapps_finder_impl.h b/chrome/browser/media_galleries/fileapi/iapps_finder_impl.h index 7e9f955..82c8424 100644 --- a/chrome/browser/media_galleries/fileapi/iapps_finder_impl.h +++ b/chrome/browser/media_galleries/fileapi/iapps_finder_impl.h @@ -9,6 +9,7 @@ #include "base/callback.h" #include "base/files/file_path.h" +#include "build/build_config.h" #include "chrome/browser/media_galleries/fileapi/iapps_finder.h" #include "components/storage_monitor/storage_info.h" diff --git a/chrome/browser/media_galleries/fileapi/iapps_finder_impl_win_browsertest.cc b/chrome/browser/media_galleries/fileapi/iapps_finder_impl_win_browsertest.cc index f023ae3..117f44a 100644 --- a/chrome/browser/media_galleries/fileapi/iapps_finder_impl_win_browsertest.cc +++ b/chrome/browser/media_galleries/fileapi/iapps_finder_impl_win_browsertest.cc @@ -8,6 +8,7 @@ #include "base/files/file_util.h" #include "base/files/scoped_temp_dir.h" #include "base/logging.h" +#include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "base/message_loop/message_loop.h" #include "base/run_loop.h" diff --git a/chrome/browser/media_galleries/fileapi/iphoto_data_provider.cc b/chrome/browser/media_galleries/fileapi/iphoto_data_provider.cc index 5b7603a1e..9d7372b 100644 --- a/chrome/browser/media_galleries/fileapi/iphoto_data_provider.cc +++ b/chrome/browser/media_galleries/fileapi/iphoto_data_provider.cc @@ -4,6 +4,8 @@ #include "chrome/browser/media_galleries/fileapi/iphoto_data_provider.h" +#include <stdint.h> + #include <map> #include "base/bind.h" @@ -46,7 +48,7 @@ void IPhotoDataProvider::OnLibraryParsed(const ReadyCallback& ready_callback, } void IPhotoDataProvider::BuildIndices(const parser::Library& library) { - typedef base::hash_map<uint64, const base::FilePath*> IdIndex; + typedef base::hash_map<uint64_t, const base::FilePath*> IdIndex; IdIndex photo_id_index; IdIndex originals_id_index; @@ -60,7 +62,7 @@ void IPhotoDataProvider::BuildIndices(const parser::Library& library) { // Build up a set of IDs which have in-album duplicates. // Those are the filenames we want to globally mangle. - std::set<uint64> dupe_ids; + std::set<uint64_t> dupe_ids; for (parser::Albums::const_iterator album_it = library.albums.begin(); album_it != library.albums.end(); album_it++) { const parser::Album& album = album_it->second; @@ -68,7 +70,7 @@ void IPhotoDataProvider::BuildIndices(const parser::Library& library) { std::set<std::string> album_paths; for (parser::Album::const_iterator id_it = album.begin(); id_it != album.end(); id_it++) { - uint64 id = *id_it; + uint64_t id = *id_it; IdIndex::const_iterator photo_it = photo_id_index.find(id); if (photo_it == photo_id_index.end()) continue; @@ -91,7 +93,7 @@ void IPhotoDataProvider::BuildIndices(const parser::Library& library) { for (parser::Album::const_iterator id_it = album.begin(); id_it != album.end(); id_it++) { - uint64 id = *id_it; + uint64_t id = *id_it; IdIndex::const_iterator photo_it = photo_id_index.find(id); if (photo_it == photo_id_index.end()) continue; diff --git a/chrome/browser/media_galleries/fileapi/iphoto_data_provider.h b/chrome/browser/media_galleries/fileapi/iphoto_data_provider.h index 594bb7b..6266012 100644 --- a/chrome/browser/media_galleries/fileapi/iphoto_data_provider.h +++ b/chrome/browser/media_galleries/fileapi/iphoto_data_provider.h @@ -9,11 +9,11 @@ #include <set> #include <string> -#include "base/basictypes.h" #include "base/callback_forward.h" #include "base/containers/hash_tables.h" #include "base/files/file_path.h" #include "base/files/file_path_watcher.h" +#include "base/macros.h" #include "base/memory/weak_ptr.h" #include "chrome/browser/media_galleries/fileapi/iapps_data_provider.h" #include "chrome/browser/media_galleries/fileapi/safe_iapps_library_parser.h" diff --git a/chrome/browser/media_galleries/fileapi/iphoto_data_provider_browsertest.cc b/chrome/browser/media_galleries/fileapi/iphoto_data_provider_browsertest.cc index a9886d2..99d2d9b 100644 --- a/chrome/browser/media_galleries/fileapi/iphoto_data_provider_browsertest.cc +++ b/chrome/browser/media_galleries/fileapi/iphoto_data_provider_browsertest.cc @@ -11,6 +11,7 @@ #include "base/files/scoped_temp_dir.h" #include "base/format_macros.h" #include "base/logging.h" +#include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "base/message_loop/message_loop.h" #include "base/run_loop.h" diff --git a/chrome/browser/media_galleries/fileapi/iphoto_file_util.h b/chrome/browser/media_galleries/fileapi/iphoto_file_util.h index 68bb200..db35156 100644 --- a/chrome/browser/media_galleries/fileapi/iphoto_file_util.h +++ b/chrome/browser/media_galleries/fileapi/iphoto_file_util.h @@ -5,6 +5,7 @@ #ifndef CHROME_BROWSER_MEDIA_GALLERIES_FILEAPI_IPHOTO_FILE_UTIL_H_ #define CHROME_BROWSER_MEDIA_GALLERIES_FILEAPI_IPHOTO_FILE_UTIL_H_ +#include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "base/memory/weak_ptr.h" #include "chrome/browser/media_galleries/fileapi/native_media_file_util.h" diff --git a/chrome/browser/media_galleries/fileapi/iphoto_file_util_unittest.cc b/chrome/browser/media_galleries/fileapi/iphoto_file_util_unittest.cc index 215753f..0aa61c8 100644 --- a/chrome/browser/media_galleries/fileapi/iphoto_file_util_unittest.cc +++ b/chrome/browser/media_galleries/fileapi/iphoto_file_util_unittest.cc @@ -11,6 +11,7 @@ #include "base/bind_helpers.h" #include "base/files/file_util.h" #include "base/files/scoped_temp_dir.h" +#include "base/macros.h" #include "base/run_loop.h" #include "base/single_thread_task_runner.h" #include "base/synchronization/waitable_event.h" diff --git a/chrome/browser/media_galleries/fileapi/itunes_data_provider.h b/chrome/browser/media_galleries/fileapi/itunes_data_provider.h index 788d478..dc66899 100644 --- a/chrome/browser/media_galleries/fileapi/itunes_data_provider.h +++ b/chrome/browser/media_galleries/fileapi/itunes_data_provider.h @@ -9,10 +9,10 @@ #include <set> #include <string> -#include "base/basictypes.h" #include "base/callback_forward.h" #include "base/files/file_path.h" #include "base/files/file_path_watcher.h" +#include "base/macros.h" #include "chrome/browser/media_galleries/fileapi/iapps_data_provider.h" #include "chrome/browser/media_galleries/fileapi/safe_iapps_library_parser.h" diff --git a/chrome/browser/media_galleries/fileapi/itunes_data_provider_browsertest.cc b/chrome/browser/media_galleries/fileapi/itunes_data_provider_browsertest.cc index 72130a0..1bf8cc3 100644 --- a/chrome/browser/media_galleries/fileapi/itunes_data_provider_browsertest.cc +++ b/chrome/browser/media_galleries/fileapi/itunes_data_provider_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 <stddef.h> + #include <string> #include <vector> @@ -11,10 +13,12 @@ #include "base/files/scoped_temp_dir.h" #include "base/format_macros.h" #include "base/logging.h" +#include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "base/message_loop/message_loop.h" #include "base/run_loop.h" #include "base/strings/stringprintf.h" +#include "build/build_config.h" #include "chrome/browser/media_galleries/fileapi/itunes_data_provider.h" #include "chrome/browser/media_galleries/fileapi/media_file_system_backend.h" #include "chrome/browser/media_galleries/imported_media_gallery_registry.h" diff --git a/chrome/browser/media_galleries/fileapi/itunes_file_util.cc b/chrome/browser/media_galleries/fileapi/itunes_file_util.cc index da4aeb00..e3e7b13 100644 --- a/chrome/browser/media_galleries/fileapi/itunes_file_util.cc +++ b/chrome/browser/media_galleries/fileapi/itunes_file_util.cc @@ -4,6 +4,8 @@ #include "chrome/browser/media_galleries/fileapi/itunes_file_util.h" +#include <stddef.h> + #include <set> #include <string> #include <vector> diff --git a/chrome/browser/media_galleries/fileapi/itunes_file_util.h b/chrome/browser/media_galleries/fileapi/itunes_file_util.h index 9c068e5..f47d48b 100644 --- a/chrome/browser/media_galleries/fileapi/itunes_file_util.h +++ b/chrome/browser/media_galleries/fileapi/itunes_file_util.h @@ -5,6 +5,7 @@ #ifndef CHROME_BROWSER_MEDIA_GALLERIES_FILEAPI_ITUNES_FILE_UTIL_H_ #define CHROME_BROWSER_MEDIA_GALLERIES_FILEAPI_ITUNES_FILE_UTIL_H_ +#include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "base/memory/weak_ptr.h" #include "chrome/browser/media_galleries/fileapi/native_media_file_util.h" diff --git a/chrome/browser/media_galleries/fileapi/itunes_file_util_unittest.cc b/chrome/browser/media_galleries/fileapi/itunes_file_util_unittest.cc index 4a19776..de5184b 100644 --- a/chrome/browser/media_galleries/fileapi/itunes_file_util_unittest.cc +++ b/chrome/browser/media_galleries/fileapi/itunes_file_util_unittest.cc @@ -10,6 +10,7 @@ #include "base/bind_helpers.h" #include "base/files/file_util.h" #include "base/files/scoped_temp_dir.h" +#include "base/macros.h" #include "base/run_loop.h" #include "base/single_thread_task_runner.h" #include "base/synchronization/waitable_event.h" diff --git a/chrome/browser/media_galleries/fileapi/media_file_system_backend.cc b/chrome/browser/media_galleries/fileapi/media_file_system_backend.cc index aa4f27d..bb2ee61 100644 --- a/chrome/browser/media_galleries/fileapi/media_file_system_backend.cc +++ b/chrome/browser/media_galleries/fileapi/media_file_system_backend.cc @@ -16,6 +16,7 @@ #include "base/strings/utf_string_conversions.h" #include "base/thread_task_runner_handle.h" #include "base/threading/sequenced_worker_pool.h" +#include "build/build_config.h" #include "chrome/browser/browser_process.h" #include "chrome/browser/extensions/extension_service.h" #include "chrome/browser/media_galleries/fileapi/device_media_async_file_util.h" @@ -72,8 +73,8 @@ void OnPreferencesInit( } void AttemptAutoMountOnUIThread( - int32 process_id, - int32 routing_id, + int32_t process_id, + int32_t routing_id, const std::string& storage_domain, const std::string& mount_point, const base::Callback<void(base::File::Error result)>& callback) { @@ -352,8 +353,8 @@ bool MediaFileSystemBackend::HasInplaceCopyImplementation( scoped_ptr<storage::FileStreamReader> MediaFileSystemBackend::CreateFileStreamReader( const FileSystemURL& url, - int64 offset, - int64 max_bytes_to_read, + int64_t offset, + int64_t max_bytes_to_read, const base::Time& expected_modification_time, FileSystemContext* context) const { if (url.type() == storage::kFileSystemTypeDeviceMedia) { @@ -376,7 +377,7 @@ MediaFileSystemBackend::CreateFileStreamReader( scoped_ptr<storage::FileStreamWriter> MediaFileSystemBackend::CreateFileStreamWriter( const FileSystemURL& url, - int64 offset, + int64_t offset, FileSystemContext* context) const { return scoped_ptr<storage::FileStreamWriter>( storage::FileStreamWriter::CreateForLocalFile( diff --git a/chrome/browser/media_galleries/fileapi/media_file_system_backend.h b/chrome/browser/media_galleries/fileapi/media_file_system_backend.h index 1ae691b..71bdbcc 100644 --- a/chrome/browser/media_galleries/fileapi/media_file_system_backend.h +++ b/chrome/browser/media_galleries/fileapi/media_file_system_backend.h @@ -5,12 +5,16 @@ #ifndef CHROME_BROWSER_MEDIA_GALLERIES_FILEAPI_MEDIA_FILE_SYSTEM_BACKEND_H_ #define CHROME_BROWSER_MEDIA_GALLERIES_FILEAPI_MEDIA_FILE_SYSTEM_BACKEND_H_ +#include <stdint.h> + #include <string> #include "base/callback.h" #include "base/files/file_path.h" +#include "base/macros.h" #include "base/memory/ref_counted.h" #include "base/memory/scoped_ptr.h" +#include "build/build_config.h" #include "chrome/browser/media_galleries/media_galleries_preferences.h" #include "storage/browser/fileapi/file_system_backend.h" #include "storage/browser/fileapi/task_runner_bound_observer_list.h" @@ -76,13 +80,13 @@ class MediaFileSystemBackend : public storage::FileSystemBackend { storage::FileSystemType type) const override; scoped_ptr<storage::FileStreamReader> CreateFileStreamReader( const storage::FileSystemURL& url, - int64 offset, - int64 max_bytes_to_read, + int64_t offset, + int64_t max_bytes_to_read, const base::Time& expected_modification_time, storage::FileSystemContext* context) const override; scoped_ptr<storage::FileStreamWriter> CreateFileStreamWriter( const storage::FileSystemURL& url, - int64 offset, + int64_t offset, storage::FileSystemContext* context) const override; storage::FileSystemQuotaUtil* GetQuotaUtil() override; const storage::UpdateObserverList* GetUpdateObservers( diff --git a/chrome/browser/media_galleries/fileapi/media_file_validator_browsertest.cc b/chrome/browser/media_galleries/fileapi/media_file_validator_browsertest.cc index e695891..45c1de2 100644 --- a/chrome/browser/media_galleries/fileapi/media_file_validator_browsertest.cc +++ b/chrome/browser/media_galleries/fileapi/media_file_validator_browsertest.cc @@ -2,12 +2,15 @@ // 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 <stdint.h> + #include "base/bind.h" #include "base/files/file_path.h" #include "base/files/file_util.h" #include "base/files/scoped_temp_dir.h" #include "base/location.h" +#include "base/macros.h" #include "base/path_service.h" #include "base/single_thread_task_runner.h" #include "base/thread_task_runner_handle.h" @@ -36,9 +39,9 @@ const char kValidImage[] = "RIFF0\0\0\0WEBPVP8 $\0\0\0\xB2\x02\0\x9D\x01\x2A" const char kInvalidMediaFile[] = "Not a media file"; -const int64 kNoFileSize = -1; +const int64_t kNoFileSize = -1; -void HandleCheckFileResult(int64 expected_size, +void HandleCheckFileResult(int64_t expected_size, const base::Callback<void(bool success)>& callback, base::File::Error result, const base::File::Info& file_info) { @@ -175,7 +178,7 @@ class MediaFileValidatorTest : public InProcessBrowserTest { // |kNoFileSize| if the file should not exist. |callback| is called // with success/failure. void CheckFile(storage::FileSystemURL url, - int64 expected_size, + int64_t expected_size, const base::Callback<void(bool success)>& callback) { operation_runner()->GetMetadata( url, storage::FileSystemOperation::GET_METADATA_FIELD_SIZE, diff --git a/chrome/browser/media_galleries/fileapi/media_file_validator_factory.cc b/chrome/browser/media_galleries/fileapi/media_file_validator_factory.cc index 608f49f..5b6e6cb 100644 --- a/chrome/browser/media_galleries/fileapi/media_file_validator_factory.cc +++ b/chrome/browser/media_galleries/fileapi/media_file_validator_factory.cc @@ -5,6 +5,7 @@ #include "chrome/browser/media_galleries/fileapi/media_file_validator_factory.h" #include "base/files/file_path.h" +#include "base/macros.h" #include "chrome/browser/media_galleries/fileapi/supported_audio_video_checker.h" #include "chrome/browser/media_galleries/fileapi/supported_image_type_validator.h" #include "storage/browser/fileapi/copy_or_move_file_validator.h" diff --git a/chrome/browser/media_galleries/fileapi/media_file_validator_factory.h b/chrome/browser/media_galleries/fileapi/media_file_validator_factory.h index a18b7e0..7e267d1 100644 --- a/chrome/browser/media_galleries/fileapi/media_file_validator_factory.h +++ b/chrome/browser/media_galleries/fileapi/media_file_validator_factory.h @@ -5,7 +5,7 @@ #ifndef CHROME_BROWSER_MEDIA_GALLERIES_FILEAPI_MEDIA_FILE_VALIDATOR_FACTORY_H_ #define CHROME_BROWSER_MEDIA_GALLERIES_FILEAPI_MEDIA_FILE_VALIDATOR_FACTORY_H_ -#include "base/basictypes.h" +#include "base/macros.h" #include "storage/browser/fileapi/copy_or_move_file_validator.h" namespace base { diff --git a/chrome/browser/media_galleries/fileapi/media_path_filter.cc b/chrome/browser/media_galleries/fileapi/media_path_filter.cc index d7d41e6..de14bb69 100644 --- a/chrome/browser/media_galleries/fileapi/media_path_filter.cc +++ b/chrome/browser/media_galleries/fileapi/media_path_filter.cc @@ -11,7 +11,9 @@ #include <algorithm> #include <string> +#include "base/macros.h" #include "base/strings/string_util.h" +#include "build/build_config.h" #include "components/mime_util/mime_util.h" #include "net/base/mime_util.h" diff --git a/chrome/browser/media_galleries/fileapi/media_path_filter.h b/chrome/browser/media_galleries/fileapi/media_path_filter.h index 244e9b0..9f84f97 100644 --- a/chrome/browser/media_galleries/fileapi/media_path_filter.h +++ b/chrome/browser/media_galleries/fileapi/media_path_filter.h @@ -5,11 +5,14 @@ #ifndef CHROME_BROWSER_MEDIA_GALLERIES_FILEAPI_MEDIA_PATH_FILTER_H_ #define CHROME_BROWSER_MEDIA_GALLERIES_FILEAPI_MEDIA_PATH_FILTER_H_ +#include <stddef.h> + #include <string> #include <vector> #include "base/containers/hash_tables.h" #include "base/files/file_path.h" +#include "base/macros.h" #include "base/sequence_checker.h" #include "chrome/browser/media_galleries/media_scan_types.h" diff --git a/chrome/browser/media_galleries/fileapi/mtp_device_async_delegate.cc b/chrome/browser/media_galleries/fileapi/mtp_device_async_delegate.cc index cc091e9..7124506 100644 --- a/chrome/browser/media_galleries/fileapi/mtp_device_async_delegate.cc +++ b/chrome/browser/media_galleries/fileapi/mtp_device_async_delegate.cc @@ -7,7 +7,10 @@ #include "net/base/io_buffer.h" MTPDeviceAsyncDelegate::ReadBytesRequest::ReadBytesRequest( - uint32 file_id, net::IOBuffer* buf, int64 offset, int buf_len, + uint32_t file_id, + net::IOBuffer* buf, + int64_t offset, + int buf_len, const ReadBytesSuccessCallback& success_callback, const ErrorCallback& error_callback) : file_id(file_id), @@ -15,7 +18,6 @@ MTPDeviceAsyncDelegate::ReadBytesRequest::ReadBytesRequest( offset(offset), buf_len(buf_len), success_callback(success_callback), - error_callback(error_callback) { -} + error_callback(error_callback) {} MTPDeviceAsyncDelegate::ReadBytesRequest::~ReadBytesRequest() {} diff --git a/chrome/browser/media_galleries/fileapi/mtp_device_async_delegate.h b/chrome/browser/media_galleries/fileapi/mtp_device_async_delegate.h index 2ebfa93..68e8482 100644 --- a/chrome/browser/media_galleries/fileapi/mtp_device_async_delegate.h +++ b/chrome/browser/media_galleries/fileapi/mtp_device_async_delegate.h @@ -5,6 +5,8 @@ #ifndef CHROME_BROWSER_MEDIA_GALLERIES_FILEAPI_MTP_DEVICE_ASYNC_DELEGATE_H_ #define CHROME_BROWSER_MEDIA_GALLERIES_FILEAPI_MTP_DEVICE_ASYNC_DELEGATE_H_ +#include <stdint.h> + #include "base/callback.h" #include "base/files/file.h" #include "base/memory/ref_counted.h" @@ -54,15 +56,17 @@ class MTPDeviceAsyncDelegate { int bytes_read)> ReadBytesSuccessCallback; struct ReadBytesRequest { - ReadBytesRequest(uint32 file_id, - net::IOBuffer* buf, int64 offset, int buf_len, + ReadBytesRequest(uint32_t file_id, + net::IOBuffer* buf, + int64_t offset, + int buf_len, const ReadBytesSuccessCallback& success_callback, const ErrorCallback& error_callback); ~ReadBytesRequest(); - uint32 file_id; + uint32_t file_id; scoped_refptr<net::IOBuffer> buf; - int64 offset; + int64_t offset; int buf_len; ReadBytesSuccessCallback success_callback; ErrorCallback error_callback; @@ -133,7 +137,7 @@ class MTPDeviceAsyncDelegate { // IsStreaming() is true. virtual void ReadBytes(const base::FilePath& device_file_path, const scoped_refptr<net::IOBuffer>& buf, - int64 offset, + int64_t offset, int buf_len, const ReadBytesSuccessCallback& success_callback, const ErrorCallback& error_callback) = 0; diff --git a/chrome/browser/media_galleries/fileapi/mtp_device_map_service.h b/chrome/browser/media_galleries/fileapi/mtp_device_map_service.h index 0f24b14..4e0657d 100644 --- a/chrome/browser/media_galleries/fileapi/mtp_device_map_service.h +++ b/chrome/browser/media_galleries/fileapi/mtp_device_map_service.h @@ -9,6 +9,7 @@ #include "base/files/file_path.h" #include "base/lazy_instance.h" +#include "base/macros.h" #include "base/threading/thread_checker.h" class MTPDeviceAsyncDelegate; diff --git a/chrome/browser/media_galleries/fileapi/mtp_file_stream_reader.cc b/chrome/browser/media_galleries/fileapi/mtp_file_stream_reader.cc index d1fa2c1..8b728a9 100644 --- a/chrome/browser/media_galleries/fileapi/mtp_file_stream_reader.cc +++ b/chrome/browser/media_galleries/fileapi/mtp_file_stream_reader.cc @@ -43,7 +43,7 @@ void CallInt64CompletionCallbackWithPlatformFileError( void ReadBytes( const storage::FileSystemURL& url, const scoped_refptr<net::IOBuffer>& buf, - int64 offset, + int64_t offset, int buf_len, const MTPDeviceAsyncDelegate::ReadBytesSuccessCallback& success_callback, const net::CompletionCallback& error_callback) { @@ -67,7 +67,7 @@ void ReadBytes( MTPFileStreamReader::MTPFileStreamReader( storage::FileSystemContext* file_system_context, const storage::FileSystemURL& url, - int64 initial_offset, + int64_t initial_offset, const base::Time& expected_modification_time, bool do_media_header_validation) : file_system_context_(file_system_context), @@ -75,8 +75,7 @@ MTPFileStreamReader::MTPFileStreamReader( current_offset_(initial_offset), expected_modification_time_(expected_modification_time), media_header_validated_(!do_media_header_validation), - weak_factory_(this) { -} + weak_factory_(this) {} MTPFileStreamReader::~MTPFileStreamReader() { } @@ -126,7 +125,7 @@ int MTPFileStreamReader::Read(net::IOBuffer* buf, int buf_len, return net::ERR_IO_PENDING; } -int64 MTPFileStreamReader::GetLength( +int64_t MTPFileStreamReader::GetLength( const net::Int64CompletionCallback& callback) { DCHECK_CURRENTLY_ON(content::BrowserThread::IO); diff --git a/chrome/browser/media_galleries/fileapi/mtp_file_stream_reader.h b/chrome/browser/media_galleries/fileapi/mtp_file_stream_reader.h index 60c8578..dc9eab1 100644 --- a/chrome/browser/media_galleries/fileapi/mtp_file_stream_reader.h +++ b/chrome/browser/media_galleries/fileapi/mtp_file_stream_reader.h @@ -5,8 +5,11 @@ #ifndef CHROME_BROWSER_MEDIA_GALLERIES_FILEAPI_MTP_FILE_STREAM_READER_H_ #define CHROME_BROWSER_MEDIA_GALLERIES_FILEAPI_MTP_FILE_STREAM_READER_H_ +#include <stdint.h> + #include "base/bind.h" #include "base/files/file.h" +#include "base/macros.h" #include "base/memory/ref_counted.h" #include "base/memory/weak_ptr.h" #include "storage/browser/fileapi/file_stream_reader.h" @@ -26,7 +29,7 @@ class MTPFileStreamReader public: MTPFileStreamReader(storage::FileSystemContext* file_system_context, const storage::FileSystemURL& url, - int64 initial_offset, + int64_t initial_offset, const base::Time& expected_modification_time, bool do_media_header_validation); @@ -36,7 +39,7 @@ class MTPFileStreamReader int Read(net::IOBuffer* buf, int buf_len, const net::CompletionCallback& callback) override; - int64 GetLength(const net::Int64CompletionCallback& callback) override; + int64_t GetLength(const net::Int64CompletionCallback& callback) override; private: void FinishValidateMediaHeader( @@ -54,7 +57,7 @@ class MTPFileStreamReader scoped_refptr<storage::FileSystemContext> file_system_context_; storage::FileSystemURL url_; - int64 current_offset_; + int64_t current_offset_; const base::Time expected_modification_time_; bool media_header_validated_; diff --git a/chrome/browser/media_galleries/fileapi/native_media_file_util.cc b/chrome/browser/media_galleries/fileapi/native_media_file_util.cc index 50a4286..3ac81063 100644 --- a/chrome/browser/media_galleries/fileapi/native_media_file_util.cc +++ b/chrome/browser/media_galleries/fileapi/native_media_file_util.cc @@ -82,7 +82,7 @@ base::File::Error NativeMediaFileUtil::IsMediaFile( char buffer[net::kMaxBytesToSniff]; // Read as much as net::SniffMimeTypeFromLocalData() will bother looking at. - int64 len = file.Read(0, buffer, net::kMaxBytesToSniff); + int64_t len = file.Read(0, buffer, net::kMaxBytesToSniff); if (len < 0) return base::File::FILE_ERROR_FAILED; @@ -206,7 +206,7 @@ void NativeMediaFileUtil::Touch( void NativeMediaFileUtil::Truncate( scoped_ptr<storage::FileSystemOperationContext> context, const storage::FileSystemURL& url, - int64 length, + int64_t length, const StatusCallback& callback) { DCHECK_CURRENTLY_ON(content::BrowserThread::IO); callback.Run(base::File::FILE_ERROR_SECURITY); diff --git a/chrome/browser/media_galleries/fileapi/native_media_file_util.h b/chrome/browser/media_galleries/fileapi/native_media_file_util.h index 2a6593e..73d47a1 100644 --- a/chrome/browser/media_galleries/fileapi/native_media_file_util.h +++ b/chrome/browser/media_galleries/fileapi/native_media_file_util.h @@ -5,6 +5,10 @@ #ifndef CHROME_BROWSER_MEDIA_GALLERIES_FILEAPI_NATIVE_MEDIA_FILE_UTIL_H_ #define CHROME_BROWSER_MEDIA_GALLERIES_FILEAPI_NATIVE_MEDIA_FILE_UTIL_H_ +#include <stddef.h> +#include <stdint.h> + +#include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "base/memory/weak_ptr.h" #include "storage/browser/fileapi/async_file_util.h" @@ -68,7 +72,7 @@ class NativeMediaFileUtil : public storage::AsyncFileUtil { const StatusCallback& callback) override; void Truncate(scoped_ptr<storage::FileSystemOperationContext> context, const storage::FileSystemURL& url, - int64 length, + int64_t length, const StatusCallback& callback) override; void CopyFileLocal(scoped_ptr<storage::FileSystemOperationContext> context, const storage::FileSystemURL& src_url, diff --git a/chrome/browser/media_galleries/fileapi/native_media_file_util_unittest.cc b/chrome/browser/media_galleries/fileapi/native_media_file_util_unittest.cc index 84e7699..f96707d 100644 --- a/chrome/browser/media_galleries/fileapi/native_media_file_util_unittest.cc +++ b/chrome/browser/media_galleries/fileapi/native_media_file_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 <set> #include <string> @@ -9,6 +11,7 @@ #include "base/files/file_util.h" #include "base/files/scoped_temp_dir.h" #include "base/format_macros.h" +#include "base/macros.h" #include "base/message_loop/message_loop.h" #include "base/strings/stringprintf.h" #include "base/thread_task_runner_handle.h" diff --git a/chrome/browser/media_galleries/fileapi/picasa_data_provider.cc b/chrome/browser/media_galleries/fileapi/picasa_data_provider.cc index 3cd347c..ad895e2 100644 --- a/chrome/browser/media_galleries/fileapi/picasa_data_provider.cc +++ b/chrome/browser/media_galleries/fileapi/picasa_data_provider.cc @@ -6,7 +6,6 @@ #include <utility> -#include "base/basictypes.h" #include "base/bind_helpers.h" #include "base/callback.h" #include "base/files/file_util.h" diff --git a/chrome/browser/media_galleries/fileapi/picasa_data_provider.h b/chrome/browser/media_galleries/fileapi/picasa_data_provider.h index 8da1ae4..141a182 100644 --- a/chrome/browser/media_galleries/fileapi/picasa_data_provider.h +++ b/chrome/browser/media_galleries/fileapi/picasa_data_provider.h @@ -9,11 +9,11 @@ #include <string> #include <vector> -#include "base/basictypes.h" #include "base/callback_forward.h" #include "base/files/file.h" #include "base/files/file_path.h" #include "base/files/file_path_watcher.h" +#include "base/macros.h" #include "base/memory/ref_counted.h" #include "base/memory/scoped_ptr.h" #include "base/memory/weak_ptr.h" diff --git a/chrome/browser/media_galleries/fileapi/picasa_data_provider_browsertest.cc b/chrome/browser/media_galleries/fileapi/picasa_data_provider_browsertest.cc index a397f51..d8187e4 100644 --- a/chrome/browser/media_galleries/fileapi/picasa_data_provider_browsertest.cc +++ b/chrome/browser/media_galleries/fileapi/picasa_data_provider_browsertest.cc @@ -7,6 +7,7 @@ #include "base/files/file_enumerator.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 "base/memory/scoped_ptr.h" #include "base/message_loop/message_loop.h" diff --git a/chrome/browser/media_galleries/fileapi/picasa_file_util.cc b/chrome/browser/media_galleries/fileapi/picasa_file_util.cc index 3417fe5..6d2ca1c 100644 --- a/chrome/browser/media_galleries/fileapi/picasa_file_util.cc +++ b/chrome/browser/media_galleries/fileapi/picasa_file_util.cc @@ -7,7 +7,6 @@ #include <string> #include <vector> -#include "base/basictypes.h" #include "base/bind_helpers.h" #include "base/strings/string_util.h" #include "base/strings/stringprintf.h" diff --git a/chrome/browser/media_galleries/fileapi/picasa_file_util.h b/chrome/browser/media_galleries/fileapi/picasa_file_util.h index 8d1a166..ec65f36 100644 --- a/chrome/browser/media_galleries/fileapi/picasa_file_util.h +++ b/chrome/browser/media_galleries/fileapi/picasa_file_util.h @@ -5,6 +5,7 @@ #ifndef CHROME_BROWSER_MEDIA_GALLERIES_FILEAPI_PICASA_FILE_UTIL_H_ #define CHROME_BROWSER_MEDIA_GALLERIES_FILEAPI_PICASA_FILE_UTIL_H_ +#include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "base/memory/weak_ptr.h" #include "chrome/browser/media_galleries/fileapi/native_media_file_util.h" diff --git a/chrome/browser/media_galleries/fileapi/picasa_file_util_unittest.cc b/chrome/browser/media_galleries/fileapi/picasa_file_util_unittest.cc index 8b1c080..ae8d7d3 100644 --- a/chrome/browser/media_galleries/fileapi/picasa_file_util_unittest.cc +++ b/chrome/browser/media_galleries/fileapi/picasa_file_util_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 <stdint.h> + #include <set> #include <string> #include <vector> @@ -10,6 +13,7 @@ #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 "base/memory/scoped_vector.h" #include "base/message_loop/message_loop.h" @@ -97,7 +101,7 @@ class TestFolder { base::Time variant_epoch = base::Time::FromLocalExploded( picasa::kPmpVariantTimeEpoch); - int64 microseconds_since_epoch = + int64_t microseconds_since_epoch = (folder_info_.timestamp - variant_epoch).InMicroseconds(); return static_cast<double>(microseconds_since_epoch) / diff --git a/chrome/browser/media_galleries/fileapi/picasa_finder.cc b/chrome/browser/media_galleries/fileapi/picasa_finder.cc index 5473a2a..ecb76d9 100644 --- a/chrome/browser/media_galleries/fileapi/picasa_finder.cc +++ b/chrome/browser/media_galleries/fileapi/picasa_finder.cc @@ -13,6 +13,7 @@ #include "base/files/file_util.h" #include "base/path_service.h" #include "base/strings/string16.h" +#include "build/build_config.h" #include "chrome/common/media_galleries/picasa_types.h" #include "components/storage_monitor/storage_info.h" #include "content/public/browser/browser_thread.h" diff --git a/chrome/browser/media_galleries/fileapi/picasa_finder.h b/chrome/browser/media_galleries/fileapi/picasa_finder.h index 109c90d..5fa69ad 100644 --- a/chrome/browser/media_galleries/fileapi/picasa_finder.h +++ b/chrome/browser/media_galleries/fileapi/picasa_finder.h @@ -9,6 +9,7 @@ #include "base/callback.h" #include "base/files/file_path.h" +#include "build/build_config.h" #if defined(OS_MACOSX) diff --git a/chrome/browser/media_galleries/fileapi/readahead_file_stream_reader.cc b/chrome/browser/media_galleries/fileapi/readahead_file_stream_reader.cc index d91f39d..556e71b 100644 --- a/chrome/browser/media_galleries/fileapi/readahead_file_stream_reader.cc +++ b/chrome/browser/media_galleries/fileapi/readahead_file_stream_reader.cc @@ -4,6 +4,8 @@ #include "chrome/browser/media_galleries/fileapi/readahead_file_stream_reader.h" +#include <stddef.h> + #include <algorithm> #include "base/message_loop/message_loop.h" @@ -51,7 +53,7 @@ int ReadaheadFileStreamReader::Read( return result; } -int64 ReadaheadFileStreamReader::GetLength( +int64_t ReadaheadFileStreamReader::GetLength( const net::Int64CompletionCallback& callback) { return source_->GetLength(callback); } diff --git a/chrome/browser/media_galleries/fileapi/readahead_file_stream_reader.h b/chrome/browser/media_galleries/fileapi/readahead_file_stream_reader.h index 90afc96..65d4ff2 100644 --- a/chrome/browser/media_galleries/fileapi/readahead_file_stream_reader.h +++ b/chrome/browser/media_galleries/fileapi/readahead_file_stream_reader.h @@ -5,8 +5,11 @@ #ifndef CHROME_BROWSER_MEDIA_GALLERIES_FILEAPI_READAHEAD_FILE_STREAM_READER_H_ #define CHROME_BROWSER_MEDIA_GALLERIES_FILEAPI_READAHEAD_FILE_STREAM_READER_H_ +#include <stdint.h> + #include <queue> +#include "base/macros.h" #include "base/memory/weak_ptr.h" #include "net/base/io_buffer.h" #include "storage/browser/fileapi/file_stream_reader.h" @@ -24,7 +27,7 @@ class ReadaheadFileStreamReader int Read(net::IOBuffer* buf, int buf_len, const net::CompletionCallback& callback) override; - int64 GetLength(const net::Int64CompletionCallback& callback) override; + int64_t GetLength(const net::Int64CompletionCallback& callback) override; private: // Returns the number of bytes consumed from the internal cache into |sink|. diff --git a/chrome/browser/media_galleries/fileapi/safe_audio_video_checker.cc b/chrome/browser/media_galleries/fileapi/safe_audio_video_checker.cc index 3eb5b6e..cf33f39 100644 --- a/chrome/browser/media_galleries/fileapi/safe_audio_video_checker.cc +++ b/chrome/browser/media_galleries/fileapi/safe_audio_video_checker.cc @@ -4,6 +4,8 @@ #include "chrome/browser/media_galleries/fileapi/safe_audio_video_checker.h" +#include <stdint.h> + #include "base/bind.h" #include "base/callback.h" #include "base/location.h" @@ -14,9 +16,9 @@ #include "chrome/common/chrome_utility_messages.h" #include "chrome/common/extensions/chrome_utility_extensions_messages.h" #include "chrome/grit/generated_resources.h" +#include "content/public/browser/browser_thread.h" #include "content/public/browser/child_process_data.h" #include "content/public/browser/utility_process_host.h" -#include "content/public/browser/browser_thread.h" #include "ipc/ipc_message_macros.h" #include "ipc/ipc_platform_file.h" #include "ui/base/l10n/l10n_util.h" @@ -64,7 +66,7 @@ void SafeAudioVideoChecker::OnProcessStarted() { OnCheckingFinished(false /* valid? */); return; } - const int64 kFileDecodeTimeInMS = 250; + const int64_t kFileDecodeTimeInMS = 250; utility_process_host_->Send(new ChromeUtilityMsg_CheckMediaFile( kFileDecodeTimeInMS, file_for_transit)); } diff --git a/chrome/browser/media_galleries/fileapi/safe_audio_video_checker.h b/chrome/browser/media_galleries/fileapi/safe_audio_video_checker.h index 9a1fac1..64efe48 100644 --- a/chrome/browser/media_galleries/fileapi/safe_audio_video_checker.h +++ b/chrome/browser/media_galleries/fileapi/safe_audio_video_checker.h @@ -5,9 +5,9 @@ #ifndef CHROME_BROWSER_MEDIA_GALLERIES_FILEAPI_SAFE_AUDIO_VIDEO_CHECKER_H_ #define CHROME_BROWSER_MEDIA_GALLERIES_FILEAPI_SAFE_AUDIO_VIDEO_CHECKER_H_ -#include "base/basictypes.h" #include "base/callback_forward.h" #include "base/files/file.h" +#include "base/macros.h" #include "base/memory/weak_ptr.h" #include "content/public/browser/utility_process_host_client.h" #include "storage/browser/fileapi/copy_or_move_file_validator.h" diff --git a/chrome/browser/media_galleries/fileapi/safe_iapps_library_parser.cc b/chrome/browser/media_galleries/fileapi/safe_iapps_library_parser.cc index a4389b7..5e7f042 100644 --- a/chrome/browser/media_galleries/fileapi/safe_iapps_library_parser.cc +++ b/chrome/browser/media_galleries/fileapi/safe_iapps_library_parser.cc @@ -4,6 +4,7 @@ #include "chrome/browser/media_galleries/fileapi/safe_iapps_library_parser.h" +#include "build/build_config.h" #include "chrome/browser/media_galleries/fileapi/media_file_system_backend.h" #include "chrome/common/chrome_utility_messages.h" #include "chrome/common/extensions/chrome_utility_extensions_messages.h" diff --git a/chrome/browser/media_galleries/fileapi/safe_iapps_library_parser.h b/chrome/browser/media_galleries/fileapi/safe_iapps_library_parser.h index 4d940e1..bd79e51 100644 --- a/chrome/browser/media_galleries/fileapi/safe_iapps_library_parser.h +++ b/chrome/browser/media_galleries/fileapi/safe_iapps_library_parser.h @@ -11,7 +11,9 @@ #include "base/compiler_specific.h" #include "base/files/file.h" #include "base/files/file_path.h" +#include "base/macros.h" #include "base/memory/weak_ptr.h" +#include "build/build_config.h" #include "chrome/common/media_galleries/iphoto_library.h" #include "chrome/common/media_galleries/itunes_library.h" #include "content/public/browser/utility_process_host.h" diff --git a/chrome/browser/media_galleries/fileapi/safe_itunes_pref_parser_win.h b/chrome/browser/media_galleries/fileapi/safe_itunes_pref_parser_win.h index 0777c64..542fa89 100644 --- a/chrome/browser/media_galleries/fileapi/safe_itunes_pref_parser_win.h +++ b/chrome/browser/media_galleries/fileapi/safe_itunes_pref_parser_win.h @@ -9,6 +9,7 @@ #include "base/callback.h" #include "base/compiler_specific.h" +#include "base/macros.h" #include "content/public/browser/utility_process_host_client.h" namespace base { diff --git a/chrome/browser/media_galleries/fileapi/safe_media_metadata_parser.cc b/chrome/browser/media_galleries/fileapi/safe_media_metadata_parser.cc index 9888300..a240420 100644 --- a/chrome/browser/media_galleries/fileapi/safe_media_metadata_parser.cc +++ b/chrome/browser/media_galleries/fileapi/safe_media_metadata_parser.cc @@ -18,9 +18,11 @@ using content::BrowserThread; namespace metadata { -SafeMediaMetadataParser::SafeMediaMetadataParser( - Profile* profile, const std::string& blob_uuid, int64 blob_size, - const std::string& mime_type, bool get_attached_images) +SafeMediaMetadataParser::SafeMediaMetadataParser(Profile* profile, + const std::string& blob_uuid, + int64_t blob_size, + const std::string& mime_type, + bool get_attached_images) : profile_(profile), blob_uuid_(blob_uuid), blob_size_(blob_size), @@ -88,7 +90,9 @@ void SafeMediaMetadataParser::OnParseMediaMetadataFinished( } void SafeMediaMetadataParser::OnUtilityProcessRequestBlobBytes( - int64 request_id, int64 byte_start, int64 length) { + int64_t request_id, + int64_t byte_start, + int64_t length) { DCHECK_CURRENTLY_ON(BrowserThread::IO); BrowserThread::PostTask( BrowserThread::UI, @@ -97,8 +101,9 @@ void SafeMediaMetadataParser::OnUtilityProcessRequestBlobBytes( request_id, byte_start, length)); } -void SafeMediaMetadataParser::StartBlobReaderOnUIThread( - int64 request_id, int64 byte_start, int64 length) { +void SafeMediaMetadataParser::StartBlobReaderOnUIThread(int64_t request_id, + int64_t byte_start, + int64_t length) { DCHECK_CURRENTLY_ON(BrowserThread::UI); // BlobReader is self-deleting. @@ -109,8 +114,9 @@ void SafeMediaMetadataParser::StartBlobReaderOnUIThread( } void SafeMediaMetadataParser::OnBlobReaderDoneOnUIThread( - int64 request_id, scoped_ptr<std::string> data, - int64 /* blob_total_size */) { + int64_t request_id, + scoped_ptr<std::string> data, + int64_t /* blob_total_size */) { DCHECK_CURRENTLY_ON(BrowserThread::UI); BrowserThread::PostTask( BrowserThread::IO, @@ -120,7 +126,8 @@ void SafeMediaMetadataParser::OnBlobReaderDoneOnUIThread( } void SafeMediaMetadataParser::FinishRequestBlobBytes( - int64 request_id, scoped_ptr<std::string> data) { + int64_t request_id, + scoped_ptr<std::string> data) { DCHECK_CURRENTLY_ON(BrowserThread::IO); if (!utility_process_host_.get()) return; diff --git a/chrome/browser/media_galleries/fileapi/safe_media_metadata_parser.h b/chrome/browser/media_galleries/fileapi/safe_media_metadata_parser.h index ac18b80..a2c0dd3 100644 --- a/chrome/browser/media_galleries/fileapi/safe_media_metadata_parser.h +++ b/chrome/browser/media_galleries/fileapi/safe_media_metadata_parser.h @@ -5,11 +5,14 @@ #ifndef CHROME_BROWSER_MEDIA_GALLERIES_FILEAPI_SAFE_MEDIA_METADATA_PARSER_H_ #define CHROME_BROWSER_MEDIA_GALLERIES_FILEAPI_SAFE_MEDIA_METADATA_PARSER_H_ +#include <stdint.h> + #include <string> #include <vector> #include "base/callback.h" #include "base/compiler_specific.h" +#include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "base/memory/weak_ptr.h" #include "chrome/common/extensions/api/media_galleries.h" @@ -38,8 +41,10 @@ class SafeMediaMetadataParser : public content::UtilityProcessHostClient { scoped_ptr<std::vector<AttachedImage> > attached_images)> DoneCallback; - SafeMediaMetadataParser(Profile* profile, const std::string& blob_uuid, - int64 blob_size, const std::string& mime_type, + SafeMediaMetadataParser(Profile* profile, + const std::string& blob_uuid, + int64_t blob_size, + const std::string& mime_type, bool get_attached_images); // Should be called on the UI thread. |callback| also runs on the UI thread. @@ -66,14 +71,16 @@ class SafeMediaMetadataParser : public content::UtilityProcessHostClient { // Sequence of functions that bounces from the IO thread to the UI thread to // read the blob data, then sends the data back to the utility process. - void OnUtilityProcessRequestBlobBytes(int64 request_id, int64 byte_start, - int64 length); - void StartBlobReaderOnUIThread(int64 request_id, int64 byte_start, - int64 length); - void OnBlobReaderDoneOnUIThread(int64 request_id, + void OnUtilityProcessRequestBlobBytes(int64_t request_id, + int64_t byte_start, + int64_t length); + void StartBlobReaderOnUIThread(int64_t request_id, + int64_t byte_start, + int64_t length); + void OnBlobReaderDoneOnUIThread(int64_t request_id, scoped_ptr<std::string> data, - int64 /* blob_total_size */); - void FinishRequestBlobBytes(int64 request_id, scoped_ptr<std::string> data); + int64_t /* blob_total_size */); + void FinishRequestBlobBytes(int64_t request_id, scoped_ptr<std::string> data); // UtilityProcessHostClient implementation. // Runs on the IO thread. @@ -83,7 +90,7 @@ class SafeMediaMetadataParser : public content::UtilityProcessHostClient { // All member variables are only accessed on the IO thread. Profile* const profile_; const std::string blob_uuid_; - const int64 blob_size_; + const int64_t blob_size_; const std::string mime_type_; bool get_attached_images_; diff --git a/chrome/browser/media_galleries/fileapi/safe_picasa_album_table_reader.h b/chrome/browser/media_galleries/fileapi/safe_picasa_album_table_reader.h index 139f17f..6d0829a 100644 --- a/chrome/browser/media_galleries/fileapi/safe_picasa_album_table_reader.h +++ b/chrome/browser/media_galleries/fileapi/safe_picasa_album_table_reader.h @@ -9,6 +9,7 @@ #include "base/callback.h" #include "base/compiler_specific.h" +#include "base/macros.h" #include "base/memory/weak_ptr.h" #include "chrome/common/media_galleries/picasa_types.h" #include "content/public/browser/utility_process_host.h" diff --git a/chrome/browser/media_galleries/fileapi/safe_picasa_albums_indexer.h b/chrome/browser/media_galleries/fileapi/safe_picasa_albums_indexer.h index 45ac9b9..8311c71 100644 --- a/chrome/browser/media_galleries/fileapi/safe_picasa_albums_indexer.h +++ b/chrome/browser/media_galleries/fileapi/safe_picasa_albums_indexer.h @@ -10,6 +10,7 @@ #include "base/callback.h" #include "base/compiler_specific.h" +#include "base/macros.h" #include "base/memory/weak_ptr.h" #include "chrome/common/media_galleries/picasa_types.h" #include "content/public/browser/utility_process_host_client.h" diff --git a/chrome/browser/media_galleries/fileapi/supported_audio_video_checker.cc b/chrome/browser/media_galleries/fileapi/supported_audio_video_checker.cc index 7832979..d2270e5 100644 --- a/chrome/browser/media_galleries/fileapi/supported_audio_video_checker.cc +++ b/chrome/browser/media_galleries/fileapi/supported_audio_video_checker.cc @@ -4,6 +4,8 @@ #include "chrome/browser/media_galleries/fileapi/supported_audio_video_checker.h" +#include <stddef.h> + #include <set> #include <vector> @@ -12,6 +14,7 @@ #include "base/lazy_instance.h" #include "base/location.h" #include "base/logging.h" +#include "base/macros.h" #include "base/stl_util.h" #include "chrome/browser/media_galleries/fileapi/safe_audio_video_checker.h" #include "components/mime_util/mime_util.h" diff --git a/chrome/browser/media_galleries/fileapi/supported_audio_video_checker.h b/chrome/browser/media_galleries/fileapi/supported_audio_video_checker.h index 031b36c..182bba0 100644 --- a/chrome/browser/media_galleries/fileapi/supported_audio_video_checker.h +++ b/chrome/browser/media_galleries/fileapi/supported_audio_video_checker.h @@ -5,9 +5,9 @@ #ifndef CHROME_BROWSER_MEDIA_GALLERIES_FILEAPI_SUPPORTED_AUDIO_VIDEO_CHECKER_H_ #define CHROME_BROWSER_MEDIA_GALLERIES_FILEAPI_SUPPORTED_AUDIO_VIDEO_CHECKER_H_ -#include "base/basictypes.h" #include "base/files/file.h" #include "base/files/file_path.h" +#include "base/macros.h" #include "base/memory/ref_counted.h" #include "base/memory/weak_ptr.h" #include "chrome/browser/media_galleries/fileapi/av_scanning_file_validator.h" diff --git a/chrome/browser/media_galleries/fileapi/supported_image_type_validator.cc b/chrome/browser/media_galleries/fileapi/supported_image_type_validator.cc index 2e83a76..5578361 100644 --- a/chrome/browser/media_galleries/fileapi/supported_image_type_validator.cc +++ b/chrome/browser/media_galleries/fileapi/supported_image_type_validator.cc @@ -9,6 +9,7 @@ #include "base/files/file.h" #include "base/location.h" #include "base/logging.h" +#include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "base/memory/weak_ptr.h" #include "base/stl_util.h" diff --git a/chrome/browser/media_galleries/fileapi/supported_image_type_validator.h b/chrome/browser/media_galleries/fileapi/supported_image_type_validator.h index 28be737..04e8e15 100644 --- a/chrome/browser/media_galleries/fileapi/supported_image_type_validator.h +++ b/chrome/browser/media_galleries/fileapi/supported_image_type_validator.h @@ -5,8 +5,8 @@ #ifndef CHROME_BROWSER_MEDIA_GALLERIES_FILEAPI_SUPPORTED_IMAGE_TYPE_VALIDATOR_H_ #define CHROME_BROWSER_MEDIA_GALLERIES_FILEAPI_SUPPORTED_IMAGE_TYPE_VALIDATOR_H_ -#include "base/basictypes.h" #include "base/files/file_path.h" +#include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "base/memory/weak_ptr.h" #include "chrome/browser/media_galleries/fileapi/av_scanning_file_validator.h" diff --git a/chrome/browser/media_galleries/gallery_watch_manager.cc b/chrome/browser/media_galleries/gallery_watch_manager.cc index 4368fae..52d35e1 100644 --- a/chrome/browser/media_galleries/gallery_watch_manager.cc +++ b/chrome/browser/media_galleries/gallery_watch_manager.cc @@ -4,9 +4,12 @@ #include "chrome/browser/media_galleries/gallery_watch_manager.h" +#include <stddef.h> + #include <tuple> #include "base/bind.h" +#include "base/macros.h" #include "base/stl_util.h" #include "base/time/time.h" #include "chrome/browser/browser_process.h" diff --git a/chrome/browser/media_galleries/gallery_watch_manager.h b/chrome/browser/media_galleries/gallery_watch_manager.h index bdb08c4..c5edd41b 100644 --- a/chrome/browser/media_galleries/gallery_watch_manager.h +++ b/chrome/browser/media_galleries/gallery_watch_manager.h @@ -8,10 +8,10 @@ #include <map> #include <string> -#include "base/basictypes.h" #include "base/callback_forward.h" #include "base/files/file_path.h" #include "base/files/file_path_watcher.h" +#include "base/macros.h" #include "base/memory/linked_ptr.h" #include "base/memory/scoped_ptr.h" #include "base/memory/weak_ptr.h" diff --git a/chrome/browser/media_galleries/gallery_watch_manager_observer.h b/chrome/browser/media_galleries/gallery_watch_manager_observer.h index a4671e5..33d8c04 100644 --- a/chrome/browser/media_galleries/gallery_watch_manager_observer.h +++ b/chrome/browser/media_galleries/gallery_watch_manager_observer.h @@ -5,7 +5,6 @@ #ifndef CHROME_BROWSER_MEDIA_GALLERIES_GALLERY_WATCH_MANAGER_OBSERVER_H_ #define CHROME_BROWSER_MEDIA_GALLERIES_GALLERY_WATCH_MANAGER_OBSERVER_H_ -#include "base/basictypes.h" #include "chrome/browser/media_galleries/media_galleries_preferences.h" class GalleryWatchManagerObserver { diff --git a/chrome/browser/media_galleries/gallery_watch_manager_unittest.cc b/chrome/browser/media_galleries/gallery_watch_manager_unittest.cc index 5a94469..d1f791a 100644 --- a/chrome/browser/media_galleries/gallery_watch_manager_unittest.cc +++ b/chrome/browser/media_galleries/gallery_watch_manager_unittest.cc @@ -7,9 +7,11 @@ #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/scoped_ptr.h" #include "base/run_loop.h" #include "base/test/scoped_path_override.h" +#include "build/build_config.h" #include "chrome/browser/extensions/test_extension_system.h" #include "chrome/browser/media_galleries/gallery_watch_manager.h" #include "chrome/browser/media_galleries/gallery_watch_manager_observer.h" diff --git a/chrome/browser/media_galleries/imported_media_gallery_registry.cc b/chrome/browser/media_galleries/imported_media_gallery_registry.cc index cfa7da4..abbf8c8 100644 --- a/chrome/browser/media_galleries/imported_media_gallery_registry.cc +++ b/chrome/browser/media_galleries/imported_media_gallery_registry.cc @@ -7,6 +7,7 @@ #include "base/bind.h" #include "base/files/file_util.h" #include "base/logging.h" +#include "build/build_config.h" #include "chrome/browser/media_galleries/fileapi/iphoto_data_provider.h" #include "chrome/browser/media_galleries/fileapi/itunes_data_provider.h" #include "chrome/browser/media_galleries/fileapi/media_file_system_backend.h" diff --git a/chrome/browser/media_galleries/imported_media_gallery_registry.h b/chrome/browser/media_galleries/imported_media_gallery_registry.h index 8c343c1..39f5e77 100644 --- a/chrome/browser/media_galleries/imported_media_gallery_registry.h +++ b/chrome/browser/media_galleries/imported_media_gallery_registry.h @@ -8,10 +8,11 @@ #include <set> #include <string> -#include "base/basictypes.h" #include "base/files/file_path.h" #include "base/lazy_instance.h" +#include "base/macros.h" #include "base/memory/scoped_ptr.h" +#include "build/build_config.h" namespace iphoto { class IPhotoDataProvider; diff --git a/chrome/browser/media_galleries/linux/mtp_device_delegate_impl_linux.cc b/chrome/browser/media_galleries/linux/mtp_device_delegate_impl_linux.cc index d00847a..3d5a68fb 100644 --- a/chrome/browser/media_galleries/linux/mtp_device_delegate_impl_linux.cc +++ b/chrome/browser/media_galleries/linux/mtp_device_delegate_impl_linux.cc @@ -6,6 +6,7 @@ #include <errno.h> #include <fcntl.h> +#include <stddef.h> #include <algorithm> #include <limits> @@ -13,6 +14,7 @@ #include "base/bind.h" #include "base/files/file_util.h" +#include "base/macros.h" #include "base/numerics/safe_conversions.h" #include "base/posix/eintr_wrapper.h" #include "base/strings/string_number_conversions.h" diff --git a/chrome/browser/media_galleries/linux/mtp_device_delegate_impl_linux.h b/chrome/browser/media_galleries/linux/mtp_device_delegate_impl_linux.h index 9737150..4e971f5 100644 --- a/chrome/browser/media_galleries/linux/mtp_device_delegate_impl_linux.h +++ b/chrome/browser/media_galleries/linux/mtp_device_delegate_impl_linux.h @@ -16,6 +16,7 @@ #include "base/containers/scoped_ptr_hash_map.h" #include "base/files/file_path.h" #include "base/location.h" +#include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "base/memory/weak_ptr.h" #include "chrome/browser/media_galleries/fileapi/mtp_device_async_delegate.h" diff --git a/chrome/browser/media_galleries/linux/mtp_device_object_enumerator.cc b/chrome/browser/media_galleries/linux/mtp_device_object_enumerator.cc index 914d797..af5b125 100644 --- a/chrome/browser/media_galleries/linux/mtp_device_object_enumerator.cc +++ b/chrome/browser/media_galleries/linux/mtp_device_object_enumerator.cc @@ -27,7 +27,7 @@ base::FilePath MTPDeviceObjectEnumerator::Next() { return base::FilePath(file_entries_[index_].file_name()); } -int64 MTPDeviceObjectEnumerator::Size() { +int64_t MTPDeviceObjectEnumerator::Size() { if (!IsIndexReadyAndInRange()) return 0; return file_entries_[index_].file_size(); @@ -45,7 +45,7 @@ base::Time MTPDeviceObjectEnumerator::LastModifiedTime() { return base::Time::FromTimeT(file_entries_[index_].modification_time()); } -bool MTPDeviceObjectEnumerator::GetEntryId(uint32* entry_id) const { +bool MTPDeviceObjectEnumerator::GetEntryId(uint32_t* entry_id) const { DCHECK(entry_id); if (!IsIndexReadyAndInRange()) return false; diff --git a/chrome/browser/media_galleries/linux/mtp_device_object_enumerator.h b/chrome/browser/media_galleries/linux/mtp_device_object_enumerator.h index f6ea42f..785e90d 100644 --- a/chrome/browser/media_galleries/linux/mtp_device_object_enumerator.h +++ b/chrome/browser/media_galleries/linux/mtp_device_object_enumerator.h @@ -5,9 +5,13 @@ #ifndef CHROME_BROWSER_MEDIA_GALLERIES_LINUX_MTP_DEVICE_OBJECT_ENUMERATOR_H_ #define CHROME_BROWSER_MEDIA_GALLERIES_LINUX_MTP_DEVICE_OBJECT_ENUMERATOR_H_ +#include <stddef.h> +#include <stdint.h> + #include <vector> #include "base/files/file_path.h" +#include "base/macros.h" #include "base/time/time.h" #include "device/media_transfer_protocol/mtp_file_entry.pb.h" @@ -19,13 +23,13 @@ class MTPDeviceObjectEnumerator { ~MTPDeviceObjectEnumerator(); base::FilePath Next(); - int64 Size(); + int64_t Size(); bool IsDirectory(); base::Time LastModifiedTime(); // If the current file entry is valid, returns true and fills in |entry_id| // with the entry identifier else returns false and |entry_id| is not set. - bool GetEntryId(uint32* entry_id) const; + bool GetEntryId(uint32_t* entry_id) const; private: // Returns true if the enumerator has more entries to traverse, false diff --git a/chrome/browser/media_galleries/linux/mtp_device_object_enumerator_unittest.cc b/chrome/browser/media_galleries/linux/mtp_device_object_enumerator_unittest.cc index 77e14b4..ae15310 100644 --- a/chrome/browser/media_galleries/linux/mtp_device_object_enumerator_unittest.cc +++ b/chrome/browser/media_galleries/linux/mtp_device_object_enumerator_unittest.cc @@ -2,6 +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 <stdint.h> + +#include "base/macros.h" #include "chrome/browser/media_galleries/linux/mtp_device_object_enumerator.h" #include "testing/gtest/include/gtest/gtest.h" @@ -9,7 +13,7 @@ namespace { struct MtpFileEntryData { const char* const name; - int64 size; + int64_t size; bool is_directory; time_t modification_time; }; diff --git a/chrome/browser/media_galleries/linux/mtp_device_task_helper.h b/chrome/browser/media_galleries/linux/mtp_device_task_helper.h index 2a73e17..c4d33e2 100644 --- a/chrome/browser/media_galleries/linux/mtp_device_task_helper.h +++ b/chrome/browser/media_galleries/linux/mtp_device_task_helper.h @@ -5,12 +5,14 @@ #ifndef CHROME_BROWSER_MEDIA_GALLERIES_LINUX_MTP_DEVICE_TASK_HELPER_H_ #define CHROME_BROWSER_MEDIA_GALLERIES_LINUX_MTP_DEVICE_TASK_HELPER_H_ +#include <stddef.h> #include <stdint.h> #include <string> #include <vector> #include "base/callback.h" +#include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "base/memory/weak_ptr.h" #include "chrome/browser/media_galleries/fileapi/mtp_device_async_delegate.h" @@ -78,12 +80,12 @@ class MTPDeviceTaskHelper { // // If there is an error, |error_callback| is invoked on the IO thread to // notify the caller about the file error. - void GetFileInfo(uint32 file_id, + void GetFileInfo(uint32_t file_id, const GetFileInfoSuccessCallback& success_callback, const ErrorCallback& error_callback); // Forwards CreateDirectory request to the MediaTransferProtocolManager. - void CreateDirectory(const uint32 parent_id, + void CreateDirectory(const uint32_t parent_id, const std::string& directory_name, const CreateDirectorySuccessCallback& success_callback, const ErrorCallback& error_callback); @@ -100,7 +102,7 @@ class MTPDeviceTaskHelper { // // If there is an error, |error_callback| is invoked on the IO thread to // notify the caller about the file error. - void ReadDirectory(const uint32 directory_id, + void ReadDirectory(const uint32_t directory_id, const size_t max_size, const ReadDirectorySuccessCallback& success_callback, const ErrorCallback& error_callback); @@ -122,7 +124,7 @@ class MTPDeviceTaskHelper { void ReadBytes(const MTPDeviceAsyncDelegate::ReadBytesRequest& request); // Forwards RenameObject request to the MediaTransferProtocolManager. - void RenameObject(const uint32 object_id, + void RenameObject(const uint32_t object_id, const std::string& new_name, const RenameObjectSuccessCallback& success_callback, const ErrorCallback& error_callback); @@ -131,13 +133,13 @@ class MTPDeviceTaskHelper { void CopyFileFromLocal( const std::string& storage_name, const int source_file_descriptor, - const uint32 parent_id, + const uint32_t parent_id, const std::string& file_name, const CopyFileFromLocalSuccessCallback& success_callback, const ErrorCallback& error_callback); // Forwards DeleteObject request to the MediaTransferProtocolManager. - void DeleteObject(const uint32 object_id, + void DeleteObject(const uint32_t object_id, const DeleteObjectSuccessCallback& success_callback, const ErrorCallback& error_callback); diff --git a/chrome/browser/media_galleries/linux/mtp_device_task_helper_map_service.h b/chrome/browser/media_galleries/linux/mtp_device_task_helper_map_service.h index 6b02b09..21543f1 100644 --- a/chrome/browser/media_galleries/linux/mtp_device_task_helper_map_service.h +++ b/chrome/browser/media_galleries/linux/mtp_device_task_helper_map_service.h @@ -9,6 +9,7 @@ #include <string> #include "base/lazy_instance.h" +#include "base/macros.h" class MTPDeviceTaskHelper; diff --git a/chrome/browser/media_galleries/linux/mtp_read_file_worker.cc b/chrome/browser/media_galleries/linux/mtp_read_file_worker.cc index 5d11427..4d554f3 100644 --- a/chrome/browser/media_galleries/linux/mtp_read_file_worker.cc +++ b/chrome/browser/media_galleries/linux/mtp_read_file_worker.cc @@ -23,12 +23,12 @@ namespace { // the file thread. // Returns the number of bytes written to the snapshot file. In case of failure, // returns zero. -uint32 WriteDataChunkIntoSnapshotFileOnFileThread( +uint32_t WriteDataChunkIntoSnapshotFileOnFileThread( const base::FilePath& snapshot_file_path, const std::string& data) { DCHECK_CURRENTLY_ON(content::BrowserThread::FILE); return base::AppendToFile(snapshot_file_path, data.c_str(), data.size()) - ? base::checked_cast<uint32>(data.size()) + ? base::checked_cast<uint32_t>(data.size()) : 0; } @@ -103,7 +103,7 @@ void MTPReadFileWorker::OnDidReadDataChunkFromDeviceFile( void MTPReadFileWorker::OnDidWriteDataChunkIntoSnapshotFile( scoped_ptr<SnapshotFileDetails> snapshot_file_details, - uint32 bytes_written) { + uint32_t bytes_written) { DCHECK_CURRENTLY_ON(content::BrowserThread::UI); DCHECK(snapshot_file_details.get()); if (snapshot_file_details->AddBytesWritten(bytes_written)) { diff --git a/chrome/browser/media_galleries/linux/mtp_read_file_worker.h b/chrome/browser/media_galleries/linux/mtp_read_file_worker.h index 0b86e29..f11e0fb 100644 --- a/chrome/browser/media_galleries/linux/mtp_read_file_worker.h +++ b/chrome/browser/media_galleries/linux/mtp_read_file_worker.h @@ -5,10 +5,13 @@ #ifndef CHROME_BROWSER_MEDIA_GALLERIES_LINUX_MTP_READ_FILE_WORKER_H_ #define CHROME_BROWSER_MEDIA_GALLERIES_LINUX_MTP_READ_FILE_WORKER_H_ +#include <stdint.h> + #include <string> #include "base/callback.h" #include "base/files/file.h" +#include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "base/memory/weak_ptr.h" @@ -75,7 +78,7 @@ class MTPReadFileWorker { // If the write operation fails, |bytes_written| is set to zero. void OnDidWriteDataChunkIntoSnapshotFile( scoped_ptr<SnapshotFileDetails> snapshot_file_details, - uint32 bytes_written); + uint32_t bytes_written); // The device unique identifier to query the device. const std::string device_handle_; diff --git a/chrome/browser/media_galleries/linux/snapshot_file_details.h b/chrome/browser/media_galleries/linux/snapshot_file_details.h index e0e3c39..cd07e69 100644 --- a/chrome/browser/media_galleries/linux/snapshot_file_details.h +++ b/chrome/browser/media_galleries/linux/snapshot_file_details.h @@ -12,6 +12,7 @@ #include "base/callback.h" #include "base/files/file.h" #include "base/files/file_path.h" +#include "base/macros.h" #include "chrome/browser/media_galleries/fileapi/mtp_device_async_delegate.h" // Used to represent snapshot file request params. diff --git a/chrome/browser/media_galleries/mac/mtp_device_delegate_impl_mac.h b/chrome/browser/media_galleries/mac/mtp_device_delegate_impl_mac.h index c92da81..b200571 100644 --- a/chrome/browser/media_galleries/mac/mtp_device_delegate_impl_mac.h +++ b/chrome/browser/media_galleries/mac/mtp_device_delegate_impl_mac.h @@ -5,6 +5,8 @@ #ifndef CHROME_BROWSER_MEDIA_GALLERIES_MAC_MTP_DEVICE_DELEGATE_IMPL_MAC_H_ #define CHROME_BROWSER_MEDIA_GALLERIES_MAC_MTP_DEVICE_DELEGATE_IMPL_MAC_H_ +#include <stdint.h> + #include <list> #include <map> #include <vector> @@ -12,6 +14,7 @@ #include "base/containers/hash_tables.h" #include "base/files/file.h" #include "base/files/file_path.h" +#include "base/macros.h" #include "base/memory/weak_ptr.h" #include "chrome/browser/media_galleries/fileapi/mtp_device_async_delegate.h" @@ -56,7 +59,7 @@ class MTPDeviceDelegateImplMac : public MTPDeviceAsyncDelegate { bool IsStreaming() override; void ReadBytes(const base::FilePath& device_file_path, const scoped_refptr<net::IOBuffer>& buf, - int64 offset, + int64_t offset, int buf_len, const ReadBytesSuccessCallback& success_callback, const ErrorCallback& error_callback) override; diff --git a/chrome/browser/media_galleries/mac/mtp_device_delegate_impl_mac.mm b/chrome/browser/media_galleries/mac/mtp_device_delegate_impl_mac.mm index 743866b..7f33184 100644 --- a/chrome/browser/media_galleries/mac/mtp_device_delegate_impl_mac.mm +++ b/chrome/browser/media_galleries/mac/mtp_device_delegate_impl_mac.mm @@ -4,9 +4,12 @@ #include "chrome/browser/media_galleries/mac/mtp_device_delegate_impl_mac.h" +#include <stddef.h> + #include <algorithm> #include "base/mac/scoped_nsobject.h" +#include "base/macros.h" #include "base/threading/sequenced_worker_pool.h" #include "components/storage_monitor/image_capture_device.h" #include "components/storage_monitor/image_capture_device_manager.h" @@ -211,7 +214,7 @@ bool MTPDeviceDelegateImplMac::IsStreaming() { void MTPDeviceDelegateImplMac::ReadBytes( const base::FilePath& device_file_path, const scoped_refptr<net::IOBuffer>& buf, - int64 offset, + int64_t offset, int buf_len, const ReadBytesSuccessCallback& success_callback, const ErrorCallback& error_callback) { diff --git a/chrome/browser/media_galleries/mac/mtp_device_delegate_impl_mac_unittest.mm b/chrome/browser/media_galleries/mac/mtp_device_delegate_impl_mac_unittest.mm index e418d65..c658c42 100644 --- a/chrome/browser/media_galleries/mac/mtp_device_delegate_impl_mac_unittest.mm +++ b/chrome/browser/media_galleries/mac/mtp_device_delegate_impl_mac_unittest.mm @@ -12,6 +12,7 @@ #include "base/mac/foundation_util.h" #include "base/mac/scoped_nsobject.h" #include "base/mac/sdk_forward_declarations.h" +#include "base/macros.h" #include "base/message_loop/message_loop.h" #include "base/run_loop.h" #include "base/strings/sys_string_conversions.h" diff --git a/chrome/browser/media_galleries/media_file_system_registry.cc b/chrome/browser/media_galleries/media_file_system_registry.cc index f16b9ac..7907ddd 100644 --- a/chrome/browser/media_galleries/media_file_system_registry.cc +++ b/chrome/browser/media_galleries/media_file_system_registry.cc @@ -4,12 +4,15 @@ #include "chrome/browser/media_galleries/media_file_system_registry.h" +#include <stddef.h> + #include <set> #include <vector> #include "base/bind.h" #include "base/callback.h" #include "base/files/file_path.h" +#include "base/macros.h" #include "base/prefs/pref_service.h" #include "base/stl_util.h" #include "chrome/browser/media_galleries/fileapi/media_file_system_backend.h" diff --git a/chrome/browser/media_galleries/media_file_system_registry.h b/chrome/browser/media_galleries/media_file_system_registry.h index 082f76b..7add905 100644 --- a/chrome/browser/media_galleries/media_file_system_registry.h +++ b/chrome/browser/media_galleries/media_file_system_registry.h @@ -13,9 +13,9 @@ #include <utility> #include <vector> -#include "base/basictypes.h" #include "base/files/file.h" #include "base/files/file_path.h" +#include "base/macros.h" #include "base/memory/ref_counted.h" #include "base/memory/scoped_ptr.h" #include "chrome/browser/media_galleries/media_galleries_preferences.h" diff --git a/chrome/browser/media_galleries/media_file_system_registry_unittest.cc b/chrome/browser/media_galleries/media_file_system_registry_unittest.cc index cebd0a0..a6fcaeb 100644 --- a/chrome/browser/media_galleries/media_file_system_registry_unittest.cc +++ b/chrome/browser/media_galleries/media_file_system_registry_unittest.cc @@ -4,6 +4,8 @@ // MediaFileSystemRegistry unit tests. +#include <stddef.h> + #include <algorithm> #include <set> @@ -11,6 +13,7 @@ #include "base/command_line.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 "base/memory/scoped_ptr.h" #include "base/memory/scoped_vector.h" @@ -22,6 +25,7 @@ #include "base/strings/utf_string_conversions.h" #include "base/threading/sequenced_worker_pool.h" #include "base/values.h" +#include "build/build_config.h" #include "chrome/browser/extensions/extension_service.h" #include "chrome/browser/extensions/test_extension_system.h" #include "chrome/browser/media_galleries/media_file_system_context.h" diff --git a/chrome/browser/media_galleries/media_folder_finder.cc b/chrome/browser/media_galleries/media_folder_finder.cc index 0a14c22..249bfe1 100644 --- a/chrome/browser/media_galleries/media_folder_finder.cc +++ b/chrome/browser/media_galleries/media_folder_finder.cc @@ -4,17 +4,22 @@ #include "chrome/browser/media_galleries/media_folder_finder.h" +#include <stddef.h> +#include <stdint.h> + #include <algorithm> #include <set> #include "base/files/file_enumerator.h" #include "base/files/file_util.h" +#include "base/macros.h" #include "base/path_service.h" #include "base/sequence_checker.h" #include "base/stl_util.h" #include "base/strings/string_util.h" #include "base/task_runner_util.h" #include "base/threading/sequenced_worker_pool.h" +#include "build/build_config.h" #include "chrome/browser/extensions/api/file_system/file_system_api.h" #include "chrome/browser/media_galleries/fileapi/media_path_filter.h" #include "chrome/common/chrome_paths.h" @@ -35,9 +40,9 @@ using content::BrowserThread; namespace { -const int64 kMinimumImageSize = 200 * 1024; // 200 KB -const int64 kMinimumAudioSize = 500 * 1024; // 500 KB -const int64 kMinimumVideoSize = 1024 * 1024; // 1 MB +const int64_t kMinimumImageSize = 200 * 1024; // 200 KB +const int64_t kMinimumAudioSize = 500 * 1024; // 500 KB +const int64_t kMinimumVideoSize = 1024 * 1024; // 1 MB const int kPrunedPaths[] = { #if defined(OS_WIN) @@ -75,7 +80,7 @@ void CountScanResult(MediaGalleryScanFileType type, scan_result->video_count += 1; } -bool FileMeetsSizeRequirement(MediaGalleryScanFileType type, int64 size) { +bool FileMeetsSizeRequirement(MediaGalleryScanFileType type, int64_t size) { if (type & MEDIA_GALLERY_SCAN_FILE_TYPE_IMAGE) if (size >= kMinimumImageSize) return true; diff --git a/chrome/browser/media_galleries/media_folder_finder.h b/chrome/browser/media_galleries/media_folder_finder.h index 8a503e0..53e3978 100644 --- a/chrome/browser/media_galleries/media_folder_finder.h +++ b/chrome/browser/media_galleries/media_folder_finder.h @@ -10,6 +10,7 @@ #include "base/callback.h" #include "base/files/file_path.h" +#include "base/macros.h" #include "base/memory/ref_counted.h" #include "base/memory/weak_ptr.h" #include "base/sequenced_task_runner.h" diff --git a/chrome/browser/media_galleries/media_folder_finder_unittest.cc b/chrome/browser/media_galleries/media_folder_finder_unittest.cc index 3f35d4b..b114be6 100644 --- a/chrome/browser/media_galleries/media_folder_finder_unittest.cc +++ b/chrome/browser/media_galleries/media_folder_finder_unittest.cc @@ -4,6 +4,8 @@ #include "chrome/browser/media_galleries/media_folder_finder.h" +#include <stddef.h> + #include <set> #include <string> @@ -11,9 +13,11 @@ #include "base/bind.h" #include "base/files/file_util.h" #include "base/files/scoped_temp_dir.h" +#include "base/macros.h" #include "base/strings/stringprintf.h" #include "base/test/scoped_path_override.h" #include "base/threading/sequenced_worker_pool.h" +#include "build/build_config.h" #include "chrome/browser/media_galleries/media_scan_types.h" #include "chrome/common/chrome_paths.h" #include "content/public/browser/browser_thread.h" diff --git a/chrome/browser/media_galleries/media_galleries_dialog_controller.h b/chrome/browser/media_galleries/media_galleries_dialog_controller.h index c8e016e..969dbcb 100644 --- a/chrome/browser/media_galleries/media_galleries_dialog_controller.h +++ b/chrome/browser/media_galleries/media_galleries_dialog_controller.h @@ -5,8 +5,11 @@ #ifndef CHROME_BROWSER_MEDIA_GALLERIES_MEDIA_GALLERIES_DIALOG_CONTROLLER_H_ #define CHROME_BROWSER_MEDIA_GALLERIES_MEDIA_GALLERIES_DIALOG_CONTROLLER_H_ +#include <stddef.h> + #include <vector> +#include "base/macros.h" #include "base/strings/string16.h" #include "chrome/browser/media_galleries/media_galleries_preferences.h" diff --git a/chrome/browser/media_galleries/media_galleries_dialog_controller_mock.h b/chrome/browser/media_galleries/media_galleries_dialog_controller_mock.h index d783b70..02369ad 100644 --- a/chrome/browser/media_galleries/media_galleries_dialog_controller_mock.h +++ b/chrome/browser/media_galleries/media_galleries_dialog_controller_mock.h @@ -5,6 +5,8 @@ #ifndef CHROME_BROWSER_MEDIA_GALLERIES_MEDIA_GALLERIES_DIALOG_CONTROLLER_MOCK_H_ #define CHROME_BROWSER_MEDIA_GALLERIES_MEDIA_GALLERIES_DIALOG_CONTROLLER_MOCK_H_ +#include <stddef.h> + #include "chrome/browser/media_galleries/media_galleries_dialog_controller.h" #include "testing/gmock/include/gmock/gmock.h" diff --git a/chrome/browser/media_galleries/media_galleries_dialog_controller_test_util.h b/chrome/browser/media_galleries/media_galleries_dialog_controller_test_util.h index 2c9f571..d20a6cb 100644 --- a/chrome/browser/media_galleries/media_galleries_dialog_controller_test_util.h +++ b/chrome/browser/media_galleries/media_galleries_dialog_controller_test_util.h @@ -6,6 +6,7 @@ #define CHROME_BROWSER_MEDIA_GALLERIES_MEDIA_GALLERIES_DIALOG_CONTROLLER_TEST_UTIL_H_ #include "base/callback.h" +#include "base/macros.h" #include "chrome/browser/media_galleries/media_galleries_dialog_controller.h" class MockMediaGalleriesDialog : public MediaGalleriesDialog { diff --git a/chrome/browser/media_galleries/media_galleries_permission_controller.h b/chrome/browser/media_galleries/media_galleries_permission_controller.h index f23205e..a299106 100644 --- a/chrome/browser/media_galleries/media_galleries_permission_controller.h +++ b/chrome/browser/media_galleries/media_galleries_permission_controller.h @@ -5,11 +5,14 @@ #ifndef CHROME_BROWSER_MEDIA_GALLERIES_MEDIA_GALLERIES_PERMISSION_CONTROLLER_H_ #define CHROME_BROWSER_MEDIA_GALLERIES_MEDIA_GALLERIES_PERMISSION_CONTROLLER_H_ +#include <stddef.h> + #include <map> #include <string> #include <vector> #include "base/callback.h" +#include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "base/strings/string16.h" #include "chrome/browser/media_galleries/media_galleries_dialog_controller.h" diff --git a/chrome/browser/media_galleries/media_galleries_permission_controller_unittest.cc b/chrome/browser/media_galleries/media_galleries_permission_controller_unittest.cc index 3bdbfac..976be4e 100644 --- a/chrome/browser/media_galleries/media_galleries_permission_controller_unittest.cc +++ b/chrome/browser/media_galleries/media_galleries_permission_controller_unittest.cc @@ -5,10 +5,12 @@ #include "base/bind.h" #include "base/command_line.h" #include "base/files/file_path.h" +#include "base/macros.h" #include "base/run_loop.h" #include "base/strings/string16.h" #include "base/strings/string_util.h" #include "base/strings/utf_string_conversions.h" +#include "build/build_config.h" #include "chrome/browser/extensions/test_extension_system.h" #include "chrome/browser/media_galleries/media_galleries_dialog_controller_test_util.h" #include "chrome/browser/media_galleries/media_galleries_permission_controller.h" diff --git a/chrome/browser/media_galleries/media_galleries_permissions_unittest.cc b/chrome/browser/media_galleries/media_galleries_permissions_unittest.cc index 7393f4a..7854bd6 100644 --- a/chrome/browser/media_galleries/media_galleries_permissions_unittest.cc +++ b/chrome/browser/media_galleries/media_galleries_permissions_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/run_loop.h" #include "chrome/browser/extensions/extension_prefs_unittest.h" diff --git a/chrome/browser/media_galleries/media_galleries_preferences.cc b/chrome/browser/media_galleries/media_galleries_preferences.cc index 553f736..be3746b 100644 --- a/chrome/browser/media_galleries/media_galleries_preferences.cc +++ b/chrome/browser/media_galleries/media_galleries_preferences.cc @@ -4,9 +4,12 @@ #include "chrome/browser/media_galleries/media_galleries_preferences.h" +#include <stddef.h> + #include "base/base_paths_posix.h" #include "base/callback.h" #include "base/i18n/time_formatting.h" +#include "base/macros.h" #include "base/path_service.h" #include "base/prefs/pref_service.h" #include "base/prefs/scoped_user_pref_update.h" @@ -15,6 +18,7 @@ #include "base/strings/string_number_conversions.h" #include "base/strings/utf_string_conversions.h" #include "base/values.h" +#include "build/build_config.h" #include "chrome/browser/browser_process.h" #include "chrome/browser/media_galleries/fileapi/iapps_finder.h" #include "chrome/browser/media_galleries/fileapi/picasa_finder.h" @@ -841,7 +845,7 @@ MediaGalleryPrefId MediaGalleriesPreferences::AddGallery( const base::string16& volume_label, const base::string16& vendor_name, const base::string16& model_name, - uint64 total_size_in_bytes, + uint64_t total_size_in_bytes, base::Time last_attach_time, int audio_count, int image_count, @@ -866,12 +870,20 @@ MediaGalleryPrefId MediaGalleriesPreferences::AddGallery( } MediaGalleryPrefId MediaGalleriesPreferences::AddOrUpdateGalleryInternal( - const std::string& device_id, const base::string16& display_name, - const base::FilePath& relative_path, MediaGalleryPrefInfo::Type type, - const base::string16& volume_label, const base::string16& vendor_name, - const base::string16& model_name, uint64 total_size_in_bytes, - base::Time last_attach_time, bool volume_metadata_valid, - int audio_count, int image_count, int video_count, int prefs_version, + const std::string& device_id, + const base::string16& display_name, + const base::FilePath& relative_path, + MediaGalleryPrefInfo::Type type, + const base::string16& volume_label, + const base::string16& vendor_name, + const base::string16& model_name, + uint64_t total_size_in_bytes, + base::Time last_attach_time, + bool volume_metadata_valid, + int audio_count, + int image_count, + int video_count, + int prefs_version, MediaGalleryPrefInfo::DefaultGalleryType default_gallery_type) { DCHECK(type == MediaGalleryPrefInfo::kUserAdded || type == MediaGalleryPrefInfo::kAutoDetected || @@ -1289,7 +1301,7 @@ const MediaGalleriesPrefInfoMap& MediaGalleriesPreferences::known_galleries() } base::Time MediaGalleriesPreferences::GetLastScanCompletionTime() const { - int64 last_scan_time_internal = + int64_t last_scan_time_internal = profile_->GetPrefs()->GetInt64(prefs::kMediaGalleriesLastScanTime); return base::Time::FromInternalValue(last_scan_time_internal); } diff --git a/chrome/browser/media_galleries/media_galleries_preferences.h b/chrome/browser/media_galleries/media_galleries_preferences.h index c60c75a..000bebd 100644 --- a/chrome/browser/media_galleries/media_galleries_preferences.h +++ b/chrome/browser/media_galleries/media_galleries_preferences.h @@ -5,14 +5,16 @@ #ifndef CHROME_BROWSER_MEDIA_GALLERIES_MEDIA_GALLERIES_PREFERENCES_H_ #define CHROME_BROWSER_MEDIA_GALLERIES_MEDIA_GALLERIES_PREFERENCES_H_ +#include <stdint.h> + #include <map> #include <set> #include <string> #include <vector> -#include "base/basictypes.h" #include "base/callback_forward.h" #include "base/files/file_path.h" +#include "base/macros.h" #include "base/memory/weak_ptr.h" #include "base/observer_list.h" #include "base/strings/string16.h" @@ -35,7 +37,7 @@ namespace user_prefs { class PrefRegistrySyncable; } -typedef uint64 MediaGalleryPrefId; +typedef uint64_t MediaGalleryPrefId; const MediaGalleryPrefId kInvalidMediaGalleryPrefId = 0; const char kMediaGalleriesPrefsVersionKey[] = "preferencesVersion"; @@ -103,7 +105,7 @@ struct MediaGalleryPrefInfo { // The capacity in bytes of the volume/device on which the gallery is // located. Will be zero if unknown. - uint64 total_size_in_bytes; + uint64_t total_size_in_bytes; // If the gallery is on a removable device, the time that device was last // attached. It is stored in preferences by the base::Time internal value, @@ -233,7 +235,7 @@ class MediaGalleriesPreferences const base::string16& volume_label, const base::string16& vendor_name, const base::string16& model_name, - uint64 total_size_in_bytes, + uint64_t total_size_in_bytes, base::Time last_attach_time, int audio_count, int image_count, @@ -330,7 +332,7 @@ class MediaGalleriesPreferences const base::string16& volume_label, const base::string16& vendor_name, const base::string16& model_name, - uint64 total_size_in_bytes, + uint64_t total_size_in_bytes, base::Time last_attach_time, bool volume_metadata_valid, int audio_count, diff --git a/chrome/browser/media_galleries/media_galleries_preferences_factory.h b/chrome/browser/media_galleries/media_galleries_preferences_factory.h index bd94e8a..a971d2c 100644 --- a/chrome/browser/media_galleries/media_galleries_preferences_factory.h +++ b/chrome/browser/media_galleries/media_galleries_preferences_factory.h @@ -5,7 +5,7 @@ #ifndef CHROME_BROWSER_MEDIA_GALLERIES_MEDIA_GALLERIES_PREFERENCES_FACTORY_H_ #define CHROME_BROWSER_MEDIA_GALLERIES_MEDIA_GALLERIES_PREFERENCES_FACTORY_H_ -#include "base/basictypes.h" +#include "base/macros.h" #include "base/memory/singleton.h" #include "components/keyed_service/content/browser_context_keyed_service_factory.h" diff --git a/chrome/browser/media_galleries/media_galleries_preferences_unittest.cc b/chrome/browser/media_galleries/media_galleries_preferences_unittest.cc index 3c8775e..9453f29 100644 --- a/chrome/browser/media_galleries/media_galleries_preferences_unittest.cc +++ b/chrome/browser/media_galleries/media_galleries_preferences_unittest.cc @@ -6,10 +6,13 @@ #include "chrome/browser/media_galleries/media_galleries_preferences.h" +#include <stdint.h> + #include <string> #include <vector> #include "base/command_line.h" +#include "base/macros.h" #include "base/memory/ref_counted.h" #include "base/memory/scoped_ptr.h" #include "base/path_service.h" @@ -17,6 +20,7 @@ #include "base/run_loop.h" #include "base/strings/utf_string_conversions.h" #include "base/values.h" +#include "build/build_config.h" #include "chrome/browser/extensions/test_extension_system.h" #include "chrome/browser/media_galleries/media_file_system_registry.h" #include "chrome/browser/media_galleries/media_galleries_test_util.h" @@ -260,9 +264,7 @@ class MediaGalleriesPreferencesTest : public testing::Test { return gallery_prefs_.get(); } - uint64 default_galleries_count() { - return default_galleries_count_; - } + uint64_t default_galleries_count() { return default_galleries_count_; } void AddGalleryExpectation(MediaGalleryPrefId id, base::string16 display_name, std::string device_id, @@ -377,7 +379,7 @@ class MediaGalleriesPreferencesTest : public testing::Test { scoped_ptr<TestingProfile> profile_; scoped_ptr<MediaGalleriesPreferences> gallery_prefs_; - uint64 default_galleries_count_; + uint64_t default_galleries_count_; DISALLOW_COPY_AND_ASSIGN(MediaGalleriesPreferencesTest); }; diff --git a/chrome/browser/media_galleries/media_galleries_scan_result_controller.h b/chrome/browser/media_galleries/media_galleries_scan_result_controller.h index efacc9d..3774acd 100644 --- a/chrome/browser/media_galleries/media_galleries_scan_result_controller.h +++ b/chrome/browser/media_galleries/media_galleries_scan_result_controller.h @@ -5,11 +5,14 @@ #ifndef CHROME_BROWSER_MEDIA_GALLERIES_MEDIA_GALLERIES_SCAN_RESULT_CONTROLLER_H_ #define CHROME_BROWSER_MEDIA_GALLERIES_MEDIA_GALLERIES_SCAN_RESULT_CONTROLLER_H_ +#include <stddef.h> + #include <map> #include <set> #include <string> #include "base/callback.h" +#include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "base/strings/string16.h" #include "chrome/browser/media_galleries/media_galleries_dialog_controller.h" diff --git a/chrome/browser/media_galleries/media_galleries_scan_result_controller_unittest.cc b/chrome/browser/media_galleries/media_galleries_scan_result_controller_unittest.cc index 1fea8f0..c84f4f0 100644 --- a/chrome/browser/media_galleries/media_galleries_scan_result_controller_unittest.cc +++ b/chrome/browser/media_galleries/media_galleries_scan_result_controller_unittest.cc @@ -2,15 +2,19 @@ // 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/bind.h" #include "base/command_line.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/run_loop.h" #include "base/strings/string16.h" #include "base/strings/utf_string_conversions.h" #include "base/time/time.h" +#include "build/build_config.h" #include "chrome/browser/extensions/test_extension_system.h" #include "chrome/browser/media_galleries/media_galleries_dialog_controller_test_util.h" #include "chrome/browser/media_galleries/media_galleries_preferences.h" diff --git a/chrome/browser/media_galleries/media_galleries_test_util.cc b/chrome/browser/media_galleries/media_galleries_test_util.cc index 1c4dc4a..1c98c86 100644 --- a/chrome/browser/media_galleries/media_galleries_test_util.cc +++ b/chrome/browser/media_galleries/media_galleries_test_util.cc @@ -4,9 +4,7 @@ #include "chrome/browser/media_galleries/media_galleries_test_util.h" -#if defined(OS_WIN) -#include <windows.h> -#endif +#include <stddef.h> #include "base/base_paths.h" #include "base/files/file_path.h" @@ -14,6 +12,7 @@ #include "base/path_service.h" #include "base/strings/string_number_conversions.h" #include "base/strings/stringprintf.h" +#include "build/build_config.h" #include "chrome/browser/extensions/extension_service.h" #include "chrome/browser/media_galleries/fileapi/picasa_finder.h" #include "chrome/browser/profiles/profile.h" @@ -32,6 +31,7 @@ #endif // OS_MACOSX #if defined(OS_WIN) +#include <windows.h> #include "base/test/test_reg_util_win.h" #include "base/win/registry.h" #endif // OS_WIN diff --git a/chrome/browser/media_galleries/media_galleries_test_util.h b/chrome/browser/media_galleries/media_galleries_test_util.h index 599aa24..5181601 100644 --- a/chrome/browser/media_galleries/media_galleries_test_util.h +++ b/chrome/browser/media_galleries/media_galleries_test_util.h @@ -8,11 +8,12 @@ #include <string> #include <vector> -#include "base/basictypes.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 "base/test/scoped_path_override.h" +#include "build/build_config.h" #if defined(OS_WIN) #include "base/test/test_reg_util_win.h" diff --git a/chrome/browser/media_galleries/media_gallery_context_menu.h b/chrome/browser/media_galleries/media_gallery_context_menu.h index 05fcf99..35bc8c6 100644 --- a/chrome/browser/media_galleries/media_gallery_context_menu.h +++ b/chrome/browser/media_galleries/media_gallery_context_menu.h @@ -5,8 +5,8 @@ #ifndef CHROME_BROWSER_MEDIA_GALLERIES_MEDIA_GALLERY_CONTEXT_MENU_H_ #define CHROME_BROWSER_MEDIA_GALLERIES_MEDIA_GALLERY_CONTEXT_MENU_H_ -#include "base/basictypes.h" #include "base/callback.h" +#include "base/macros.h" #include "chrome/browser/media_galleries/media_galleries_preferences.h" #include "ui/base/models/simple_menu_model.h" diff --git a/chrome/browser/media_galleries/media_scan_manager.cc b/chrome/browser/media_galleries/media_scan_manager.cc index d86bd8c..0201cad 100644 --- a/chrome/browser/media_galleries/media_scan_manager.cc +++ b/chrome/browser/media_galleries/media_scan_manager.cc @@ -4,6 +4,8 @@ #include "chrome/browser/media_galleries/media_scan_manager.h" +#include <stddef.h> + #include "base/files/file_enumerator.h" #include "base/files/file_util.h" #include "base/logging.h" diff --git a/chrome/browser/media_galleries/media_scan_manager.h b/chrome/browser/media_galleries/media_scan_manager.h index bbfc10c..51c717a 100644 --- a/chrome/browser/media_galleries/media_scan_manager.h +++ b/chrome/browser/media_galleries/media_scan_manager.h @@ -9,8 +9,8 @@ #include <set> #include <string> -#include "base/basictypes.h" #include "base/compiler_specific.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/chrome/browser/media_galleries/media_scan_manager_observer.h b/chrome/browser/media_galleries/media_scan_manager_observer.h index 93f460a..e20cf16 100644 --- a/chrome/browser/media_galleries/media_scan_manager_observer.h +++ b/chrome/browser/media_galleries/media_scan_manager_observer.h @@ -7,7 +7,6 @@ #include <string> -#include "base/basictypes.h" #include "chrome/browser/media_galleries/media_scan_types.h" class MediaScanManagerObserver { diff --git a/chrome/browser/media_galleries/media_scan_manager_unittest.cc b/chrome/browser/media_galleries/media_scan_manager_unittest.cc index d2bb73f..1a6adc2 100644 --- a/chrome/browser/media_galleries/media_scan_manager_unittest.cc +++ b/chrome/browser/media_galleries/media_scan_manager_unittest.cc @@ -2,15 +2,19 @@ // 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/bind.h" #include "base/command_line.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/scoped_ptr.h" #include "base/run_loop.h" #include "base/test/scoped_path_override.h" +#include "build/build_config.h" #include "chrome/browser/extensions/test_extension_system.h" #include "chrome/browser/media_galleries/media_folder_finder.h" #include "chrome/browser/media_galleries/media_galleries_preferences.h" diff --git a/chrome/browser/media_galleries/win/mtp_device_delegate_impl_win.cc b/chrome/browser/media_galleries/win/mtp_device_delegate_impl_win.cc index b21cf6d..fe8898d 100644 --- a/chrome/browser/media_galleries/win/mtp_device_delegate_impl_win.cc +++ b/chrome/browser/media_galleries/win/mtp_device_delegate_impl_win.cc @@ -7,6 +7,7 @@ #include "chrome/browser/media_galleries/win/mtp_device_delegate_impl_win.h" #include <portabledevice.h> +#include <stddef.h> #include <vector> @@ -465,7 +466,7 @@ bool MTPDeviceDelegateImplWin::IsStreaming() { void MTPDeviceDelegateImplWin::ReadBytes( const base::FilePath& device_file_path, const scoped_refptr<net::IOBuffer>& buf, - int64 offset, + int64_t offset, int buf_len, const ReadBytesSuccessCallback& success_callback, const ErrorCallback& error_callback) { diff --git a/chrome/browser/media_galleries/win/mtp_device_delegate_impl_win.h b/chrome/browser/media_galleries/win/mtp_device_delegate_impl_win.h index 5a8282b..42612f92 100644 --- a/chrome/browser/media_galleries/win/mtp_device_delegate_impl_win.h +++ b/chrome/browser/media_galleries/win/mtp_device_delegate_impl_win.h @@ -5,11 +5,14 @@ #ifndef CHROME_BROWSER_MEDIA_GALLERIES_WIN_MTP_DEVICE_DELEGATE_IMPL_WIN_H_ #define CHROME_BROWSER_MEDIA_GALLERIES_WIN_MTP_DEVICE_DELEGATE_IMPL_WIN_H_ +#include <stdint.h> + #include <queue> #include "base/callback.h" #include "base/files/file.h" #include "base/location.h" +#include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "base/memory/weak_ptr.h" #include "base/strings/string16.h" @@ -112,7 +115,7 @@ class MTPDeviceDelegateImplWin : public MTPDeviceAsyncDelegate { bool IsStreaming() override; void ReadBytes(const base::FilePath& device_file_path, const scoped_refptr<net::IOBuffer>& buf, - int64 offset, + int64_t offset, int buf_len, const ReadBytesSuccessCallback& success_callback, const ErrorCallback& error_callback) override; diff --git a/chrome/browser/media_galleries/win/mtp_device_delegate_impl_win_unittest.cc b/chrome/browser/media_galleries/win/mtp_device_delegate_impl_win_unittest.cc index 48503ee..d6728a4 100644 --- a/chrome/browser/media_galleries/win/mtp_device_delegate_impl_win_unittest.cc +++ b/chrome/browser/media_galleries/win/mtp_device_delegate_impl_win_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 <vector> #include "base/command_line.h" diff --git a/chrome/browser/media_galleries/win/mtp_device_object_entry.cc b/chrome/browser/media_galleries/win/mtp_device_object_entry.cc index 4078fbb..61294ea 100644 --- a/chrome/browser/media_galleries/win/mtp_device_object_entry.cc +++ b/chrome/browser/media_galleries/win/mtp_device_object_entry.cc @@ -12,11 +12,10 @@ MTPDeviceObjectEntry::MTPDeviceObjectEntry() : is_directory(false), size(0) { MTPDeviceObjectEntry::MTPDeviceObjectEntry(const base::string16& object_id, const base::string16& object_name, bool is_directory, - int64 size, + int64_t size, const base::Time& last_modified_time) : object_id(object_id), name(object_name), is_directory(is_directory), size(size), - last_modified_time(last_modified_time) { -} + last_modified_time(last_modified_time) {} diff --git a/chrome/browser/media_galleries/win/mtp_device_object_entry.h b/chrome/browser/media_galleries/win/mtp_device_object_entry.h index b26652e..e182241 100644 --- a/chrome/browser/media_galleries/win/mtp_device_object_entry.h +++ b/chrome/browser/media_galleries/win/mtp_device_object_entry.h @@ -5,9 +5,10 @@ #ifndef CHROME_BROWSER_MEDIA_GALLERIES_WIN_MTP_DEVICE_OBJECT_ENTRY_H_ #define CHROME_BROWSER_MEDIA_GALLERIES_WIN_MTP_DEVICE_OBJECT_ENTRY_H_ +#include <stdint.h> + #include <vector> -#include "base/basictypes.h" #include "base/strings/string16.h" #include "base/time/time.h" @@ -19,7 +20,7 @@ struct MTPDeviceObjectEntry { MTPDeviceObjectEntry(const base::string16& object_id, const base::string16& object_name, bool is_directory, - int64 size, + int64_t size, const base::Time& last_modified_time); // The object identifier obtained using IEnumPortableDeviceObjectIDs::Next(), @@ -33,7 +34,7 @@ struct MTPDeviceObjectEntry { bool is_directory; // The object file size in bytes, e.g. "882992". - int64 size; + int64_t size; // Last modified time of the object. base::Time last_modified_time; diff --git a/chrome/browser/media_galleries/win/mtp_device_object_enumerator.cc b/chrome/browser/media_galleries/win/mtp_device_object_enumerator.cc index 5e3fc27..802f80a 100644 --- a/chrome/browser/media_galleries/win/mtp_device_object_enumerator.cc +++ b/chrome/browser/media_galleries/win/mtp_device_object_enumerator.cc @@ -33,7 +33,7 @@ base::FilePath MTPDeviceObjectEnumerator::Next() { return base::FilePath(object_entries_[index_].name); } -int64 MTPDeviceObjectEnumerator::Size() { +int64_t MTPDeviceObjectEnumerator::Size() { DCHECK(thread_checker_.CalledOnValidThread()); if (!IsIndexReadyAndInRange()) return 0; diff --git a/chrome/browser/media_galleries/win/mtp_device_object_enumerator.h b/chrome/browser/media_galleries/win/mtp_device_object_enumerator.h index a460f61..ffb0078 100644 --- a/chrome/browser/media_galleries/win/mtp_device_object_enumerator.h +++ b/chrome/browser/media_galleries/win/mtp_device_object_enumerator.h @@ -8,7 +8,11 @@ #ifndef CHROME_BROWSER_MEDIA_GALLERIES_WIN_MTP_DEVICE_OBJECT_ENUMERATOR_H_ #define CHROME_BROWSER_MEDIA_GALLERIES_WIN_MTP_DEVICE_OBJECT_ENUMERATOR_H_ +#include <stddef.h> +#include <stdint.h> + #include "base/files/file_path.h" +#include "base/macros.h" #include "base/threading/thread_checker.h" #include "base/time/time.h" #include "chrome/browser/media_galleries/win/mtp_device_object_entry.h" @@ -23,7 +27,7 @@ class MTPDeviceObjectEnumerator { ~MTPDeviceObjectEnumerator(); base::FilePath Next(); - int64 Size(); + int64_t Size(); bool IsDirectory(); base::Time LastModifiedTime(); diff --git a/chrome/browser/media_galleries/win/mtp_device_object_enumerator_unittest.cc b/chrome/browser/media_galleries/win/mtp_device_object_enumerator_unittest.cc index 1d6b66d..2caba53 100644 --- a/chrome/browser/media_galleries/win/mtp_device_object_enumerator_unittest.cc +++ b/chrome/browser/media_galleries/win/mtp_device_object_enumerator_unittest.cc @@ -6,9 +6,12 @@ #include "chrome/browser/media_galleries/win/mtp_device_object_enumerator.h" +#include <stddef.h> +#include <stdint.h> + #include <ctime> -#include "base/basictypes.h" +#include "base/macros.h" #include "base/strings/string16.h" #include "base/time/time.h" #include "chrome/browser/media_galleries/win/mtp_device_object_entry.h" @@ -27,7 +30,7 @@ struct MTPDeviceObjectEntryData { bool is_directory; // The object file size in bytes, e.g. "882992". - int64 size; + int64_t size; // Last modified time of the object. time_t last_modified_time; diff --git a/chrome/browser/media_galleries/win/mtp_device_operations_util.h b/chrome/browser/media_galleries/win/mtp_device_operations_util.h index 42aee00..1d0572b 100644 --- a/chrome/browser/media_galleries/win/mtp_device_operations_util.h +++ b/chrome/browser/media_galleries/win/mtp_device_operations_util.h @@ -12,6 +12,7 @@ #define CHROME_BROWSER_MEDIA_GALLERIES_WIN_MTP_DEVICE_OPERATIONS_UTIL_H_ #include <portabledeviceapi.h> +#include <stddef.h> #include <string> diff --git a/chrome/browser/media_galleries/win/portable_device_map_service.h b/chrome/browser/media_galleries/win/portable_device_map_service.h index a593ea8..0a7c44f 100644 --- a/chrome/browser/media_galleries/win/portable_device_map_service.h +++ b/chrome/browser/media_galleries/win/portable_device_map_service.h @@ -9,6 +9,7 @@ #include <map> #include "base/lazy_instance.h" +#include "base/macros.h" #include "base/strings/string16.h" #include "base/synchronization/lock.h" #include "base/win/scoped_comptr.h" diff --git a/chrome/browser/memory/oom_memory_details.cc b/chrome/browser/memory/oom_memory_details.cc index 0cdd438..6d46892 100644 --- a/chrome/browser/memory/oom_memory_details.cc +++ b/chrome/browser/memory/oom_memory_details.cc @@ -7,6 +7,7 @@ #include "base/logging.h" #include "base/process/process_metrics.h" #include "base/strings/utf_string_conversions.h" +#include "build/build_config.h" #include "chrome/browser/memory/oom_memory_details.h" #include "ui/base/text/bytes_formatting.h" diff --git a/chrome/browser/memory/tab_manager.cc b/chrome/browser/memory/tab_manager.cc index 1112bbd..aa2bee0 100644 --- a/chrome/browser/memory/tab_manager.cc +++ b/chrome/browser/memory/tab_manager.cc @@ -4,6 +4,8 @@ #include "chrome/browser/memory/tab_manager.h" +#include <stddef.h> + #include <algorithm> #include <set> #include <vector> @@ -14,6 +16,7 @@ #include "base/bind.h" #include "base/bind_helpers.h" #include "base/command_line.h" +#include "base/macros.h" #include "base/memory/memory_pressure_monitor.h" #include "base/metrics/field_trial.h" #include "base/metrics/histogram.h" @@ -75,18 +78,19 @@ const int kAudioProtectionTimeSeconds = 60; // Returns a unique ID for a WebContents. Do not cast back to a pointer, as // the WebContents could be deleted if the user closed the tab. -int64 IdFromWebContents(WebContents* web_contents) { - return reinterpret_cast<int64>(web_contents); +int64_t IdFromWebContents(WebContents* web_contents) { + return reinterpret_cast<int64_t>(web_contents); } -int FindTabStripModelById(int64 target_web_contents_id, TabStripModel** model) { +int FindTabStripModelById(int64_t target_web_contents_id, + TabStripModel** model) { DCHECK(model); for (chrome::BrowserIterator it; !it.done(); it.Next()) { Browser* browser = *it; TabStripModel* local_model = browser->tab_strip_model(); for (int idx = 0; idx < local_model->count(); idx++) { WebContents* web_contents = local_model->GetWebContentsAt(idx); - int64 web_contents_id = IdFromWebContents(web_contents); + int64_t web_contents_id = IdFromWebContents(web_contents); if (web_contents_id == target_web_contents_id) { *model = local_model; return idx; @@ -195,7 +199,7 @@ bool TabManager::DiscardTab() { // Loop until a non-discarded tab to kill is found. for (TabStatsList::const_reverse_iterator stats_rit = stats.rbegin(); stats_rit != stats.rend(); ++stats_rit) { - int64 least_important_tab_id = stats_rit->tab_contents_id; + int64_t least_important_tab_id = stats_rit->tab_contents_id; if (CanDiscardTab(least_important_tab_id) && DiscardTabById(least_important_tab_id)) return true; @@ -203,7 +207,7 @@ bool TabManager::DiscardTab() { return false; } -WebContents* TabManager::DiscardTabById(int64 target_web_contents_id) { +WebContents* TabManager::DiscardTabById(int64_t target_web_contents_id) { TabStripModel* model; int index = FindTabStripModelById(target_web_contents_id, &model); @@ -435,7 +439,7 @@ void TabManager::UpdateTimerCallback() { #endif } -bool TabManager::CanDiscardTab(int64 target_web_contents_id) const { +bool TabManager::CanDiscardTab(int64_t target_web_contents_id) const { TabStripModel* model; int idx = FindTabStripModelById(target_web_contents_id, &model); diff --git a/chrome/browser/memory/tab_manager.h b/chrome/browser/memory/tab_manager.h index 951319a..ed833981 100644 --- a/chrome/browser/memory/tab_manager.h +++ b/chrome/browser/memory/tab_manager.h @@ -5,15 +5,19 @@ #ifndef CHROME_BROWSER_MEMORY_TAB_MANAGER_H_ #define CHROME_BROWSER_MEMORY_TAB_MANAGER_H_ +#include <stdint.h> + #include <utility> #include <vector> #include "base/compiler_specific.h" #include "base/gtest_prod_util.h" +#include "base/macros.h" #include "base/memory/memory_pressure_listener.h" #include "base/memory/scoped_ptr.h" #include "base/strings/string16.h" #include "base/timer/timer.h" +#include "build/build_config.h" #include "chrome/browser/memory/tab_stats.h" #include "chrome/browser/ui/browser_tab_strip_tracker.h" #include "chrome/browser/ui/tabs/tab_strip_model_observer.h" @@ -82,7 +86,7 @@ class TabManager : public TabStripModelObserver { // Discards a tab with the given unique ID. The tab still exists in the // tab-strip; clicking on it will reload it. Returns true if it successfully // found a tab and discarded it. - content::WebContents* DiscardTabById(int64 target_web_contents_id); + content::WebContents* DiscardTabById(int64_t target_web_contents_id); // Log memory statistics for the running processes, then discards a tab. // Tab discard happens sometime later, as collecting the statistics touches @@ -134,7 +138,7 @@ class TabManager : public TabStripModelObserver { // Goes through a list of checks to see if a tab is allowed to be discarded by // the automatic tab discarding mechanism. Note that this is not used when // discarding a particular tab from about:discards. - bool CanDiscardTab(int64 target_web_contents_id) const; + bool CanDiscardTab(int64_t target_web_contents_id) const; // Does the actual discard by destroying the WebContents in |model| at |index| // and replacing it by an empty one. Returns the new WebContents or NULL if diff --git a/chrome/browser/memory/tab_manager_browsertest.cc b/chrome/browser/memory/tab_manager_browsertest.cc index 7eab6e5..ac02e06 100644 --- a/chrome/browser/memory/tab_manager_browsertest.cc +++ b/chrome/browser/memory/tab_manager_browsertest.cc @@ -5,6 +5,7 @@ #include "base/base_switches.h" #include "base/command_line.h" #include "base/memory/memory_pressure_listener.h" +#include "build/build_config.h" #include "chrome/browser/browser_process.h" #include "chrome/browser/memory/tab_manager.h" #include "chrome/browser/memory/tab_manager_web_contents_data.h" diff --git a/chrome/browser/memory/tab_manager_delegate_chromeos.h b/chrome/browser/memory/tab_manager_delegate_chromeos.h index a32b61d..f23bcb1 100644 --- a/chrome/browser/memory/tab_manager_delegate_chromeos.h +++ b/chrome/browser/memory/tab_manager_delegate_chromeos.h @@ -10,6 +10,7 @@ #include "base/containers/hash_tables.h" #include "base/gtest_prod_util.h" +#include "base/macros.h" #include "base/process/process.h" #include "base/timer/timer.h" #include "chrome/browser/memory/tab_manager.h" diff --git a/chrome/browser/memory/tab_manager_unittest.cc b/chrome/browser/memory/tab_manager_unittest.cc index 52bad28..2adae4a 100644 --- a/chrome/browser/memory/tab_manager_unittest.cc +++ b/chrome/browser/memory/tab_manager_unittest.cc @@ -8,8 +8,10 @@ #include <vector> #include "base/logging.h" +#include "base/macros.h" #include "base/strings/string16.h" #include "base/time/time.h" +#include "build/build_config.h" #include "chrome/browser/memory/tab_manager_web_contents_data.h" #include "chrome/browser/memory/tab_stats.h" #include "chrome/browser/profiles/profile.h" diff --git a/chrome/browser/memory/tab_stats.cc b/chrome/browser/memory/tab_stats.cc index 94f2f29..99565e3 100644 --- a/chrome/browser/memory/tab_stats.cc +++ b/chrome/browser/memory/tab_stats.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 "chrome/browser/memory/tab_stats.h" namespace memory { diff --git a/chrome/browser/memory/tab_stats.h b/chrome/browser/memory/tab_stats.h index 8f40c51..00de0e0 100644 --- a/chrome/browser/memory/tab_stats.h +++ b/chrome/browser/memory/tab_stats.h @@ -5,11 +5,14 @@ #ifndef CHROME_BROWSER_MEMORY_TAB_STATS_H_ #define CHROME_BROWSER_MEMORY_TAB_STATS_H_ +#include <stdint.h> + #include <vector> #include "base/process/process.h" #include "base/strings/string16.h" #include "base/time/time.h" +#include "build/build_config.h" namespace memory { @@ -31,7 +34,7 @@ struct TabStats { #if defined(OS_CHROMEOS) int oom_score; #endif - int64 tab_contents_id; // Unique ID per WebContents. + int64_t tab_contents_id; // Unique ID per WebContents. }; typedef std::vector<TabStats> TabStatsList; diff --git a/chrome/browser/memory_details.cc b/chrome/browser/memory_details.cc index b210f92..b53eb2d 100644 --- a/chrome/browser/memory_details.cc +++ b/chrome/browser/memory_details.cc @@ -13,6 +13,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 "chrome/browser/profiles/profile.h" #include "chrome/common/url_constants.h" #include "chrome/grit/generated_resources.h" diff --git a/chrome/browser/memory_details.h b/chrome/browser/memory_details.h index 02a9e6b..21965f4 100644 --- a/chrome/browser/memory_details.h +++ b/chrome/browser/memory_details.h @@ -9,11 +9,13 @@ #include <string> #include <vector> +#include "base/macros.h" #include "base/memory/ref_counted.h" #include "base/process/process_handle.h" #include "base/process/process_metrics.h" #include "base/strings/string16.h" #include "base/time/time.h" +#include "build/build_config.h" #include "chrome/browser/site_details.h" #include "content/public/common/process_type.h" diff --git a/chrome/browser/memory_details_linux.cc b/chrome/browser/memory_details_linux.cc index 469e3ae..ff8fef3 100644 --- a/chrome/browser/memory_details_linux.cc +++ b/chrome/browser/memory_details_linux.cc @@ -4,6 +4,7 @@ #include "chrome/browser/memory_details.h" +#include <stddef.h> #include <sys/types.h> #include <unistd.h> @@ -17,6 +18,7 @@ #include "base/strings/string_number_conversions.h" #include "base/strings/string_util.h" #include "base/strings/utf_string_conversions.h" +#include "build/build_config.h" #include "chrome/common/chrome_constants.h" #include "chrome/grit/chromium_strings.h" #include "content/public/browser/browser_thread.h" diff --git a/chrome/browser/memory_details_mac.cc b/chrome/browser/memory_details_mac.cc index 1443494..63c51c8 100644 --- a/chrome/browser/memory_details_mac.cc +++ b/chrome/browser/memory_details_mac.cc @@ -4,10 +4,11 @@ #include "chrome/browser/memory_details.h" +#include <stddef.h> + #include <set> #include <string> -#include "base/basictypes.h" #include "base/bind.h" #include "base/file_version_info.h" #include "base/files/file_path.h" diff --git a/chrome/browser/memory_details_win.cc b/chrome/browser/memory_details_win.cc index f8266d6..e0957bc 100644 --- a/chrome/browser/memory_details_win.cc +++ b/chrome/browser/memory_details_win.cc @@ -5,6 +5,7 @@ #include "chrome/browser/memory_details.h" #include <psapi.h> +#include <stddef.h> #include <TlHelp32.h> #include "base/bind.h" diff --git a/chrome/browser/metrics/android_metrics_provider.h b/chrome/browser/metrics/android_metrics_provider.h index 6582682..bdab08a 100644 --- a/chrome/browser/metrics/android_metrics_provider.h +++ b/chrome/browser/metrics/android_metrics_provider.h @@ -5,7 +5,7 @@ #ifndef CHROME_BROWSER_METRICS_ANDROID_METRICS_PROVIDER_H_ #define CHROME_BROWSER_METRICS_ANDROID_METRICS_PROVIDER_H_ -#include "base/basictypes.h" +#include "base/macros.h" #include "chrome/browser/android/activity_type_ids.h" #include "components/metrics/metrics_provider.h" diff --git a/chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.cc b/chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.cc index b2afea3..525ab33 100644 --- a/chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.cc +++ b/chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.cc @@ -9,11 +9,13 @@ #include "base/bind.h" #include "base/command_line.h" #include "base/cpu.h" +#include "base/macros.h" #include "base/metrics/histogram.h" #include "base/metrics/sparse_histogram.h" #include "base/sys_info.h" #include "base/threading/sequenced_worker_pool.h" #include "base/time/time.h" +#include "build/build_config.h" #include "chrome/browser/about_flags.h" #include "chrome/browser/browser_process.h" #include "chrome/browser/chrome_browser_main.h" diff --git a/chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.h b/chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.h index a8f7b00..d646d3b 100644 --- a/chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.h +++ b/chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.h @@ -5,9 +5,12 @@ #ifndef CHROME_BROWSER_METRICS_CHROME_BROWSER_MAIN_EXTRA_PARTS_METRICS_H_ #define CHROME_BROWSER_METRICS_CHROME_BROWSER_MAIN_EXTRA_PARTS_METRICS_H_ -#include "base/basictypes.h" +#include <stdint.h> + #include "base/compiler_specific.h" +#include "base/macros.h" #include "base/memory/scoped_ptr.h" +#include "build/build_config.h" #include "chrome/browser/chrome_browser_main_extra_parts.h" #include "ui/gfx/display_observer.h" diff --git a/chrome/browser/metrics/chrome_metrics_service_accessor.cc b/chrome/browser/metrics/chrome_metrics_service_accessor.cc index 0fe57ab..643afc2 100644 --- a/chrome/browser/metrics/chrome_metrics_service_accessor.cc +++ b/chrome/browser/metrics/chrome_metrics_service_accessor.cc @@ -5,6 +5,7 @@ #include "chrome/browser/metrics/chrome_metrics_service_accessor.h" #include "base/prefs/pref_service.h" +#include "build/build_config.h" #include "chrome/browser/browser_process.h" #include "chrome/common/features.h" #include "chrome/common/pref_names.h" diff --git a/chrome/browser/metrics/chrome_metrics_service_accessor_unittest.cc b/chrome/browser/metrics/chrome_metrics_service_accessor_unittest.cc index 983aba9..fa5685e 100644 --- a/chrome/browser/metrics/chrome_metrics_service_accessor_unittest.cc +++ b/chrome/browser/metrics/chrome_metrics_service_accessor_unittest.cc @@ -6,6 +6,8 @@ #include "base/base_switches.h" #include "base/command_line.h" +#include "base/macros.h" +#include "build/build_config.h" #include "chrome/common/pref_names.h" #include "chrome/test/base/scoped_testing_local_state.h" #include "chrome/test/base/testing_browser_process.h" diff --git a/chrome/browser/metrics/chrome_metrics_service_client.cc b/chrome/browser/metrics/chrome_metrics_service_client.cc index 1fbe66d..ed8897b 100644 --- a/chrome/browser/metrics/chrome_metrics_service_client.cc +++ b/chrome/browser/metrics/chrome_metrics_service_client.cc @@ -4,6 +4,8 @@ #include "chrome/browser/metrics/chrome_metrics_service_client.h" +#include <stddef.h> + #include <vector> #include "base/bind.h" @@ -17,6 +19,7 @@ #include "base/rand_util.h" #include "base/strings/string16.h" #include "base/threading/platform_thread.h" +#include "build/build_config.h" #include "chrome/browser/browser_process.h" #include "chrome/browser/chrome_notification_types.h" #include "chrome/browser/google/google_brand.h" @@ -197,7 +200,7 @@ bool ChromeMetricsServiceClient::IsOffTheRecordSessionActive() { return chrome::IsOffTheRecordSessionActive(); } -int32 ChromeMetricsServiceClient::GetProduct() { +int32_t ChromeMetricsServiceClient::GetProduct() { return metrics::ChromeUserMetricsExtension::CHROME; } diff --git a/chrome/browser/metrics/chrome_metrics_service_client.h b/chrome/browser/metrics/chrome_metrics_service_client.h index b79878f..7cb7a43 100644 --- a/chrome/browser/metrics/chrome_metrics_service_client.h +++ b/chrome/browser/metrics/chrome_metrics_service_client.h @@ -5,13 +5,16 @@ #ifndef CHROME_BROWSER_METRICS_CHROME_METRICS_SERVICE_CLIENT_H_ #define CHROME_BROWSER_METRICS_CHROME_METRICS_SERVICE_CLIENT_H_ +#include <stdint.h> + #include <string> -#include "base/basictypes.h" #include "base/callback.h" +#include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "base/memory/weak_ptr.h" #include "base/threading/thread_checker.h" +#include "build/build_config.h" #include "chrome/browser/metrics/metrics_memory_details.h" #include "components/metrics/metrics_service_client.h" #include "components/metrics/profiler/tracking_synchronizer_observer.h" @@ -58,7 +61,7 @@ class ChromeMetricsServiceClient void SetMetricsClientId(const std::string& client_id) override; void OnRecordingDisabled() override; bool IsOffTheRecordSessionActive() override; - int32 GetProduct() override; + int32_t GetProduct() override; std::string GetApplicationLocale() override; bool GetBrand(std::string* brand_code) override; metrics::SystemProfileProto::Channel GetChannel() override; diff --git a/chrome/browser/metrics/chrome_metrics_services_manager_client.h b/chrome/browser/metrics/chrome_metrics_services_manager_client.h index 4960dd7..3186606 100644 --- a/chrome/browser/metrics/chrome_metrics_services_manager_client.h +++ b/chrome/browser/metrics/chrome_metrics_services_manager_client.h @@ -5,7 +5,7 @@ #ifndef CHROME_BROWSER_METRICS_CHROME_METRICS_SERVICES_MANAGER_CLIENT_H_ #define CHROME_BROWSER_METRICS_CHROME_METRICS_SERVICES_MANAGER_CLIENT_H_ -#include "base/basictypes.h" +#include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "base/threading/thread_checker.h" #include "chrome/browser/safe_browsing/safe_browsing_service.h" diff --git a/chrome/browser/metrics/chrome_stability_metrics_provider.cc b/chrome/browser/metrics/chrome_stability_metrics_provider.cc index 35ff811..c8145ab 100644 --- a/chrome/browser/metrics/chrome_stability_metrics_provider.cc +++ b/chrome/browser/metrics/chrome_stability_metrics_provider.cc @@ -9,6 +9,7 @@ #include "base/logging.h" #include "base/metrics/histogram.h" #include "base/metrics/sparse_histogram.h" +#include "build/build_config.h" #include "chrome/browser/chrome_notification_types.h" #include "chrome/common/chrome_constants.h" #include "content/public/browser/child_process_data.h" diff --git a/chrome/browser/metrics/chrome_stability_metrics_provider.h b/chrome/browser/metrics/chrome_stability_metrics_provider.h index d9bd23f..0c5f19a 100644 --- a/chrome/browser/metrics/chrome_stability_metrics_provider.h +++ b/chrome/browser/metrics/chrome_stability_metrics_provider.h @@ -5,8 +5,8 @@ #ifndef CHROME_BROWSER_METRICS_CHROME_STABILITY_METRICS_PROVIDER_H_ #define CHROME_BROWSER_METRICS_CHROME_STABILITY_METRICS_PROVIDER_H_ -#include "base/basictypes.h" #include "base/gtest_prod_util.h" +#include "base/macros.h" #include "base/metrics/user_metrics.h" #include "base/process/kill.h" #include "components/metrics/metrics_provider.h" diff --git a/chrome/browser/metrics/chrome_stability_metrics_provider_unittest.cc b/chrome/browser/metrics/chrome_stability_metrics_provider_unittest.cc index e5032ee..fd95be7 100644 --- a/chrome/browser/metrics/chrome_stability_metrics_provider_unittest.cc +++ b/chrome/browser/metrics/chrome_stability_metrics_provider_unittest.cc @@ -4,7 +4,7 @@ #include "chrome/browser/metrics/chrome_stability_metrics_provider.h" -#include "base/basictypes.h" +#include "base/macros.h" #include "base/prefs/pref_service.h" #include "base/prefs/scoped_user_pref_update.h" #include "base/prefs/testing_pref_service.h" diff --git a/chrome/browser/metrics/chromeos_metrics_provider.cc b/chrome/browser/metrics/chromeos_metrics_provider.cc index 473af30..f1565ca 100644 --- a/chrome/browser/metrics/chromeos_metrics_provider.cc +++ b/chrome/browser/metrics/chromeos_metrics_provider.cc @@ -4,6 +4,8 @@ #include "chrome/browser/metrics/chromeos_metrics_provider.h" +#include <stddef.h> + #include "base/prefs/pref_registry_simple.h" #include "base/prefs/pref_service.h" #include "base/strings/string_number_conversions.h" @@ -248,12 +250,12 @@ void ChromeOSMetricsProvider::WriteBluetoothProto( paired_device->set_type(AsBluetoothDeviceType(device->GetDeviceType())); // |address| is xx:xx:xx:xx:xx:xx, extract the first three components and - // pack into a uint32. + // pack into a uint32_t. std::string address = device->GetAddress(); if (address.size() > 9 && address[2] == ':' && address[5] == ':' && address[8] == ':') { std::string vendor_prefix_str; - uint64 vendor_prefix; + uint64_t vendor_prefix; base::RemoveChars(address.substr(0, 9), ":", &vendor_prefix_str); DCHECK_EQ(6U, vendor_prefix_str.size()); diff --git a/chrome/browser/metrics/chromeos_metrics_provider.h b/chrome/browser/metrics/chromeos_metrics_provider.h index c4b4576..6b1c900 100644 --- a/chrome/browser/metrics/chromeos_metrics_provider.h +++ b/chrome/browser/metrics/chromeos_metrics_provider.h @@ -5,6 +5,9 @@ #ifndef CHROME_BROWSER_METRICS_CHROMEOS_METRICS_PROVIDER_H_ #define CHROME_BROWSER_METRICS_CHROMEOS_METRICS_PROVIDER_H_ +#include <stdint.h> + +#include "base/macros.h" #include "base/memory/weak_ptr.h" #include "chrome/browser/metrics/perf/perf_provider_chromeos.h" #include "components/metrics/metrics_provider.h" @@ -88,7 +91,7 @@ class ChromeOSMetricsProvider : public metrics::MetricsProvider { // The user count at the time that a log was last initialized. Contains a // valid value only if |registered_user_count_at_log_initialization_| is // true. - uint64 user_count_at_log_initialization_; + uint64_t user_count_at_log_initialization_; // Hardware class (e.g., hardware qualification ID). This class identifies // the configured system components such as CPU, WiFi adapter, etc. diff --git a/chrome/browser/metrics/chromeos_metrics_provider_unittest.cc b/chrome/browser/metrics/chromeos_metrics_provider_unittest.cc index 4801acc..19ee029 100644 --- a/chrome/browser/metrics/chromeos_metrics_provider_unittest.cc +++ b/chrome/browser/metrics/chromeos_metrics_provider_unittest.cc @@ -6,7 +6,7 @@ #include <string> -#include "base/basictypes.h" +#include "base/macros.h" #include "chrome/browser/chromeos/login/users/fake_chrome_user_manager.h" #include "chrome/browser/chromeos/login/users/scoped_user_manager_enabler.h" #include "chrome/browser/metrics/chromeos_metrics_provider.h" diff --git a/chrome/browser/metrics/extensions_metrics_provider.cc b/chrome/browser/metrics/extensions_metrics_provider.cc index 7af9b5a..80c0443 100644 --- a/chrome/browser/metrics/extensions_metrics_provider.cc +++ b/chrome/browser/metrics/extensions_metrics_provider.cc @@ -4,6 +4,8 @@ #include "chrome/browser/metrics/extensions_metrics_provider.h" +#include <stddef.h> + #include <algorithm> #include <set> #include <vector> @@ -125,11 +127,11 @@ ExtensionsMetricsProvider::~ExtensionsMetricsProvider() { // static int ExtensionsMetricsProvider::HashExtension(const std::string& extension_id, - uint32 client_key) { + uint32_t client_key) { DCHECK_LE(client_key, kExtensionListClientKeys); std::string message = base::StringPrintf("%u:%s", client_key, extension_id.c_str()); - uint64 output = CityHash64(message.data(), message.size()); + uint64_t output = CityHash64(message.data(), message.size()); return output % kExtensionListBuckets; } @@ -165,7 +167,7 @@ ExtensionsMetricsProvider::GetInstalledExtensions(Profile* profile) { return scoped_ptr<extensions::ExtensionSet>(); } -uint64 ExtensionsMetricsProvider::GetClientID() { +uint64_t ExtensionsMetricsProvider::GetClientID() { // TODO(blundell): Create a MetricsLog::ClientIDAsInt() API and call it // here as well as in MetricsLog's population of the client_id field of // the uma_proto. diff --git a/chrome/browser/metrics/extensions_metrics_provider.h b/chrome/browser/metrics/extensions_metrics_provider.h index 1e851b2..50ef6f2 100644 --- a/chrome/browser/metrics/extensions_metrics_provider.h +++ b/chrome/browser/metrics/extensions_metrics_provider.h @@ -5,9 +5,11 @@ #ifndef CHROME_BROWSER_METRICS_EXTENSIONS_METRICS_PROVIDER_H_ #define CHROME_BROWSER_METRICS_EXTENSIONS_METRICS_PROVIDER_H_ +#include <stdint.h> + #include <string> -#include "base/basictypes.h" +#include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "components/metrics/metrics_provider.h" @@ -45,12 +47,13 @@ class ExtensionsMetricsProvider : public metrics::MetricsProvider { Profile* profile); // Retrieves the client ID. - virtual uint64 GetClientID(); + virtual uint64_t GetClientID(); // Hashes the extension extension ID using the provided client key (which // must be less than kExtensionListClientKeys) and to produce an output value // between 0 and kExtensionListBuckets-1. - static int HashExtension(const std::string& extension_id, uint32 client_key); + static int HashExtension(const std::string& extension_id, + uint32_t client_key); private: // Returns the profile for which extensions will be gathered. Once a diff --git a/chrome/browser/metrics/extensions_metrics_provider_unittest.cc b/chrome/browser/metrics/extensions_metrics_provider_unittest.cc index 77d89cd..0209ff5 100644 --- a/chrome/browser/metrics/extensions_metrics_provider_unittest.cc +++ b/chrome/browser/metrics/extensions_metrics_provider_unittest.cc @@ -4,6 +4,8 @@ #include "chrome/browser/metrics/extensions_metrics_provider.h" +#include <stdint.h> + #include <string> #include "base/memory/scoped_ptr.h" @@ -77,7 +79,7 @@ class TestExtensionsMetricsProvider : public ExtensionsMetricsProvider { // Override GetClientID() to return a specific value on which test // expectations are based. - uint64 GetClientID() override { return 0x3f1bfee9; } + uint64_t GetClientID() override { return 0x3f1bfee9; } }; } // namespace diff --git a/chrome/browser/metrics/field_trial_synchronizer.h b/chrome/browser/metrics/field_trial_synchronizer.h index 6c62d27..e93d1c6 100644 --- a/chrome/browser/metrics/field_trial_synchronizer.h +++ b/chrome/browser/metrics/field_trial_synchronizer.h @@ -8,7 +8,7 @@ #include <string> #include <vector> -#include "base/basictypes.h" +#include "base/macros.h" #include "base/memory/ref_counted.h" #include "base/metrics/field_trial.h" diff --git a/chrome/browser/metrics/first_web_contents_profiler.cc b/chrome/browser/metrics/first_web_contents_profiler.cc index 038bbf0..fcce4d9 100644 --- a/chrome/browser/metrics/first_web_contents_profiler.cc +++ b/chrome/browser/metrics/first_web_contents_profiler.cc @@ -12,6 +12,7 @@ #include "base/logging.h" #include "base/metrics/histogram_macros.h" #include "base/time/time.h" +#include "build/build_config.h" #include "chrome/browser/ui/browser.h" #include "chrome/browser/ui/browser_iterator.h" #include "chrome/browser/ui/tabs/tab_strip_model.h" diff --git a/chrome/browser/metrics/first_web_contents_profiler.h b/chrome/browser/metrics/first_web_contents_profiler.h index 2cace6a..e6e5dbf 100644 --- a/chrome/browser/metrics/first_web_contents_profiler.h +++ b/chrome/browser/metrics/first_web_contents_profiler.h @@ -5,6 +5,7 @@ #ifndef CHROME_BROWSER_METRICS_FIRST_WEB_CONTENTS_PROFILER_H_ #define CHROME_BROWSER_METRICS_FIRST_WEB_CONTENTS_PROFILER_H_ +#include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "content/public/browser/web_contents_observer.h" diff --git a/chrome/browser/metrics/metrics_memory_details.cc b/chrome/browser/metrics/metrics_memory_details.cc index c6ed526..857168f 100644 --- a/chrome/browser/metrics/metrics_memory_details.cc +++ b/chrome/browser/metrics/metrics_memory_details.cc @@ -4,6 +4,8 @@ #include "chrome/browser/metrics/metrics_memory_details.h" +#include <stddef.h> + #include <vector> #include "base/location.h" @@ -11,6 +13,7 @@ #include "base/single_thread_task_runner.h" #include "base/strings/utf_string_conversions.h" #include "base/thread_task_runner_handle.h" +#include "build/build_config.h" #include "components/nacl/common/nacl_process_type.h" #include "content/public/browser/render_process_host.h" #include "content/public/common/content_constants.h" diff --git a/chrome/browser/metrics/metrics_memory_details.h b/chrome/browser/metrics/metrics_memory_details.h index cee946f..23badc5 100644 --- a/chrome/browser/metrics/metrics_memory_details.h +++ b/chrome/browser/metrics/metrics_memory_details.h @@ -8,6 +8,8 @@ #include <map> #include "base/callback.h" +#include "base/macros.h" +#include "build/build_config.h" #include "chrome/browser/memory_details.h" // MemoryGrowthTracker tracks latest metrics about record time and memory usage diff --git a/chrome/browser/metrics/metrics_memory_details_browsertest.cc b/chrome/browser/metrics/metrics_memory_details_browsertest.cc index 4abccd8..7922808 100644 --- a/chrome/browser/metrics/metrics_memory_details_browsertest.cc +++ b/chrome/browser/metrics/metrics_memory_details_browsertest.cc @@ -5,6 +5,7 @@ #include "chrome/browser/metrics/metrics_memory_details.h" #include "base/bind_helpers.h" +#include "base/macros.h" #include "base/message_loop/message_loop.h" #include "base/test/histogram_tester.h" #include "chrome/test/base/in_process_browser_test.h" diff --git a/chrome/browser/metrics/metrics_reporting_state.cc b/chrome/browser/metrics/metrics_reporting_state.cc index c3d0fbb..aa03fbb 100644 --- a/chrome/browser/metrics/metrics_reporting_state.cc +++ b/chrome/browser/metrics/metrics_reporting_state.cc @@ -7,6 +7,7 @@ #include "base/callback.h" #include "base/metrics/histogram.h" #include "base/prefs/pref_service.h" +#include "build/build_config.h" #include "chrome/browser/browser_process.h" #include "chrome/browser/metrics/chrome_metrics_service_accessor.h" #include "chrome/installer/util/google_update_settings.h" diff --git a/chrome/browser/metrics/metrics_service_browsertest.cc b/chrome/browser/metrics/metrics_service_browsertest.cc index 13e8a67..1ea1f51 100644 --- a/chrome/browser/metrics/metrics_service_browsertest.cc +++ b/chrome/browser/metrics/metrics_service_browsertest.cc @@ -13,6 +13,7 @@ #include "base/files/file_path.h" #include "base/path_service.h" #include "base/prefs/pref_service.h" +#include "build/build_config.h" #include "chrome/browser/browser_process.h" #include "chrome/browser/ui/browser.h" #include "chrome/browser/ui/tabs/tab_strip_model.h" diff --git a/chrome/browser/metrics/perf/perf_provider_chromeos.cc b/chrome/browser/metrics/perf/perf_provider_chromeos.cc index c466eee..15bcf4c 100644 --- a/chrome/browser/metrics/perf/perf_provider_chromeos.cc +++ b/chrome/browser/metrics/perf/perf_provider_chromeos.cc @@ -4,6 +4,8 @@ #include "chrome/browser/metrics/perf/perf_provider_chromeos.h" +#include <stddef.h> + #include <algorithm> #include <map> #include <string> @@ -79,11 +81,11 @@ base::TimeDelta RandomTimeDelta(base::TimeDelta max) { // integer, stores the result in |out| and return true. Otherwise return false. bool GetInt64Param(const std::map<std::string, std::string>& params, const std::string& key, - int64* out) { + int64_t* out) { auto it = params.find(key); if (it == params.end()) return false; - int64 value; + int64_t value; // NB: StringToInt64 will set value even if the conversion fails. if (!base::StringToInt64(it->second, &value)) return false; @@ -200,11 +202,10 @@ PerfProvider::CollectionParams::CollectionParams( } PerfProvider::CollectionParams::TriggerParams::TriggerParams( - int64 sampling_factor, + int64_t sampling_factor, base::TimeDelta max_collection_delay) : sampling_factor_(sampling_factor), - max_collection_delay_(max_collection_delay.ToInternalValue()) { -} + max_collection_delay_(max_collection_delay.ToInternalValue()) {} const PerfProvider::CollectionParams PerfProvider::kDefaultParameters( /* collection_duration = */ base::TimeDelta::FromSeconds(2), @@ -307,7 +308,7 @@ std::string FindBestCpuSpecifierFromParams( void PerfProvider::SetCollectionParamsFromVariationParams( const std::map<std::string, std::string>& params) { - int64 value; + int64_t value; if (GetInt64Param(params, "ProfileCollectionDurationSec", &value)) { collection_params_.set_collection_duration( base::TimeDelta::FromSeconds(value)); @@ -382,8 +383,8 @@ void PerfProvider::ParseOutputProtoIfValid( scoped_ptr<WindowedIncognitoObserver> incognito_observer, scoped_ptr<SampledProfile> sampled_profile, int result, - const std::vector<uint8>& perf_data, - const std::vector<uint8>& perf_stat) { + const std::vector<uint8_t>& perf_data, + const std::vector<uint8_t>& perf_stat) { DCHECK(CalledOnValidThread()); if (incognito_observer->incognito_launched()) { diff --git a/chrome/browser/metrics/perf/perf_provider_chromeos.h b/chrome/browser/metrics/perf/perf_provider_chromeos.h index f81a9fa..d099e9f 100644 --- a/chrome/browser/metrics/perf/perf_provider_chromeos.h +++ b/chrome/browser/metrics/perf/perf_provider_chromeos.h @@ -5,10 +5,12 @@ #ifndef CHROME_BROWSER_METRICS_PERF_PERF_PROVIDER_CHROMEOS_H_ #define CHROME_BROWSER_METRICS_PERF_PERF_PROVIDER_CHROMEOS_H_ +#include <stdint.h> + #include <string> #include <vector> -#include "base/basictypes.h" +#include "base/macros.h" #include "base/threading/non_thread_safe.h" #include "base/time/time.h" #include "base/timer/timer.h" @@ -129,8 +131,8 @@ class PerfProvider : public base::NonThreadSafe, scoped_ptr<WindowedIncognitoObserver> incognito_observer, scoped_ptr<SampledProfile> sampled_profile, int result, - const std::vector<uint8>& perf_data, - const std::vector<uint8>& perf_stat); + const std::vector<uint8_t>& perf_data, + const std::vector<uint8_t>& perf_stat); const CollectionParams& collection_params() const { return collection_params_; diff --git a/chrome/browser/metrics/perf/perf_provider_chromeos_unittest.cc b/chrome/browser/metrics/perf/perf_provider_chromeos_unittest.cc index 19a8af8..59207c2 100644 --- a/chrome/browser/metrics/perf/perf_provider_chromeos_unittest.cc +++ b/chrome/browser/metrics/perf/perf_provider_chromeos_unittest.cc @@ -4,10 +4,12 @@ #include "chrome/browser/metrics/perf/perf_provider_chromeos.h" +#include <stdint.h> + #include <string> #include <vector> -#include "base/basictypes.h" +#include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "base/metrics/field_trial.h" #include "base/test/test_simple_task_runner.h" diff --git a/chrome/browser/metrics/perf/random_selector.h b/chrome/browser/metrics/perf/random_selector.h index b8d2946..e1ba9c6 100644 --- a/chrome/browser/metrics/perf/random_selector.h +++ b/chrome/browser/metrics/perf/random_selector.h @@ -5,6 +5,8 @@ #ifndef CHROME_BROWSER_METRICS_PERF_RANDOM_SELECTOR_H_ #define CHROME_BROWSER_METRICS_PERF_RANDOM_SELECTOR_H_ +#include <stddef.h> + #include <string> #include <vector> diff --git a/chrome/browser/metrics/perf/random_selector_unittest.cc b/chrome/browser/metrics/perf/random_selector_unittest.cc index d6eb008..7749f50 100644 --- a/chrome/browser/metrics/perf/random_selector_unittest.cc +++ b/chrome/browser/metrics/perf/random_selector_unittest.cc @@ -4,10 +4,13 @@ #include "chrome/browser/metrics/perf/random_selector.h" +#include <stddef.h> + #include <cmath> #include <map> #include <string> +#include "base/macros.h" #include "testing/gtest/include/gtest/gtest.h" // A small floating point number used to verify that the expected odds are equal diff --git a/chrome/browser/metrics/plugin_metrics_provider.cc b/chrome/browser/metrics/plugin_metrics_provider.cc index 4d8f183..e070e36 100644 --- a/chrome/browser/metrics/plugin_metrics_provider.cc +++ b/chrome/browser/metrics/plugin_metrics_provider.cc @@ -4,6 +4,8 @@ #include "chrome/browser/metrics/plugin_metrics_provider.h" +#include <stddef.h> + #include <string> #include "base/prefs/pref_registry_simple.h" diff --git a/chrome/browser/metrics/plugin_metrics_provider.h b/chrome/browser/metrics/plugin_metrics_provider.h index b8bce80..54a651b 100644 --- a/chrome/browser/metrics/plugin_metrics_provider.h +++ b/chrome/browser/metrics/plugin_metrics_provider.h @@ -8,8 +8,8 @@ #include <map> #include <vector> -#include "base/basictypes.h" #include "base/gtest_prod_util.h" +#include "base/macros.h" #include "base/memory/weak_ptr.h" #include "base/strings/string16.h" #include "components/metrics/metrics_provider.h" diff --git a/chrome/browser/metrics/plugin_metrics_provider_unittest.cc b/chrome/browser/metrics/plugin_metrics_provider_unittest.cc index 21e30e8..9504937 100644 --- a/chrome/browser/metrics/plugin_metrics_provider_unittest.cc +++ b/chrome/browser/metrics/plugin_metrics_provider_unittest.cc @@ -4,9 +4,11 @@ #include "chrome/browser/metrics/plugin_metrics_provider.h" +#include <stddef.h> + #include <string> -#include "base/basictypes.h" +#include "base/macros.h" #include "base/prefs/pref_service.h" #include "base/prefs/scoped_user_pref_update.h" #include "base/prefs/testing_pref_service.h" diff --git a/chrome/browser/metrics/thread_watcher.cc b/chrome/browser/metrics/thread_watcher.cc index f45ee41..3db2b1c 100644 --- a/chrome/browser/metrics/thread_watcher.cc +++ b/chrome/browser/metrics/thread_watcher.cc @@ -11,6 +11,7 @@ #include "base/debug/dump_without_crashing.h" #include "base/lazy_instance.h" #include "base/location.h" +#include "base/macros.h" #include "base/strings/string_number_conversions.h" #include "base/strings/string_split.h" #include "base/strings/string_tokenizer.h" @@ -161,7 +162,7 @@ void ThreadWatcher::PostPingMessage() { } } -void ThreadWatcher::OnPongMessage(uint64 ping_sequence_number) { +void ThreadWatcher::OnPongMessage(uint64_t ping_sequence_number) { DCHECK(WatchDogThread::CurrentlyOnWatchDogThread()); // Record watched thread's response time. @@ -192,7 +193,7 @@ void ThreadWatcher::OnPongMessage(uint64 ping_sequence_number) { sleep_time_); } -void ThreadWatcher::OnCheckResponsiveness(uint64 ping_sequence_number) { +void ThreadWatcher::OnCheckResponsiveness(uint64_t ping_sequence_number) { DCHECK(WatchDogThread::CurrentlyOnWatchDogThread()); // If we have stopped watching then consider thread as responding. if (!active_) { @@ -285,8 +286,8 @@ void ThreadWatcher::GotNoResponse() { return; // Record how other threads are responding. - uint32 responding_thread_count = 0; - uint32 unresponding_thread_count = 0; + uint32_t responding_thread_count = 0; + uint32_t unresponding_thread_count = 0; ThreadWatcherList::GetStatusOfThreads(&responding_thread_count, &unresponding_thread_count); @@ -335,11 +336,10 @@ const int ThreadWatcherList::kLiveThreadsThreshold = 2; int ThreadWatcherList::g_initialize_delay_seconds = 120; ThreadWatcherList::CrashDataThresholds::CrashDataThresholds( - uint32 live_threads_threshold, - uint32 unresponsive_threshold) + uint32_t live_threads_threshold, + uint32_t unresponsive_threshold) : live_threads_threshold(live_threads_threshold), - unresponsive_threshold(unresponsive_threshold) { -} + unresponsive_threshold(unresponsive_threshold) {} ThreadWatcherList::CrashDataThresholds::CrashDataThresholds() : live_threads_threshold(kLiveThreadsThreshold), @@ -350,7 +350,7 @@ ThreadWatcherList::CrashDataThresholds::CrashDataThresholds() void ThreadWatcherList::StartWatchingAll( const base::CommandLine& command_line) { DCHECK_CURRENTLY_ON(BrowserThread::UI); - uint32 unresponsive_threshold; + uint32_t unresponsive_threshold; CrashOnHangThreadMap crash_on_hang_threads; ParseCommandLine(command_line, &unresponsive_threshold, @@ -398,8 +398,9 @@ bool ThreadWatcherList::IsRegistered(const BrowserThread::ID thread_id) { } // static -void ThreadWatcherList::GetStatusOfThreads(uint32* responding_thread_count, - uint32* unresponding_thread_count) { +void ThreadWatcherList::GetStatusOfThreads( + uint32_t* responding_thread_count, + uint32_t* unresponding_thread_count) { DCHECK(WatchDogThread::CurrentlyOnWatchDogThread()); *responding_thread_count = 0; *unresponding_thread_count = 0; @@ -445,7 +446,7 @@ ThreadWatcherList::~ThreadWatcherList() { // static void ThreadWatcherList::ParseCommandLine( const base::CommandLine& command_line, - uint32* unresponsive_threshold, + uint32_t* unresponsive_threshold, CrashOnHangThreadMap* crash_on_hang_threads) { // Initialize |unresponsive_threshold| to a default value. *unresponsive_threshold = kUnresponsiveCount; @@ -467,7 +468,7 @@ void ThreadWatcherList::ParseCommandLine( *unresponsive_threshold *= 2; #endif - uint32 crash_seconds = *unresponsive_threshold * kUnresponsiveSeconds; + uint32_t crash_seconds = *unresponsive_threshold * kUnresponsiveSeconds; std::string crash_on_hang_thread_names; if (command_line.HasSwitch(switches::kCrashOnHangThreads)) { crash_on_hang_thread_names = @@ -491,8 +492,8 @@ void ThreadWatcherList::ParseCommandLine( // static void ThreadWatcherList::ParseCommandLineCrashOnHangThreads( const std::string& crash_on_hang_thread_names, - uint32 default_live_threads_threshold, - uint32 default_crash_seconds, + uint32_t default_live_threads_threshold, + uint32_t default_crash_seconds, CrashOnHangThreadMap* crash_on_hang_threads) { base::StringTokenizer tokens(crash_on_hang_thread_names, ","); while (tokens.GetNext()) { @@ -500,8 +501,8 @@ void ThreadWatcherList::ParseCommandLineCrashOnHangThreads( tokens.token_piece(), ":", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); std::string thread_name = values[0].as_string(); - uint32 live_threads_threshold = default_live_threads_threshold; - uint32 crash_seconds = default_crash_seconds; + uint32_t live_threads_threshold = default_live_threads_threshold; + uint32_t crash_seconds = default_crash_seconds; if (values.size() >= 2 && (!base::StringToUint(values[1], &live_threads_threshold))) { continue; @@ -510,7 +511,7 @@ void ThreadWatcherList::ParseCommandLineCrashOnHangThreads( (!base::StringToUint(values[2], &crash_seconds))) { continue; } - uint32 unresponsive_threshold = static_cast<uint32>( + uint32_t unresponsive_threshold = static_cast<uint32_t>( ceil(static_cast<float>(crash_seconds) / kUnresponsiveSeconds)); CrashDataThresholds crash_data(live_threads_threshold, @@ -522,7 +523,7 @@ void ThreadWatcherList::ParseCommandLineCrashOnHangThreads( // static void ThreadWatcherList::InitializeAndStartWatching( - uint32 unresponsive_threshold, + uint32_t unresponsive_threshold, const CrashOnHangThreadMap& crash_on_hang_threads) { DCHECK(WatchDogThread::CurrentlyOnWatchDogThread()); @@ -574,14 +575,14 @@ void ThreadWatcherList::StartWatching( const std::string& thread_name, const base::TimeDelta& sleep_time, const base::TimeDelta& unresponsive_time, - uint32 unresponsive_threshold, + uint32_t unresponsive_threshold, const CrashOnHangThreadMap& crash_on_hang_threads) { DCHECK(WatchDogThread::CurrentlyOnWatchDogThread()); CrashOnHangThreadMap::const_iterator it = crash_on_hang_threads.find(thread_name); bool crash_on_hang = false; - uint32 live_threads_threshold = 0; + uint32_t live_threads_threshold = 0; if (it != crash_on_hang_threads.end()) { crash_on_hang = true; live_threads_threshold = it->second.live_threads_threshold; diff --git a/chrome/browser/metrics/thread_watcher.h b/chrome/browser/metrics/thread_watcher.h index b363370..af5ec1f 100644 --- a/chrome/browser/metrics/thread_watcher.h +++ b/chrome/browser/metrics/thread_watcher.h @@ -32,9 +32,9 @@ // // base::TimeDelta sleep_time = base::TimeDelta::FromSeconds(5); // base::TimeDelta unresponsive_time = base::TimeDelta::FromSeconds(10); -// uint32 unresponsive_threshold = ThreadWatcherList::kUnresponsiveCount; +// uint32_t unresponsive_threshold = ThreadWatcherList::kUnresponsiveCount; // bool crash_on_hang = false; -// uint32 live_threads_threshold = ThreadWatcherList::kLiveThreadsThreshold; +// uint32_t live_threads_threshold = ThreadWatcherList::kLiveThreadsThreshold; // ThreadWatcher::StartWatching( // BrowserThread::IO, "IO", sleep_time, unresponsive_time, // unresponsive_threshold, crash_on_hang, live_threads_threshold); @@ -46,9 +46,11 @@ #include <string> #include <vector> -#include "base/basictypes.h" +#include <stdint.h> + #include "base/command_line.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/message_loop/message_loop.h" @@ -80,25 +82,24 @@ class ThreadWatcher { const std::string& thread_name; const base::TimeDelta& sleep_time; const base::TimeDelta& unresponsive_time; - uint32 unresponsive_threshold; + uint32_t unresponsive_threshold; bool crash_on_hang; - uint32 live_threads_threshold; + uint32_t live_threads_threshold; WatchingParams(const content::BrowserThread::ID& thread_id_in, const std::string& thread_name_in, const base::TimeDelta& sleep_time_in, const base::TimeDelta& unresponsive_time_in, - uint32 unresponsive_threshold_in, + uint32_t unresponsive_threshold_in, bool crash_on_hang_in, - uint32 live_threads_threshold_in) + uint32_t live_threads_threshold_in) : thread_id(thread_id_in), thread_name(thread_name_in), sleep_time(sleep_time_in), unresponsive_time(unresponsive_time_in), unresponsive_threshold(unresponsive_threshold_in), crash_on_hang(crash_on_hang_in), - live_threads_threshold(live_threads_threshold_in) { - } + live_threads_threshold(live_threads_threshold_in) {} }; // This method starts performing health check on the given |thread_id|. It @@ -135,7 +136,7 @@ class ThreadWatcher { base::TimeTicks ping_time() const { return ping_time_; } // Returns |ping_sequence_number_| (used by unit tests). - uint64 ping_sequence_number() const { return ping_sequence_number_; } + uint64_t ping_sequence_number() const { return ping_sequence_number_; } protected: // Construct a ThreadWatcher for the given |thread_id|. |sleep_time| is the @@ -170,14 +171,14 @@ class ThreadWatcher { // PostPingMessage() task that would be called after waiting |sleep_time_|. It // increments |ping_sequence_number_| by 1. // This method is accessible on WatchDogThread. - virtual void OnPongMessage(uint64 ping_sequence_number); + virtual void OnPongMessage(uint64_t ping_sequence_number); // This method will determine if the watched thread is responsive or not. If // the latest |ping_sequence_number_| is not same as the // |ping_sequence_number| that is passed in, then we can assume that watched // thread has responded with a pong message. // This method is accessible on WatchDogThread. - virtual void OnCheckResponsiveness(uint64 ping_sequence_number); + virtual void OnCheckResponsiveness(uint64_t ping_sequence_number); // Set by OnCheckResponsiveness when it determines if the watched thread is // responsive or not. @@ -241,7 +242,7 @@ class ThreadWatcher { // This is the sequence number of the next ping for which there is no pong. If // the instance is sleeping, then it will be the sequence number for the next // ping. - uint64 ping_sequence_number_; + uint64_t ping_sequence_number_; // This is set to true if thread watcher is watching. bool active_; @@ -272,7 +273,7 @@ class ThreadWatcher { // is zero then watched thread has responded with a pong message. This is // incremented by 1 when we got no response (GotNoResponse()) from the watched // thread. - uint32 unresponsive_count_; + uint32_t unresponsive_count_; // This is set to true when we would have crashed the browser because the // watched thread hasn't responded at least |unresponsive_threshold_| times. @@ -282,7 +283,7 @@ class ThreadWatcher { // This is used to determine if the watched thread is responsive or not. If // watched thread's |unresponsive_count_| is greater than or equal to // |unresponsive_threshold_| then we would consider it as unresponsive. - uint32 unresponsive_threshold_; + uint32_t unresponsive_threshold_; // This is set to true if we want to crash the browser when the watched thread // has become sufficiently unresponsive, while other threads are sufficiently @@ -292,7 +293,7 @@ class ThreadWatcher { // This specifies the number of browser threads that are to be responsive when // we want to crash the browser because watched thread has become sufficiently // unresponsive. - uint32 live_threads_threshold_; + uint32_t live_threads_threshold_; // We use this factory to create callback tasks for ThreadWatcher object. We // use this during ping-pong messaging between WatchDog thread and watched @@ -372,12 +373,12 @@ class ThreadWatcherList { // would not consider this a problem worth crashing for. FILE thread would be // considered as hung if it didn't respond for 45 ping messages. struct CrashDataThresholds { - CrashDataThresholds(uint32 live_threads_threshold, - uint32 unresponsive_threshold); + CrashDataThresholds(uint32_t live_threads_threshold, + uint32_t unresponsive_threshold); CrashDataThresholds(); - uint32 live_threads_threshold; - uint32 unresponsive_threshold; + uint32_t live_threads_threshold; + uint32_t unresponsive_threshold; }; typedef std::map<std::string, CrashDataThresholds> CrashOnHangThreadMap; @@ -399,8 +400,8 @@ class ThreadWatcherList { static bool IsRegistered(const content::BrowserThread::ID thread_id); // This method returns number of responsive and unresponsive watched threads. - static void GetStatusOfThreads(uint32* responding_thread_count, - uint32* unresponding_thread_count); + static void GetStatusOfThreads(uint32_t* responding_thread_count, + uint32_t* unresponding_thread_count); // This will ensure that the watching is actively taking place, and awaken // all thread watchers that are registered. @@ -427,10 +428,9 @@ class ThreadWatcherList { // Parses the command line to get |crash_on_hang_threads| map from // switches::kCrashOnHangThreads. |crash_on_hang_threads| is a map of // |crash_on_hang| thread's names to |CrashDataThresholds|. - static void ParseCommandLine( - const base::CommandLine& command_line, - uint32* unresponsive_threshold, - CrashOnHangThreadMap* crash_on_hang_threads); + static void ParseCommandLine(const base::CommandLine& command_line, + uint32_t* unresponsive_threshold, + CrashOnHangThreadMap* crash_on_hang_threads); // Parses the argument |crash_on_hang_thread_names| and creates // |crash_on_hang_threads| map of |crash_on_hang| thread's names to @@ -440,26 +440,25 @@ class ThreadWatcherList { // then it uses |default_crash_seconds| as the value. static void ParseCommandLineCrashOnHangThreads( const std::string& crash_on_hang_thread_names, - uint32 default_live_threads_threshold, - uint32 default_crash_seconds, + uint32_t default_live_threads_threshold, + uint32_t default_crash_seconds, CrashOnHangThreadMap* crash_on_hang_threads); // This constructs the |ThreadWatcherList| singleton and starts watching // browser threads by calling StartWatching() on each browser thread that is // watched. It disarms StartupTimeBomb. static void InitializeAndStartWatching( - uint32 unresponsive_threshold, + uint32_t unresponsive_threshold, const CrashOnHangThreadMap& crash_on_hang_threads); // This method calls ThreadWatcher::StartWatching() to perform health check on // the given |thread_id|. - static void StartWatching( - const content::BrowserThread::ID& thread_id, - const std::string& thread_name, - const base::TimeDelta& sleep_time, - const base::TimeDelta& unresponsive_time, - uint32 unresponsive_threshold, - const CrashOnHangThreadMap& crash_on_hang_threads); + static void StartWatching(const content::BrowserThread::ID& thread_id, + const std::string& thread_name, + const base::TimeDelta& sleep_time, + const base::TimeDelta& unresponsive_time, + uint32_t unresponsive_threshold, + const CrashOnHangThreadMap& crash_on_hang_threads); // Delete all thread watcher objects and remove them from global map. It also // deletes |g_thread_watcher_list_|. diff --git a/chrome/browser/metrics/thread_watcher_android.h b/chrome/browser/metrics/thread_watcher_android.h index a69281a..c13bd84 100644 --- a/chrome/browser/metrics/thread_watcher_android.h +++ b/chrome/browser/metrics/thread_watcher_android.h @@ -12,7 +12,7 @@ #ifndef CHROME_BROWSER_METRICS_THREAD_WATCHER_ANDROID_H_ #define CHROME_BROWSER_METRICS_THREAD_WATCHER_ANDROID_H_ -#include "base/basictypes.h" +#include "base/macros.h" class ThreadWatcherAndroid { public: diff --git a/chrome/browser/metrics/thread_watcher_unittest.cc b/chrome/browser/metrics/thread_watcher_unittest.cc index ea47fa3..972e1e0 100644 --- a/chrome/browser/metrics/thread_watcher_unittest.cc +++ b/chrome/browser/metrics/thread_watcher_unittest.cc @@ -3,11 +3,12 @@ // found in the LICENSE file. #include <math.h> +#include <stdint.h> -#include "base/basictypes.h" #include "base/bind.h" #include "base/location.h" #include "base/logging.h" +#include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "base/message_loop/message_loop.h" #include "base/run_loop.h" @@ -66,12 +67,12 @@ class CustomThreadWatcher : public ThreadWatcher { State thread_watcher_state_; WaitState wait_state_; CheckResponseState check_response_state_; - uint64 ping_sent_; - uint64 pong_received_; + uint64_t ping_sent_; + uint64_t pong_received_; base::subtle::Atomic32 success_response_; base::subtle::Atomic32 failed_response_; base::TimeTicks saved_ping_time_; - uint64 saved_ping_sequence_number_; + uint64_t saved_ping_sequence_number_; CustomThreadWatcher(const BrowserThread::ID thread_id, const std::string thread_name, @@ -140,13 +141,13 @@ class CustomThreadWatcher : public ThreadWatcher { ThreadWatcher::PostPingMessage(); } - void OnPongMessage(uint64 ping_sequence_number) override { + void OnPongMessage(uint64_t ping_sequence_number) override { State old_state = UpdateState(RECEIVED_PONG); EXPECT_TRUE(old_state == SENT_PING || old_state == DEACTIVATED); ThreadWatcher::OnPongMessage(ping_sequence_number); } - void OnCheckResponsiveness(uint64 ping_sequence_number) override { + void OnCheckResponsiveness(uint64_t ping_sequence_number) override { ThreadWatcher::OnCheckResponsiveness(ping_sequence_number); { base::AutoLock auto_lock(custom_lock_); @@ -188,7 +189,7 @@ class CustomThreadWatcher : public ThreadWatcher { State exit_state = INITIALIZED; // Keep the thread that is running the tests waiting until ThreadWatcher // object's state changes to the expected_state or until wait_time elapses. - for (uint32 i = 0; i < unresponsive_threshold_; ++i) { + for (uint32_t i = 0; i < unresponsive_threshold_; ++i) { TimeTicks end_time = TimeTicks::Now() + wait_time; { base::AutoLock auto_lock(custom_lock_); @@ -217,7 +218,7 @@ class CustomThreadWatcher : public ThreadWatcher { // Keep the thread that is running the tests waiting until ThreadWatcher // object's check_response_state_ changes to the expected_state or until // wait_time elapses. - for (uint32 i = 0; i < unresponsive_threshold_; ++i) { + for (uint32_t i = 0; i < unresponsive_threshold_; ++i) { TimeTicks end_time = TimeTicks::Now() + wait_time; { base::AutoLock auto_lock(custom_lock_); @@ -347,7 +348,7 @@ TEST_F(ThreadWatcherTest, ThreadNamesOnlyArgs) { // Parse command_line arguments. ThreadWatcherList::CrashOnHangThreadMap crash_on_hang_threads; - uint32 unresponsive_threshold; + uint32_t unresponsive_threshold; ThreadWatcherList::ParseCommandLine(command_line, &unresponsive_threshold, &crash_on_hang_threads); @@ -376,7 +377,7 @@ TEST_F(ThreadWatcherTest, ThreadNamesAndLiveThresholdArgs) { // Parse command_line arguments. ThreadWatcherList::CrashOnHangThreadMap crash_on_hang_threads; - uint32 unresponsive_threshold; + uint32_t unresponsive_threshold; ThreadWatcherList::ParseCommandLine(command_line, &unresponsive_threshold, &crash_on_hang_threads); @@ -405,7 +406,7 @@ TEST_F(ThreadWatcherTest, CrashOnHangThreadsAllArgs) { // Parse command_line arguments. ThreadWatcherList::CrashOnHangThreadMap crash_on_hang_threads; - uint32 unresponsive_threshold; + uint32_t unresponsive_threshold; ThreadWatcherList::ParseCommandLine(command_line, &unresponsive_threshold, &crash_on_hang_threads); @@ -423,11 +424,11 @@ TEST_F(ThreadWatcherTest, CrashOnHangThreadsAllArgs) { bool crash_on_hang = (it != crash_on_hang_threads.end()); EXPECT_TRUE(crash_on_hang); - uint32 crash_live_threads_threshold = it->second.live_threads_threshold; + uint32_t crash_live_threads_threshold = it->second.live_threads_threshold; EXPECT_EQ(5u, crash_live_threads_threshold); - uint32 crash_unresponsive_threshold = it->second.unresponsive_threshold; - uint32 crash_on_unresponsive_seconds = + uint32_t crash_unresponsive_threshold = it->second.unresponsive_threshold; + uint32_t crash_on_unresponsive_seconds = ThreadWatcherList::kUnresponsiveSeconds * crash_unresponsive_threshold; EXPECT_EQ(12u, crash_on_unresponsive_seconds); } @@ -468,11 +469,11 @@ TEST_F(ThreadWatcherTest, ThreadResponding) { // ping/pong messaging sequence to happen. io_watcher_->WaitForStateChange(kSleepTime + TimeDelta::FromMinutes(1), RECEIVED_PONG); - EXPECT_GT(io_watcher_->ping_sent_, static_cast<uint64>(0)); - EXPECT_GT(io_watcher_->pong_received_, static_cast<uint64>(0)); + EXPECT_GT(io_watcher_->ping_sent_, static_cast<uint64_t>(0)); + EXPECT_GT(io_watcher_->pong_received_, static_cast<uint64_t>(0)); EXPECT_TRUE(io_watcher_->active()); EXPECT_GE(io_watcher_->saved_ping_time_, time_before_ping); - EXPECT_GE(io_watcher_->saved_ping_sequence_number_, static_cast<uint64>(0)); + EXPECT_GE(io_watcher_->saved_ping_sequence_number_, static_cast<uint64_t>(0)); // Verify watched thread is responding with ping/pong messaging. io_watcher_->WaitForCheckResponse( @@ -546,9 +547,9 @@ TEST_F(ThreadWatcherTest, MultipleThreadsResponding) { // Verify DB thread is responding with ping/pong messaging. db_watcher_->WaitForCheckResponse( kUnresponsiveTime + TimeDelta::FromMinutes(1), SUCCESSFUL); - EXPECT_GT(db_watcher_->ping_sent_, static_cast<uint64>(0)); - EXPECT_GT(db_watcher_->pong_received_, static_cast<uint64>(0)); - EXPECT_GE(db_watcher_->ping_sequence_number_, static_cast<uint64>(0)); + EXPECT_GT(db_watcher_->ping_sent_, static_cast<uint64_t>(0)); + EXPECT_GT(db_watcher_->pong_received_, static_cast<uint64_t>(0)); + EXPECT_GE(db_watcher_->ping_sequence_number_, static_cast<uint64_t>(0)); EXPECT_GT(base::subtle::NoBarrier_Load(&(db_watcher_->success_response_)), static_cast<base::subtle::Atomic32>(0)); EXPECT_EQ(base::subtle::NoBarrier_Load(&(db_watcher_->failed_response_)), @@ -557,9 +558,9 @@ TEST_F(ThreadWatcherTest, MultipleThreadsResponding) { // Verify IO thread is responding with ping/pong messaging. io_watcher_->WaitForCheckResponse( kUnresponsiveTime + TimeDelta::FromMinutes(1), SUCCESSFUL); - EXPECT_GT(io_watcher_->ping_sent_, static_cast<uint64>(0)); - EXPECT_GT(io_watcher_->pong_received_, static_cast<uint64>(0)); - EXPECT_GE(io_watcher_->ping_sequence_number_, static_cast<uint64>(0)); + EXPECT_GT(io_watcher_->ping_sent_, static_cast<uint64_t>(0)); + EXPECT_GT(io_watcher_->pong_received_, static_cast<uint64_t>(0)); + EXPECT_GE(io_watcher_->ping_sequence_number_, static_cast<uint64_t>(0)); EXPECT_GT(base::subtle::NoBarrier_Load(&(io_watcher_->success_response_)), static_cast<base::subtle::Atomic32>(0)); EXPECT_EQ(base::subtle::NoBarrier_Load(&(io_watcher_->failed_response_)), diff --git a/chrome/browser/metrics/time_ticks_experiment_unittest.cc b/chrome/browser/metrics/time_ticks_experiment_unittest.cc index 944510e..e9e2bc9 100644 --- a/chrome/browser/metrics/time_ticks_experiment_unittest.cc +++ b/chrome/browser/metrics/time_ticks_experiment_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 "build/build_config.h" #include "chrome/browser/metrics/time_ticks_experiment_win.h" #include "testing/gtest/include/gtest/gtest.h" diff --git a/chrome/browser/metrics/time_ticks_experiment_win.cc b/chrome/browser/metrics/time_ticks_experiment_win.cc index 8cc27f0..d77788c 100644 --- a/chrome/browser/metrics/time_ticks_experiment_win.cc +++ b/chrome/browser/metrics/time_ticks_experiment_win.cc @@ -12,6 +12,7 @@ #include "base/cpu.h" #include "base/metrics/histogram.h" #include "base/win/windows_version.h" +#include "build/build_config.h" namespace chrome { diff --git a/chrome/browser/metrics/variations/chrome_variations_service_client.cc b/chrome/browser/metrics/variations/chrome_variations_service_client.cc index ed7ceff..b99ece9 100644 --- a/chrome/browser/metrics/variations/chrome_variations_service_client.cc +++ b/chrome/browser/metrics/variations/chrome_variations_service_client.cc @@ -5,6 +5,7 @@ #include "chrome/browser/metrics/variations/chrome_variations_service_client.h" #include "base/bind.h" +#include "build/build_config.h" #include "chrome/browser/browser_process.h" #include "chrome/common/channel_info.h" #include "components/version_info/version_info.h" diff --git a/chrome/browser/metrics/variations/chrome_variations_service_client.h b/chrome/browser/metrics/variations/chrome_variations_service_client.h index 2b84c84..e9b8890 100644 --- a/chrome/browser/metrics/variations/chrome_variations_service_client.h +++ b/chrome/browser/metrics/variations/chrome_variations_service_client.h @@ -7,7 +7,8 @@ #include <string> -#include "base/basictypes.h" +#include "base/macros.h" +#include "build/build_config.h" #include "components/variations/service/variations_service_client.h" #if defined(OS_WIN) diff --git a/chrome/browser/metrics/variations/variations_registry_syncer_win.h b/chrome/browser/metrics/variations/variations_registry_syncer_win.h index 11dc3ab..43ce631 100644 --- a/chrome/browser/metrics/variations/variations_registry_syncer_win.h +++ b/chrome/browser/metrics/variations/variations_registry_syncer_win.h @@ -5,6 +5,7 @@ #ifndef CHROME_BROWSER_METRICS_VARIATIONS_VARIATIONS_REGISTRY_SYNCER_WIN_H_ #define CHROME_BROWSER_METRICS_VARIATIONS_VARIATIONS_REGISTRY_SYNCER_WIN_H_ +#include "base/macros.h" #include "base/timer/timer.h" namespace chrome_variations { diff --git a/chrome/browser/metro_viewer/chrome_metro_viewer_process_host_aurawin.cc b/chrome/browser/metro_viewer/chrome_metro_viewer_process_host_aurawin.cc index 3b83d86..571c16c 100644 --- a/chrome/browser/metro_viewer/chrome_metro_viewer_process_host_aurawin.cc +++ b/chrome/browser/metro_viewer/chrome_metro_viewer_process_host_aurawin.cc @@ -117,7 +117,7 @@ void ChromeMetroViewerProcessHost::OnChannelError() { g_browser_process->platform_part()->OnMetroViewerProcessTerminated(); } -void ChromeMetroViewerProcessHost::OnChannelConnected(int32 /*peer_pid*/) { +void ChromeMetroViewerProcessHost::OnChannelConnected(int32_t /*peer_pid*/) { DVLOG(1) << "ChromeMetroViewerProcessHost::OnChannelConnected: "; // Set environment variable to let breakpad know that metro process was // connected. @@ -167,8 +167,8 @@ void ChromeMetroViewerProcessHost::OnHandleSearchRequest( OpenURL(url); } -void ChromeMetroViewerProcessHost::OnWindowSizeChanged(uint32 width, - uint32 height) { +void ChromeMetroViewerProcessHost::OnWindowSizeChanged(uint32_t width, + uint32_t height) { std::vector<ash::DisplayInfo> info_list; info_list.push_back(ash::DisplayInfo::CreateFromSpec( base::StringPrintf("%dx%d*%f", width, height, gfx::GetDPIScale()))); diff --git a/chrome/browser/metro_viewer/chrome_metro_viewer_process_host_aurawin.h b/chrome/browser/metro_viewer/chrome_metro_viewer_process_host_aurawin.h index 26fae65..9696a49 100644 --- a/chrome/browser/metro_viewer/chrome_metro_viewer_process_host_aurawin.h +++ b/chrome/browser/metro_viewer/chrome_metro_viewer_process_host_aurawin.h @@ -5,6 +5,9 @@ #ifndef CHROME_BROWSER_METRO_VIEWER_CHROME_METRO_VIEWER_PROCESS_HOST_AURAWIN_H_ #define CHROME_BROWSER_METRO_VIEWER_CHROME_METRO_VIEWER_PROCESS_HOST_AURAWIN_H_ +#include <stdint.h> + +#include "base/macros.h" #include "win8/viewer/metro_viewer_process_host.h" namespace base { @@ -21,12 +24,12 @@ class ChromeMetroViewerProcessHost : public win8::MetroViewerProcessHost { void OnChannelError() override; // IPC::Listener implementation - void OnChannelConnected(int32 peer_pid) override; + void OnChannelConnected(int32_t peer_pid) override; void OnSetTargetSurface(gfx::NativeViewId target_surface, float device_scale) override; void OnOpenURL(const base::string16& url) override; void OnHandleSearchRequest(const base::string16& search_string) override; - void OnWindowSizeChanged(uint32 width, uint32 height) override; + void OnWindowSizeChanged(uint32_t width, uint32_t height) override; DISALLOW_COPY_AND_ASSIGN(ChromeMetroViewerProcessHost); }; diff --git a/chrome/browser/mouseleave_browsertest.cc b/chrome/browser/mouseleave_browsertest.cc index 6719b93..eef6f85 100644 --- a/chrome/browser/mouseleave_browsertest.cc +++ b/chrome/browser/mouseleave_browsertest.cc @@ -3,7 +3,9 @@ // found in the LICENSE file. #include "base/files/file_path.h" +#include "base/macros.h" #include "base/strings/utf_string_conversions.h" +#include "build/build_config.h" #include "chrome/browser/renderer_context_menu/render_view_context_menu.h" #include "chrome/browser/renderer_context_menu/render_view_context_menu_browsertest_util.h" #include "chrome/browser/ui/browser.h" diff --git a/chrome/browser/nacl_host/nacl_browser_delegate_impl.cc b/chrome/browser/nacl_host/nacl_browser_delegate_impl.cc index b45eeb7..add454f 100644 --- a/chrome/browser/nacl_host/nacl_browser_delegate_impl.cc +++ b/chrome/browser/nacl_host/nacl_browser_delegate_impl.cc @@ -4,8 +4,11 @@ #include "chrome/browser/nacl_host/nacl_browser_delegate_impl.h" +#include <stddef.h> + #include <vector> +#include "base/macros.h" #include "base/path_service.h" #include "base/strings/string_split.h" #include "chrome/browser/browser_process.h" diff --git a/chrome/browser/nacl_host/nacl_browser_delegate_impl.h b/chrome/browser/nacl_host/nacl_browser_delegate_impl.h index 04da2ce..5ca7dbb 100644 --- a/chrome/browser/nacl_host/nacl_browser_delegate_impl.h +++ b/chrome/browser/nacl_host/nacl_browser_delegate_impl.h @@ -9,6 +9,7 @@ #include <string> #include "base/compiler_specific.h" +#include "base/macros.h" #include "components/nacl/browser/nacl_browser_delegate.h" #if defined(ENABLE_EXTENSIONS) diff --git a/chrome/browser/nacl_host/nacl_infobar_delegate.h b/chrome/browser/nacl_host/nacl_infobar_delegate.h index ea2648e..1be0d2f 100644 --- a/chrome/browser/nacl_host/nacl_infobar_delegate.h +++ b/chrome/browser/nacl_host/nacl_infobar_delegate.h @@ -5,6 +5,7 @@ #ifndef CHROME_BROWSER_NACL_HOST_NACL_INFOBAR_DELEGATE_H_ #define CHROME_BROWSER_NACL_HOST_NACL_INFOBAR_DELEGATE_H_ +#include "base/macros.h" #include "components/infobars/core/confirm_infobar_delegate.h" class NaClInfoBarDelegate : public ConfirmInfoBarDelegate { diff --git a/chrome/browser/nacl_host/test/gdb_debug_stub_browsertest.cc b/chrome/browser/nacl_host/test/gdb_debug_stub_browsertest.cc index be03454..0f036d6 100644 --- a/chrome/browser/nacl_host/test/gdb_debug_stub_browsertest.cc +++ b/chrome/browser/nacl_host/test/gdb_debug_stub_browsertest.cc @@ -9,6 +9,7 @@ #include "base/process/launch.h" #include "base/process/process.h" #include "base/strings/string_number_conversions.h" +#include "build/build_config.h" #include "chrome/common/chrome_paths.h" #include "chrome/test/ppapi/ppapi_test.h" #include "components/nacl/browser/nacl_browser.h" diff --git a/chrome/browser/nacl_host/test/nacl_gdb_browsertest.cc b/chrome/browser/nacl_host/test/nacl_gdb_browsertest.cc index 6de3fa6..860c228 100644 --- a/chrome/browser/nacl_host/test/nacl_gdb_browsertest.cc +++ b/chrome/browser/nacl_host/test/nacl_gdb_browsertest.cc @@ -7,6 +7,7 @@ #include "base/files/file_util.h" #include "base/path_service.h" #include "base/win/windows_version.h" +#include "build/build_config.h" #include "chrome/common/chrome_switches.h" #include "chrome/test/ppapi/ppapi_test.h" #include "components/nacl/common/nacl_switches.h" diff --git a/chrome/browser/net/chrome_extensions_network_delegate.cc b/chrome/browser/net/chrome_extensions_network_delegate.cc index 75c6f2b..134a4ec 100644 --- a/chrome/browser/net/chrome_extensions_network_delegate.cc +++ b/chrome/browser/net/chrome_extensions_network_delegate.cc @@ -4,6 +4,9 @@ #include "chrome/browser/net/chrome_extensions_network_delegate.h" +#include <stdint.h> + +#include "base/macros.h" #include "net/base/net_errors.h" #if defined(ENABLE_EXTENSIONS) @@ -31,7 +34,7 @@ enum RequestStatus { REQUEST_STARTED, REQUEST_DONE }; // for a particular RenderFrame. void NotifyEPMRequestStatus(RequestStatus status, void* profile_id, - uint64 request_id, + uint64_t request_id, int process_id, int render_frame_id) { DCHECK_CURRENTLY_ON(BrowserThread::UI); diff --git a/chrome/browser/net/chrome_extensions_network_delegate.h b/chrome/browser/net/chrome_extensions_network_delegate.h index 156094c..912c66b 100644 --- a/chrome/browser/net/chrome_extensions_network_delegate.h +++ b/chrome/browser/net/chrome_extensions_network_delegate.h @@ -5,8 +5,8 @@ #ifndef CHROME_BROWSER_NET_CHROME_EXTENSIONS_NETWORK_DELEGATE_H_ #define CHROME_BROWSER_NET_CHROME_EXTENSIONS_NETWORK_DELEGATE_H_ -#include "base/basictypes.h" #include "base/compiler_specific.h" +#include "base/macros.h" #include "base/memory/ref_counted.h" #include "net/base/network_delegate_impl.h" diff --git a/chrome/browser/net/chrome_http_user_agent_settings.h b/chrome/browser/net/chrome_http_user_agent_settings.h index 8612b3c..f1d8244 100644 --- a/chrome/browser/net/chrome_http_user_agent_settings.h +++ b/chrome/browser/net/chrome_http_user_agent_settings.h @@ -7,8 +7,8 @@ #include <string> -#include "base/basictypes.h" #include "base/compiler_specific.h" +#include "base/macros.h" #include "base/prefs/pref_member.h" #include "net/url_request/http_user_agent_settings.h" diff --git a/chrome/browser/net/chrome_network_delegate.cc b/chrome/browser/net/chrome_network_delegate.cc index eeee086..0775d81 100644 --- a/chrome/browser/net/chrome_network_delegate.cc +++ b/chrome/browser/net/chrome_network_delegate.cc @@ -4,6 +4,7 @@ #include "chrome/browser/net/chrome_network_delegate.h" +#include <stddef.h> #include <stdlib.h> #include <vector> @@ -14,6 +15,7 @@ #include "base/debug/dump_without_crashing.h" #include "base/debug/stack_trace.h" #include "base/logging.h" +#include "base/macros.h" #include "base/metrics/field_trial.h" #include "base/metrics/histogram.h" #include "base/metrics/sparse_histogram.h" @@ -25,6 +27,7 @@ #include "base/strings/string_number_conversions.h" #include "base/strings/string_util.h" #include "base/time/time.h" +#include "build/build_config.h" #include "chrome/browser/browser_process.h" #include "chrome/browser/content_settings/cookie_settings_factory.h" #include "chrome/browser/content_settings/tab_specific_content_settings.h" @@ -113,7 +116,7 @@ void RecordPrecacheStatsOnUIThread(const GURL& url, const GURL& referrer, base::TimeDelta latency, const base::Time& fetch_time, - int64 size, + int64_t size, bool was_cached, void* profile_id) { DCHECK_CURRENTLY_ON(BrowserThread::UI); @@ -273,7 +276,7 @@ void RecordCacheStateStats(const net::URLRequest* request) { CACHE_STATE_MAX); } - int64 size = request->received_response_content_length(); + int64_t size = request->received_response_content_length(); if (size >= 0 && state == CACHE_STATE_NO_LONGER_VALID) { UMA_HISTOGRAM_COUNTS("Net.CacheState.AllBytes", size); if (CanRequestBeDeltaEncoded(request)) { @@ -532,7 +535,8 @@ void ChromeNetworkDelegate::OnCompleted(net::URLRequest* request, // For better accuracy, we use the actual bytes read instead of the length // specified with the Content-Length header, which may be inaccurate, // or missing, as is the case with chunked encoding. - int64 received_content_length = request->received_response_content_length(); + int64_t received_content_length = + request->received_response_content_length(); base::TimeDelta latency = base::TimeTicks::Now() - request->creation_time(); // Record precache metrics when a fetch is completed successfully, if diff --git a/chrome/browser/net/chrome_network_delegate.h b/chrome/browser/net/chrome_network_delegate.h index 901e542..ea2a007 100644 --- a/chrome/browser/net/chrome_network_delegate.h +++ b/chrome/browser/net/chrome_network_delegate.h @@ -9,12 +9,13 @@ #include <string> -#include "base/basictypes.h" #include "base/compiler_specific.h" #include "base/files/file_path.h" +#include "base/macros.h" #include "base/memory/ref_counted.h" #include "base/memory/scoped_ptr.h" #include "base/values.h" +#include "build/build_config.h" #include "net/base/network_delegate_impl.h" #if !defined(OS_IOS) diff --git a/chrome/browser/net/chrome_network_delegate_unittest.cc b/chrome/browser/net/chrome_network_delegate_unittest.cc index 69435bc..6cc42f9 100644 --- a/chrome/browser/net/chrome_network_delegate_unittest.cc +++ b/chrome/browser/net/chrome_network_delegate_unittest.cc @@ -7,12 +7,14 @@ #include <stdint.h> #include "base/command_line.h" +#include "base/macros.h" #include "base/memory/ref_counted.h" #include "base/memory/scoped_ptr.h" #include "base/message_loop/message_loop.h" #include "base/prefs/pref_member.h" #include "base/run_loop.h" #include "base/test/histogram_tester.h" +#include "build/build_config.h" #include "chrome/browser/browser_process.h" #include "chrome/browser/content_settings/cookie_settings_factory.h" #include "chrome/browser/net/safe_search_util.h" diff --git a/chrome/browser/net/chrome_url_request_context_getter.cc b/chrome/browser/net/chrome_url_request_context_getter.cc index cf39fa4..ad662e7 100644 --- a/chrome/browser/net/chrome_url_request_context_getter.cc +++ b/chrome/browser/net/chrome_url_request_context_getter.cc @@ -6,6 +6,7 @@ #include "base/bind.h" #include "base/compiler_specific.h" +#include "base/macros.h" #include "base/message_loop/message_loop.h" #include "base/thread_task_runner_handle.h" #include "chrome/browser/browser_process.h" diff --git a/chrome/browser/net/chrome_url_request_context_getter.h b/chrome/browser/net/chrome_url_request_context_getter.h index 31b5c30..9113db8 100644 --- a/chrome/browser/net/chrome_url_request_context_getter.h +++ b/chrome/browser/net/chrome_url_request_context_getter.h @@ -7,6 +7,7 @@ #include <string> +#include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "chrome/browser/custom_handlers/protocol_handler_registry.h" #include "net/url_request/url_request_context.h" diff --git a/chrome/browser/net/connect_interceptor.h b/chrome/browser/net/connect_interceptor.h index 2caa8b8..c70574c 100644 --- a/chrome/browser/net/connect_interceptor.h +++ b/chrome/browser/net/connect_interceptor.h @@ -6,6 +6,7 @@ #define CHROME_BROWSER_NET_CONNECT_INTERCEPTOR_H_ #include "base/gtest_prod_util.h" +#include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "chrome/browser/net/timed_cache.h" diff --git a/chrome/browser/net/cookie_policy_browsertest.cc b/chrome/browser/net/cookie_policy_browsertest.cc index 6bd6cfd..9762e1c 100644 --- a/chrome/browser/net/cookie_policy_browsertest.cc +++ b/chrome/browser/net/cookie_policy_browsertest.cc @@ -4,6 +4,7 @@ #include "base/bind.h" #include "base/bind_helpers.h" +#include "base/macros.h" #include "base/prefs/pref_service.h" #include "chrome/browser/profiles/profile.h" #include "chrome/browser/ui/browser.h" diff --git a/chrome/browser/net/crl_set_fetcher.cc b/chrome/browser/net/crl_set_fetcher.cc index 5c402cd..f2d9caf 100644 --- a/chrome/browser/net/crl_set_fetcher.cc +++ b/chrome/browser/net/crl_set_fetcher.cc @@ -67,7 +67,7 @@ void CRLSetFetcher::DoInitialLoadFromDisk() { LoadFromDisk(GetCRLSetFilePath(), &crl_set_); - uint32 sequence_of_loaded_crl = 0; + uint32_t sequence_of_loaded_crl = 0; if (crl_set_.get()) sequence_of_loaded_crl = crl_set_->sequence(); @@ -129,14 +129,13 @@ void CRLSetFetcher::SetCRLSetIfNewer( // kPublicKeySHA256 is the SHA256 hash of the SubjectPublicKeyInfo of the key // that's used to sign generated CRL sets. -static const uint8 kPublicKeySHA256[32] = { - 0x75, 0xda, 0xf8, 0xcb, 0x77, 0x68, 0x40, 0x33, - 0x65, 0x4c, 0x97, 0xe5, 0xc5, 0x1b, 0xcd, 0x81, - 0x7b, 0x1e, 0xeb, 0x11, 0x2c, 0xe1, 0xa4, 0x33, - 0x8c, 0xf5, 0x72, 0x5e, 0xed, 0xb8, 0x43, 0x97, +static const uint8_t kPublicKeySHA256[32] = { + 0x75, 0xda, 0xf8, 0xcb, 0x77, 0x68, 0x40, 0x33, 0x65, 0x4c, 0x97, + 0xe5, 0xc5, 0x1b, 0xcd, 0x81, 0x7b, 0x1e, 0xeb, 0x11, 0x2c, 0xe1, + 0xa4, 0x33, 0x8c, 0xf5, 0x72, 0x5e, 0xed, 0xb8, 0x43, 0x97, }; -void CRLSetFetcher::RegisterComponent(uint32 sequence_of_loaded_crl) { +void CRLSetFetcher::RegisterComponent(uint32_t sequence_of_loaded_crl) { DCHECK_CURRENTLY_ON(BrowserThread::UI); update_client::CrxComponent component; diff --git a/chrome/browser/net/crl_set_fetcher.h b/chrome/browser/net/crl_set_fetcher.h index 9c23a87..540647a 100644 --- a/chrome/browser/net/crl_set_fetcher.h +++ b/chrome/browser/net/crl_set_fetcher.h @@ -5,10 +5,13 @@ #ifndef CHROME_BROWSER_NET_CRL_SET_FETCHER_H_ #define CHROME_BROWSER_NET_CRL_SET_FETCHER_H_ +#include <stdint.h> + #include <string> #include "base/compiler_specific.h" #include "base/files/file_path.h" +#include "base/macros.h" #include "base/memory/ref_counted.h" #include "components/update_client/update_client.h" @@ -70,7 +73,7 @@ class CRLSetFetcher : public update_client::CrxInstaller { void SetCRLSetIfNewer(scoped_refptr<net::CRLSet> crl_set); // RegisterComponent registers this object as a component updater. - void RegisterComponent(uint32 sequence_of_loaded_crl); + void RegisterComponent(uint32_t sequence_of_loaded_crl); // DoDeleteFromDisk runs on the FILE thread and removes the CRLSet file from // the disk. diff --git a/chrome/browser/net/disk_cache_dir_policy_handler.h b/chrome/browser/net/disk_cache_dir_policy_handler.h index 02519c5..13854f4 100644 --- a/chrome/browser/net/disk_cache_dir_policy_handler.h +++ b/chrome/browser/net/disk_cache_dir_policy_handler.h @@ -5,8 +5,8 @@ #ifndef CHROME_BROWSER_NET_DISK_CACHE_DIR_POLICY_HANDLER_H_ #define CHROME_BROWSER_NET_DISK_CACHE_DIR_POLICY_HANDLER_H_ -#include "base/basictypes.h" #include "base/compiler_specific.h" +#include "base/macros.h" #include "components/policy/core/browser/configuration_policy_handler.h" namespace policy { diff --git a/chrome/browser/net/dns_probe_runner.h b/chrome/browser/net/dns_probe_runner.h index 4240f8b..ca01b56 100644 --- a/chrome/browser/net/dns_probe_runner.h +++ b/chrome/browser/net/dns_probe_runner.h @@ -5,8 +5,8 @@ #ifndef CHROME_BROWSER_NET_DNS_PROBE_RUNNER_H_ #define CHROME_BROWSER_NET_DNS_PROBE_RUNNER_H_ -#include "base/basictypes.h" #include "base/bind.h" +#include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "base/memory/weak_ptr.h" diff --git a/chrome/browser/net/dns_probe_service.h b/chrome/browser/net/dns_probe_service.h index 16efecf..81cb655 100644 --- a/chrome/browser/net/dns_probe_service.h +++ b/chrome/browser/net/dns_probe_service.h @@ -7,8 +7,8 @@ #include <vector> -#include "base/basictypes.h" #include "base/bind.h" +#include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "base/time/time.h" #include "chrome/browser/net/dns_probe_runner.h" diff --git a/chrome/browser/net/dns_probe_test_util.cc b/chrome/browser/net/dns_probe_test_util.cc index 4f9c49d..5d51a32 100644 --- a/chrome/browser/net/dns_probe_test_util.cc +++ b/chrome/browser/net/dns_probe_test_util.cc @@ -4,6 +4,8 @@ #include "chrome/browser/net/dns_probe_test_util.h" +#include <stdint.h> + #include "chrome/browser/net/dns_probe_runner.h" #include "net/dns/dns_config_service.h" #include "net/dns/dns_protocol.h" @@ -22,10 +24,10 @@ scoped_ptr<DnsClient> CreateMockDnsClientForProbes( DnsConfig config; IPAddressNumber dns_ip; ParseIPLiteralToNumber("192.168.1.1", &dns_ip); - const uint16 kDnsPort = net::dns_protocol::kDefaultPort; + const uint16_t kDnsPort = net::dns_protocol::kDefaultPort; config.nameservers.push_back(net::IPEndPoint(dns_ip, kDnsPort)); - const uint16 kTypeA = net::dns_protocol::kTypeA; + const uint16_t kTypeA = net::dns_protocol::kTypeA; MockDnsClientRuleList rules; rules.push_back(MockDnsClientRule(DnsProbeRunner::kKnownGoodHostname, kTypeA, result, false)); diff --git a/chrome/browser/net/file_downloader.h b/chrome/browser/net/file_downloader.h index 8282a66..d638318 100644 --- a/chrome/browser/net/file_downloader.h +++ b/chrome/browser/net/file_downloader.h @@ -7,6 +7,7 @@ #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 "net/url_request/url_fetcher_delegate.h" diff --git a/chrome/browser/net/firefox_proxy_settings.cc b/chrome/browser/net/firefox_proxy_settings.cc index 16b3618..15fb3a7 100644 --- a/chrome/browser/net/firefox_proxy_settings.cc +++ b/chrome/browser/net/firefox_proxy_settings.cc @@ -4,6 +4,8 @@ #include "chrome/browser/net/firefox_proxy_settings.h" +#include <stddef.h> + #include "base/files/file_path.h" #include "base/files/file_util.h" #include "base/strings/string_number_conversions.h" diff --git a/chrome/browser/net/firefox_proxy_settings.h b/chrome/browser/net/firefox_proxy_settings.h index 94dfe56..03ecfc7 100644 --- a/chrome/browser/net/firefox_proxy_settings.h +++ b/chrome/browser/net/firefox_proxy_settings.h @@ -8,7 +8,7 @@ #include <string> #include <vector> -#include "base/basictypes.h" +#include "base/macros.h" namespace base { class FilePath; diff --git a/chrome/browser/net/ftp_browsertest.cc b/chrome/browser/net/ftp_browsertest.cc index 2e86a37..2037826 100644 --- a/chrome/browser/net/ftp_browsertest.cc +++ b/chrome/browser/net/ftp_browsertest.cc @@ -5,6 +5,7 @@ #include "base/command_line.h" #include "base/files/file_path.h" #include "base/strings/utf_string_conversions.h" +#include "build/build_config.h" #include "chrome/browser/ui/browser.h" #include "chrome/browser/ui/tabs/tab_strip_model.h" #include "chrome/test/base/in_process_browser_test.h" diff --git a/chrome/browser/net/load_timing_browsertest.cc b/chrome/browser/net/load_timing_browsertest.cc index 2e7084d..1805c3d 100644 --- a/chrome/browser/net/load_timing_browsertest.cc +++ b/chrome/browser/net/load_timing_browsertest.cc @@ -4,10 +4,10 @@ #include <string> -#include "base/basictypes.h" #include "base/bind.h" #include "base/compiler_specific.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/message_loop/message_loop.h" diff --git a/chrome/browser/net/net_error_tab_helper.h b/chrome/browser/net/net_error_tab_helper.h index 37dcf37..f23535d 100644 --- a/chrome/browser/net/net_error_tab_helper.h +++ b/chrome/browser/net/net_error_tab_helper.h @@ -7,9 +7,9 @@ #include <string> -#include "base/basictypes.h" #include "base/bind.h" #include "base/compiler_specific.h" +#include "base/macros.h" #include "base/memory/weak_ptr.h" #include "base/prefs/pref_member.h" #include "chrome/browser/net/dns_probe_service.h" diff --git a/chrome/browser/net/nss_context.h b/chrome/browser/net/nss_context.h index 8212ee1..ca62c4a 100644 --- a/chrome/browser/net/nss_context.h +++ b/chrome/browser/net/nss_context.h @@ -9,6 +9,7 @@ #include "base/callback.h" #include "base/compiler_specific.h" +#include "build/build_config.h" #include "crypto/scoped_nss_types.h" class Profile; diff --git a/chrome/browser/net/nss_context_chromeos.cc b/chrome/browser/net/nss_context_chromeos.cc index d68f02d..045e6ff 100644 --- a/chrome/browser/net/nss_context_chromeos.cc +++ b/chrome/browser/net/nss_context_chromeos.cc @@ -4,6 +4,7 @@ #include "chrome/browser/net/nss_context.h" +#include "base/macros.h" #include "base/memory/weak_ptr.h" #include "base/supports_user_data.h" #include "chrome/browser/profiles/profile_io_data.h" diff --git a/chrome/browser/net/predictor.cc b/chrome/browser/net/predictor.cc index 634abd4..799fa1a 100644 --- a/chrome/browser/net/predictor.cc +++ b/chrome/browser/net/predictor.cc @@ -9,12 +9,12 @@ #include <set> #include <sstream> -#include "base/basictypes.h" #include "base/bind.h" #include "base/compiler_specific.h" #include "base/containers/mru_cache.h" #include "base/location.h" #include "base/logging.h" +#include "base/macros.h" #include "base/metrics/histogram.h" #include "base/prefs/pref_service.h" #include "base/prefs/scoped_user_pref_update.h" @@ -73,8 +73,8 @@ const double Predictor::kDiscardableExpectedValue = 0.05; // system that uses a higher trim ratio when the list is large. // static const double Predictor::kReferrerTrimRatio = 0.97153; -const int64 Predictor::kDurationBetweenTrimmingsHours = 1; -const int64 Predictor::kDurationBetweenTrimmingIncrementsSeconds = 15; +const int64_t Predictor::kDurationBetweenTrimmingsHours = 1; +const int64_t Predictor::kDurationBetweenTrimmingIncrementsSeconds = 15; const size_t Predictor::kUrlsTrimmedPerIncrement = 5u; const size_t Predictor::kMaxSpeculativeParallelResolves = 3; const int Predictor::kMaxUnusedSocketLifetimeSecondsWithoutAGet = 10; diff --git a/chrome/browser/net/predictor.h b/chrome/browser/net/predictor.h index 8601ff0..5f26701 100644 --- a/chrome/browser/net/predictor.h +++ b/chrome/browser/net/predictor.h @@ -25,7 +25,12 @@ #include <string> #include <vector> +#include <stddef.h> + +#include <stdint.h> + #include "base/gtest_prod_util.h" +#include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "base/memory/weak_ptr.h" #include "chrome/browser/net/prediction_options.h" @@ -407,9 +412,9 @@ class Predictor { // Interval between periodic trimming of our whole referrer list. // We only do a major trimming about once an hour, and then only when the user // is actively browsing. - static const int64 kDurationBetweenTrimmingsHours; + static const int64_t kDurationBetweenTrimmingsHours; // Interval between incremental trimmings (to avoid inducing Jank). - static const int64 kDurationBetweenTrimmingIncrementsSeconds; + static const int64_t kDurationBetweenTrimmingIncrementsSeconds; // Number of referring URLs processed in an incremental trimming. static const size_t kUrlsTrimmedPerIncrement; diff --git a/chrome/browser/net/predictor_browsertest.cc b/chrome/browser/net/predictor_browsertest.cc index 0e598c8..1257f7e 100644 --- a/chrome/browser/net/predictor_browsertest.cc +++ b/chrome/browser/net/predictor_browsertest.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 <stddef.h> #include <stdint.h> #include "base/base64.h" @@ -11,6 +12,7 @@ #include "base/prefs/pref_service.h" #include "base/synchronization/lock.h" #include "base/thread_task_runner_handle.h" +#include "build/build_config.h" #include "chrome/browser/browser_process.h" #include "chrome/browser/net/predictor.h" #include "chrome/browser/profiles/profile.h" diff --git a/chrome/browser/net/predictor_tab_helper.h b/chrome/browser/net/predictor_tab_helper.h index a7351af..4d95ba0 100644 --- a/chrome/browser/net/predictor_tab_helper.h +++ b/chrome/browser/net/predictor_tab_helper.h @@ -5,6 +5,7 @@ #ifndef CHROME_BROWSER_NET_PREDICTOR_TAB_HELPER_H_ #define CHROME_BROWSER_NET_PREDICTOR_TAB_HELPER_H_ +#include "base/macros.h" #include "content/public/browser/notification_observer.h" #include "content/public/browser/notification_registrar.h" #include "content/public/browser/web_contents_observer.h" diff --git a/chrome/browser/net/predictor_unittest.cc b/chrome/browser/net/predictor_unittest.cc index 00ed17f6..3ffa989 100644 --- a/chrome/browser/net/predictor_unittest.cc +++ b/chrome/browser/net/predictor_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 <stddef.h> #include <time.h> #include <algorithm> @@ -9,6 +10,7 @@ #include <string> #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" @@ -16,6 +18,7 @@ #include "base/thread_task_runner_handle.h" #include "base/timer/timer.h" #include "base/values.h" +#include "build/build_config.h" #include "chrome/browser/net/predictor.h" #include "chrome/browser/net/url_info.h" #include "components/network_hints/common/network_hints_common.h" diff --git a/chrome/browser/net/probe_message.cc b/chrome/browser/net/probe_message.cc index dd23531..4ab7e3e 100644 --- a/chrome/browser/net/probe_message.cc +++ b/chrome/browser/net/probe_message.cc @@ -4,17 +4,19 @@ #include "chrome/browser/net/probe_message.h" +#include <stddef.h> + #include <string> #include "base/logging.h" namespace chrome_browser_net { -const uint32 ProbeMessage::kVersion = 2; -const uint32 ProbeMessage::kMaxNumberProbePackets = 21; -const uint32 ProbeMessage::kMaxProbePacketBytes = 1500; +const uint32_t ProbeMessage::kVersion = 2; +const uint32_t ProbeMessage::kMaxNumberProbePackets = 21; +const uint32_t ProbeMessage::kMaxProbePacketBytes = 1500; // Maximum pacing interval is 300 seconds (for testing NAT binding). -const uint32 ProbeMessage::kMaxPacingIntervalMicros = 300000000; +const uint32_t ProbeMessage::kMaxPacingIntervalMicros = 300000000; const char ProbeMessage::kEncodingString[] = "T\xd3?\xa5h2\x9c\x8en\xf1Q6\xbc{\xc6-4\xfa$f\xb9[\xa6\xcd@6,\xdf\xb3i-\xe6" "v\x9eV\x8dXd\xd9kE\xf6=\xbeO"; @@ -43,7 +45,7 @@ bool ProbeMessage::ParseInput(const std::string& input, // Checksum is computed on padding only. if (probe_packet->has_padding()) { DVLOG(3) << "received padding: " << probe_packet->padding(); - uint32 computed_checksum = Checksum(probe_packet->padding()); + uint32_t computed_checksum = Checksum(probe_packet->padding()); if (computed_checksum != header.checksum()) { DVLOG(1) << "Checksum mismatch. Got: " << header.checksum() << " expected: " << computed_checksum; @@ -59,19 +61,19 @@ bool ProbeMessage::ParseInput(const std::string& input, return true; } -uint32 ProbeMessage::Checksum(const std::string& str) const { - uint32 ret = 0; +uint32_t ProbeMessage::Checksum(const std::string& str) const { + uint32_t ret = 0; for (std::string::const_iterator i = str.begin(); i != str.end(); ++i) { - ret += static_cast<uint8>(*i); + ret += static_cast<uint8_t>(*i); } return ret; } void ProbeMessage::GenerateProbeRequest(const ProbePacket_Token& token, - uint32 group_id, - uint32 probe_size, - uint32 pacing_interval_micros, - uint32 number_probe_packets, + uint32_t group_id, + uint32_t probe_size, + uint32_t pacing_interval_micros, + uint32_t number_probe_packets, ProbePacket* probe_packet) { DCHECK_LE(number_probe_packets, kMaxNumberProbePackets); DCHECK_LE(probe_size, kMaxProbePacketBytes); @@ -91,7 +93,7 @@ void ProbeMessage::GenerateProbeRequest(const ProbePacket_Token& token, probe_packet->mutable_header()->set_checksum(Checksum(*padding)); DVLOG(3) << "Request size " << probe_packet->ByteSize() << " probe size " << probe_size; - DCHECK_LE(probe_size, static_cast<uint32>(probe_packet->ByteSize())); + DCHECK_LE(probe_size, static_cast<uint32_t>(probe_packet->ByteSize())); } void ProbeMessage::SetPacketHeader(ProbePacket_Type packet_type, diff --git a/chrome/browser/net/probe_message.h b/chrome/browser/net/probe_message.h index cef40d40..6fa0466 100644 --- a/chrome/browser/net/probe_message.h +++ b/chrome/browser/net/probe_message.h @@ -5,10 +5,12 @@ #ifndef CHROME_BROWSER_NET_PROBE_MESSAGE_H_ #define CHROME_BROWSER_NET_PROBE_MESSAGE_H_ +#include <stdint.h> + #include <string> -#include "base/basictypes.h" #include "base/gtest_prod_util.h" +#include "base/macros.h" #include "chrome/browser/net/probe_message.pb.h" namespace chrome_browser_net { @@ -20,10 +22,10 @@ class ProbeMessage { // Generate a ProbeRequest packet. void GenerateProbeRequest(const ProbePacket_Token& received_token, - uint32 group_id, - uint32 probe_size, - uint32 pacing_interval_micros, - uint32 number_probe_packets, + uint32_t group_id, + uint32_t probe_size, + uint32_t pacing_interval_micros, + uint32_t number_probe_packets, ProbePacket* output); // Make an encoded packet (string) from a ProbePacket object. std::string MakeEncodedPacket(const ProbePacket& packet) const; @@ -34,7 +36,7 @@ class ProbeMessage { // packet. Return true if there is no error and false otherwise. bool ParseInput(const std::string& input, ProbePacket* packet) const; - static const uint32 kMaxProbePacketBytes; + static const uint32_t kMaxProbePacketBytes; private: // For unittest. @@ -45,14 +47,14 @@ class ProbeMessage { FRIEND_TEST_ALL_PREFIXES(ProbeMessageTest, TestSetPacketHeader); // Compute the checksum of the padding string. - uint32 Checksum(const std::string& str) const; + uint32_t Checksum(const std::string& str) const; // Encode the packet with kEncodingString. This is also used for decoding. std::string Encode(const std::string& input) const; - static const uint32 kVersion; - static const uint32 kMaxNumberProbePackets; - static const uint32 kMaxPacingIntervalMicros; + static const uint32_t kVersion; + static const uint32_t kMaxNumberProbePackets; + static const uint32_t kMaxPacingIntervalMicros; static const char kEncodingString[]; DISALLOW_COPY_AND_ASSIGN(ProbeMessage); diff --git a/chrome/browser/net/probe_message_unittest.cc b/chrome/browser/net/probe_message_unittest.cc index f386089d..b3d8970 100644 --- a/chrome/browser/net/probe_message_unittest.cc +++ b/chrome/browser/net/probe_message_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 <stdint.h> #include <string.h> #include "chrome/browser/net/probe_message.h" @@ -22,10 +23,10 @@ TEST_F(ProbeMessageTest, TestGenerateProbeRequest) { ProbePacket_Token token; token.set_timestamp_micros(1000000U); token.mutable_hash()->assign("1x1x"); - uint32 group_id = 1; - uint32 probe_size = 500; - uint32 pacing_interval_micros = 1000000; - uint32 number_probe_packets = 21; + uint32_t group_id = 1; + uint32_t probe_size = 500; + uint32_t pacing_interval_micros = 1000000; + uint32_t number_probe_packets = 21; ProbePacket probe_packet; pm.GenerateProbeRequest(token, group_id, @@ -57,10 +58,10 @@ TEST_F(ProbeMessageTest, TestSetPacketHeader) { TEST_F(ProbeMessageTest, TestMakeEncodePacketAndParseInput) { ProbeMessage pm; ProbePacket in_packet; - uint32 version = 2; + uint32_t version = 2; ProbePacket_Type type = ProbePacket_Type_HELLO_REPLY; - uint32 number_probe_packets = 2; - uint32 group_id = 5; + uint32_t number_probe_packets = 2; + uint32_t group_id = 5; in_packet.mutable_header()->set_version(version); in_packet.mutable_header()->set_type(type); in_packet.set_number_probe_packets(number_probe_packets); @@ -81,10 +82,10 @@ TEST_F(ProbeMessageTest, TestMakeEncodePacketAndParseInput) { TEST_F(ProbeMessageTest, TestChecksum) { ProbeMessage pm; std::string str("ABC"); - uint32 computed_checksum = pm.Checksum(str); - uint32 expected_sum = 0; + uint32_t computed_checksum = pm.Checksum(str); + uint32_t expected_sum = 0; for (unsigned i = 0; i < str.size(); ++i) - expected_sum += static_cast<uint8>(str[i]); + expected_sum += static_cast<uint8_t>(str[i]); EXPECT_EQ(computed_checksum, expected_sum); } diff --git a/chrome/browser/net/proxy_browsertest.cc b/chrome/browser/net/proxy_browsertest.cc index 8b0ced8..ccbdbfa 100644 --- a/chrome/browser/net/proxy_browsertest.cc +++ b/chrome/browser/net/proxy_browsertest.cc @@ -4,9 +4,11 @@ #include "base/command_line.h" #include "base/files/file_path.h" +#include "base/macros.h" #include "base/strings/string_util.h" #include "base/strings/stringprintf.h" #include "base/strings/utf_string_conversions.h" +#include "build/build_config.h" #include "chrome/browser/chrome_notification_types.h" #include "chrome/browser/ui/browser.h" #include "chrome/browser/ui/login/login_prompt.h" diff --git a/chrome/browser/net/proxy_service_factory.cc b/chrome/browser/net/proxy_service_factory.cc index d3d4655..20bab5c 100644 --- a/chrome/browser/net/proxy_service_factory.cc +++ b/chrome/browser/net/proxy_service_factory.cc @@ -4,12 +4,15 @@ #include "chrome/browser/net/proxy_service_factory.h" +#include <stddef.h> + #include <string> #include "base/command_line.h" #include "base/metrics/field_trial.h" #include "base/strings/string_number_conversions.h" #include "base/threading/thread.h" +#include "build/build_config.h" #include "chrome/browser/browser_process.h" #include "chrome/browser/io_thread.h" #include "chrome/common/chrome_switches.h" diff --git a/chrome/browser/net/proxy_service_factory.h b/chrome/browser/net/proxy_service_factory.h index 4aa082b..9219b0a 100644 --- a/chrome/browser/net/proxy_service_factory.h +++ b/chrome/browser/net/proxy_service_factory.h @@ -5,7 +5,7 @@ #ifndef CHROME_BROWSER_NET_PROXY_SERVICE_FACTORY_H_ #define CHROME_BROWSER_NET_PROXY_SERVICE_FACTORY_H_ -#include "base/basictypes.h" +#include "base/macros.h" #include "base/memory/scoped_ptr.h" class PrefProxyConfigTracker; diff --git a/chrome/browser/net/quota_policy_channel_id_store.cc b/chrome/browser/net/quota_policy_channel_id_store.cc index 6cfef52..732c8ff 100644 --- a/chrome/browser/net/quota_policy_channel_id_store.cc +++ b/chrome/browser/net/quota_policy_channel_id_store.cc @@ -6,7 +6,6 @@ #include <list> -#include "base/basictypes.h" #include "base/bind.h" #include "base/files/file_path.h" #include "base/files/file_util.h" diff --git a/chrome/browser/net/referrer.cc b/chrome/browser/net/referrer.cc index 67ac6bf..c85ea8c 100644 --- a/chrome/browser/net/referrer.cc +++ b/chrome/browser/net/referrer.cc @@ -5,6 +5,7 @@ #include "chrome/browser/net/referrer.h" #include <limits.h> +#include <stddef.h> #include "base/compiler_specific.h" #include "base/logging.h" @@ -83,11 +84,11 @@ void Referrer::DeleteLeastUseful() { GURL least_useful_url; double lowest_rate_seen = 0.0; // We use longs for durations because we will use multiplication on them. - int64 least_useful_lifetime = 0; // Duration in milliseconds. + int64_t least_useful_lifetime = 0; // Duration in milliseconds. const base::Time kNow(base::Time::Now()); // Avoid multiple calls. for (SubresourceMap::iterator it = begin(); it != end(); ++it) { - int64 lifetime = (kNow - it->second.birth_time()).InMilliseconds(); + int64_t lifetime = (kNow - it->second.birth_time()).InMilliseconds(); double rate = it->second.subresource_use_rate(); if (least_useful_url.has_host()) { if (rate > lowest_rate_seen) diff --git a/chrome/browser/net/referrer.h b/chrome/browser/net/referrer.h index fb5d6d2..27dd786 100644 --- a/chrome/browser/net/referrer.h +++ b/chrome/browser/net/referrer.h @@ -17,7 +17,9 @@ #include <map> -#include "base/basictypes.h" +#include <stdint.h> + +#include "base/macros.h" #include "base/time/time.h" #include "net/base/host_port_pair.h" #include "url/gurl.h" @@ -51,13 +53,13 @@ class ReferrerValue { // of our associated referrer.) void ReferrerWasObserved(); - int64 navigation_count() const { return navigation_count_; } + int64_t navigation_count() const { return navigation_count_; } double subresource_use_rate() const { return subresource_use_rate_; } - int64 preconnection_count() const { return preconnection_count_; } + int64_t preconnection_count() const { return preconnection_count_; } void IncrementPreconnectionCount() { ++preconnection_count_; } - int64 preresolution_count() const { return preresolution_count_; } + int64_t preresolution_count() const { return preresolution_count_; } void preresolution_increment() { ++preresolution_count_; } // Reduce the subresource_use_rate_ by the supplied factor, and return true @@ -68,15 +70,15 @@ class ReferrerValue { const base::Time birth_time_; // The number of times this item was navigated to with the fixed referrer. - int64 navigation_count_; + int64_t navigation_count_; // The number of times this item was preconnected as a consequence of its // referrer. - int64 preconnection_count_; + int64_t preconnection_count_; // The number of times this item was pre-resolved (via DNS) as a consequence // of its referrer. - int64 preresolution_count_; + int64_t preresolution_count_; // A smoothed estimate of the expected number of connections that will be made // to this subresource. @@ -102,7 +104,7 @@ class Referrer : public SubresourceMap { public: Referrer(); void IncrementUseCount() { ++use_count_; } - int64 use_count() const { return use_count_; } + int64_t use_count() const { return use_count_; } // Add the indicated url to the list that are resolved via DNS when the user // navigates to this referrer. Note that if the list is long, an entry may be @@ -129,7 +131,7 @@ class Referrer : public SubresourceMap { // The number of times this referer had its subresources scanned for possible // preconnection or DNS preresolution. - int64 use_count_; + int64_t use_count_; // We put these into a std::map<>, so we need copy constructors. // DISALLOW_COPY_AND_ASSIGN(Referrer); diff --git a/chrome/browser/net/request_source_bandwidth_histograms.cc b/chrome/browser/net/request_source_bandwidth_histograms.cc index a9a7b47..bdcdc82 100644 --- a/chrome/browser/net/request_source_bandwidth_histograms.cc +++ b/chrome/browser/net/request_source_bandwidth_histograms.cc @@ -4,6 +4,8 @@ #include "chrome/browser/net/request_source_bandwidth_histograms.h" +#include <stdint.h> + #include "base/metrics/histogram_macros.h" #include "content/public/browser/resource_request_info.h" #include "content/public/common/process_type.h" @@ -40,8 +42,8 @@ Bucket GetBucketForRequest(const net::URLRequest* request) { UMA_HISTOGRAM_CUSTOM_COUNTS("Net.ResponseSizeByProcess." bucket, sample, \ 1, 4 * 1024 * 1024, 100) -void LogRequest(Bucket bucket, int64 bytes) { - int64 kilobytes = bytes / 1024; +void LogRequest(Bucket bucket, int64_t bytes) { + int64_t kilobytes = bytes / 1024; switch (bucket) { case BUCKET_UNKNOWN: UMA_HISTOGRAM_RESPONSE_KB("Unknown", kilobytes); diff --git a/chrome/browser/net/resource_prefetch_predictor_observer.h b/chrome/browser/net/resource_prefetch_predictor_observer.h index e2fd480..9bd1694 100644 --- a/chrome/browser/net/resource_prefetch_predictor_observer.h +++ b/chrome/browser/net/resource_prefetch_predictor_observer.h @@ -5,7 +5,7 @@ #ifndef CHROME_BROWSER_NET_RESOURCE_PREFETCH_PREDICTOR_OBSERVER_H_ #define CHROME_BROWSER_NET_RESOURCE_PREFETCH_PREDICTOR_OBSERVER_H_ -#include "base/basictypes.h" +#include "base/macros.h" #include "base/memory/weak_ptr.h" #include "chrome/browser/predictors/resource_prefetch_predictor.h" #include "content/public/common/resource_type.h" diff --git a/chrome/browser/net/safe_search_util.cc b/chrome/browser/net/safe_search_util.cc index 2a184aa..17bda66 100644 --- a/chrome/browser/net/safe_search_util.cc +++ b/chrome/browser/net/safe_search_util.cc @@ -9,6 +9,7 @@ #include <vector> #include "base/logging.h" +#include "base/macros.h" #include "base/strings/string_number_conversions.h" #include "base/strings/string_piece.h" #include "base/strings/string_split.h" diff --git a/chrome/browser/net/sdch_browsertest.cc b/chrome/browser/net/sdch_browsertest.cc index b9c30e5..d28651b 100644 --- a/chrome/browser/net/sdch_browsertest.cc +++ b/chrome/browser/net/sdch_browsertest.cc @@ -5,6 +5,9 @@ // End-to-end SDCH tests. Uses the embedded test server to return SDCH // results +#include <stddef.h> +#include <stdint.h> + #include "base/base64.h" #include "base/bind.h" #include "base/callback.h" @@ -16,6 +19,7 @@ #include "base/strings/string_tokenizer.h" #include "base/strings/string_util.h" #include "base/strings/stringprintf.h" +#include "build/build_config.h" #include "chrome/browser/browser_process.h" #include "chrome/browser/browsing_data/browsing_data_helper.h" #include "chrome/browser/browsing_data/browsing_data_remover.h" @@ -487,7 +491,7 @@ class SdchBrowserTest : public InProcessBrowserTest, run_loop.Run(); } - uint16 test_server_port() { return test_server_.port(); } + uint16_t test_server_port() { return test_server_.port(); } void SetSdchCacheability(bool cache_sdch_response) { base::RunLoop run_loop; diff --git a/chrome/browser/net/service_providers_win.cc b/chrome/browser/net/service_providers_win.cc index 17b8469..125b26a 100644 --- a/chrome/browser/net/service_providers_win.cc +++ b/chrome/browser/net/service_providers_win.cc @@ -8,6 +8,7 @@ #include <Ws2spi.h> #include "base/logging.h" +#include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "base/values.h" diff --git a/chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_io_data.cc b/chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_io_data.cc index 6dc4a55..6b482a5 100644 --- a/chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_io_data.cc +++ b/chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_io_data.cc @@ -5,6 +5,7 @@ #include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_io_data.h" #include "base/prefs/pref_service.h" +#include "build/build_config.h" #include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings.h" #include "chrome/common/chrome_content_client.h" #include "chrome/common/pref_names.h" diff --git a/chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings.cc b/chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings.cc index fac32f3..a702c9a 100644 --- a/chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings.cc +++ b/chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings.cc @@ -14,6 +14,7 @@ #include "base/prefs/scoped_user_pref_update.h" #include "base/strings/string_util.h" #include "base/time/time.h" +#include "build/build_config.h" #include "chrome/browser/browser_process.h" #include "chrome/browser/metrics/chrome_metrics_service_accessor.h" #include "chrome/browser/profiles/profile.h" diff --git a/chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings.h b/chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings.h index 83df456..048b5a6 100644 --- a/chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings.h +++ b/chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings.h @@ -7,6 +7,7 @@ #include <string> +#include "base/macros.h" #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_request_options.h" #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_settings.h" #include "components/keyed_service/core/keyed_service.h" diff --git a/chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings_factory.h b/chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings_factory.h index ba8afb4..d3b253c 100644 --- a/chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings_factory.h +++ b/chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings_factory.h @@ -6,6 +6,7 @@ #define CHROME_BROWSER_NET_SPDYPROXY_DATA_REDUCTION_PROXY_CHROME_SETTINGS_FACTORY_H_ #include "base/compiler_specific.h" +#include "base/macros.h" #include "base/memory/singleton.h" #include "components/keyed_service/content/browser_context_keyed_service_factory.h" diff --git a/chrome/browser/net/spdyproxy/data_reduction_proxy_infobar_delegate_android.h b/chrome/browser/net/spdyproxy/data_reduction_proxy_infobar_delegate_android.h index c516c6d..5a487b3 100644 --- a/chrome/browser/net/spdyproxy/data_reduction_proxy_infobar_delegate_android.h +++ b/chrome/browser/net/spdyproxy/data_reduction_proxy_infobar_delegate_android.h @@ -5,7 +5,7 @@ #ifndef CHROME_BROWSER_NET_SPDYPROXY_DATA_REDUCTION_PROXY_INFOBAR_DELEGATE_ANDROID_H_ #define CHROME_BROWSER_NET_SPDYPROXY_DATA_REDUCTION_PROXY_INFOBAR_DELEGATE_ANDROID_H_ -#include "base/basictypes.h" +#include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "components/infobars/core/confirm_infobar_delegate.h" #include "components/infobars/core/infobar_delegate.h" diff --git a/chrome/browser/net/spdyproxy/data_reduction_proxy_settings_android.cc b/chrome/browser/net/spdyproxy/data_reduction_proxy_settings_android.cc index 6090293..47940ae 100644 --- a/chrome/browser/net/spdyproxy/data_reduction_proxy_settings_android.cc +++ b/chrome/browser/net/spdyproxy/data_reduction_proxy_settings_android.cc @@ -4,6 +4,8 @@ #include "chrome/browser/net/spdyproxy/data_reduction_proxy_settings_android.h" +#include <stdint.h> + #include "base/android/jni_android.h" #include "base/android/jni_string.h" #include "base/values.h" @@ -116,9 +118,9 @@ base::android::ScopedJavaLocalRef<jobject> DataReductionProxySettingsAndroid::GetContentLengths( JNIEnv* env, const JavaParamRef<jobject>& obj) { - int64 original_content_length; - int64 received_content_length; - int64 last_update_internal; + int64_t original_content_length; + int64_t received_content_length; + int64_t last_update_internal; Settings()->GetContentLengths( data_reduction_proxy::kNumDaysInHistorySummary, &original_content_length, diff --git a/chrome/browser/net/spdyproxy/data_reduction_proxy_settings_android.h b/chrome/browser/net/spdyproxy/data_reduction_proxy_settings_android.h index 2512284..477a9aa 100644 --- a/chrome/browser/net/spdyproxy/data_reduction_proxy_settings_android.h +++ b/chrome/browser/net/spdyproxy/data_reduction_proxy_settings_android.h @@ -8,9 +8,9 @@ #include "base/android/jni_string.h" #include "base/android/jni_weak_ref.h" #include "base/android/scoped_java_ref.h" -#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/prefs/pref_member.h" diff --git a/chrome/browser/net/spdyproxy/data_reduction_proxy_settings_unittest_android.cc b/chrome/browser/net/spdyproxy/data_reduction_proxy_settings_unittest_android.cc index f762b2e..36f087f 100644 --- a/chrome/browser/net/spdyproxy/data_reduction_proxy_settings_unittest_android.cc +++ b/chrome/browser/net/spdyproxy/data_reduction_proxy_settings_unittest_android.cc @@ -4,6 +4,8 @@ #include "chrome/browser/net/spdyproxy/data_reduction_proxy_settings_android.h" +#include <stddef.h> + #include "base/android/jni_android.h" #include "base/android/jni_string.h" #include "base/android/scoped_java_ref.h" diff --git a/chrome/browser/net/timed_cache.h b/chrome/browser/net/timed_cache.h index dfcdc98..a808777 100644 --- a/chrome/browser/net/timed_cache.h +++ b/chrome/browser/net/timed_cache.h @@ -5,8 +5,8 @@ #ifndef CHROME_BROWSER_NET_TIMED_CACHE_H_ #define CHROME_BROWSER_NET_TIMED_CACHE_H_ -#include "base/basictypes.h" #include "base/containers/mru_cache.h" +#include "base/macros.h" #include "base/time/time.h" class GURL; diff --git a/chrome/browser/net/url_info.cc b/chrome/browser/net/url_info.cc index 6c983cd..5057a9f 100644 --- a/chrome/browser/net/url_info.cc +++ b/chrome/browser/net/url_info.cc @@ -6,6 +6,7 @@ #include <ctype.h> #include <math.h> +#include <stddef.h> #include <stdint.h> #include <algorithm> @@ -15,6 +16,7 @@ #include "base/format_macros.h" #include "base/lazy_instance.h" #include "base/logging.h" +#include "base/macros.h" #include "base/metrics/histogram.h" #include "base/strings/stringprintf.h" diff --git a/chrome/browser/net/url_info.h b/chrome/browser/net/url_info.h index 8b13588..e5e9fb9 100644 --- a/chrome/browser/net/url_info.h +++ b/chrome/browser/net/url_info.h @@ -19,6 +19,7 @@ #include <string> #include <vector> +#include "base/macros.h" #include "base/time/time.h" #include "net/base/host_port_pair.h" #include "url/gurl.h" diff --git a/chrome/browser/net/utility_process_mojo_proxy_resolver_factory.h b/chrome/browser/net/utility_process_mojo_proxy_resolver_factory.h index a14f652..5eaafc7 100644 --- a/chrome/browser/net/utility_process_mojo_proxy_resolver_factory.h +++ b/chrome/browser/net/utility_process_mojo_proxy_resolver_factory.h @@ -5,6 +5,8 @@ #ifndef CHROME_BROWSER_NET_UTILITY_PROCESS_MOJO_PROXY_RESOLVER_FACTORY_H_ #define CHROME_BROWSER_NET_UTILITY_PROCESS_MOJO_PROXY_RESOLVER_FACTORY_H_ +#include <stddef.h> + #include "base/macros.h" #include "base/memory/weak_ptr.h" #include "base/threading/thread_checker.h" diff --git a/chrome/browser/net/websocket_browsertest.cc b/chrome/browser/net/websocket_browsertest.cc index c7e048b..f22e33c 100644 --- a/chrome/browser/net/websocket_browsertest.cc +++ b/chrome/browser/net/websocket_browsertest.cc @@ -4,6 +4,7 @@ #include <string> +#include "base/macros.h" #include "base/strings/string_util.h" #include "base/strings/utf_string_conversions.h" #include "chrome/browser/chrome_notification_types.h" diff --git a/chrome/browser/notifications/extension_welcome_notification.cc b/chrome/browser/notifications/extension_welcome_notification.cc index 4ea1fcb..fdeb9dc 100644 --- a/chrome/browser/notifications/extension_welcome_notification.cc +++ b/chrome/browser/notifications/extension_welcome_notification.cc @@ -4,11 +4,14 @@ #include "chrome/browser/notifications/extension_welcome_notification.h" +#include <stdint.h> + #include <utility> #include "base/guid.h" #include "base/lazy_instance.h" #include "base/location.h" +#include "base/macros.h" #include "base/prefs/pref_service.h" #include "base/single_thread_task_runner.h" #include "base/strings/utf_string_conversions.h" @@ -336,7 +339,7 @@ void ExtensionWelcomeNotification::ExpireWelcomeNotification() { base::Time ExtensionWelcomeNotification::GetExpirationTimestamp() const { PrefService* const pref_service = profile_->GetPrefs(); - const int64 expiration_timestamp = + const int64_t expiration_timestamp = pref_service->GetInt64(prefs::kWelcomeNotificationExpirationTimestamp); return (expiration_timestamp == 0) ? base::Time() diff --git a/chrome/browser/notifications/extension_welcome_notification.h b/chrome/browser/notifications/extension_welcome_notification.h index 3e26c50..363c8df 100644 --- a/chrome/browser/notifications/extension_welcome_notification.h +++ b/chrome/browser/notifications/extension_welcome_notification.h @@ -7,6 +7,7 @@ #include <string> +#include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "base/prefs/pref_member.h" #include "base/timer/timer.h" diff --git a/chrome/browser/notifications/extension_welcome_notification_unittest.cc b/chrome/browser/notifications/extension_welcome_notification_unittest.cc index 85826c3..e04706c 100644 --- a/chrome/browser/notifications/extension_welcome_notification_unittest.cc +++ b/chrome/browser/notifications/extension_welcome_notification_unittest.cc @@ -4,8 +4,11 @@ #include "chrome/browser/notifications/extension_welcome_notification.h" +#include <stdint.h> + #include <string> +#include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "base/message_loop/message_loop.h" #include "base/prefs/pref_service.h" @@ -195,10 +198,10 @@ class ExtensionWelcomeNotificationTest : public testing::Test { void SetBooleanPref(const char* path, bool value) const { profile_->GetPrefs()->SetBoolean(path, value); } - int64 GetInt64Pref(const char* path) const { + int64_t GetInt64Pref(const char* path) const { return profile_->GetPrefs()->GetInt64(path); } - void SetInt64Pref(const char* path, int64 value) const { + void SetInt64Pref(const char* path, int64_t value) const { profile_->GetPrefs()->SetInt64(path, value); } diff --git a/chrome/browser/notifications/fullscreen_notification_blocker.h b/chrome/browser/notifications/fullscreen_notification_blocker.h index 439e766..d2101de 100644 --- a/chrome/browser/notifications/fullscreen_notification_blocker.h +++ b/chrome/browser/notifications/fullscreen_notification_blocker.h @@ -5,7 +5,7 @@ #ifndef CHROME_BROWSER_NOTIFICATIONS_FULLSCREEN_NOTIFICATION_BLOCKER_H_ #define CHROME_BROWSER_NOTIFICATIONS_FULLSCREEN_NOTIFICATION_BLOCKER_H_ -#include "base/basictypes.h" +#include "base/macros.h" #include "content/public/browser/notification_observer.h" #include "content/public/browser/notification_registrar.h" #include "ui/message_center/notification_blocker.h" diff --git a/chrome/browser/notifications/google_now_notification_stats_collector.h b/chrome/browser/notifications/google_now_notification_stats_collector.h index 9ce460b..80e3567c 100644 --- a/chrome/browser/notifications/google_now_notification_stats_collector.h +++ b/chrome/browser/notifications/google_now_notification_stats_collector.h @@ -7,6 +7,7 @@ #include <string> +#include "base/macros.h" #include "ui/message_center/message_center.h" #include "ui/message_center/message_center_observer.h" #include "ui/message_center/message_center_types.h" diff --git a/chrome/browser/notifications/login_state_notification_blocker_chromeos.h b/chrome/browser/notifications/login_state_notification_blocker_chromeos.h index 12767f2..414f22b 100644 --- a/chrome/browser/notifications/login_state_notification_blocker_chromeos.h +++ b/chrome/browser/notifications/login_state_notification_blocker_chromeos.h @@ -6,6 +6,7 @@ #define CHROME_BROWSER_NOTIFICATIONS_LOGIN_STATE_NOTIFICATION_BLOCKER_CHROMEOS_H_ #include "ash/shell_observer.h" +#include "base/macros.h" #include "chrome/browser/chromeos/login/ui/user_adding_screen.h" #include "chromeos/login/login_state.h" #include "ui/message_center/notification_blocker.h" diff --git a/chrome/browser/notifications/login_state_notification_blocker_chromeos_browsertest.cc b/chrome/browser/notifications/login_state_notification_blocker_chromeos_browsertest.cc index 23f09c3..3d1ce0b4 100644 --- a/chrome/browser/notifications/login_state_notification_blocker_chromeos_browsertest.cc +++ b/chrome/browser/notifications/login_state_notification_blocker_chromeos_browsertest.cc @@ -5,6 +5,7 @@ #include "ash/shell.h" #include "ash/system/system_notifier.h" #include "base/command_line.h" +#include "base/macros.h" #include "chrome/browser/chromeos/login/login_manager_test.h" #include "chrome/browser/chromeos/login/startup_utils.h" #include "chrome/browser/chromeos/login/ui/user_adding_screen.h" diff --git a/chrome/browser/notifications/login_state_notification_blocker_chromeos_unittest.cc b/chrome/browser/notifications/login_state_notification_blocker_chromeos_unittest.cc index 3060a58..396b866 100644 --- a/chrome/browser/notifications/login_state_notification_blocker_chromeos_unittest.cc +++ b/chrome/browser/notifications/login_state_notification_blocker_chromeos_unittest.cc @@ -6,6 +6,7 @@ #include "ash/system/system_notifier.h" #include "ash/test/ash_test_base.h" #include "base/command_line.h" +#include "base/macros.h" #include "chrome/browser/notifications/login_state_notification_blocker_chromeos.h" #include "chromeos/login/login_state.h" #include "ui/message_center/message_center.h" diff --git a/chrome/browser/notifications/message_center_notification_manager.cc b/chrome/browser/notifications/message_center_notification_manager.cc index aed754c..b09d182 100644 --- a/chrome/browser/notifications/message_center_notification_manager.cc +++ b/chrome/browser/notifications/message_center_notification_manager.cc @@ -10,6 +10,7 @@ #include "base/memory/scoped_ptr.h" #include "base/stl_util.h" #include "base/strings/stringprintf.h" +#include "build/build_config.h" #include "chrome/browser/extensions/api/notification_provider/notification_provider_api.h" #include "chrome/browser/notifications/extension_welcome_notification.h" #include "chrome/browser/notifications/extension_welcome_notification_factory.h" diff --git a/chrome/browser/notifications/message_center_notification_manager.h b/chrome/browser/notifications/message_center_notification_manager.h index c3a1cac..40a5b61 100644 --- a/chrome/browser/notifications/message_center_notification_manager.h +++ b/chrome/browser/notifications/message_center_notification_manager.h @@ -10,6 +10,7 @@ #include <vector> #include "base/gtest_prod_util.h" +#include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "base/memory/weak_ptr.h" #include "base/time/time.h" diff --git a/chrome/browser/notifications/message_center_notifications_browsertest.cc b/chrome/browser/notifications/message_center_notifications_browsertest.cc index cb67a36..10a6a42 100644 --- a/chrome/browser/notifications/message_center_notifications_browsertest.cc +++ b/chrome/browser/notifications/message_center_notifications_browsertest.cc @@ -6,11 +6,13 @@ #include <string> #include "base/command_line.h" +#include "base/macros.h" #include "base/message_loop/message_loop.h" #include "base/strings/string_number_conversions.h" #include "base/strings/string_util.h" #include "base/strings/stringprintf.h" #include "base/strings/utf_string_conversions.h" +#include "build/build_config.h" #include "chrome/browser/browser_process.h" #include "chrome/browser/notifications/message_center_notification_manager.h" #include "chrome/browser/notifications/notification.h" diff --git a/chrome/browser/notifications/message_center_notifications_unittest.cc b/chrome/browser/notifications/message_center_notifications_unittest.cc index cdaf477..9105b59 100644 --- a/chrome/browser/notifications/message_center_notifications_unittest.cc +++ b/chrome/browser/notifications/message_center_notifications_unittest.cc @@ -7,6 +7,7 @@ #include "base/strings/utf_string_conversions.h" #include "base/test/test_timeouts.h" #include "base/values.h" +#include "build/build_config.h" #include "chrome/browser/notifications/message_center_notification_manager.h" #include "chrome/browser/notifications/notification.h" #include "chrome/browser/notifications/notification_test_util.h" diff --git a/chrome/browser/notifications/message_center_settings_controller.cc b/chrome/browser/notifications/message_center_settings_controller.cc index 171f184..f67ee39 100644 --- a/chrome/browser/notifications/message_center_settings_controller.cc +++ b/chrome/browser/notifications/message_center_settings_controller.cc @@ -12,6 +12,7 @@ #include "base/strings/utf_string_conversions.h" #include "base/task/cancelable_task_tracker.h" #include "base/thread_task_runner_handle.h" +#include "build/build_config.h" #include "chrome/browser/browser_process.h" #include "chrome/browser/chrome_notification_types.h" #include "chrome/browser/content_settings/host_content_settings_map_factory.h" diff --git a/chrome/browser/notifications/message_center_settings_controller.h b/chrome/browser/notifications/message_center_settings_controller.h index 5ada1a3..0b5fc97 100644 --- a/chrome/browser/notifications/message_center_settings_controller.h +++ b/chrome/browser/notifications/message_center_settings_controller.h @@ -5,13 +5,16 @@ #ifndef CHROME_BROWSER_NOTIFICATIONS_MESSAGE_CENTER_SETTINGS_CONTROLLER_H_ #define CHROME_BROWSER_NOTIFICATIONS_MESSAGE_CENTER_SETTINGS_CONTROLLER_H_ +#include <stddef.h> + #include <map> #include <vector> -#include "base/basictypes.h" +#include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "base/memory/weak_ptr.h" #include "base/observer_list.h" +#include "build/build_config.h" #include "chrome/browser/extensions/app_icon_loader.h" #include "chrome/browser/profiles/profile_info_cache_observer.h" #include "components/content_settings/core/common/content_settings.h" diff --git a/chrome/browser/notifications/message_center_settings_controller_unittest.cc b/chrome/browser/notifications/message_center_settings_controller_unittest.cc index 13c84c93..f4b05b6 100644 --- a/chrome/browser/notifications/message_center_settings_controller_unittest.cc +++ b/chrome/browser/notifications/message_center_settings_controller_unittest.cc @@ -6,7 +6,9 @@ #include <utility> #include "base/command_line.h" +#include "base/macros.h" #include "base/strings/utf_string_conversions.h" +#include "build/build_config.h" #include "chrome/browser/content_settings/host_content_settings_map_factory.h" #include "chrome/browser/extensions/extension_service.h" #include "chrome/browser/extensions/test_extension_system.h" diff --git a/chrome/browser/notifications/message_center_stats_collector.cc b/chrome/browser/notifications/message_center_stats_collector.cc index 67657e3..196de98 100644 --- a/chrome/browser/notifications/message_center_stats_collector.cc +++ b/chrome/browser/notifications/message_center_stats_collector.cc @@ -4,6 +4,8 @@ #include "chrome/browser/notifications/message_center_stats_collector.h" +#include <stddef.h> + #include <string> #include "base/metrics/histogram.h" diff --git a/chrome/browser/notifications/message_center_stats_collector.h b/chrome/browser/notifications/message_center_stats_collector.h index 75c340d..8b87699 100644 --- a/chrome/browser/notifications/message_center_stats_collector.h +++ b/chrome/browser/notifications/message_center_stats_collector.h @@ -8,6 +8,7 @@ #include <set> #include <string> +#include "base/macros.h" #include "ui/message_center/message_center.h" #include "ui/message_center/message_center_observer.h" #include "ui/message_center/message_center_types.h" diff --git a/chrome/browser/notifications/notification.h b/chrome/browser/notifications/notification.h index 668fa0f..99b9072 100644 --- a/chrome/browser/notifications/notification.h +++ b/chrome/browser/notifications/notification.h @@ -7,7 +7,6 @@ #include <string> -#include "base/basictypes.h" #include "base/memory/scoped_ptr.h" #include "base/strings/string16.h" #include "base/values.h" diff --git a/chrome/browser/notifications/notification_browsertest.cc b/chrome/browser/notifications/notification_browsertest.cc index 8642d8d..19ec359 100644 --- a/chrome/browser/notifications/notification_browsertest.cc +++ b/chrome/browser/notifications/notification_browsertest.cc @@ -9,12 +9,14 @@ #include "base/callback.h" #include "base/command_line.h" #include "base/compiler_specific.h" +#include "base/macros.h" #include "base/memory/ref_counted.h" #include "base/run_loop.h" #include "base/strings/stringprintf.h" #include "base/strings/utf_string_conversions.h" #include "base/test/simple_test_clock.h" #include "base/time/clock.h" +#include "build/build_config.h" #include "chrome/browser/browser_process.h" #include "chrome/browser/chrome_notification_types.h" #include "chrome/browser/content_settings/host_content_settings_map_factory.h" diff --git a/chrome/browser/notifications/notification_conversion_helper.cc b/chrome/browser/notifications/notification_conversion_helper.cc index 8ce7ee3..5b78d20 100644 --- a/chrome/browser/notifications/notification_conversion_helper.cc +++ b/chrome/browser/notifications/notification_conversion_helper.cc @@ -4,6 +4,9 @@ #include "chrome/browser/notifications/notification_conversion_helper.h" +#include <stddef.h> +#include <stdint.h> + #include <string> #include <utility> #include <vector> diff --git a/chrome/browser/notifications/notification_conversion_helper_unittest.cc b/chrome/browser/notifications/notification_conversion_helper_unittest.cc index 4738de9..67d3bc1 100644 --- a/chrome/browser/notifications/notification_conversion_helper_unittest.cc +++ b/chrome/browser/notifications/notification_conversion_helper_unittest.cc @@ -4,6 +4,7 @@ #include "chrome/browser/notifications/notification_conversion_helper.h" +#include "base/macros.h" #include "base/strings/utf_string_conversions.h" #include "chrome/browser/notifications/notification.h" #include "chrome/browser/notifications/notification_test_util.h" diff --git a/chrome/browser/notifications/notification_object_proxy.h b/chrome/browser/notifications/notification_object_proxy.h index 813aba4..1de7447 100644 --- a/chrome/browser/notifications/notification_object_proxy.h +++ b/chrome/browser/notifications/notification_object_proxy.h @@ -7,6 +7,7 @@ #include <string> +#include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "chrome/browser/notifications/notification_delegate.h" diff --git a/chrome/browser/notifications/notification_permission_context_factory.h b/chrome/browser/notifications/notification_permission_context_factory.h index e7aac50..6190325 100644 --- a/chrome/browser/notifications/notification_permission_context_factory.h +++ b/chrome/browser/notifications/notification_permission_context_factory.h @@ -5,6 +5,7 @@ #ifndef CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_PERMISSION_CONTEXT_FACTORY_H_ #define CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_PERMISSION_CONTEXT_FACTORY_H_ +#include "base/macros.h" #include "base/memory/singleton.h" #include "chrome/browser/permissions/permission_context_factory_base.h" diff --git a/chrome/browser/notifications/notification_permission_infobar_delegate.h b/chrome/browser/notifications/notification_permission_infobar_delegate.h index f541631..bc81585 100644 --- a/chrome/browser/notifications/notification_permission_infobar_delegate.h +++ b/chrome/browser/notifications/notification_permission_infobar_delegate.h @@ -7,6 +7,7 @@ #include <string> +#include "base/macros.h" #include "chrome/browser/permissions/permission_infobar_delegate.h" class NotificationPermissionInfobarDelegate : public PermissionInfobarDelegate { diff --git a/chrome/browser/notifications/notification_system_observer.h b/chrome/browser/notifications/notification_system_observer.h index 7b5fe88..6e2eb9a 100644 --- a/chrome/browser/notifications/notification_system_observer.h +++ b/chrome/browser/notifications/notification_system_observer.h @@ -5,6 +5,7 @@ #ifndef CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_SYSTEM_OBSERVER_H_ #define CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_SYSTEM_OBSERVER_H_ +#include "base/macros.h" #include "content/public/browser/notification_observer.h" #include "content/public/browser/notification_registrar.h" diff --git a/chrome/browser/notifications/notification_test_util.h b/chrome/browser/notifications/notification_test_util.h index e2d34eb..66b01e6 100644 --- a/chrome/browser/notifications/notification_test_util.h +++ b/chrome/browser/notifications/notification_test_util.h @@ -11,6 +11,7 @@ #include <vector> #include "base/callback.h" +#include "base/macros.h" #include "chrome/browser/notifications/notification.h" #include "chrome/browser/notifications/notification_ui_manager.h" diff --git a/chrome/browser/notifications/notification_ui_manager.h b/chrome/browser/notifications/notification_ui_manager.h index d86a9a5..5986a53 100644 --- a/chrome/browser/notifications/notification_ui_manager.h +++ b/chrome/browser/notifications/notification_ui_manager.h @@ -9,7 +9,7 @@ #include <string> #include <vector> -#include "base/basictypes.h" +#include "base/macros.h" typedef void* ProfileID; diff --git a/chrome/browser/notifications/notification_ui_manager_android.h b/chrome/browser/notifications/notification_ui_manager_android.h index 11beb39..523b58e 100644 --- a/chrome/browser/notifications/notification_ui_manager_android.h +++ b/chrome/browser/notifications/notification_ui_manager_android.h @@ -6,10 +6,12 @@ #define CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_UI_MANAGER_ANDROID_H_ #include <jni.h> +#include <stdint.h> #include <map> #include <string> #include "base/android/scoped_java_ref.h" +#include "base/macros.h" #include "chrome/browser/notifications/notification_ui_manager.h" // Implementation of the Notification UI Manager for Android, which defers to diff --git a/chrome/browser/notifications/notifier_state_tracker.cc b/chrome/browser/notifications/notifier_state_tracker.cc index 3af24b4..d31a0ac 100644 --- a/chrome/browser/notifications/notifier_state_tracker.cc +++ b/chrome/browser/notifications/notifier_state_tracker.cc @@ -4,11 +4,14 @@ #include "chrome/browser/notifications/notifier_state_tracker.h" +#include <stddef.h> + #include <utility> #include "base/bind.h" #include "base/prefs/scoped_user_pref_update.h" #include "base/values.h" +#include "build/build_config.h" #include "chrome/browser/notifications/desktop_notification_profile_util.h" #include "chrome/browser/profiles/profile.h" #include "chrome/common/pref_names.h" diff --git a/chrome/browser/notifications/notifier_state_tracker_factory.h b/chrome/browser/notifications/notifier_state_tracker_factory.h index f122a580..ea887ed 100644 --- a/chrome/browser/notifications/notifier_state_tracker_factory.h +++ b/chrome/browser/notifications/notifier_state_tracker_factory.h @@ -5,6 +5,7 @@ #ifndef CHROME_BROWSER_NOTIFICATIONS_NOTIFIER_STATE_TRACKER_FACTORY_H_ #define CHROME_BROWSER_NOTIFICATIONS_NOTIFIER_STATE_TRACKER_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/chrome/browser/notifications/platform_notification_service_impl.cc b/chrome/browser/notifications/platform_notification_service_impl.cc index bcb89a79a..6a28a84 100644 --- a/chrome/browser/notifications/platform_notification_service_impl.cc +++ b/chrome/browser/notifications/platform_notification_service_impl.cc @@ -11,6 +11,7 @@ #include "base/metrics/user_metrics_action.h" #include "base/prefs/pref_service.h" #include "base/strings/utf_string_conversions.h" +#include "build/build_config.h" #include "chrome/browser/browser_process.h" #include "chrome/browser/content_settings/host_content_settings_map_factory.h" #include "chrome/browser/notifications/desktop_notification_profile_util.h" diff --git a/chrome/browser/notifications/platform_notification_service_impl.h b/chrome/browser/notifications/platform_notification_service_impl.h index e7f9ab6..d2ac54f 100644 --- a/chrome/browser/notifications/platform_notification_service_impl.h +++ b/chrome/browser/notifications/platform_notification_service_impl.h @@ -11,6 +11,7 @@ #include <string> #include "base/gtest_prod_util.h" +#include "base/macros.h" #include "base/memory/singleton.h" #include "base/strings/string16.h" #include "chrome/browser/notifications/notification.h" diff --git a/chrome/browser/notifications/platform_notification_service_unittest.cc b/chrome/browser/notifications/platform_notification_service_unittest.cc index 5f303bb..d8b2e01 100644 --- a/chrome/browser/notifications/platform_notification_service_unittest.cc +++ b/chrome/browser/notifications/platform_notification_service_unittest.cc @@ -2,11 +2,15 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#include <stdint.h> + #include <utility> +#include "base/macros.h" #include "base/strings/utf_string_conversions.h" #include "base/threading/platform_thread.h" #include "base/time/time.h" +#include "build/build_config.h" #include "chrome/browser/content_settings/host_content_settings_map_factory.h" #include "chrome/browser/notifications/notification_delegate.h" #include "chrome/browser/notifications/notification_test_util.h" diff --git a/chrome/browser/notifications/profile_notification.cc b/chrome/browser/notifications/profile_notification.cc index 1109b79..c04a1d7 100644 --- a/chrome/browser/notifications/profile_notification.cc +++ b/chrome/browser/notifications/profile_notification.cc @@ -5,6 +5,7 @@ #include "chrome/browser/notifications/profile_notification.h" #include "base/strings/stringprintf.h" +#include "build/build_config.h" #include "chrome/browser/ui/ash/multi_user/multi_user_util.h" #include "components/signin/core/account_id/account_id.h" diff --git a/chrome/browser/notifications/screen_lock_notification_blocker.h b/chrome/browser/notifications/screen_lock_notification_blocker.h index 4aff911..8888878 100644 --- a/chrome/browser/notifications/screen_lock_notification_blocker.h +++ b/chrome/browser/notifications/screen_lock_notification_blocker.h @@ -5,7 +5,7 @@ #ifndef CHROME_BROWSER_NOTIFICATIONS_SCREEN_LOCK_NOTIFICATION_BLOCKER_H_ #define CHROME_BROWSER_NOTIFICATIONS_SCREEN_LOCK_NOTIFICATION_BLOCKER_H_ -#include "base/basictypes.h" +#include "base/macros.h" #include "base/observer_list.h" #include "base/timer/timer.h" #include "ui/message_center/notification_blocker.h" |