diff options
author | avi <avi@chromium.org> | 2015-12-22 14:01:49 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-12-22 22:02:48 +0000 |
commit | 82d54ced98e8abf55c6a31253e85e81150b5e74e (patch) | |
tree | f13a3d72acb6dbe3d4ce592ffee1ce431467d6a8 /chromecast | |
parent | f13c2a3e3ed93b92dc92e5e9accc7e9fb9470bb3 (diff) | |
download | chromium_src-82d54ced98e8abf55c6a31253e85e81150b5e74e.zip chromium_src-82d54ced98e8abf55c6a31253e85e81150b5e74e.tar.gz chromium_src-82d54ced98e8abf55c6a31253e85e81150b5e74e.tar.bz2 |
Switch to standard integer types in chromecast/.
BUG=138542
TBR=gunsch@chromium.org
NOPRESUBMIT=true
Review URL: https://codereview.chromium.org/1540423003
Cr-Commit-Position: refs/heads/master@{#366665}
Diffstat (limited to 'chromecast')
123 files changed, 348 insertions, 153 deletions
diff --git a/chromecast/android/cast_jni_registrar.cc b/chromecast/android/cast_jni_registrar.cc index 32c7005..eccbf00 100644 --- a/chromecast/android/cast_jni_registrar.cc +++ b/chromecast/android/cast_jni_registrar.cc @@ -6,6 +6,7 @@ #include "base/android/jni_android.h" #include "base/android/jni_registrar.h" +#include "base/macros.h" #include "chromecast/android/cast_metrics_helper_android.h" #include "chromecast/app/android/crash_handler.h" #include "chromecast/base/android/dumpstate_writer.h" diff --git a/chromecast/app/android/cast_crash_reporter_client_android.h b/chromecast/app/android/cast_crash_reporter_client_android.h index 9761683..9beac22 100644 --- a/chromecast/app/android/cast_crash_reporter_client_android.h +++ b/chromecast/app/android/cast_crash_reporter_client_android.h @@ -5,7 +5,10 @@ #ifndef CHROMECAST_APP_ANDROID_CAST_CRASH_REPORTER_CLIENT_ANDROID_H_ #define CHROMECAST_APP_ANDROID_CAST_CRASH_REPORTER_CLIENT_ANDROID_H_ +#include <stddef.h> + #include "base/compiler_specific.h" +#include "base/macros.h" #include "components/crash/content/app/crash_reporter_client.h" namespace chromecast { diff --git a/chromecast/app/cast_main_delegate.cc b/chromecast/app/cast_main_delegate.cc index 698d14c..b2f9884 100644 --- a/chromecast/app/cast_main_delegate.cc +++ b/chromecast/app/cast_main_delegate.cc @@ -17,6 +17,7 @@ #include "base/logging.h" #include "base/path_service.h" #include "base/posix/global_descriptors.h" +#include "build/build_config.h" #include "chromecast/base/cast_paths.h" #include "chromecast/browser/cast_content_browser_client.h" #include "chromecast/common/cast_resource_delegate.h" diff --git a/chromecast/app/cast_main_delegate.h b/chromecast/app/cast_main_delegate.h index a6fd003..010f28f 100644 --- a/chromecast/app/cast_main_delegate.h +++ b/chromecast/app/cast_main_delegate.h @@ -7,6 +7,7 @@ #include "base/macros.h" #include "base/memory/scoped_ptr.h" +#include "build/build_config.h" #include "chromecast/common/cast_content_client.h" #include "content/public/app/content_main_delegate.h" diff --git a/chromecast/app/linux/cast_crash_reporter_client.h b/chromecast/app/linux/cast_crash_reporter_client.h index ef9f900..315ace2 100644 --- a/chromecast/app/linux/cast_crash_reporter_client.h +++ b/chromecast/app/linux/cast_crash_reporter_client.h @@ -5,6 +5,8 @@ #ifndef CHROMECAST_APP_LINUX_CAST_CRASH_REPORTER_CLIENT_H_ #define CHROMECAST_APP_LINUX_CAST_CRASH_REPORTER_CLIENT_H_ +#include <stdint.h> + #include <string> #include "base/macros.h" diff --git a/chromecast/app/linux/cast_crash_reporter_client_unittest.cc b/chromecast/app/linux/cast_crash_reporter_client_unittest.cc index 9dc408b..133a0ad 100644 --- a/chromecast/app/linux/cast_crash_reporter_client_unittest.cc +++ b/chromecast/app/linux/cast_crash_reporter_client_unittest.cc @@ -9,6 +9,7 @@ #include "base/files/file.h" #include "base/files/file_util.h" #include "base/files/scoped_temp_dir.h" +#include "base/macros.h" #include "base/memory/scoped_vector.h" #include "base/test/scoped_path_override.h" #include "base/threading/thread_restrictions.h" diff --git a/chromecast/base/device_capabilities_impl.cc b/chromecast/base/device_capabilities_impl.cc index 5d35913..bd0fd13 100644 --- a/chromecast/base/device_capabilities_impl.cc +++ b/chromecast/base/device_capabilities_impl.cc @@ -4,6 +4,8 @@ #include "chromecast/base/device_capabilities_impl.h" +#include <stddef.h> + #include "base/logging.h" #include "base/single_thread_task_runner.h" #include "base/thread_task_runner_handle.h" diff --git a/chromecast/base/device_capabilities_impl_unittest.cc b/chromecast/base/device_capabilities_impl_unittest.cc index 065cf63..75c802c 100644 --- a/chromecast/base/device_capabilities_impl_unittest.cc +++ b/chromecast/base/device_capabilities_impl_unittest.cc @@ -6,6 +6,7 @@ #include <string> +#include "base/macros.h" #include "base/message_loop/message_loop.h" #include "base/run_loop.h" #include "base/values.h" diff --git a/chromecast/base/metrics/cast_metrics_helper.h b/chromecast/base/metrics/cast_metrics_helper.h index 5535f73..43f9f7e 100644 --- a/chromecast/base/metrics/cast_metrics_helper.h +++ b/chromecast/base/metrics/cast_metrics_helper.h @@ -8,6 +8,7 @@ #include <string> #include "base/callback.h" +#include "base/macros.h" #include "base/memory/ref_counted.h" #include "base/time/time.h" diff --git a/chromecast/base/metrics/grouped_histogram.cc b/chromecast/base/metrics/grouped_histogram.cc index 8318850..4d84929 100644 --- a/chromecast/base/metrics/grouped_histogram.cc +++ b/chromecast/base/metrics/grouped_histogram.cc @@ -4,6 +4,9 @@ #include "chromecast/base/metrics/grouped_histogram.h" +#include <stddef.h> +#include <stdint.h> + #include "base/lazy_instance.h" #include "base/logging.h" #include "base/macros.h" @@ -133,7 +136,7 @@ void PreregisterHistogram(const std::string& name, GroupedHistogram::Sample minimum, GroupedHistogram::Sample maximum, size_t bucket_count, - int32 flags) { + int32_t flags) { DCHECK(base::StatisticsRecorder::IsActive()); DCHECK(base::Histogram::InspectConstructionArguments( name, &minimum, &maximum, &bucket_count)); diff --git a/chromecast/base/process_utils.cc b/chromecast/base/process_utils.cc index 9e379a0..2e5726f 100644 --- a/chromecast/base/process_utils.cc +++ b/chromecast/base/process_utils.cc @@ -5,6 +5,7 @@ #include "chromecast/base/process_utils.h" #include <errno.h> +#include <stddef.h> #include <stdio.h> #include "base/logging.h" diff --git a/chromecast/base/task_runner_impl.h b/chromecast/base/task_runner_impl.h index 110274d..e8a2e22 100644 --- a/chromecast/base/task_runner_impl.h +++ b/chromecast/base/task_runner_impl.h @@ -5,6 +5,8 @@ #ifndef CHROMECAST_BASE_TASK_RUNNER_IMPL_H_ #define CHROMECAST_BASE_TASK_RUNNER_IMPL_H_ +#include <stdint.h> + #include "base/macros.h" #include "base/memory/ref_counted.h" #include "chromecast/public/task_runner.h" diff --git a/chromecast/browser/android/cast_window_android.cc b/chromecast/browser/android/cast_window_android.cc index 21bf0fc..7d7af3b 100644 --- a/chromecast/browser/android/cast_window_android.cc +++ b/chromecast/browser/android/cast_window_android.cc @@ -138,9 +138,9 @@ bool CastWindowAndroid::CanOverscrollContent() const { } bool CastWindowAndroid::AddMessageToConsole(content::WebContents* source, - int32 level, + int32_t level, const base::string16& message, - int32 line_no, + int32_t line_no, const base::string16& source_id) { return false; } diff --git a/chromecast/browser/android/cast_window_android.h b/chromecast/browser/android/cast_window_android.h index 1c67cb8..dce0c7b 100644 --- a/chromecast/browser/android/cast_window_android.h +++ b/chromecast/browser/android/cast_window_android.h @@ -6,11 +6,11 @@ #define CHROMECAST_BROWSER_ANDROID_CAST_WINDOW_ANDROID_H_ #include <jni.h> +#include <stdint.h> #include <vector> #include "base/android/jni_string.h" #include "base/android/scoped_java_ref.h" -#include "base/basictypes.h" #include "base/callback_forward.h" #include "base/command_line.h" #include "base/macros.h" @@ -66,9 +66,9 @@ class CastWindowAndroid : public content::WebContentsDelegate, void CloseContents(content::WebContents* source) override; bool CanOverscrollContent() const override; bool AddMessageToConsole(content::WebContents* source, - int32 level, + int32_t level, const base::string16& message, - int32 line_no, + int32_t line_no, const base::string16& source_id) override; void ActivateContents(content::WebContents* contents) override; diff --git a/chromecast/browser/cast_browser_context.cc b/chromecast/browser/cast_browser_context.cc index bdbd9e8..666555d 100644 --- a/chromecast/browser/cast_browser_context.cc +++ b/chromecast/browser/cast_browser_context.cc @@ -8,6 +8,7 @@ #include "base/files/file_util.h" #include "base/macros.h" #include "base/path_service.h" +#include "build/build_config.h" #include "chromecast/base/cast_paths.h" #include "chromecast/browser/cast_download_manager_delegate.h" #include "chromecast/browser/cast_permission_manager.h" diff --git a/chromecast/browser/cast_browser_main_parts.cc b/chromecast/browser/cast_browser_main_parts.cc index 31a6eb3..14f2331 100644 --- a/chromecast/browser/cast_browser_main_parts.cc +++ b/chromecast/browser/cast_browser_main_parts.cc @@ -4,22 +4,19 @@ #include "chromecast/browser/cast_browser_main_parts.h" +#include <stddef.h> + #include <string> -#if !defined(OS_ANDROID) -#include <signal.h> -#include <sys/prctl.h> -#endif -#if defined(OS_LINUX) -#include <fontconfig/fontconfig.h> -#endif #include "base/command_line.h" #include "base/files/file_util.h" +#include "base/macros.h" #include "base/message_loop/message_loop.h" #include "base/path_service.h" #include "base/prefs/pref_registry_simple.h" #include "base/run_loop.h" #include "base/thread_task_runner_handle.h" +#include "build/build_config.h" #include "cc/base/switches.h" #include "chromecast/base/cast_paths.h" #include "chromecast/base/cast_sys_info_util.h" @@ -51,6 +48,14 @@ #include "media/base/media.h" #include "ui/compositor/compositor_switches.h" +#if !defined(OS_ANDROID) +#include <signal.h> +#include <sys/prctl.h> +#endif +#if defined(OS_LINUX) +#include <fontconfig/fontconfig.h> +#endif + #if defined(OS_ANDROID) #include "chromecast/app/android/crash_handler.h" #include "chromecast/browser/media/cast_media_client_android.h" diff --git a/chromecast/browser/cast_browser_process.cc b/chromecast/browser/cast_browser_process.cc index 077ee1d..a28d37e 100644 --- a/chromecast/browser/cast_browser_process.cc +++ b/chromecast/browser/cast_browser_process.cc @@ -6,6 +6,7 @@ #include "base/logging.h" #include "base/prefs/pref_service.h" +#include "build/build_config.h" #include "chromecast/base/metrics/cast_metrics_helper.h" #include "chromecast/browser/cast_browser_context.h" #include "chromecast/browser/cast_resource_dispatcher_host_delegate.h" diff --git a/chromecast/browser/cast_browser_process.h b/chromecast/browser/cast_browser_process.h index 422bd49..2df7916 100644 --- a/chromecast/browser/cast_browser_process.h +++ b/chromecast/browser/cast_browser_process.h @@ -8,6 +8,7 @@ #include "base/macros.h" #include "base/memory/ref_counted.h" #include "base/memory/scoped_ptr.h" +#include "build/build_config.h" class PrefService; diff --git a/chromecast/browser/cast_content_browser_client.cc b/chromecast/browser/cast_content_browser_client.cc index c97017c..d644b12 100644 --- a/chromecast/browser/cast_content_browser_client.cc +++ b/chromecast/browser/cast_content_browser_client.cc @@ -4,14 +4,18 @@ #include "chromecast/browser/cast_content_browser_client.h" +#include <stddef.h> + #include <string> #include "base/base_switches.h" #include "base/command_line.h" #include "base/files/scoped_file.h" #include "base/i18n/rtl.h" +#include "base/macros.h" #include "base/path_service.h" #include "base/strings/utf_string_conversions.h" +#include "build/build_config.h" #include "chromecast/base/cast_paths.h" #include "chromecast/base/chromecast_switches.h" #include "chromecast/browser/cast_browser_context.h" diff --git a/chromecast/browser/cast_content_browser_client.h b/chromecast/browser/cast_content_browser_client.h index d62f0af..ff3805c 100644 --- a/chromecast/browser/cast_content_browser_client.h +++ b/chromecast/browser/cast_content_browser_client.h @@ -11,6 +11,7 @@ #include "base/macros.h" #include "base/memory/scoped_ptr.h" +#include "build/build_config.h" #include "content/public/browser/content_browser_client.h" class PrefService; diff --git a/chromecast/browser/cast_content_window.cc b/chromecast/browser/cast_content_window.cc index 804ed51..99f0a77 100644 --- a/chromecast/browser/cast_content_window.cc +++ b/chromecast/browser/cast_content_window.cc @@ -4,6 +4,7 @@ #include "chromecast/browser/cast_content_window.h" +#include "base/macros.h" #include "base/threading/thread_restrictions.h" #include "chromecast/base/metrics/cast_metrics_helper.h" #include "chromecast/browser/cast_browser_process.h" diff --git a/chromecast/browser/cast_download_manager_delegate.cc b/chromecast/browser/cast_download_manager_delegate.cc index 9817fcb..2c795ab 100644 --- a/chromecast/browser/cast_download_manager_delegate.cc +++ b/chromecast/browser/cast_download_manager_delegate.cc @@ -4,6 +4,8 @@ #include "chromecast/browser/cast_download_manager_delegate.h" +#include <stdint.h> + #include "base/files/file_path.h" #include "base/logging.h" #include "content/public/browser/download_danger_type.h" @@ -19,7 +21,7 @@ CastDownloadManagerDelegate::~CastDownloadManagerDelegate() {} void CastDownloadManagerDelegate::GetNextId( const content::DownloadIdCallback& callback) { // See default behavior of DownloadManagerImpl::GetNextId() - static uint32 next_id = content::DownloadItem::kInvalidId + 1; + static uint32_t next_id = content::DownloadItem::kInvalidId + 1; callback.Run(next_id++); } diff --git a/chromecast/browser/cast_http_user_agent_settings.cc b/chromecast/browser/cast_http_user_agent_settings.cc index ef752dc..fcce6ba 100644 --- a/chromecast/browser/cast_http_user_agent_settings.cc +++ b/chromecast/browser/cast_http_user_agent_settings.cc @@ -6,6 +6,7 @@ #include "base/i18n/rtl.h" #include "base/logging.h" +#include "build/build_config.h" #include "chromecast/common/cast_content_client.h" #include "content/public/browser/browser_thread.h" #include "grit/chromecast_settings.h" diff --git a/chromecast/browser/cast_net_log.h b/chromecast/browser/cast_net_log.h index 6be2b5b3..b592caf 100644 --- a/chromecast/browser/cast_net_log.h +++ b/chromecast/browser/cast_net_log.h @@ -7,6 +7,7 @@ #include <string> +#include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "net/log/write_to_file_net_log_observer.h" diff --git a/chromecast/browser/cast_network_delegate.h b/chromecast/browser/cast_network_delegate.h index f3372eb..c573a6c 100644 --- a/chromecast/browser/cast_network_delegate.h +++ b/chromecast/browser/cast_network_delegate.h @@ -5,6 +5,7 @@ #ifndef CHROMECAST_BROWSER_CAST_NETWORK_DELEGATE_H_ #define CHROMECAST_BROWSER_CAST_NETWORK_DELEGATE_H_ +#include "base/macros.h" #include "net/base/network_delegate_impl.h" namespace net { diff --git a/chromecast/browser/devtools/cast_dev_tools_delegate.cc b/chromecast/browser/devtools/cast_dev_tools_delegate.cc index 59bd0d3..53d9b98 100644 --- a/chromecast/browser/devtools/cast_dev_tools_delegate.cc +++ b/chromecast/browser/devtools/cast_dev_tools_delegate.cc @@ -5,6 +5,7 @@ #include "chromecast/browser/devtools/cast_dev_tools_delegate.h" #include "base/macros.h" +#include "build/build_config.h" #include "grit/shell_resources.h" #include "ui/base/resource/resource_bundle.h" diff --git a/chromecast/browser/devtools/cast_dev_tools_delegate.h b/chromecast/browser/devtools/cast_dev_tools_delegate.h index 2e00995..aeeb429 100644 --- a/chromecast/browser/devtools/cast_dev_tools_delegate.h +++ b/chromecast/browser/devtools/cast_dev_tools_delegate.h @@ -5,6 +5,7 @@ #ifndef CHROMECAST_BROWSER_DEVTOOLS_CAST_DEV_TOOLS_DELEGATE_H_ #define CHROMECAST_BROWSER_DEVTOOLS_CAST_DEV_TOOLS_DELEGATE_H_ +#include "base/macros.h" #include "components/devtools_http_handler/devtools_http_handler_delegate.h" namespace chromecast { diff --git a/chromecast/browser/devtools/remote_debugging_server.cc b/chromecast/browser/devtools/remote_debugging_server.cc index 494d3c4..ef34fd5 100644 --- a/chromecast/browser/devtools/remote_debugging_server.cc +++ b/chromecast/browser/devtools/remote_debugging_server.cc @@ -8,8 +8,10 @@ #include "base/bind_helpers.h" #include "base/command_line.h" #include "base/files/file_path.h" +#include "base/macros.h" #include "base/strings/string_number_conversions.h" #include "base/strings/stringprintf.h" +#include "build/build_config.h" #include "chromecast/base/pref_names.h" #include "chromecast/browser/cast_browser_process.h" #include "chromecast/browser/devtools/cast_dev_tools_delegate.h" @@ -36,7 +38,7 @@ namespace { const char kFrontEndURL[] = "https://chrome-devtools-frontend.appspot.com/serve_rev/%s/inspector.html"; -const uint16 kDefaultRemoteDebuggingPort = 9222; +const uint16_t kDefaultRemoteDebuggingPort = 9222; const int kBackLog = 10; @@ -68,9 +70,8 @@ class UnixDomainServerSocketFactory class TCPServerSocketFactory : public DevToolsHttpHandler::ServerSocketFactory { public: - TCPServerSocketFactory(const std::string& address, uint16 port) - : address_(address), port_(port) { - } + TCPServerSocketFactory(const std::string& address, uint16_t port) + : address_(address), port_(port) {} private: // devtools_http_handler::DevToolsHttpHandler::ServerSocketFactory. @@ -84,14 +85,14 @@ class TCPServerSocketFactory } std::string address_; - uint16 port_; + uint16_t port_; DISALLOW_COPY_AND_ASSIGN(TCPServerSocketFactory); }; #endif -scoped_ptr<DevToolsHttpHandler::ServerSocketFactory> -CreateSocketFactory(uint16 port) { +scoped_ptr<DevToolsHttpHandler::ServerSocketFactory> CreateSocketFactory( + uint16_t port) { #if defined(OS_ANDROID) base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); std::string socket_name = "cast_shell_devtools_remote"; @@ -127,7 +128,7 @@ RemoteDebuggingServer::RemoteDebuggingServer(bool start_immediately) if (!port_str.empty()) { int port = kDefaultRemoteDebuggingPort; if (base::StringToInt(port_str, &port)) { - port_ = static_cast<uint16>(port); + port_ = static_cast<uint16_t>(port); } else { port_ = kDefaultRemoteDebuggingPort; } diff --git a/chromecast/browser/devtools/remote_debugging_server.h b/chromecast/browser/devtools/remote_debugging_server.h index ba32cc7..172e1fb 100644 --- a/chromecast/browser/devtools/remote_debugging_server.h +++ b/chromecast/browser/devtools/remote_debugging_server.h @@ -5,6 +5,9 @@ #ifndef CHROMECAST_BROWSER_DEVTOOLS_REMOTE_DEBUGGING_SERVER_H_ #define CHROMECAST_BROWSER_DEVTOOLS_REMOTE_DEBUGGING_SERVER_H_ +#include <stdint.h> + +#include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "base/prefs/pref_member.h" @@ -29,7 +32,7 @@ class RemoteDebuggingServer { scoped_ptr<devtools_http_handler::DevToolsHttpHandler> devtools_http_handler_; BooleanPrefMember pref_enabled_; - uint16 port_; + uint16_t port_; DISALLOW_COPY_AND_ASSIGN(RemoteDebuggingServer); }; diff --git a/chromecast/browser/media/cast_browser_cdm_factory.h b/chromecast/browser/media/cast_browser_cdm_factory.h index 22c31bc..80e0ba0 100644 --- a/chromecast/browser/media/cast_browser_cdm_factory.h +++ b/chromecast/browser/media/cast_browser_cdm_factory.h @@ -5,6 +5,7 @@ #ifndef CHROMECAST_BROWSER_MEDIA_CAST_BROWSER_CDM_FACTORY_H_ #define CHROMECAST_BROWSER_MEDIA_CAST_BROWSER_CDM_FACTORY_H_ +#include "base/macros.h" #include "chromecast/media/base/key_systems_common.h" #include "media/base/cdm_factory.h" #include "media/base/media_keys.h" diff --git a/chromecast/browser/media/cma_media_pipeline_client.h b/chromecast/browser/media/cma_media_pipeline_client.h index 4caa59d..7c8ce00 100644 --- a/chromecast/browser/media/cma_media_pipeline_client.h +++ b/chromecast/browser/media/cma_media_pipeline_client.h @@ -5,6 +5,9 @@ #ifndef CHROMECAST_BROWSER_MEDIA_CMA_MEDIA_PIPELINE_CLIENT_H_ #define CHROMECAST_BROWSER_MEDIA_CMA_MEDIA_PIPELINE_CLIENT_H_ +#include <stddef.h> + +#include "base/macros.h" #include "base/memory/ref_counted.h" #include "base/memory/scoped_ptr.h" #include "base/threading/thread_checker.h" diff --git a/chromecast/browser/media/cma_message_filter_host.cc b/chromecast/browser/media/cma_message_filter_host.cc index 0a737cb..f2b62e3 100644 --- a/chromecast/browser/media/cma_message_filter_host.cc +++ b/chromecast/browser/media/cma_message_filter_host.cc @@ -4,6 +4,8 @@ #include "chromecast/browser/media/cma_message_filter_host.h" +#include <stdint.h> + #include <utility> #include "base/lazy_instance.h" @@ -47,8 +49,8 @@ base::LazyInstance<MediaPipelineCmaMap> g_pipeline_map_cma = LAZY_INSTANCE_INITIALIZER; uint64_t GetPipelineCmaId(int process_id, int media_id) { - return (static_cast<uint64>(process_id) << 32) + - static_cast<uint64>(media_id); + return (static_cast<uint64_t>(process_id) << 32) + + static_cast<uint64_t>(media_id); } MediaPipelineHost* GetMediaPipeline(int process_id, int media_id) { diff --git a/chromecast/browser/media/cma_message_filter_host.h b/chromecast/browser/media/cma_message_filter_host.h index acaafe3..67b0430 100644 --- a/chromecast/browser/media/cma_message_filter_host.h +++ b/chromecast/browser/media/cma_message_filter_host.h @@ -5,6 +5,8 @@ #ifndef CHROMECAST_BROWSER_MEDIA_CMA_MESSAGE_FILTER_HOST_H_ #define CHROMECAST_BROWSER_MEDIA_CMA_MESSAGE_FILTER_HOST_H_ +#include <stddef.h> + #include <map> #include "base/macros.h" diff --git a/chromecast/browser/media/media_pipeline_host.cc b/chromecast/browser/media/media_pipeline_host.cc index 45cc897..43d0eb4 100644 --- a/chromecast/browser/media/media_pipeline_host.cc +++ b/chromecast/browser/media/media_pipeline_host.cc @@ -4,6 +4,8 @@ #include "chromecast/browser/media/media_pipeline_host.h" +#include <stddef.h> + #include <utility> #include "base/bind.h" diff --git a/chromecast/browser/metrics/cast_metrics_service_client.cc b/chromecast/browser/metrics/cast_metrics_service_client.cc index db12989..a2cef3b 100644 --- a/chromecast/browser/metrics/cast_metrics_service_client.cc +++ b/chromecast/browser/metrics/cast_metrics_service_client.cc @@ -12,6 +12,7 @@ #include "base/prefs/pref_service.h" #include "base/strings/string_number_conversions.h" #include "base/thread_task_runner_handle.h" +#include "build/build_config.h" #include "chromecast/base/cast_sys_info_util.h" #include "chromecast/base/chromecast_switches.h" #include "chromecast/base/path_utils.h" diff --git a/chromecast/browser/metrics/cast_metrics_service_client.h b/chromecast/browser/metrics/cast_metrics_service_client.h index 3320994..86ccc15 100644 --- a/chromecast/browser/metrics/cast_metrics_service_client.h +++ b/chromecast/browser/metrics/cast_metrics_service_client.h @@ -5,11 +5,14 @@ #ifndef CHROMECAST_BROWSER_METRICS_CAST_METRICS_SERVICE_CLIENT_H_ #define CHROMECAST_BROWSER_METRICS_CAST_METRICS_SERVICE_CLIENT_H_ +#include <stdint.h> + #include <string> #include "base/macros.h" #include "base/memory/ref_counted.h" #include "base/memory/scoped_ptr.h" +#include "build/build_config.h" #include "components/metrics/metrics_service_client.h" class PrefRegistrySimple; diff --git a/chromecast/browser/metrics/cast_stability_metrics_provider.h b/chromecast/browser/metrics/cast_stability_metrics_provider.h index b29d2a4..ade89ca 100644 --- a/chromecast/browser/metrics/cast_stability_metrics_provider.h +++ b/chromecast/browser/metrics/cast_stability_metrics_provider.h @@ -5,7 +5,7 @@ #ifndef CHROMECAST_BROWSER_METRICS_CAST_STABILITY_METRICS_PROVIDER_H_ #define CHROMECAST_BROWSER_METRICS_CAST_STABILITY_METRICS_PROVIDER_H_ -#include "base/basictypes.h" +#include "base/macros.h" #include "base/process/kill.h" #include "components/metrics/metrics_provider.h" #include "content/public/browser/browser_child_process_observer.h" diff --git a/chromecast/browser/metrics/external_metrics.cc b/chromecast/browser/metrics/external_metrics.cc index df9fa79..ce9cbdb 100644 --- a/chromecast/browser/metrics/external_metrics.cc +++ b/chromecast/browser/metrics/external_metrics.cc @@ -4,6 +4,8 @@ #include "chromecast/browser/metrics/external_metrics.h" +#include <stddef.h> + #include <string> #include "base/bind.h" diff --git a/chromecast/browser/service/cast_service_simple.h b/chromecast/browser/service/cast_service_simple.h index ba5b9ea..ad75f30 100644 --- a/chromecast/browser/service/cast_service_simple.h +++ b/chromecast/browser/service/cast_service_simple.h @@ -5,6 +5,7 @@ #ifndef CHROMECAST_BROWSER_SERVICE_CAST_SERVICE_SIMPLE_H_ #define CHROMECAST_BROWSER_SERVICE_CAST_SERVICE_SIMPLE_H_ +#include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "chromecast/service/cast_service.h" #include "url/gurl.h" diff --git a/chromecast/common/cast_content_client.cc b/chromecast/common/cast_content_client.cc index ca3a263..b442fdd 100644 --- a/chromecast/common/cast_content_client.cc +++ b/chromecast/common/cast_content_client.cc @@ -4,8 +4,11 @@ #include "chromecast/common/cast_content_client.h" +#include <stdint.h> + #include "base/strings/stringprintf.h" #include "base/sys_info.h" +#include "build/build_config.h" #include "chromecast/base/version.h" #include "content/public/common/user_agent.h" #include "ui/base/l10n/l10n_util.h" @@ -18,9 +21,9 @@ namespace { #if defined(OS_ANDROID) std::string BuildAndroidOsInfo() { - int32 os_major_version = 0; - int32 os_minor_version = 0; - int32 os_bugfix_version = 0; + int32_t os_major_version = 0; + int32_t os_minor_version = 0; + int32_t os_bugfix_version = 0; base::SysInfo::OperatingSystemVersionNumbers(&os_major_version, &os_minor_version, &os_bugfix_version); diff --git a/chromecast/common/global_descriptors.h b/chromecast/common/global_descriptors.h index b380158..c3b47cfc 100644 --- a/chromecast/common/global_descriptors.h +++ b/chromecast/common/global_descriptors.h @@ -5,6 +5,7 @@ #ifndef CHROMECAST_COMMON_GLOBAL_DESCRIPTORS_H_ #define CHROMECAST_COMMON_GLOBAL_DESCRIPTORS_H_ +#include "build/build_config.h" #include "content/public/common/content_descriptors.h" // This is a list of global descriptor keys to be used with the diff --git a/chromecast/common/media/cma_messages.h b/chromecast/common/media/cma_messages.h index e273a68..90c4a6d 100644 --- a/chromecast/common/media/cma_messages.h +++ b/chromecast/common/media/cma_messages.h @@ -5,6 +5,8 @@ // IPC messages for the Cast Media Acceleration (CMA) pipeline. // Multiply-included message file, hence no include guard. +#include <stddef.h> + #include "chromecast/common/media/cma_ipc_common.h" #include "chromecast/common/media/cma_param_traits.h" #include "chromecast/common/media/cma_param_traits_macros.h" diff --git a/chromecast/common/media/cma_param_traits.cc b/chromecast/common/media/cma_param_traits.cc index 2ae4fd9..4c15ac8 100644 --- a/chromecast/common/media/cma_param_traits.cc +++ b/chromecast/common/media/cma_param_traits.cc @@ -4,6 +4,8 @@ #include "chromecast/common/media/cma_param_traits.h" +#include <stdint.h> + #include <vector> #include "chromecast/common/media/cma_param_traits_macros.h" @@ -46,7 +48,7 @@ bool ParamTraits<media::AudioDecoderConfig>::Read( media::ChannelLayout channel_layout; int samples_per_second; bool is_encrypted; - std::vector<uint8> extra_data; + std::vector<uint8_t> extra_data; if (!ReadParam(m, iter, &codec) || !ReadParam(m, iter, &sample_format) || !ReadParam(m, iter, &channel_layout) || !ReadParam(m, iter, &samples_per_second) || @@ -87,7 +89,7 @@ bool ParamTraits<media::VideoDecoderConfig>::Read( gfx::Rect visible_rect; gfx::Size natural_size; bool is_encrypted; - std::vector<uint8> extra_data; + std::vector<uint8_t> extra_data; if (!ReadParam(m, iter, &codec) || !ReadParam(m, iter, &profile) || !ReadParam(m, iter, &format) || !ReadParam(m, iter, &color_space) || !ReadParam(m, iter, &coded_size) || !ReadParam(m, iter, &visible_rect) || diff --git a/chromecast/common/media/shared_memory_chunk.h b/chromecast/common/media/shared_memory_chunk.h index a8b71c2..1dc5063 100644 --- a/chromecast/common/media/shared_memory_chunk.h +++ b/chromecast/common/media/shared_memory_chunk.h @@ -5,6 +5,8 @@ #ifndef CHROMECAST_COMMON_MEDIA_SHARED_MEMORY_CHUNK_H_ #define CHROMECAST_COMMON_MEDIA_SHARED_MEMORY_CHUNK_H_ +#include <stddef.h> + #include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "chromecast/media/cma/ipc/media_memory_chunk.h" diff --git a/chromecast/crash/cast_crash_keys.cc b/chromecast/crash/cast_crash_keys.cc index f437111d..ab8d356 100644 --- a/chromecast/crash/cast_crash_keys.cc +++ b/chromecast/crash/cast_crash_keys.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 "chromecast/crash/cast_crash_keys.h" // TODO(kjoswiak): Potentially refactor chunk size info as well as non-cast diff --git a/chromecast/crash/cast_crash_keys.h b/chromecast/crash/cast_crash_keys.h index 2f1af20e..1306384 100644 --- a/chromecast/crash/cast_crash_keys.h +++ b/chromecast/crash/cast_crash_keys.h @@ -5,6 +5,8 @@ #ifndef CHROMECAST_CRASH_CAST_CRASH_KEYS_H_ #define CHROMECAST_CRASH_CAST_CRASH_KEYS_H_ +#include <stddef.h> + #include "base/debug/crash_logging.h" namespace chromecast { diff --git a/chromecast/crash/linux/dummy_minidump_generator_unittest.cc b/chromecast/crash/linux/dummy_minidump_generator_unittest.cc index 567d9e2..00c3574 100644 --- a/chromecast/crash/linux/dummy_minidump_generator_unittest.cc +++ b/chromecast/crash/linux/dummy_minidump_generator_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_util.h" diff --git a/chromecast/crash/linux/dump_info.cc b/chromecast/crash/linux/dump_info.cc index 2b99604..9b97580 100644 --- a/chromecast/crash/linux/dump_info.cc +++ b/chromecast/crash/linux/dump_info.cc @@ -4,6 +4,7 @@ #include "chromecast/crash/linux/dump_info.h" #include <errno.h> +#include <stddef.h> #include <stdlib.h> #include "base/logging.h" diff --git a/chromecast/crash/linux/minidump_params.h b/chromecast/crash/linux/minidump_params.h index 1a1fc6b..02bd69f 100644 --- a/chromecast/crash/linux/minidump_params.h +++ b/chromecast/crash/linux/minidump_params.h @@ -5,6 +5,8 @@ #ifndef CHROMECAST_CRASH_LINUX_MINIDUMP_PARAMS_H_ #define CHROMECAST_CRASH_LINUX_MINIDUMP_PARAMS_H_ +#include <stdint.h> + #include <string> namespace chromecast { diff --git a/chromecast/crash/linux/minidump_writer_unittest.cc b/chromecast/crash/linux/minidump_writer_unittest.cc index f9156f8..1874031 100644 --- a/chromecast/crash/linux/minidump_writer_unittest.cc +++ b/chromecast/crash/linux/minidump_writer_unittest.cc @@ -8,6 +8,7 @@ #include "base/bind.h" #include "base/files/file_path.h" #include "base/files/file_util.h" +#include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "base/test/scoped_path_override.h" #include "chromecast/base/scoped_temp_file.h" diff --git a/chromecast/crash/linux/synchronized_minidump_manager.cc b/chromecast/crash/linux/synchronized_minidump_manager.cc index 25154726..5be8140 100644 --- a/chromecast/crash/linux/synchronized_minidump_manager.cc +++ b/chromecast/crash/linux/synchronized_minidump_manager.cc @@ -7,6 +7,8 @@ #include <dirent.h> #include <errno.h> #include <fcntl.h> +#include <stddef.h> +#include <stdint.h> #include <string.h> #include <sys/file.h> #include <sys/stat.h> @@ -406,7 +408,7 @@ bool SynchronizedMinidumpManager::CanUploadDump() { bool SynchronizedMinidumpManager::HasDumps() { // Check if lockfile has entries. - int64 size = 0; + int64_t size = 0; if (GetFileSize(base::FilePath(lockfile_path_), &size) && size > 0) return true; diff --git a/chromecast/crash/linux/synchronized_minidump_manager_unittest.cc b/chromecast/crash/linux/synchronized_minidump_manager_unittest.cc index 2987cff..abdd2b0 100644 --- a/chromecast/crash/linux/synchronized_minidump_manager_unittest.cc +++ b/chromecast/crash/linux/synchronized_minidump_manager_unittest.cc @@ -3,11 +3,12 @@ // found in the LICENSE file. #include <fcntl.h> +#include <stdint.h> +#include <stdio.h> // perror #include <stdlib.h> #include <sys/file.h> #include <sys/stat.h> // mkdir #include <sys/types.h> // -#include <stdio.h> // perror #include <time.h> #include <fstream> @@ -488,7 +489,7 @@ TEST_F(SynchronizedMinidumpManagerTest, UploadSucceedsAfterRateLimitPeriodEnd) { ASSERT_EQ(0, uploader.DoWorkLocked()); ASSERT_FALSE(uploader.can_upload_return_val()); - int64 period = SynchronizedMinidumpManager::kRatelimitPeriodSeconds; + int64_t period = SynchronizedMinidumpManager::kRatelimitPeriodSeconds; // Half period shouldn't trigger reset produce_dumps(producer, 1); diff --git a/chromecast/graphics/cast_screen.cc b/chromecast/graphics/cast_screen.cc index 2cf113f..7cfe769 100644 --- a/chromecast/graphics/cast_screen.cc +++ b/chromecast/graphics/cast_screen.cc @@ -4,6 +4,8 @@ #include "chromecast/graphics/cast_screen.h" +#include <stdint.h> + #include "ui/aura/env.h" #include "ui/gfx/geometry/rect_conversions.h" #include "ui/gfx/geometry/size_conversions.h" @@ -14,7 +16,7 @@ namespace chromecast { namespace { -const int64 kDisplayId = 1; +const int64_t kDisplayId = 1; const int k720pWidth = 1280; const int k720pHeight = 720; diff --git a/chromecast/graphics/cast_screen.h b/chromecast/graphics/cast_screen.h index 50fbf70..37fcf6c 100644 --- a/chromecast/graphics/cast_screen.h +++ b/chromecast/graphics/cast_screen.h @@ -5,6 +5,7 @@ #ifndef CHROMECAST_GRAPHICS_CAST_SCREEN_H_ #define CHROMECAST_GRAPHICS_CAST_SCREEN_H_ +#include "base/macros.h" #include "ui/gfx/display.h" #include "ui/gfx/screen.h" diff --git a/chromecast/graphics/osd_plane_default.cc b/chromecast/graphics/osd_plane_default.cc index 2c73edc..35dfe14 100644 --- a/chromecast/graphics/osd_plane_default.cc +++ b/chromecast/graphics/osd_plane_default.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 "chromecast/public/graphics_types.h" #include "chromecast/public/osd_plane.h" diff --git a/chromecast/media/audio/cast_audio_output_stream.cc b/chromecast/media/audio/cast_audio_output_stream.cc index 6dac338..ec415d7 100644 --- a/chromecast/media/audio/cast_audio_output_stream.cc +++ b/chromecast/media/audio/cast_audio_output_stream.cc @@ -4,8 +4,11 @@ #include "chromecast/media/audio/cast_audio_output_stream.h" +#include <stdint.h> + #include "base/bind.h" #include "base/callback_helpers.h" +#include "base/macros.h" #include "base/synchronization/waitable_event.h" #include "base/threading/thread_checker.h" #include "chromecast/base/metrics/cast_metrics_helper.h" diff --git a/chromecast/media/audio/cast_audio_output_stream_unittest.cc b/chromecast/media/audio/cast_audio_output_stream_unittest.cc index e946c25..577e91e 100644 --- a/chromecast/media/audio/cast_audio_output_stream_unittest.cc +++ b/chromecast/media/audio/cast_audio_output_stream_unittest.cc @@ -2,7 +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 <stdint.h> + #include "base/bind.h" +#include "base/macros.h" #include "base/synchronization/waitable_event.h" #include "chromecast/base/metrics/cast_metrics_test_helper.h" #include "chromecast/media/audio/cast_audio_manager.h" diff --git a/chromecast/media/base/cast_media_default.cc b/chromecast/media/base/cast_media_default.cc index 82ac496..33f9590 100644 --- a/chromecast/media/base/cast_media_default.cc +++ b/chromecast/media/base/cast_media_default.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 "chromecast/media/cma/backend/media_pipeline_backend_default.h" #include "chromecast/public/cast_media_shlib.h" #include "chromecast/public/graphics_types.h" diff --git a/chromecast/media/base/decrypt_context_impl.h b/chromecast/media/base/decrypt_context_impl.h index c2a5b96..c46dde0 100644 --- a/chromecast/media/base/decrypt_context_impl.h +++ b/chromecast/media/base/decrypt_context_impl.h @@ -5,6 +5,8 @@ #ifndef CHROMECAST_MEDIA_BASE_DECRYPT_CONTEXT_IMPL_H_ #define CHROMECAST_MEDIA_BASE_DECRYPT_CONTEXT_IMPL_H_ +#include <stdint.h> + #include "base/macros.h" #include "base/memory/ref_counted.h" #include "chromecast/media/base/key_systems_common.h" diff --git a/chromecast/media/base/key_systems_common.h b/chromecast/media/base/key_systems_common.h index 53e323c..c80cf0f 100644 --- a/chromecast/media/base/key_systems_common.h +++ b/chromecast/media/base/key_systems_common.h @@ -10,6 +10,7 @@ #include <vector> #include "base/compiler_specific.h" +#include "build/build_config.h" #include "chromecast/public/media/cast_key_system.h" #include "media/base/android/media_client_android.h" diff --git a/chromecast/media/base/key_systems_common_simple.cc b/chromecast/media/base/key_systems_common_simple.cc index 671ce03..cd55e1c 100644 --- a/chromecast/media/base/key_systems_common_simple.cc +++ b/chromecast/media/base/key_systems_common_simple.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 "chromecast/media/base/key_systems_common.h" namespace chromecast { diff --git a/chromecast/media/base/video_plane_controller.cc b/chromecast/media/base/video_plane_controller.cc index 8f07839..7202b00 100644 --- a/chromecast/media/base/video_plane_controller.cc +++ b/chromecast/media/base/video_plane_controller.cc @@ -4,10 +4,14 @@ #include "chromecast/media/base/video_plane_controller.h" +#include <stddef.h> +#include <stdint.h> + #include <vector> #include "base/bind.h" #include "base/location.h" +#include "base/macros.h" #include "base/single_thread_task_runner.h" #include "base/time/time.h" #include "chromecast/media/base/media_message_loop.h" @@ -99,14 +103,14 @@ class VideoPlaneController::RateLimitedSetVideoPlaneGeometry friend class base::RefCountedThreadSafe<RateLimitedSetVideoPlaneGeometry>; ~RateLimitedSetVideoPlaneGeometry() {} - void UpdateAverageTime(int64 sample) { + void UpdateAverageTime(int64_t sample) { const size_t kSampleCount = 5; if (samples_.size() < kSampleCount) samples_.push_back(sample); else samples_[sample_counter_++ % kSampleCount] = sample; - int64 total = 0; - for (int64 s : samples_) + int64_t total = 0; + for (int64_t s : samples_) total += s; min_calling_interval_ms_ = 2 * total / samples_.size(); } @@ -124,11 +128,11 @@ class VideoPlaneController::RateLimitedSetVideoPlaneGeometry base::TimeTicks last_set_geometry_time_; // Don't call SetGeometry faster than this interval. - int64 min_calling_interval_ms_; + int64_t min_calling_interval_ms_; // Min calling interval is computed as double average of last few time samples // (i.e. allow at least as much time between calls as the call itself takes). - std::vector<int64> samples_; + std::vector<int64_t> samples_; size_t sample_counter_; scoped_refptr<base::SingleThreadTaskRunner> task_runner_; diff --git a/chromecast/media/base/video_plane_controller.h b/chromecast/media/base/video_plane_controller.h index 302c8fa..74f91eb 100644 --- a/chromecast/media/base/video_plane_controller.h +++ b/chromecast/media/base/video_plane_controller.h @@ -5,6 +5,7 @@ #ifndef CHROMECAST_MEDIA_VIDEO_PLANE_CONTROLLER_H_ #define CHROMECAST_MEDIA_VIDEO_PLANE_CONTROLLER_H_ +#include "base/macros.h" #include "base/memory/ref_counted.h" #include "base/memory/singleton.h" #include "base/threading/thread_checker.h" diff --git a/chromecast/media/cdm/chromecast_init_data_unittest.cc b/chromecast/media/cdm/chromecast_init_data_unittest.cc index 640b95c..8d41d57 100644 --- a/chromecast/media/cdm/chromecast_init_data_unittest.cc +++ b/chromecast/media/cdm/chromecast_init_data_unittest.cc @@ -4,6 +4,8 @@ #include "chromecast/media/cdm/chromecast_init_data.h" +#include <stdint.h> + #include <vector> #include "testing/gtest/include/gtest/gtest.h" diff --git a/chromecast/media/cdm/playready_drm_delegate_android.cc b/chromecast/media/cdm/playready_drm_delegate_android.cc index 2cb856b..1d8b591 100644 --- a/chromecast/media/cdm/playready_drm_delegate_android.cc +++ b/chromecast/media/cdm/playready_drm_delegate_android.cc @@ -5,6 +5,7 @@ #include "chromecast/media/cdm/playready_drm_delegate_android.h" #include "base/logging.h" +#include "base/macros.h" #include "chromecast/media/cdm/chromecast_init_data.h" namespace chromecast { diff --git a/chromecast/media/cdm/playready_drm_delegate_android.h b/chromecast/media/cdm/playready_drm_delegate_android.h index 3a934c45..76fcdf6 100644 --- a/chromecast/media/cdm/playready_drm_delegate_android.h +++ b/chromecast/media/cdm/playready_drm_delegate_android.h @@ -5,6 +5,8 @@ #ifndef CHROMECAST_MEDIA_CDM_PLAYREADY_DRM_DELEGATE_ANDROID_H_ #define CHROMECAST_MEDIA_CDM_PLAYREADY_DRM_DELEGATE_ANDROID_H_ +#include <stdint.h> + #include "base/macros.h" #include "media/base/android/media_drm_bridge_delegate.h" diff --git a/chromecast/media/cma/backend/audio_video_pipeline_device_unittest.cc b/chromecast/media/cma/backend/audio_video_pipeline_device_unittest.cc index 3dcdb7da..72d4d4b 100644 --- a/chromecast/media/cma/backend/audio_video_pipeline_device_unittest.cc +++ b/chromecast/media/cma/backend/audio_video_pipeline_device_unittest.cc @@ -2,14 +2,16 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#include <stdint.h> + #include <vector> -#include "base/basictypes.h" #include "base/bind.h" #include "base/command_line.h" #include "base/files/file_path.h" #include "base/files/memory_mapped_file.h" #include "base/logging.h" +#include "base/macros.h" #include "base/memory/ref_counted.h" #include "base/memory/scoped_ptr.h" #include "base/memory/scoped_vector.h" diff --git a/chromecast/media/cma/backend/media_pipeline_backend_default.h b/chromecast/media/cma/backend/media_pipeline_backend_default.h index 9fb1611..4f9f4d0 100644 --- a/chromecast/media/cma/backend/media_pipeline_backend_default.h +++ b/chromecast/media/cma/backend/media_pipeline_backend_default.h @@ -5,6 +5,8 @@ #ifndef CHROMECAST_MEDIA_CMA_BACKEND_MEDIA_PIPELINE_BACKEND_DEFAULT_H_ #define CHROMECAST_MEDIA_CMA_BACKEND_MEDIA_PIPELINE_BACKEND_DEFAULT_H_ +#include <stdint.h> + #include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "base/time/time.h" diff --git a/chromecast/media/cma/base/balanced_media_task_runner_factory.cc b/chromecast/media/cma/base/balanced_media_task_runner_factory.cc index 7edd5a5..6a6af62 100644 --- a/chromecast/media/cma/base/balanced_media_task_runner_factory.cc +++ b/chromecast/media/cma/base/balanced_media_task_runner_factory.cc @@ -9,6 +9,7 @@ #include "base/bind.h" #include "base/callback_helpers.h" #include "base/logging.h" +#include "base/macros.h" #include "base/single_thread_task_runner.h" #include "chromecast/media/cma/base/media_task_runner.h" #include "media/base/timestamp_constants.h" diff --git a/chromecast/media/cma/base/balanced_media_task_runner_unittest.cc b/chromecast/media/cma/base/balanced_media_task_runner_unittest.cc index 02e29d4..5ac52d3 100644 --- a/chromecast/media/cma/base/balanced_media_task_runner_unittest.cc +++ b/chromecast/media/cma/base/balanced_media_task_runner_unittest.cc @@ -2,11 +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 <list> #include <vector> -#include "base/basictypes.h" #include "base/bind.h" +#include "base/macros.h" #include "base/memory/ref_counted.h" #include "base/memory/scoped_ptr.h" #include "base/thread_task_runner_handle.h" diff --git a/chromecast/media/cma/base/buffering_controller_unittest.cc b/chromecast/media/cma/base/buffering_controller_unittest.cc index e0b45c5..57210e9d 100644 --- a/chromecast/media/cma/base/buffering_controller_unittest.cc +++ b/chromecast/media/cma/base/buffering_controller_unittest.cc @@ -5,6 +5,7 @@ #include "base/bind.h" #include "base/callback_helpers.h" #include "base/logging.h" +#include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "base/time/time.h" #include "chromecast/media/cma/base/buffering_controller.h" diff --git a/chromecast/media/cma/base/buffering_defs.h b/chromecast/media/cma/base/buffering_defs.h index a56a9a6..45a6054f 100644 --- a/chromecast/media/cma/base/buffering_defs.h +++ b/chromecast/media/cma/base/buffering_defs.h @@ -5,7 +5,7 @@ #ifndef CHROMECAST_MEDIA_CMA_BASE_BUFFERING_DEFS_H_ #define CHROMECAST_MEDIA_CMA_BASE_BUFFERING_DEFS_H_ -#include "base/basictypes.h" +#include <stddef.h> namespace chromecast { namespace media { diff --git a/chromecast/media/cma/base/buffering_frame_provider.h b/chromecast/media/cma/base/buffering_frame_provider.h index 0cb99e2..34a8edb 100644 --- a/chromecast/media/cma/base/buffering_frame_provider.h +++ b/chromecast/media/cma/base/buffering_frame_provider.h @@ -5,8 +5,11 @@ #ifndef CHROMECAST_MEDIA_CMA_BASE_BUFFERING_FRAME_PROVIDER_H_ #define CHROMECAST_MEDIA_CMA_BASE_BUFFERING_FRAME_PROVIDER_H_ +#include <stddef.h> + #include <list> +#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/chromecast/media/cma/base/buffering_frame_provider_unittest.cc b/chromecast/media/cma/base/buffering_frame_provider_unittest.cc index 95c6dc3..7d85a6b4 100644 --- a/chromecast/media/cma/base/buffering_frame_provider_unittest.cc +++ b/chromecast/media/cma/base/buffering_frame_provider_unittest.cc @@ -2,11 +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 <list> #include <vector> -#include "base/basictypes.h" #include "base/bind.h" +#include "base/macros.h" #include "base/memory/ref_counted.h" #include "base/memory/scoped_ptr.h" #include "base/threading/thread.h" diff --git a/chromecast/media/cma/base/decoder_buffer_adapter.cc b/chromecast/media/cma/base/decoder_buffer_adapter.cc index 313d87a..e4019c8 100644 --- a/chromecast/media/cma/base/decoder_buffer_adapter.cc +++ b/chromecast/media/cma/base/decoder_buffer_adapter.cc @@ -37,11 +37,11 @@ void DecoderBufferAdapter::set_timestamp(base::TimeDelta timestamp) { buffer_->set_timestamp(timestamp); } -const uint8* DecoderBufferAdapter::data() const { +const uint8_t* DecoderBufferAdapter::data() const { return buffer_->data(); } -uint8* DecoderBufferAdapter::writable_data() const { +uint8_t* DecoderBufferAdapter::writable_data() const { return buffer_->writable_data(); } diff --git a/chromecast/media/cma/base/decoder_buffer_adapter.h b/chromecast/media/cma/base/decoder_buffer_adapter.h index 37ba4e6..d3da104 100644 --- a/chromecast/media/cma/base/decoder_buffer_adapter.h +++ b/chromecast/media/cma/base/decoder_buffer_adapter.h @@ -5,6 +5,9 @@ #ifndef CHROMECAST_MEDIA_CMA_BASE_DECODER_BUFFER_ADAPTER_H_ #define CHROMECAST_MEDIA_CMA_BASE_DECODER_BUFFER_ADAPTER_H_ +#include <stddef.h> +#include <stdint.h> + #include "base/macros.h" #include "base/memory/ref_counted.h" #include "base/memory/scoped_ptr.h" @@ -32,8 +35,8 @@ class DecoderBufferAdapter : public DecoderBufferBase { StreamId stream_id() const override; int64_t timestamp() const override; void set_timestamp(base::TimeDelta timestamp) override; - const uint8* data() const override; - uint8* writable_data() const override; + const uint8_t* data() const override; + uint8_t* writable_data() const override; size_t data_size() const override; const CastDecryptConfig* decrypt_config() const override; bool end_of_stream() const override; diff --git a/chromecast/media/cma/base/decoder_buffer_base.h b/chromecast/media/cma/base/decoder_buffer_base.h index 518771d..4249f38 100644 --- a/chromecast/media/cma/base/decoder_buffer_base.h +++ b/chromecast/media/cma/base/decoder_buffer_base.h @@ -5,6 +5,8 @@ #ifndef CHROMECAST_MEDIA_CMA_BASE_DECODER_BUFFER_BASE_H_ #define CHROMECAST_MEDIA_CMA_BASE_DECODER_BUFFER_BASE_H_ +#include <stdint.h> + #include "base/macros.h" #include "base/memory/ref_counted.h" #include "base/memory/scoped_ptr.h" diff --git a/chromecast/media/cma/decoder/cast_audio_decoder_linux.cc b/chromecast/media/cma/decoder/cast_audio_decoder_linux.cc index ea88ba42..b635764 100644 --- a/chromecast/media/cma/decoder/cast_audio_decoder_linux.cc +++ b/chromecast/media/cma/decoder/cast_audio_decoder_linux.cc @@ -4,6 +4,8 @@ #include "chromecast/media/cma/decoder/cast_audio_decoder.h" +#include <stdint.h> + #include <limits> #include <queue> #include <vector> @@ -11,6 +13,7 @@ #include "base/bind.h" #include "base/location.h" #include "base/logging.h" +#include "base/macros.h" #include "base/single_thread_task_runner.h" #include "chromecast/media/cma/base/decoder_buffer_adapter.h" #include "chromecast/media/cma/base/decoder_buffer_base.h" @@ -31,15 +34,15 @@ namespace media { namespace { const int kOpusSamplingRate = 48000; -const uint8 kFakeOpusExtraData[19] = { +const uint8_t kFakeOpusExtraData[19] = { 'O', 'p', 'u', 's', 'H', 'e', 'a', 'd', // offset 0, OpusHead 0, // offset 8, version 2, // offset 9, channels 0, 0, // offset 10, skip - static_cast<uint8>(kOpusSamplingRate & 0xFF), // offset 12, LE - static_cast<uint8>((kOpusSamplingRate >> 8) & 0xFF), - static_cast<uint8>((kOpusSamplingRate >> 16) & 0xFF), - static_cast<uint8>((kOpusSamplingRate >> 24) & 0xFF), + static_cast<uint8_t>(kOpusSamplingRate & 0xFF), // offset 12, LE + static_cast<uint8_t>((kOpusSamplingRate >> 8) & 0xFF), + static_cast<uint8_t>((kOpusSamplingRate >> 16) & 0xFF), + static_cast<uint8_t>((kOpusSamplingRate >> 24) & 0xFF), 0, 0, // offset 16, gain 0, // offset 18, stereo mapping }; diff --git a/chromecast/media/cma/ipc/media_memory_chunk.h b/chromecast/media/cma/ipc/media_memory_chunk.h index 1b91c84..52ad052 100644 --- a/chromecast/media/cma/ipc/media_memory_chunk.h +++ b/chromecast/media/cma/ipc/media_memory_chunk.h @@ -5,7 +5,7 @@ #ifndef CHROMECAST_MEDIA_CMA_IPC_MEDIA_MEMORY_CHUNK_H_ #define CHROMECAST_MEDIA_CMA_IPC_MEDIA_MEMORY_CHUNK_H_ -#include "base/basictypes.h" +#include <stddef.h> namespace chromecast { namespace media { diff --git a/chromecast/media/cma/ipc/media_message.cc b/chromecast/media/cma/ipc/media_message.cc index 8dfcd7c..3749b7e 100644 --- a/chromecast/media/cma/ipc/media_message.cc +++ b/chromecast/media/cma/ipc/media_message.cc @@ -6,7 +6,6 @@ #include <limits> -#include "base/basictypes.h" #include "base/logging.h" #include "chromecast/media/cma/ipc/media_memory_chunk.h" @@ -14,15 +13,14 @@ namespace chromecast { namespace media { // static -scoped_ptr<MediaMessage> MediaMessage::CreateDummyMessage( - uint32 type) { +scoped_ptr<MediaMessage> MediaMessage::CreateDummyMessage(uint32_t type) { return scoped_ptr<MediaMessage>( new MediaMessage(type, std::numeric_limits<size_t>::max())); } // static scoped_ptr<MediaMessage> MediaMessage::CreateMessage( - uint32 type, + uint32_t type, const MemoryAllocatorCB& memory_allocator, size_t msg_content_capacity) { size_t msg_size = minimum_msg_size() + msg_content_capacity; @@ -42,7 +40,7 @@ scoped_ptr<MediaMessage> MediaMessage::CreateMessage( // static scoped_ptr<MediaMessage> MediaMessage::CreateMessage( - uint32 type, + uint32_t type, scoped_ptr<MediaMemoryChunk> memory) { return scoped_ptr<MediaMessage>(new MediaMessage(type, memory.Pass())); } @@ -53,24 +51,24 @@ scoped_ptr<MediaMessage> MediaMessage::MapMessage( return scoped_ptr<MediaMessage>(new MediaMessage(memory.Pass())); } -MediaMessage::MediaMessage(uint32 type, size_t msg_size) - : is_dummy_msg_(true), - cached_header_(&cached_msg_.header), - msg_(&cached_msg_), - msg_read_only_(&cached_msg_), - rd_offset_(0) { +MediaMessage::MediaMessage(uint32_t type, size_t msg_size) + : is_dummy_msg_(true), + cached_header_(&cached_msg_.header), + msg_(&cached_msg_), + msg_read_only_(&cached_msg_), + rd_offset_(0) { cached_header_->size = msg_size; cached_header_->type = type; cached_header_->content_size = 0; } -MediaMessage::MediaMessage(uint32 type, scoped_ptr<MediaMemoryChunk> memory) - : is_dummy_msg_(false), - cached_header_(&cached_msg_.header), - msg_(static_cast<SerializedMsg*>(memory->data())), - msg_read_only_(msg_), - mem_(memory.Pass()), - rd_offset_(0) { +MediaMessage::MediaMessage(uint32_t type, scoped_ptr<MediaMemoryChunk> memory) + : is_dummy_msg_(false), + cached_header_(&cached_msg_.header), + msg_(static_cast<SerializedMsg*>(memory->data())), + msg_read_only_(msg_), + mem_(memory.Pass()), + rd_offset_(0) { CHECK(mem_->valid()); CHECK_GE(mem_->size(), minimum_msg_size()); @@ -142,7 +140,7 @@ bool MediaMessage::WriteBuffer(const void* src, size_t size) { // Write the message only for non-dummy messages. if (!is_dummy_msg_) { - uint8* wr_ptr = &msg_->content + cached_header_->content_size; + uint8_t* wr_ptr = &msg_->content + cached_header_->content_size; memcpy(wr_ptr, src, size); } @@ -165,7 +163,7 @@ bool MediaMessage::ReadBuffer(void* dst, size_t size) { return false; } - const uint8* rd_ptr = &msg_read_only_->content + rd_offset_; + const uint8_t* rd_ptr = &msg_read_only_->content + rd_offset_; memcpy(dst, rd_ptr, size); rd_offset_ += size; return true; @@ -185,7 +183,7 @@ void* MediaMessage::GetWritableBuffer(size_t size) { return NULL; } - uint8* rd_ptr = &msg_read_only_->content + rd_offset_; + uint8_t* rd_ptr = &msg_read_only_->content + rd_offset_; rd_offset_ += size; return rd_ptr; } diff --git a/chromecast/media/cma/ipc/media_message.h b/chromecast/media/cma/ipc/media_message.h index 066409b..0d88dd7 100644 --- a/chromecast/media/cma/ipc/media_message.h +++ b/chromecast/media/cma/ipc/media_message.h @@ -6,8 +6,8 @@ #define CHROMECAST_MEDIA_CMA_IPC_MEDIA_MESSAGE_H_ #include <stddef.h> +#include <stdint.h> -#include "base/basictypes.h" #include "base/callback.h" #include "base/macros.h" #include "base/memory/scoped_ptr.h" @@ -35,20 +35,20 @@ class MediaMessage { // each write on this message is a dummy operation. // This type of message can be useful to calculate first the size of the // message, before allocating the real message. - static scoped_ptr<MediaMessage> CreateDummyMessage(uint32 type); + static scoped_ptr<MediaMessage> CreateDummyMessage(uint32_t type); // Creates a message with a capacity of at least |msg_content_capacity| // bytes. The actual content size can be smaller than its capacity. // The message can be populated with some Write functions. static scoped_ptr<MediaMessage> CreateMessage( - uint32 type, + uint32_t type, const MemoryAllocatorCB& memory_allocator, size_t msg_content_capacity); // Creates a message of type |type| whose serialized structure is stored // in |mem|. static scoped_ptr<MediaMessage> CreateMessage( - uint32 type, + uint32_t type, scoped_ptr<MediaMemoryChunk> mem); // Creates a message from a memory area which already contains @@ -84,7 +84,7 @@ class MediaMessage { size_t content_size() const { return cached_msg_.header.content_size; } // Return the type of the message. - uint32 type() const { return cached_msg_.header.type; } + uint32_t type() const { return cached_msg_.header.type; } // Append a POD to the message. // Return true if the POD has been succesfully written. @@ -111,17 +111,17 @@ class MediaMessage { void* GetWritableBuffer(size_t size); private: - MediaMessage(uint32 type, size_t msg_size); - MediaMessage(uint32 type, scoped_ptr<MediaMemoryChunk> memory); + MediaMessage(uint32_t type, size_t msg_size); + MediaMessage(uint32_t type, scoped_ptr<MediaMemoryChunk> memory); MediaMessage(scoped_ptr<MediaMemoryChunk> memory); struct Header { // Total size of the message (including both header & content). - uint32 size; + uint32_t size; // Indicate the message type. - uint32 type; + uint32_t type; // Actual size of the content in the message. - uint32 content_size; + uint32_t content_size; }; struct SerializedMsg { @@ -130,7 +130,7 @@ class MediaMessage { // Start of the content of the message. // Use uint8_t since no special alignment is needed. - uint8 content; + uint8_t content; }; // Indicate whether the message is a dummy message, i.e. a message without diff --git a/chromecast/media/cma/ipc/media_message_fifo.cc b/chromecast/media/cma/ipc/media_message_fifo.cc index bd68f3f..86a9f03 100644 --- a/chromecast/media/cma/ipc/media_message_fifo.cc +++ b/chromecast/media/cma/ipc/media_message_fifo.cc @@ -8,6 +8,7 @@ #include "base/bind.h" #include "base/location.h" #include "base/logging.h" +#include "base/macros.h" #include "base/single_thread_task_runner.h" #include "base/thread_task_runner_handle.h" #include "chromecast/media/cma/base/cma_logging.h" @@ -231,7 +232,7 @@ scoped_ptr<MediaMessage> MediaMessageFifo::Pop() { size_t max_msg_size = std::min(allocated_size, trailing_byte_count); if (max_msg_size < MediaMessage::minimum_msg_size()) return scoped_ptr<MediaMessage>(); - void* msg_src = static_cast<uint8*>(base_) + rd_offset; + void* msg_src = static_cast<uint8_t*>(base_) + rd_offset; // Create a flag to protect the serialized structure of the message // from being overwritten. @@ -277,7 +278,7 @@ scoped_ptr<MediaMemoryChunk> MediaMessageFifo::ReserveMemoryNoCheck( size_t wr_offset = internal_wr_offset(); // Memory block corresponding to the serialized structure of the message. - void* msg_start = static_cast<uint8*>(base_) + wr_offset; + void* msg_start = static_cast<uint8_t*>(base_) + wr_offset; scoped_refptr<MediaMessageFlag> wr_flag(new MediaMessageFlag(wr_offset)); wr_flags_.push_back(wr_flag); scoped_ptr<MediaMemoryChunk> mem( diff --git a/chromecast/media/cma/ipc/media_message_fifo.h b/chromecast/media/cma/ipc/media_message_fifo.h index b20432b..6ea0230 100644 --- a/chromecast/media/cma/ipc/media_message_fifo.h +++ b/chromecast/media/cma/ipc/media_message_fifo.h @@ -5,10 +5,12 @@ #ifndef CHROMECAST_MEDIA_CMA_IPC_MEDIA_MESSAGE_FIFO_H_ #define CHROMECAST_MEDIA_CMA_IPC_MEDIA_MESSAGE_FIFO_H_ +#include <stddef.h> +#include <stdint.h> + #include <list> #include "base/atomicops.h" -#include "base/basictypes.h" #include "base/callback.h" #include "base/logging.h" #include "base/macros.h" @@ -88,8 +90,8 @@ class MediaMessageFifo { size_t rd_offset; size_t wr_offset; - // Ensure the first item has the same alignment as an int64. - int64 first_item; + // Ensure the first item has the same alignment as an int64_t. + int64_t first_item; }; public: diff --git a/chromecast/media/cma/ipc/media_message_fifo_unittest.cc b/chromecast/media/cma/ipc/media_message_fifo_unittest.cc index 6680451..9a03b66 100644 --- a/chromecast/media/cma/ipc/media_message_fifo_unittest.cc +++ b/chromecast/media/cma/ipc/media_message_fifo_unittest.cc @@ -2,8 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "base/basictypes.h" +#include <stddef.h> +#include <stdint.h> + #include "base/bind.h" +#include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "base/synchronization/waitable_event.h" #include "base/threading/thread.h" @@ -40,8 +43,8 @@ void MsgProducer(scoped_ptr<MediaMessageFifo> fifo, base::WaitableEvent* event) { for (int k = 0; k < msg_count; k++) { - uint32 msg_type = 0x2 + (k % 5); - uint32 max_msg_content_size = k % 64; + uint32_t msg_type = 0x2 + (k % 5); + uint32_t max_msg_content_size = k % 64; do { scoped_ptr<MediaMessage> msg1( MediaMessage::CreateMessage( @@ -66,7 +69,7 @@ void MsgConsumer(scoped_ptr<MediaMessageFifo> fifo, int k = 0; while (k < msg_count) { - uint32 msg_type = 0x2 + (k % 5); + uint32_t msg_type = 0x2 + (k % 5); do { scoped_ptr<MediaMessage> msg2(fifo->Pop()); if (msg2) { @@ -91,8 +94,8 @@ void MsgProducerConsumer( base::WaitableEvent* event) { for (int k = 0; k < 2048; k++) { // Should have enough space to create a message. - uint32 msg_type = 0x2 + (k % 5); - uint32 max_msg_content_size = k % 64; + uint32_t msg_type = 0x2 + (k % 5); + uint32_t max_msg_content_size = k % 64; scoped_ptr<MediaMessage> msg1( MediaMessage::CreateMessage( msg_type, @@ -119,7 +122,7 @@ void MsgProducerConsumer( TEST(MediaMessageFifoTest, AlternateWriteRead) { size_t buffer_size = 64 * 1024; - scoped_ptr<uint64[]> buffer(new uint64[buffer_size / sizeof(uint64)]); + scoped_ptr<uint64_t[]> buffer(new uint64_t[buffer_size / sizeof(uint64_t)]); scoped_ptr<base::Thread> thread( new base::Thread("FeederConsumerThread")); @@ -145,7 +148,7 @@ TEST(MediaMessageFifoTest, AlternateWriteRead) { TEST(MediaMessageFifoTest, MultiThreaded) { size_t buffer_size = 64 * 1024; - scoped_ptr<uint64[]> buffer(new uint64[buffer_size / sizeof(uint64)]); + scoped_ptr<uint64_t[]> buffer(new uint64_t[buffer_size / sizeof(uint64_t)]); scoped_ptr<base::Thread> producer_thread( new base::Thread("FeederThread")); diff --git a/chromecast/media/cma/ipc/media_message_unittest.cc b/chromecast/media/cma/ipc/media_message_unittest.cc index cec0712..ce8b035 100644 --- a/chromecast/media/cma/ipc/media_message_unittest.cc +++ b/chromecast/media/cma/ipc/media_message_unittest.cc @@ -2,7 +2,9 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "base/basictypes.h" +#include <stddef.h> +#include <stdint.h> + #include "base/bind.h" #include "base/memory/scoped_ptr.h" #include "chromecast/media/cma/ipc/media_memory_chunk.h" @@ -42,10 +44,10 @@ scoped_ptr<MediaMemoryChunk> DummyAllocator( TEST(MediaMessageTest, WriteRead) { int buffer_size = 1024; - scoped_ptr<uint8[]> buffer(new uint8[buffer_size]); + scoped_ptr<uint8_t[]> buffer(new uint8_t[buffer_size]); MediaMessage::MemoryAllocatorCB mem_alloc_cb( base::Bind(&DummyAllocator, buffer.get(), buffer_size)); - uint32 type = 0x1; + uint32_t type = 0x1; int msg_content_capacity = 512; // Write a message. @@ -55,10 +57,10 @@ TEST(MediaMessageTest, WriteRead) { for (int k = 0; k < count; k++) { int v1 = 2 * k + 1; EXPECT_TRUE(msg1->WritePod(v1)); - uint8 v2 = k; + uint8_t v2 = k; EXPECT_TRUE(msg1->WritePod(v2)); } - EXPECT_EQ(msg1->content_size(), count * (sizeof(int) + sizeof(uint8))); + EXPECT_EQ(msg1->content_size(), count * (sizeof(int) + sizeof(uint8_t))); // Verify the integrity of the message. scoped_ptr<MediaMessage> msg2( @@ -69,8 +71,8 @@ TEST(MediaMessageTest, WriteRead) { int expected_v1 = 2 * k + 1; EXPECT_TRUE(msg2->ReadPod(&v1)); EXPECT_EQ(v1, expected_v1); - uint8 v2; - uint8 expected_v2 = k; + uint8_t v2; + uint8_t expected_v2 = k; EXPECT_TRUE(msg2->ReadPod(&v2)); EXPECT_EQ(v2, expected_v2); } @@ -78,16 +80,16 @@ TEST(MediaMessageTest, WriteRead) { TEST(MediaMessageTest, WriteOverflow) { int buffer_size = 1024; - scoped_ptr<uint8[]> buffer(new uint8[buffer_size]); + scoped_ptr<uint8_t[]> buffer(new uint8_t[buffer_size]); MediaMessage::MemoryAllocatorCB mem_alloc_cb( base::Bind(&DummyAllocator, buffer.get(), buffer_size)); - uint32 type = 0x1; + uint32_t type = 0x1; int msg_content_capacity = 8; scoped_ptr<MediaMessage> msg1( MediaMessage::CreateMessage(type, mem_alloc_cb, msg_content_capacity)); - uint32 v1 = 0; - uint8 v2 = 0; + uint32_t v1 = 0; + uint8_t v2 = 0; EXPECT_TRUE(msg1->WritePod(v1)); EXPECT_TRUE(msg1->WritePod(v1)); @@ -97,22 +99,22 @@ TEST(MediaMessageTest, WriteOverflow) { TEST(MediaMessageTest, ReadOverflow) { int buffer_size = 1024; - scoped_ptr<uint8[]> buffer(new uint8[buffer_size]); + scoped_ptr<uint8_t[]> buffer(new uint8_t[buffer_size]); MediaMessage::MemoryAllocatorCB mem_alloc_cb( base::Bind(&DummyAllocator, buffer.get(), buffer_size)); - uint32 type = 0x1; + uint32_t type = 0x1; int msg_content_capacity = 8; scoped_ptr<MediaMessage> msg1( MediaMessage::CreateMessage(type, mem_alloc_cb, msg_content_capacity)); - uint32 v1 = 0xcd; + uint32_t v1 = 0xcd; EXPECT_TRUE(msg1->WritePod(v1)); EXPECT_TRUE(msg1->WritePod(v1)); scoped_ptr<MediaMessage> msg2( MediaMessage::MapMessage(scoped_ptr<MediaMemoryChunk>( new ExternalMemoryBlock(&buffer[0], buffer_size)))); - uint32 v2; + uint32_t v2; EXPECT_TRUE(msg2->ReadPod(&v2)); EXPECT_EQ(v2, v1); EXPECT_TRUE(msg2->ReadPod(&v2)); @@ -122,15 +124,15 @@ TEST(MediaMessageTest, ReadOverflow) { TEST(MediaMessageTest, DummyMessage) { int buffer_size = 1024; - scoped_ptr<uint8[]> buffer(new uint8[buffer_size]); + scoped_ptr<uint8_t[]> buffer(new uint8_t[buffer_size]); MediaMessage::MemoryAllocatorCB mem_alloc_cb( base::Bind(&DummyAllocator, buffer.get(), buffer_size)); - uint32 type = 0x1; + uint32_t type = 0x1; // Create first a dummy message to estimate the content size. scoped_ptr<MediaMessage> msg1( MediaMessage::CreateDummyMessage(type)); - uint32 v1 = 0xcd; + uint32_t v1 = 0xcd; EXPECT_TRUE(msg1->WritePod(v1)); EXPECT_TRUE(msg1->WritePod(v1)); diff --git a/chromecast/media/cma/ipc_streamer/audio_decoder_config_marshaller.cc b/chromecast/media/cma/ipc_streamer/audio_decoder_config_marshaller.cc index 2bc40f4..2798c6b 100644 --- a/chromecast/media/cma/ipc_streamer/audio_decoder_config_marshaller.cc +++ b/chromecast/media/cma/ipc_streamer/audio_decoder_config_marshaller.cc @@ -4,9 +4,11 @@ #include "chromecast/media/cma/ipc_streamer/audio_decoder_config_marshaller.h" +#include <stddef.h> +#include <stdint.h> + #include <vector> -#include "base/basictypes.h" #include "base/logging.h" #include "chromecast/media/cma/ipc/media_message.h" #include "media/base/audio_decoder_config.h" diff --git a/chromecast/media/cma/ipc_streamer/av_streamer_unittest.cc b/chromecast/media/cma/ipc_streamer/av_streamer_unittest.cc index b3e4970..5636dac 100644 --- a/chromecast/media/cma/ipc_streamer/av_streamer_unittest.cc +++ b/chromecast/media/cma/ipc_streamer/av_streamer_unittest.cc @@ -2,11 +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 <list> #include <vector> -#include "base/basictypes.h" #include "base/bind.h" +#include "base/macros.h" #include "base/memory/ref_counted.h" #include "base/memory/scoped_ptr.h" #include "base/thread_task_runner_handle.h" @@ -70,7 +73,7 @@ class AvStreamerTest : public testing::Test { void OnTestTimeout(); protected: - scoped_ptr<uint64[]> fifo_mem_; + scoped_ptr<uint64_t[]> fifo_mem_; scoped_ptr<AvStreamerProxy> av_buffer_proxy_; scoped_ptr<CodedFrameProviderHost> coded_frame_provider_host_; @@ -123,7 +126,7 @@ void AvStreamerTest::Configure( frame_provider->SetDelayFlush(delay_flush); size_t fifo_size_div_8 = 512; - fifo_mem_.reset(new uint64[fifo_size_div_8]); + fifo_mem_.reset(new uint64_t[fifo_size_div_8]); scoped_ptr<MediaMessageFifo> producer_fifo( new MediaMessageFifo( scoped_ptr<MediaMemoryChunk>( diff --git a/chromecast/media/cma/ipc_streamer/coded_frame_provider_host.h b/chromecast/media/cma/ipc_streamer/coded_frame_provider_host.h index 738cc8b..5ba7471 100644 --- a/chromecast/media/cma/ipc_streamer/coded_frame_provider_host.h +++ b/chromecast/media/cma/ipc_streamer/coded_frame_provider_host.h @@ -6,6 +6,7 @@ #define CHROMECAST_MEDIA_CMA_IPC_STREAMER_CODED_FRAME_PROVIDER_HOST_H_ #include "base/callback.h" +#include "base/macros.h" #include "base/memory/weak_ptr.h" #include "base/threading/thread_checker.h" #include "chromecast/media/cma/base/coded_frame_provider.h" diff --git a/chromecast/media/cma/ipc_streamer/decoder_buffer_base_marshaller.cc b/chromecast/media/cma/ipc_streamer/decoder_buffer_base_marshaller.cc index c3cb7a8..cc8b63b 100644 --- a/chromecast/media/cma/ipc_streamer/decoder_buffer_base_marshaller.cc +++ b/chromecast/media/cma/ipc_streamer/decoder_buffer_base_marshaller.cc @@ -4,7 +4,11 @@ #include "chromecast/media/cma/ipc_streamer/decoder_buffer_base_marshaller.h" +#include <stddef.h> +#include <stdint.h> + #include "base/logging.h" +#include "base/macros.h" #include "chromecast/media/cma/base/cast_decrypt_config_impl.h" #include "chromecast/media/cma/base/decoder_buffer_base.h" #include "chromecast/media/cma/ipc/media_message.h" @@ -30,8 +34,8 @@ class DecoderBufferFromMsg : public DecoderBufferBase { StreamId stream_id() const override; int64_t timestamp() const override; void set_timestamp(base::TimeDelta timestamp) override; - const uint8* data() const override; - uint8* writable_data() const override; + const uint8_t* data() const override; + uint8_t* writable_data() const override; size_t data_size() const override; const CastDecryptConfig* decrypt_config() const override; bool end_of_stream() const override; @@ -57,7 +61,7 @@ class DecoderBufferFromMsg : public DecoderBufferBase { // Keeps the message since frame data is not copied. scoped_ptr<MediaMessage> msg_; - uint8* data_; + uint8_t* data_; DISALLOW_COPY_AND_ASSIGN(DecoderBufferFromMsg); }; @@ -83,7 +87,7 @@ void DecoderBufferFromMsg::Initialize() { CHECK(msg_->ReadPod(&stream_id_)); - int64 pts_internal = 0; + int64_t pts_internal = 0; CHECK(msg_->ReadPod(&pts_internal)); pts_ = base::TimeDelta::FromMicroseconds(pts_internal); @@ -98,11 +102,11 @@ void DecoderBufferFromMsg::Initialize() { // Get a pointer to the frame data inside the message. // Avoid copying the frame data here. - data_ = static_cast<uint8*>(msg_->GetWritableBuffer(data_size_)); + data_ = static_cast<uint8_t*>(msg_->GetWritableBuffer(data_size_)); CHECK(data_); if (decrypt_config_) { - uint32 subsample_total_size = 0; + uint32_t subsample_total_size = 0; for (size_t k = 0; k < decrypt_config_->subsamples().size(); k++) { subsample_total_size += decrypt_config_->subsamples()[k].clear_bytes; subsample_total_size += decrypt_config_->subsamples()[k].cypher_bytes; @@ -123,12 +127,12 @@ void DecoderBufferFromMsg::set_timestamp(base::TimeDelta timestamp) { pts_ = timestamp; } -const uint8* DecoderBufferFromMsg::data() const { +const uint8_t* DecoderBufferFromMsg::data() const { CHECK(msg_->IsSerializedMsgAvailable()); return data_; } -uint8* DecoderBufferFromMsg::writable_data() const { +uint8_t* DecoderBufferFromMsg::writable_data() const { CHECK(msg_->IsSerializedMsgAvailable()); return data_; } diff --git a/chromecast/media/cma/ipc_streamer/decrypt_config_marshaller.cc b/chromecast/media/cma/ipc_streamer/decrypt_config_marshaller.cc index bc373f6..e45a0e9 100644 --- a/chromecast/media/cma/ipc_streamer/decrypt_config_marshaller.cc +++ b/chromecast/media/cma/ipc_streamer/decrypt_config_marshaller.cc @@ -4,6 +4,8 @@ #include "chromecast/media/cma/ipc_streamer/decrypt_config_marshaller.h" +#include <stddef.h> + #include "base/logging.h" #include "chromecast/media/cma/base/cast_decrypt_config_impl.h" #include "chromecast/media/cma/ipc/media_message.h" diff --git a/chromecast/media/cma/ipc_streamer/video_decoder_config_marshaller.cc b/chromecast/media/cma/ipc_streamer/video_decoder_config_marshaller.cc index 8cd28ae..b2e9aaa 100644 --- a/chromecast/media/cma/ipc_streamer/video_decoder_config_marshaller.cc +++ b/chromecast/media/cma/ipc_streamer/video_decoder_config_marshaller.cc @@ -4,9 +4,11 @@ #include "chromecast/media/cma/ipc_streamer/video_decoder_config_marshaller.h" +#include <stddef.h> +#include <stdint.h> + #include <vector> -#include "base/basictypes.h" #include "base/logging.h" #include "chromecast/media/cma/ipc/media_message.h" #include "media/base/video_decoder_config.h" diff --git a/chromecast/media/cma/pipeline/audio_decoder_software_wrapper.h b/chromecast/media/cma/pipeline/audio_decoder_software_wrapper.h index c186147..abb77a6 100644 --- a/chromecast/media/cma/pipeline/audio_decoder_software_wrapper.h +++ b/chromecast/media/cma/pipeline/audio_decoder_software_wrapper.h @@ -5,6 +5,8 @@ #ifndef CHROMECAST_MEDIA_CMA_PIPELINE_AUDIO_DECODER_SOFTWARE_WRAPPER_H_ #define CHROMECAST_MEDIA_CMA_PIPELINE_AUDIO_DECODER_SOFTWARE_WRAPPER_H_ +#include <stdint.h> + #include "base/macros.h" #include "base/memory/ref_counted.h" #include "base/memory/scoped_ptr.h" diff --git a/chromecast/media/cma/pipeline/audio_pipeline_impl.cc b/chromecast/media/cma/pipeline/audio_pipeline_impl.cc index 5edc017..b8b91d7 100644 --- a/chromecast/media/cma/pipeline/audio_pipeline_impl.cc +++ b/chromecast/media/cma/pipeline/audio_pipeline_impl.cc @@ -4,6 +4,8 @@ #include "chromecast/media/cma/pipeline/audio_pipeline_impl.h" +#include <stddef.h> + #include "base/bind.h" #include "chromecast/media/cma/base/buffering_defs.h" #include "chromecast/media/cma/base/cma_logging.h" diff --git a/chromecast/media/cma/pipeline/audio_video_pipeline_impl_unittest.cc b/chromecast/media/cma/pipeline/audio_video_pipeline_impl_unittest.cc index 981247c..eb8eea7 100644 --- a/chromecast/media/cma/pipeline/audio_video_pipeline_impl_unittest.cc +++ b/chromecast/media/cma/pipeline/audio_video_pipeline_impl_unittest.cc @@ -2,10 +2,12 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#include <stddef.h> + #include <vector> -#include "base/basictypes.h" #include "base/bind.h" +#include "base/macros.h" #include "base/memory/ref_counted.h" #include "base/memory/scoped_ptr.h" #include "base/message_loop/message_loop.h" diff --git a/chromecast/media/cma/pipeline/av_pipeline_impl.h b/chromecast/media/cma/pipeline/av_pipeline_impl.h index 5769636..0f6d96f 100644 --- a/chromecast/media/cma/pipeline/av_pipeline_impl.h +++ b/chromecast/media/cma/pipeline/av_pipeline_impl.h @@ -5,6 +5,9 @@ #ifndef CHROMECAST_MEDIA_CMA_BASE_AV_PIPELINE_IMPL_H_ #define CHROMECAST_MEDIA_CMA_BASE_AV_PIPELINE_IMPL_H_ +#include <stddef.h> +#include <stdint.h> + #include <list> #include "base/callback.h" diff --git a/chromecast/media/cma/pipeline/decrypt_util.cc b/chromecast/media/cma/pipeline/decrypt_util.cc index 323a793..30c169e 100644 --- a/chromecast/media/cma/pipeline/decrypt_util.cc +++ b/chromecast/media/cma/pipeline/decrypt_util.cc @@ -5,9 +5,12 @@ #include "chromecast/media/cma/pipeline/decrypt_util.h" #include <openssl/aes.h> +#include <stddef.h> +#include <stdint.h> #include <string> #include "base/logging.h" +#include "base/macros.h" #include "chromecast/media/cma/base/decoder_buffer_base.h" #include "chromecast/public/media/cast_decrypt_config.h" #include "crypto/symmetric_key.h" @@ -26,8 +29,8 @@ class DecoderBufferClear : public DecoderBufferBase { StreamId stream_id() const override; int64_t timestamp() const override; void set_timestamp(base::TimeDelta timestamp) override; - const uint8* data() const override; - uint8* writable_data() const override; + const uint8_t* data() const override; + uint8_t* writable_data() const override; size_t data_size() const override; const CastDecryptConfig* decrypt_config() const override; bool end_of_stream() const override; @@ -61,11 +64,11 @@ void DecoderBufferClear::set_timestamp(base::TimeDelta timestamp) { buffer_->set_timestamp(timestamp); } -const uint8* DecoderBufferClear::data() const { +const uint8_t* DecoderBufferClear::data() const { return buffer_->data(); } -uint8* DecoderBufferClear::writable_data() const { +uint8_t* DecoderBufferClear::writable_data() const { return buffer_->writable_data(); } @@ -106,7 +109,7 @@ scoped_refptr<DecoderBufferBase> DecryptDecoderBuffer( return buffer; } DCHECK_EQ(static_cast<int>(raw_key.length()), AES_BLOCK_SIZE); - const uint8* key_u8 = reinterpret_cast<const uint8*>(raw_key.data()); + const uint8_t* key_u8 = reinterpret_cast<const uint8_t*>(raw_key.data()); AES_KEY aes_key; if (AES_set_encrypt_key(key_u8, AES_BLOCK_SIZE * 8, &aes_key) != 0) { LOG(ERROR) << "Failed to set the AES key"; @@ -114,22 +117,22 @@ scoped_refptr<DecoderBufferBase> DecryptDecoderBuffer( } // Get the IV. - uint8 aes_iv[AES_BLOCK_SIZE]; + uint8_t aes_iv[AES_BLOCK_SIZE]; DCHECK_EQ(static_cast<int>(decrypt_config->iv().length()), AES_BLOCK_SIZE); memcpy(aes_iv, decrypt_config->iv().data(), AES_BLOCK_SIZE); // Decryption state. unsigned int encrypted_byte_offset = 0; - uint8 ecount_buf[AES_BLOCK_SIZE]; + uint8_t ecount_buf[AES_BLOCK_SIZE]; // Perform the decryption. const std::vector<SubsampleEntry>& subsamples = decrypt_config->subsamples(); - uint8* data = buffer->writable_data(); - uint32 offset = 0; + uint8_t* data = buffer->writable_data(); + uint32_t offset = 0; for (size_t k = 0; k < subsamples.size(); k++) { offset += subsamples[k].clear_bytes; - uint32 cypher_bytes = subsamples[k].cypher_bytes; + uint32_t cypher_bytes = subsamples[k].cypher_bytes; CHECK_LE(static_cast<size_t>(offset + cypher_bytes), buffer->data_size()); AES_ctr128_encrypt( data + offset, data + offset, cypher_bytes, &aes_key, diff --git a/chromecast/media/cma/pipeline/media_pipeline_impl.h b/chromecast/media/cma/pipeline/media_pipeline_impl.h index df0ce67..3a019ea 100644 --- a/chromecast/media/cma/pipeline/media_pipeline_impl.h +++ b/chromecast/media/cma/pipeline/media_pipeline_impl.h @@ -8,7 +8,6 @@ #include <string> #include <vector> -#include "base/basictypes.h" #include "base/macros.h" #include "base/memory/ref_counted.h" #include "base/memory/scoped_ptr.h" diff --git a/chromecast/media/cma/pipeline/video_pipeline_impl.cc b/chromecast/media/cma/pipeline/video_pipeline_impl.cc index 1888776..e4cab6b 100644 --- a/chromecast/media/cma/pipeline/video_pipeline_impl.cc +++ b/chromecast/media/cma/pipeline/video_pipeline_impl.cc @@ -4,6 +4,8 @@ #include "chromecast/media/cma/pipeline/video_pipeline_impl.h" +#include <stddef.h> + #include "base/bind.h" #include "chromecast/media/cdm/browser_cdm_cast.h" #include "chromecast/media/cma/base/buffering_defs.h" diff --git a/chromecast/media/cma/pipeline/video_pipeline_impl.h b/chromecast/media/cma/pipeline/video_pipeline_impl.h index b20ac6a..b8f017e 100644 --- a/chromecast/media/cma/pipeline/video_pipeline_impl.h +++ b/chromecast/media/cma/pipeline/video_pipeline_impl.h @@ -7,6 +7,7 @@ #include <vector> +#include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "chromecast/media/cma/pipeline/av_pipeline_impl.h" #include "chromecast/media/cma/pipeline/video_pipeline_client.h" diff --git a/chromecast/media/cma/test/frame_generator_for_test.cc b/chromecast/media/cma/test/frame_generator_for_test.cc index f2ed98d..239fe7c 100644 --- a/chromecast/media/cma/test/frame_generator_for_test.cc +++ b/chromecast/media/cma/test/frame_generator_for_test.cc @@ -4,6 +4,9 @@ #include "chromecast/media/cma/test/frame_generator_for_test.h" +#include <stdint.h> + +#include "base/macros.h" #include "chromecast/media/cma/base/decoder_buffer_adapter.h" #include "chromecast/media/cma/base/decoder_buffer_base.h" #include "media/base/decoder_buffer.h" @@ -65,8 +68,8 @@ scoped_refptr<DecoderBufferBase> FrameGeneratorForTest::Generate() { // Generate the decrypt configuration. if (frame_spec.has_decrypt_config) { - uint32 frame_size = buffer->data_size(); - uint32 chunk_size = 1; + uint32_t frame_size = buffer->data_size(); + uint32_t chunk_size = 1; std::vector< ::media::SubsampleEntry> subsamples; while (frame_size > 0) { ::media::SubsampleEntry subsample; diff --git a/chromecast/media/cma/test/frame_generator_for_test.h b/chromecast/media/cma/test/frame_generator_for_test.h index c3e3f57..cd586a4 100644 --- a/chromecast/media/cma/test/frame_generator_for_test.h +++ b/chromecast/media/cma/test/frame_generator_for_test.h @@ -5,8 +5,11 @@ #ifndef CHROMECAST_MEDIA_CMA_TEST_FRAME_GENERATOR_FOR_TEST_H_ #define CHROMECAST_MEDIA_CMA_TEST_FRAME_GENERATOR_FOR_TEST_H_ +#include <stddef.h> + #include <vector> +#include "base/macros.h" #include "base/memory/ref_counted.h" #include "base/time/time.h" diff --git a/chromecast/media/cma/test/frame_segmenter_for_test.cc b/chromecast/media/cma/test/frame_segmenter_for_test.cc index ec16b21..e3c72d6 100644 --- a/chromecast/media/cma/test/frame_segmenter_for_test.cc +++ b/chromecast/media/cma/test/frame_segmenter_for_test.cc @@ -35,7 +35,7 @@ int mp3_bitrate[] = { 0, 32, 40, 48, 56, 64, 80, 96, 112, 128, 160, 192, 224, 256, 320, 0 }; int mp3_sample_rate[] = { 44100, 48000, 32000, 0 }; -AudioFrameHeader FindNextMp3Header(const uint8* data, size_t data_size) { +AudioFrameHeader FindNextMp3Header(const uint8_t* data, size_t data_size) { bool found = false; AudioFrameHeader header; header.frame_size = 0; @@ -86,7 +86,7 @@ AudioFrameHeader FindNextMp3Header(const uint8* data, size_t data_size) { } // namespace -BufferList Mp3SegmenterForTest(const uint8* data, size_t data_size) { +BufferList Mp3SegmenterForTest(const uint8_t* data, size_t data_size) { size_t offset = 0; BufferList audio_frames; base::TimeDelta timestamp; @@ -130,7 +130,7 @@ H264AccessUnit::H264AccessUnit() poc(0) { } -BufferList H264SegmenterForTest(const uint8* data, size_t data_size) { +BufferList H264SegmenterForTest(const uint8_t* data, size_t data_size) { BufferList video_frames; std::list<H264AccessUnit> access_unit_list; H264AccessUnit access_unit; @@ -265,7 +265,7 @@ BufferList H264SegmenterForTest(const uint8* data, size_t data_size) { } void OnEncryptedMediaInitData(::media::EmeInitDataType init_data_type, - const std::vector<uint8>& init_data) { + const std::vector<uint8_t>& init_data) { LOG(FATAL) << "Unexpected test failure: file is encrypted."; } diff --git a/chromecast/media/cma/test/frame_segmenter_for_test.h b/chromecast/media/cma/test/frame_segmenter_for_test.h index 259c23e..101f016 100644 --- a/chromecast/media/cma/test/frame_segmenter_for_test.h +++ b/chromecast/media/cma/test/frame_segmenter_for_test.h @@ -5,9 +5,11 @@ #ifndef CHROMECAST_MEDIA_CMA_TEST_FRAME_SEGMENTER_FOR_TEST_H_ #define CHROMECAST_MEDIA_CMA_TEST_FRAME_SEGMENTER_FOR_TEST_H_ +#include <stddef.h> +#include <stdint.h> + #include <list> -#include "base/basictypes.h" #include "base/memory/ref_counted.h" #include "media/base/audio_decoder_config.h" #include "media/base/video_decoder_config.h" @@ -23,8 +25,8 @@ class DecoderBufferBase; typedef std::list<scoped_refptr<DecoderBufferBase> > BufferList; // Implement some basic frame segmenters good enough for unit tests. -BufferList Mp3SegmenterForTest(const uint8* data, size_t data_size); -BufferList H264SegmenterForTest(const uint8* data, size_t data_size); +BufferList Mp3SegmenterForTest(const uint8_t* data, size_t data_size); +BufferList H264SegmenterForTest(const uint8_t* data, size_t data_size); struct DemuxResult { DemuxResult(); diff --git a/chromecast/media/cma/test/mock_frame_consumer.h b/chromecast/media/cma/test/mock_frame_consumer.h index 582cb7c..a59913d 100644 --- a/chromecast/media/cma/test/mock_frame_consumer.h +++ b/chromecast/media/cma/test/mock_frame_consumer.h @@ -5,6 +5,8 @@ #ifndef CHROMECAST_MEDIA_CMA_TEST_MOCK_FRAME_CONSUMER_H_ #define CHROMECAST_MEDIA_CMA_TEST_MOCK_FRAME_CONSUMER_H_ +#include <stddef.h> + #include <vector> #include "base/callback.h" diff --git a/chromecast/media/cma/test/mock_frame_provider.h b/chromecast/media/cma/test/mock_frame_provider.h index b83503e..c1b037c 100644 --- a/chromecast/media/cma/test/mock_frame_provider.h +++ b/chromecast/media/cma/test/mock_frame_provider.h @@ -5,6 +5,8 @@ #ifndef CHROMECAST_MEDIA_CMA_TEST_MOCK_FRAME_PROVIDER_H_ #define CHROMECAST_MEDIA_CMA_TEST_MOCK_FRAME_PROVIDER_H_ +#include <stddef.h> + #include <vector> #include "base/macros.h" diff --git a/chromecast/net/connectivity_checker.h b/chromecast/net/connectivity_checker.h index fcfb878..d52543b 100644 --- a/chromecast/net/connectivity_checker.h +++ b/chromecast/net/connectivity_checker.h @@ -5,6 +5,7 @@ #ifndef CHROMECAST_NET_CONNECTIVITY_CHECKER_H_ #define CHROMECAST_NET_CONNECTIVITY_CHECKER_H_ +#include "base/macros.h" #include "base/memory/ref_counted.h" #include "base/memory/scoped_ptr.h" #include "base/observer_list_threadsafe.h" diff --git a/chromecast/net/connectivity_checker_impl.h b/chromecast/net/connectivity_checker_impl.h index da15039..3fdb4f3 100644 --- a/chromecast/net/connectivity_checker_impl.h +++ b/chromecast/net/connectivity_checker_impl.h @@ -6,6 +6,7 @@ #define CHROMECAST_NET_CONNECTIVITY_CHECKER_IMPL_H_ #include "base/cancelable_callback.h" +#include "base/macros.h" #include "chromecast/net/connectivity_checker.h" #include "net/base/network_change_notifier.h" #include "net/url_request/url_request.h" diff --git a/chromecast/net/fake_connectivity_checker.h b/chromecast/net/fake_connectivity_checker.h index 7381b8f..411b048 100644 --- a/chromecast/net/fake_connectivity_checker.h +++ b/chromecast/net/fake_connectivity_checker.h @@ -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 "chromecast/net/connectivity_checker.h" namespace chromecast { diff --git a/chromecast/public/avsettings.h b/chromecast/public/avsettings.h index 9f9688a..22caad9 100644 --- a/chromecast/public/avsettings.h +++ b/chromecast/public/avsettings.h @@ -5,6 +5,8 @@ #ifndef CHROMECAST_PUBLIC_AVSETTINGS_H_ #define CHROMECAST_PUBLIC_AVSETTINGS_H_ +#include <stdint.h> + #include "output_restrictions.h" #include "task_runner.h" diff --git a/chromecast/public/media/cast_decoder_buffer.h b/chromecast/public/media/cast_decoder_buffer.h index f6ca422..3dab870 100644 --- a/chromecast/public/media/cast_decoder_buffer.h +++ b/chromecast/public/media/cast_decoder_buffer.h @@ -5,6 +5,7 @@ #ifndef CHROMECAST_PUBLIC_MEDIA_CAST_DECODER_BUFFER_H_ #define CHROMECAST_PUBLIC_MEDIA_CAST_DECODER_BUFFER_H_ +#include <stddef.h> #include <stdint.h> #include <cstddef> diff --git a/chromecast/renderer/cast_content_renderer_client.cc b/chromecast/renderer/cast_content_renderer_client.cc index c876bee..6de24ec 100644 --- a/chromecast/renderer/cast_content_renderer_client.cc +++ b/chromecast/renderer/cast_content_renderer_client.cc @@ -4,13 +4,16 @@ #include "chromecast/renderer/cast_content_renderer_client.h" +#include <stdint.h> #include <sys/sysinfo.h> #include "base/command_line.h" #include "base/location.h" +#include "base/macros.h" #include "base/memory/memory_pressure_listener.h" #include "base/strings/string_number_conversions.h" #include "base/thread_task_runner_handle.h" +#include "build/build_config.h" #include "chromecast/base/chromecast_switches.h" #include "chromecast/crash/cast_crash_keys.h" #include "chromecast/media/base/media_caps.h" diff --git a/chromecast/renderer/cast_content_renderer_client.h b/chromecast/renderer/cast_content_renderer_client.h index 2285370..6350038 100644 --- a/chromecast/renderer/cast_content_renderer_client.h +++ b/chromecast/renderer/cast_content_renderer_client.h @@ -8,6 +8,7 @@ #include <vector> #include "base/macros.h" +#include "build/build_config.h" #include "content/public/renderer/content_renderer_client.h" namespace IPC { diff --git a/chromecast/renderer/cast_render_process_observer.cc b/chromecast/renderer/cast_render_process_observer.cc index b64a7c4..0eb6abb 100644 --- a/chromecast/renderer/cast_render_process_observer.cc +++ b/chromecast/renderer/cast_render_process_observer.cc @@ -4,6 +4,7 @@ #include "chromecast/renderer/cast_render_process_observer.h" +#include "build/build_config.h" #include "chromecast/renderer/media/capabilities_message_filter.h" #include "chromecast/renderer/media/cma_message_filter_proxy.h" #include "content/public/renderer/render_thread.h" diff --git a/chromecast/renderer/cast_render_process_observer.h b/chromecast/renderer/cast_render_process_observer.h index a84bec1..713e542 100644 --- a/chromecast/renderer/cast_render_process_observer.h +++ b/chromecast/renderer/cast_render_process_observer.h @@ -9,6 +9,7 @@ #include "base/macros.h" #include "base/memory/ref_counted.h" +#include "build/build_config.h" #include "content/public/renderer/render_process_observer.h" namespace chromecast { diff --git a/chromecast/renderer/media/audio_pipeline_proxy.cc b/chromecast/renderer/media/audio_pipeline_proxy.cc index ed76855..2ab6834 100644 --- a/chromecast/renderer/media/audio_pipeline_proxy.cc +++ b/chromecast/renderer/media/audio_pipeline_proxy.cc @@ -6,6 +6,7 @@ #include "base/bind.h" #include "base/callback_helpers.h" +#include "base/macros.h" #include "base/memory/shared_memory.h" #include "base/message_loop/message_loop.h" #include "base/threading/thread_checker.h" diff --git a/chromecast/renderer/media/capabilities_message_filter.h b/chromecast/renderer/media/capabilities_message_filter.h index 6c9c1de..1489579 100644 --- a/chromecast/renderer/media/capabilities_message_filter.h +++ b/chromecast/renderer/media/capabilities_message_filter.h @@ -5,6 +5,7 @@ #ifndef CHROMECAST_RENDERER_MEDIA_CAPABILITIES_MESSAGE_FILTER_H_ #define CHROMECAST_RENDERER_MEDIA_CAPABILITIES_MESSAGE_FILTER_H_ +#include "base/macros.h" #include "ipc/message_filter.h" namespace chromecast { diff --git a/chromecast/renderer/media/demuxer_stream_adapter.h b/chromecast/renderer/media/demuxer_stream_adapter.h index 7fbc7cd..5209e6d 100644 --- a/chromecast/renderer/media/demuxer_stream_adapter.h +++ b/chromecast/renderer/media/demuxer_stream_adapter.h @@ -6,6 +6,7 @@ #define CHROMECAST_RENDERER_MEDIA_DEMUXER_STREAM_ADAPTER_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" diff --git a/chromecast/renderer/media/demuxer_stream_adapter_unittest.cc b/chromecast/renderer/media/demuxer_stream_adapter_unittest.cc index 24b4d61..cad4130 100644 --- a/chromecast/renderer/media/demuxer_stream_adapter_unittest.cc +++ b/chromecast/renderer/media/demuxer_stream_adapter_unittest.cc @@ -4,8 +4,8 @@ #include <list> -#include "base/basictypes.h" #include "base/bind.h" +#include "base/macros.h" #include "base/memory/ref_counted.h" #include "base/memory/scoped_ptr.h" #include "base/thread_task_runner_handle.h" diff --git a/chromecast/renderer/media/demuxer_stream_for_test.h b/chromecast/renderer/media/demuxer_stream_for_test.h index 20d8d41..dc1f9d0 100644 --- a/chromecast/renderer/media/demuxer_stream_for_test.h +++ b/chromecast/renderer/media/demuxer_stream_for_test.h @@ -8,6 +8,7 @@ #include <list> #include "base/bind.h" +#include "base/macros.h" #include "base/thread_task_runner_handle.h" #include "chromecast/renderer/media/demuxer_stream_adapter.h" #include "media/base/decoder_buffer.h" diff --git a/chromecast/renderer/media/hole_frame_factory.h b/chromecast/renderer/media/hole_frame_factory.h index febeef73..a1eee57 100644 --- a/chromecast/renderer/media/hole_frame_factory.h +++ b/chromecast/renderer/media/hole_frame_factory.h @@ -7,6 +7,7 @@ #include <GLES2/gl2.h> +#include "base/macros.h" #include "base/memory/ref_counted.h" #include "gpu/command_buffer/common/mailbox.h" #include "gpu/command_buffer/common/sync_token.h" diff --git a/chromecast/renderer/media/media_pipeline_proxy.cc b/chromecast/renderer/media/media_pipeline_proxy.cc index 681d9eb..99be284 100644 --- a/chromecast/renderer/media/media_pipeline_proxy.cc +++ b/chromecast/renderer/media/media_pipeline_proxy.cc @@ -8,6 +8,7 @@ #include "base/callback_helpers.h" #include "base/location.h" #include "base/logging.h" +#include "base/macros.h" #include "base/single_thread_task_runner.h" #include "chromecast/common/media/cma_messages.h" #include "chromecast/media/cma/base/coded_frame_provider.h" diff --git a/chromecast/renderer/media/multi_demuxer_stream_adapter_unittest.cc b/chromecast/renderer/media/multi_demuxer_stream_adapter_unittest.cc index 4f878b4..bae4594 100644 --- a/chromecast/renderer/media/multi_demuxer_stream_adapter_unittest.cc +++ b/chromecast/renderer/media/multi_demuxer_stream_adapter_unittest.cc @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "base/basictypes.h" #include "base/bind.h" +#include "base/macros.h" #include "base/memory/ref_counted.h" #include "base/memory/scoped_ptr.h" #include "base/memory/scoped_vector.h" diff --git a/chromecast/renderer/media/video_pipeline_proxy.cc b/chromecast/renderer/media/video_pipeline_proxy.cc index b5931b1..07691bb 100644 --- a/chromecast/renderer/media/video_pipeline_proxy.cc +++ b/chromecast/renderer/media/video_pipeline_proxy.cc @@ -6,6 +6,7 @@ #include "base/bind.h" #include "base/callback_helpers.h" +#include "base/macros.h" #include "base/memory/shared_memory.h" #include "base/message_loop/message_loop.h" #include "base/threading/thread_checker.h" |