summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoravi <avi@chromium.org>2015-12-25 12:57:10 -0800
committerCommit bot <commit-bot@chromium.org>2015-12-25 20:58:00 +0000
commitb7348940d384d5a2132f3cb88741693daab30c2d (patch)
tree5a3b726807e3a628a6da8843bdfb78a1ffb3048a
parent30da2e2321c8a6bcc5a29581b75e0d4ccf82f0c5 (diff)
downloadchromium_src-b7348940d384d5a2132f3cb88741693daab30c2d.zip
chromium_src-b7348940d384d5a2132f3cb88741693daab30c2d.tar.gz
chromium_src-b7348940d384d5a2132f3cb88741693daab30c2d.tar.bz2
Switch to standard integer types in content/browser/.
BUG=138542 TBR=jam@chromium.org Review URL: https://codereview.chromium.org/1549113002 Cr-Commit-Position: refs/heads/master@{#366868}
-rw-r--r--content/browser/accessibility/accessibility_event_recorder_win.cc3
-rw-r--r--content/browser/accessibility/accessibility_ipc_error_browsertest.cc4
-rw-r--r--content/browser/accessibility/accessibility_tree_formatter.cc9
-rw-r--r--content/browser/accessibility/accessibility_tree_formatter.h9
-rw-r--r--content/browser/accessibility/accessibility_tree_formatter_android.cc1
-rw-r--r--content/browser/accessibility/accessibility_tree_formatter_blink.cc11
-rw-r--r--content/browser/accessibility/accessibility_tree_formatter_blink.h8
-rw-r--r--content/browser/accessibility/accessibility_tree_formatter_mac.mm1
-rw-r--r--content/browser/accessibility/accessibility_tree_formatter_utils_win.cc33
-rw-r--r--content/browser/accessibility/accessibility_tree_formatter_utils_win.h19
-rw-r--r--content/browser/accessibility/accessibility_tree_formatter_win.cc4
-rw-r--r--content/browser/accessibility/accessibility_ui.h1
-rw-r--r--content/browser/accessibility/accessibility_win_browsertest.cc39
-rw-r--r--content/browser/accessibility/ax_tree_id_registry.h2
-rw-r--r--content/browser/accessibility/browser_accessibility.cc36
-rw-r--r--content/browser/accessibility/browser_accessibility.h24
-rw-r--r--content/browser/accessibility/browser_accessibility_android.cc38
-rw-r--r--content/browser/accessibility/browser_accessibility_android.h16
-rw-r--r--content/browser/accessibility/browser_accessibility_auralinux.cc4
-rw-r--r--content/browser/accessibility/browser_accessibility_auralinux.h1
-rw-r--r--content/browser/accessibility/browser_accessibility_cocoa.mm58
-rw-r--r--content/browser/accessibility/browser_accessibility_mac.h1
-rw-r--r--content/browser/accessibility/browser_accessibility_manager.cc11
-rw-r--r--content/browser/accessibility/browser_accessibility_manager.h7
-rw-r--r--content/browser/accessibility/browser_accessibility_manager_android.cc26
-rw-r--r--content/browser/accessibility/browser_accessibility_manager_android.h19
-rw-r--r--content/browser/accessibility/browser_accessibility_manager_auralinux.h1
-rw-r--r--content/browser/accessibility/browser_accessibility_manager_mac.h1
-rw-r--r--content/browser/accessibility/browser_accessibility_manager_mac.mm2
-rw-r--r--content/browser/accessibility/browser_accessibility_manager_unittest.cc20
-rw-r--r--content/browser/accessibility/browser_accessibility_manager_win.cc5
-rw-r--r--content/browser/accessibility/browser_accessibility_manager_win.h1
-rw-r--r--content/browser/accessibility/browser_accessibility_state_impl.cc3
-rw-r--r--content/browser/accessibility/browser_accessibility_state_impl.h2
-rw-r--r--content/browser/accessibility/browser_accessibility_state_impl_win.cc1
-rw-r--r--content/browser/accessibility/browser_accessibility_win.cc141
-rw-r--r--content/browser/accessibility/browser_accessibility_win.h45
-rw-r--r--content/browser/accessibility/browser_accessibility_win_unittest.cc15
-rw-r--r--content/browser/accessibility/cross_platform_accessibility_browsertest.cc11
-rw-r--r--content/browser/accessibility/dump_accessibility_browsertest_base.cc1
-rw-r--r--content/browser/accessibility/dump_accessibility_browsertest_base.h1
-rw-r--r--content/browser/accessibility/dump_accessibility_events_browsertest.cc3
-rw-r--r--content/browser/accessibility/dump_accessibility_tree_browsertest.cc1
-rw-r--r--content/browser/accessibility/one_shot_accessibility_tree_search.cc6
-rw-r--r--content/browser/accessibility/one_shot_accessibility_tree_search.h2
-rw-r--r--content/browser/accessibility/one_shot_accessibility_tree_search_unittest.cc1
-rw-r--r--content/browser/accessibility/site_per_process_accessibility_browsertest.cc1
-rw-r--r--content/browser/accessibility/snapshot_ax_tree_browsertest.cc1
-rw-r--r--content/browser/accessibility/touch_accessibility_aura_browsertest.cc1
-rw-r--r--content/browser/appcache/appcache.cc12
-rw-r--r--content/browser/appcache/appcache.h26
-rw-r--r--content/browser/appcache/appcache_backend_impl.cc8
-rw-r--r--content/browser/appcache/appcache_backend_impl.h11
-rw-r--r--content/browser/appcache/appcache_database.cc1
-rw-r--r--content/browser/appcache/appcache_database.h1
-rw-r--r--content/browser/appcache/appcache_database_unittest.cc3
-rw-r--r--content/browser/appcache/appcache_dispatcher_host.cc16
-rw-r--r--content/browser/appcache/appcache_dispatcher_host.h17
-rw-r--r--content/browser/appcache/appcache_entry.h24
-rw-r--r--content/browser/appcache/appcache_group.cc4
-rw-r--r--content/browser/appcache/appcache_group.h16
-rw-r--r--content/browser/appcache/appcache_group_unittest.cc4
-rw-r--r--content/browser/appcache/appcache_histograms.h2
-rw-r--r--content/browser/appcache/appcache_host.cc12
-rw-r--r--content/browser/appcache/appcache_host.h19
-rw-r--r--content/browser/appcache/appcache_host_unittest.cc6
-rw-r--r--content/browser/appcache/appcache_interceptor.cc2
-rw-r--r--content/browser/appcache/appcache_interceptor.h6
-rw-r--r--content/browser/appcache/appcache_internals_ui.cc12
-rw-r--r--content/browser/appcache/appcache_internals_ui.h9
-rw-r--r--content/browser/appcache/appcache_manifest_parser.cc3
-rw-r--r--content/browser/appcache/appcache_manifest_parser_unittest.cc3
-rw-r--r--content/browser/appcache/appcache_quota_client.h1
-rw-r--r--content/browser/appcache/appcache_quota_client_unittest.cc14
-rw-r--r--content/browser/appcache/appcache_request_handler.cc21
-rw-r--r--content/browser/appcache/appcache_request_handler.h19
-rw-r--r--content/browser/appcache/appcache_request_handler_unittest.cc11
-rw-r--r--content/browser/appcache/appcache_response.cc2
-rw-r--r--content/browser/appcache/appcache_response_unittest.cc9
-rw-r--r--content/browser/appcache/appcache_service_impl.cc21
-rw-r--r--content/browser/appcache/appcache_service_impl.h8
-rw-r--r--content/browser/appcache/appcache_service_unittest.cc28
-rw-r--r--content/browser/appcache/appcache_storage.h2
-rw-r--r--content/browser/appcache/appcache_storage_impl.cc2
-rw-r--r--content/browser/appcache/appcache_storage_impl.h2
-rw-r--r--content/browser/appcache/appcache_storage_impl_unittest.cc3
-rw-r--r--content/browser/appcache/appcache_unittest.cc31
-rw-r--r--content/browser/appcache/appcache_update_job.cc3
-rw-r--r--content/browser/appcache/appcache_update_job.h12
-rw-r--r--content/browser/appcache/appcache_update_job_unittest.cc31
-rw-r--r--content/browser/appcache/appcache_url_request_job.cc15
-rw-r--r--content/browser/appcache/appcache_url_request_job.h20
-rw-r--r--content/browser/appcache/appcache_url_request_job_unittest.cc15
-rw-r--r--content/browser/appcache/appcache_working_set.cc4
-rw-r--r--content/browser/appcache/appcache_working_set.h10
-rw-r--r--content/browser/appcache/chrome_appcache_service.h1
-rw-r--r--content/browser/appcache/mock_appcache_storage.cc36
-rw-r--r--content/browser/appcache/mock_appcache_storage.h48
-rw-r--r--content/browser/appcache/mock_appcache_storage_unittest.cc51
-rw-r--r--content/browser/background_sync/background_sync_browsertest.cc10
-rw-r--r--content/browser/background_sync/background_sync_context_impl.h1
-rw-r--r--content/browser/background_sync/background_sync_manager.cc57
-rw-r--r--content/browser/background_sync/background_sync_manager.h54
-rw-r--r--content/browser/background_sync/background_sync_manager_unittest.cc31
-rw-r--r--content/browser/background_sync/background_sync_network_observer.h1
-rw-r--r--content/browser/background_sync/background_sync_power_observer.h1
-rw-r--r--content/browser/background_sync/background_sync_power_observer_unittest.cc1
-rw-r--r--content/browser/background_sync/background_sync_registration.h2
-rw-r--r--content/browser/background_sync/background_sync_registration_handle.h3
-rw-r--r--content/browser/background_sync/background_sync_registration_options.h3
-rw-r--r--content/browser/background_sync/background_sync_service_impl.h3
-rw-r--r--content/browser/background_sync/background_sync_service_impl_unittest.cc12
-rw-r--r--content/browser/battery_status/battery_monitor_impl_browsertest.cc1
-rw-r--r--content/browser/battery_status/battery_monitor_integration_browsertest.cc2
-rw-r--r--content/browser/blob_storage/blob_async_builder_host_unittest.cc3
-rw-r--r--content/browser/blob_storage/blob_async_transport_strategy_unittest.cc3
-rw-r--r--content/browser/bluetooth/bluetooth_dispatcher_host.cc10
-rw-r--r--content/browser/bluetooth/bluetooth_dispatcher_host.h10
-rw-r--r--content/browser/bluetooth/bluetooth_metrics.cc4
-rw-r--r--content/browser/bootstrap_sandbox_manager_mac.h1
-rw-r--r--content/browser/browser_child_process_host_impl.cc4
-rw-r--r--content/browser/browser_child_process_host_impl.h5
-rw-r--r--content/browser/browser_context.cc7
-rw-r--r--content/browser/browser_main.h1
-rw-r--r--content/browser/browser_main_loop.cc6
-rw-r--r--content/browser/browser_main_loop.h3
-rw-r--r--content/browser/browser_main_runner.cc2
-rw-r--r--content/browser/browser_plugin/browser_plugin_embedder.h1
-rw-r--r--content/browser/browser_plugin/browser_plugin_guest.cc6
-rw-r--r--content/browser/browser_plugin/browser_plugin_guest.h6
-rw-r--r--content/browser/browser_plugin/browser_plugin_message_filter.h1
-rw-r--r--content/browser/browser_plugin/browser_plugin_popup_menu_helper_mac.h1
-rw-r--r--content/browser/browser_process_sub_thread.h3
-rw-r--r--content/browser/browser_shutdown_profile_dumper.h4
-rw-r--r--content/browser/browser_side_navigation_browsertest.cc5
-rw-r--r--content/browser/browser_thread_impl.cc2
-rw-r--r--content/browser/browser_url_handler_impl.cc3
-rw-r--r--content/browser/browser_url_handler_impl.h3
-rw-r--r--content/browser/browsing_instance.h3
-rw-r--r--content/browser/byte_stream.cc1
-rw-r--r--content/browser/byte_stream.h2
-rw-r--r--content/browser/byte_stream_unittest.cc2
-rw-r--r--content/browser/cache_storage/cache_storage.cc6
-rw-r--r--content/browser/cache_storage/cache_storage.h5
-rw-r--r--content/browser/cache_storage/cache_storage_blob_to_disk_cache.h1
-rw-r--r--content/browser/cache_storage/cache_storage_cache.cc7
-rw-r--r--content/browser/cache_storage/cache_storage_cache.h5
-rw-r--r--content/browser/cache_storage/cache_storage_cache_unittest.cc12
-rw-r--r--content/browser/cache_storage/cache_storage_dispatcher_host.cc5
-rw-r--r--content/browser/cache_storage/cache_storage_dispatcher_host.h3
-rw-r--r--content/browser/cache_storage/cache_storage_manager.cc6
-rw-r--r--content/browser/cache_storage/cache_storage_manager.h2
-rw-r--r--content/browser/cache_storage/cache_storage_manager_unittest.cc18
-rw-r--r--content/browser/cache_storage/cache_storage_quota_client.h1
-rw-r--r--content/browser/cache_storage/cache_storage_scheduler.h1
-rw-r--r--content/browser/cert_store_impl.h1
-rw-r--r--content/browser/child_process_launcher.cc1
-rw-r--r--content/browser/child_process_launcher.h3
-rw-r--r--content/browser/child_process_security_policy_browsertest.cc2
-rw-r--r--content/browser/child_process_security_policy_impl.cc2
-rw-r--r--content/browser/child_process_security_policy_impl.h1
-rw-r--r--content/browser/child_process_security_policy_unittest.cc1
-rw-r--r--content/browser/cocoa/system_hotkey_helper_mac.h1
-rw-r--r--content/browser/compositor/browser_compositor_output_surface.h2
-rw-r--r--content/browser/compositor/browser_compositor_overlay_candidate_validator.h1
-rw-r--r--content/browser/compositor/browser_compositor_overlay_candidate_validator_mac.h1
-rw-r--r--content/browser/compositor/browser_compositor_overlay_candidate_validator_mac.mm2
-rw-r--r--content/browser/compositor/browser_compositor_overlay_candidate_validator_ozone.cc2
-rw-r--r--content/browser/compositor/browser_compositor_overlay_candidate_validator_ozone.h1
-rw-r--r--content/browser/compositor/browser_compositor_view_mac.h1
-rw-r--r--content/browser/compositor/browser_compositor_view_mac.mm4
-rw-r--r--content/browser/compositor/buffer_queue.cc1
-rw-r--r--content/browser/compositor/buffer_queue.h3
-rw-r--r--content/browser/compositor/buffer_queue_unittest.cc5
-rw-r--r--content/browser/compositor/delegated_frame_host.cc18
-rw-r--r--content/browser/compositor/delegated_frame_host.h12
-rw-r--r--content/browser/compositor/gpu_browser_compositor_output_surface.cc1
-rw-r--r--content/browser/compositor/gpu_browser_compositor_output_surface.h2
-rw-r--r--content/browser/compositor/gpu_process_transport_factory.cc3
-rw-r--r--content/browser/compositor/gpu_process_transport_factory.h8
-rw-r--r--content/browser/compositor/image_transport_factory.h1
-rw-r--r--content/browser/compositor/image_transport_factory_browsertest.cc1
-rw-r--r--content/browser/compositor/offscreen_browser_compositor_output_surface.cc1
-rw-r--r--content/browser/compositor/offscreen_browser_compositor_output_surface.h6
-rw-r--r--content/browser/compositor/owned_mailbox.h8
-rw-r--r--content/browser/compositor/reflector_impl_unittest.cc1
-rw-r--r--content/browser/compositor/reflector_texture.h7
-rw-r--r--content/browser/compositor/resize_lock.h2
-rw-r--r--content/browser/compositor/software_browser_compositor_output_surface.cc1
-rw-r--r--content/browser/compositor/software_browser_compositor_output_surface.h2
-rw-r--r--content/browser/compositor/software_browser_compositor_output_surface_unittest.cc1
-rw-r--r--content/browser/compositor/software_output_device_mac.h1
-rw-r--r--content/browser/compositor/software_output_device_mac.mm2
-rw-r--r--content/browser/compositor/software_output_device_mus.cc2
-rw-r--r--content/browser/compositor/software_output_device_ozone.h1
-rw-r--r--content/browser/compositor/software_output_device_ozone_unittest.cc1
-rw-r--r--content/browser/compositor/software_output_device_win.h6
-rw-r--r--content/browser/compositor/software_output_device_x11.cc21
-rw-r--r--content/browser/compositor/software_output_device_x11.h1
-rw-r--r--content/browser/compositor/surface_utils.cc1
-rw-r--r--content/browser/compositor/test/no_transport_image_transport_factory.cc1
-rw-r--r--content/browser/compositor/test/no_transport_image_transport_factory.h2
-rw-r--r--content/browser/cross_site_transfer_browsertest.cc1
-rw-r--r--content/browser/database_quota_client_unittest.cc14
-rw-r--r--content/browser/database_tracker_unittest.cc34
-rw-r--r--content/browser/databases_table_unittest.cc2
-rw-r--r--content/browser/device_monitor_mac.h2
-rw-r--r--content/browser/device_monitor_mac.mm1
-rw-r--r--content/browser/device_monitor_udev.cc3
-rw-r--r--content/browser/device_monitor_udev.h2
-rw-r--r--content/browser/device_sensors/ambient_light_mac.h2
-rw-r--r--content/browser/device_sensors/data_fetcher_shared_memory.h2
-rw-r--r--content/browser/device_sensors/data_fetcher_shared_memory_base.cc3
-rw-r--r--content/browser/device_sensors/data_fetcher_shared_memory_base.h1
-rw-r--r--content/browser/device_sensors/data_fetcher_shared_memory_base_unittest.cc1
-rw-r--r--content/browser/device_sensors/data_fetcher_shared_memory_mac.cc2
-rw-r--r--content/browser/device_sensors/data_fetcher_shared_memory_win.cc1
-rw-r--r--content/browser/device_sensors/device_inertial_sensor_browsertest.cc1
-rw-r--r--content/browser/device_sensors/device_inertial_sensor_service.h2
-rw-r--r--content/browser/device_sensors/device_light_message_filter.h1
-rw-r--r--content/browser/device_sensors/device_motion_message_filter.h1
-rw-r--r--content/browser/device_sensors/device_orientation_message_filter.h1
-rw-r--r--content/browser/device_sensors/sensor_manager_android.h1
-rw-r--r--content/browser/device_sensors/sensor_manager_chromeos_unittest.cc1
-rw-r--r--content/browser/devtools/devtools_agent_host_impl.cc1
-rw-r--r--content/browser/devtools/devtools_agent_host_impl.h4
-rw-r--r--content/browser/devtools/devtools_frame_trace_recorder.cc2
-rw-r--r--content/browser/devtools/devtools_frame_trace_recorder.h1
-rw-r--r--content/browser/devtools/devtools_frontend_host_impl.cc2
-rw-r--r--content/browser/devtools/devtools_frontend_host_impl.h1
-rw-r--r--content/browser/devtools/devtools_io_context.h2
-rw-r--r--content/browser/devtools/devtools_manager.h1
-rw-r--r--content/browser/devtools/devtools_manager_unittest.cc2
-rw-r--r--content/browser/devtools/devtools_netlog_observer.cc8
-rw-r--r--content/browser/devtools/devtools_netlog_observer.h8
-rw-r--r--content/browser/devtools/protocol/color_picker.cc1
-rw-r--r--content/browser/devtools/protocol/color_picker.h1
-rw-r--r--content/browser/devtools/protocol/devtools_protocol_browsertest.cc3
-rw-r--r--content/browser/devtools/protocol/devtools_protocol_client.h1
-rw-r--r--content/browser/devtools/protocol/dom_handler.cc1
-rw-r--r--content/browser/devtools/protocol/dom_handler.h1
-rw-r--r--content/browser/devtools/protocol/emulation_handler.cc1
-rw-r--r--content/browser/devtools/protocol/emulation_handler.h1
-rw-r--r--content/browser/devtools/protocol/input_handler.cc2
-rw-r--r--content/browser/devtools/protocol/input_handler.h1
-rw-r--r--content/browser/devtools/protocol/inspector_handler.h1
-rw-r--r--content/browser/devtools/protocol/io_handler.cc1
-rw-r--r--content/browser/devtools/protocol/io_handler.h1
-rw-r--r--content/browser/devtools/protocol/memory_handler.h1
-rw-r--r--content/browser/devtools/protocol/network_handler.cc2
-rw-r--r--content/browser/devtools/protocol/network_handler.h1
-rw-r--r--content/browser/devtools/protocol/page_handler.h4
-rw-r--r--content/browser/devtools/protocol/security_handler.h1
-rw-r--r--content/browser/devtools/protocol/service_worker_handler.cc16
-rw-r--r--content/browser/devtools/protocol/service_worker_handler.h7
-rw-r--r--content/browser/devtools/protocol/system_info_handler.cc4
-rw-r--r--content/browser/devtools/protocol/system_info_handler.h1
-rw-r--r--content/browser/devtools/protocol/tethering_handler.cc29
-rw-r--r--content/browser/devtools/protocol/tethering_handler.h5
-rw-r--r--content/browser/devtools/protocol/tracing_handler.cc2
-rw-r--r--content/browser/devtools/protocol/tracing_handler.h6
-rw-r--r--content/browser/devtools/render_frame_devtools_agent_host.cc2
-rw-r--r--content/browser/devtools/render_frame_devtools_agent_host.h3
-rw-r--r--content/browser/devtools/service_worker_devtools_agent_host.cc8
-rw-r--r--content/browser/devtools/service_worker_devtools_agent_host.h5
-rw-r--r--content/browser/devtools/service_worker_devtools_manager.cc5
-rw-r--r--content/browser/devtools/service_worker_devtools_manager.h10
-rw-r--r--content/browser/devtools/shared_worker_devtools_agent_host.h1
-rw-r--r--content/browser/devtools/shared_worker_devtools_manager.h2
-rw-r--r--content/browser/devtools/shared_worker_devtools_manager_unittest.cc3
-rw-r--r--content/browser/devtools/site_per_process_devtools_browsertest.cc2
-rw-r--r--content/browser/devtools/worker_devtools_agent_host.h1
-rw-r--r--content/browser/dom_storage/dom_storage_area.cc4
-rw-r--r--content/browser/dom_storage/dom_storage_area.h12
-rw-r--r--content/browser/dom_storage/dom_storage_area_unittest.cc6
-rw-r--r--content/browser/dom_storage/dom_storage_context_impl.cc18
-rw-r--r--content/browser/dom_storage/dom_storage_context_impl.h18
-rw-r--r--content/browser/dom_storage/dom_storage_context_impl_unittest.cc1
-rw-r--r--content/browser/dom_storage/dom_storage_context_wrapper.h1
-rw-r--r--content/browser/dom_storage/dom_storage_host.h1
-rw-r--r--content/browser/dom_storage/dom_storage_message_filter.cc2
-rw-r--r--content/browser/dom_storage/dom_storage_message_filter.h6
-rw-r--r--content/browser/dom_storage/dom_storage_namespace.cc5
-rw-r--r--content/browser/dom_storage/dom_storage_namespace.h11
-rw-r--r--content/browser/dom_storage/dom_storage_session.cc6
-rw-r--r--content/browser/dom_storage/dom_storage_session.h12
-rw-r--r--content/browser/dom_storage/local_storage_database_adapter.h1
-rw-r--r--content/browser/dom_storage/session_storage_database.cc12
-rw-r--r--content/browser/dom_storage/session_storage_database.h5
-rw-r--r--content/browser/dom_storage/session_storage_database_adapter.h1
-rw-r--r--content/browser/dom_storage/session_storage_database_unittest.cc36
-rw-r--r--content/browser/dom_storage/session_storage_namespace_impl.cc8
-rw-r--r--content/browser/dom_storage/session_storage_namespace_impl.h8
-rw-r--r--content/browser/download/base_file.cc5
-rw-r--r--content/browser/download/base_file.h12
-rw-r--r--content/browser/download/base_file_unittest.cc11
-rw-r--r--content/browser/download/base_file_win.cc1
-rw-r--r--content/browser/download/download_browsertest.cc7
-rw-r--r--content/browser/download/download_create_info.cc2
-rw-r--r--content/browser/download/download_create_info.h10
-rw-r--r--content/browser/download/download_file.h5
-rw-r--r--content/browser/download/download_file_impl.cc2
-rw-r--r--content/browser/download/download_file_impl.h6
-rw-r--r--content/browser/download/download_file_unittest.cc24
-rw-r--r--content/browser/download/download_item_factory.h12
-rw-r--r--content/browser/download/download_item_impl.cc42
-rw-r--r--content/browser/download/download_item_impl.h36
-rw-r--r--content/browser/download/download_item_impl_delegate.cc3
-rw-r--r--content/browser/download/download_item_impl_delegate.h5
-rw-r--r--content/browser/download/download_item_impl_unittest.cc8
-rw-r--r--content/browser/download/download_manager_impl.cc47
-rw-r--r--content/browser/download/download_manager_impl.h22
-rw-r--r--content/browser/download/download_manager_impl_unittest.cc55
-rw-r--r--content/browser/download/download_net_log_parameters.cc12
-rw-r--r--content/browser/download/download_net_log_parameters.h13
-rw-r--r--content/browser/download/download_request_core.cc6
-rw-r--r--content/browser/download/download_request_core.h5
-rw-r--r--content/browser/download/download_resource_handler.cc2
-rw-r--r--content/browser/download/download_resource_handler.h7
-rw-r--r--content/browser/download/download_stats.cc22
-rw-r--r--content/browser/download/download_stats.h13
-rw-r--r--content/browser/download/drag_download_file.cc2
-rw-r--r--content/browser/download/drag_download_file.h1
-rw-r--r--content/browser/download/drag_download_file_browsertest.cc1
-rw-r--r--content/browser/download/drag_download_util.cc3
-rw-r--r--content/browser/download/drag_download_util.h2
-rw-r--r--content/browser/download/file_metadata_linux.cc1
-rw-r--r--content/browser/download/file_metadata_unittest_linux.cc1
-rw-r--r--content/browser/download/mhtml_generation_browsertest.cc11
-rw-r--r--content/browser/download/mhtml_generation_manager.cc15
-rw-r--r--content/browser/download/mhtml_generation_manager.h7
-rw-r--r--content/browser/download/mock_download_file.h7
-rw-r--r--content/browser/download/rate_estimator.cc18
-rw-r--r--content/browser/download/rate_estimator.h14
-rw-r--r--content/browser/download/save_file.cc2
-rw-r--r--content/browser/download/save_file.h7
-rw-r--r--content/browser/download/save_file_manager.cc4
-rw-r--r--content/browser/download/save_file_manager.h8
-rw-r--r--content/browser/download/save_file_resource_handler.h5
-rw-r--r--content/browser/download/save_item.cc8
-rw-r--r--content/browser/download/save_item.h20
-rw-r--r--content/browser/download/save_package.cc44
-rw-r--r--content/browser/download/save_package.h25
-rw-r--r--content/browser/download/save_package_unittest.cc17
-rw-r--r--content/browser/download/save_types.cc2
-rw-r--r--content/browser/download/save_types.h7
-rw-r--r--content/browser/download/url_downloader.cc4
-rw-r--r--content/browser/download/url_downloader.h8
-rw-r--r--content/browser/file_descriptor_info_impl.h2
-rw-r--r--content/browser/file_descriptor_info_impl_unittest.cc1
-rw-r--r--content/browser/fileapi/blob_reader_unittest.cc19
-rw-r--r--content/browser/fileapi/blob_storage_context_unittest.cc2
-rw-r--r--content/browser/fileapi/blob_storage_host.h1
-rw-r--r--content/browser/fileapi/browser_file_system_helper.cc2
-rw-r--r--content/browser/fileapi/chrome_blob_storage_context.h3
-rw-r--r--content/browser/fileapi/copy_or_move_file_validator_unittest.cc7
-rw-r--r--content/browser/fileapi/copy_or_move_operation_delegate_unittest.cc95
-rw-r--r--content/browser/fileapi/dragged_file_util_unittest.cc4
-rw-r--r--content/browser/fileapi/external_mount_points_unittest.cc3
-rw-r--r--content/browser/fileapi/file_system_browsertest.cc4
-rw-r--r--content/browser/fileapi/file_system_context_unittest.cc4
-rw-r--r--content/browser/fileapi/file_system_dir_url_request_job_unittest.cc7
-rw-r--r--content/browser/fileapi/file_system_file_stream_reader_unittest.cc14
-rw-r--r--content/browser/fileapi/file_system_operation_impl_unittest.cc50
-rw-r--r--content/browser/fileapi/file_system_operation_impl_write_unittest.cc11
-rw-r--r--content/browser/fileapi/file_system_operation_runner_unittest.cc2
-rw-r--r--content/browser/fileapi/file_system_quota_client_unittest.cc92
-rw-r--r--content/browser/fileapi/file_system_url_request_job_unittest.cc3
-rw-r--r--content/browser/fileapi/file_system_url_unittest.cc3
-rw-r--r--content/browser/fileapi/file_system_usage_cache_unittest.cc1
-rw-r--r--content/browser/fileapi/file_writer_delegate_unittest.cc1
-rw-r--r--content/browser/fileapi/fileapi_message_filter.cc27
-rw-r--r--content/browser/fileapi/fileapi_message_filter.h12
-rw-r--r--content/browser/fileapi/fileapi_message_filter_unittest.cc2
-rw-r--r--content/browser/fileapi/isolated_context_unittest.cc4
-rw-r--r--content/browser/fileapi/local_file_stream_reader_unittest.cc16
-rw-r--r--content/browser/fileapi/local_file_stream_writer_unittest.cc4
-rw-r--r--content/browser/fileapi/local_file_util_unittest.cc6
-rw-r--r--content/browser/fileapi/mock_file_change_observer.h2
-rw-r--r--content/browser/fileapi/mock_file_update_observer.cc2
-rw-r--r--content/browser/fileapi/mock_file_update_observer.h6
-rw-r--r--content/browser/fileapi/mock_url_request_delegate.cc2
-rw-r--r--content/browser/fileapi/native_file_util_unittest.cc5
-rw-r--r--content/browser/fileapi/obfuscated_file_util_unittest.cc3
-rw-r--r--content/browser/fileapi/plugin_private_file_system_backend_unittest.cc1
-rw-r--r--content/browser/fileapi/recursive_operation_delegate_unittest.cc2
-rw-r--r--content/browser/fileapi/sandbox_database_test_helper.h2
-rw-r--r--content/browser/fileapi/sandbox_directory_database_unittest.cc7
-rw-r--r--content/browser/fileapi/sandbox_file_system_backend_delegate_unittest.cc1
-rw-r--r--content/browser/fileapi/sandbox_file_system_backend_unittest.cc4
-rw-r--r--content/browser/fileapi/sandbox_isolated_origin_database_unittest.cc1
-rw-r--r--content/browser/fileapi/sandbox_origin_database_unittest.cc3
-rw-r--r--content/browser/fileapi/sandbox_prioritized_origin_database_unittest.cc1
-rw-r--r--content/browser/fileapi/timed_task_helper_unittest.cc1
-rw-r--r--content/browser/fileapi/transient_file_util_unittest.cc2
-rw-r--r--content/browser/fileapi/upload_file_system_file_element_reader.h1
-rw-r--r--content/browser/fileapi/upload_file_system_file_element_reader_unittest.cc4
-rw-r--r--content/browser/frame_host/cross_process_frame_connector.cc2
-rw-r--r--content/browser/frame_host/cross_process_frame_connector.h4
-rw-r--r--content/browser/frame_host/cross_site_transferring_request.h2
-rw-r--r--content/browser/frame_host/frame_mojo_shell.cc1
-rw-r--r--content/browser/frame_host/frame_navigation_entry.cc15
-rw-r--r--content/browser/frame_host/frame_navigation_entry.h24
-rw-r--r--content/browser/frame_host/frame_tree.cc15
-rw-r--r--content/browser/frame_host/frame_tree.h7
-rw-r--r--content/browser/frame_host/frame_tree_browsertest.cc2
-rw-r--r--content/browser/frame_host/frame_tree_node.cc1
-rw-r--r--content/browser/frame_host/frame_tree_node.h4
-rw-r--r--content/browser/frame_host/frame_tree_unittest.cc3
-rw-r--r--content/browser/frame_host/interstitial_page_impl.cc16
-rw-r--r--content/browser/frame_host/interstitial_page_impl.h14
-rw-r--r--content/browser/frame_host/interstitial_page_impl_browsertest.cc2
-rw-r--r--content/browser/frame_host/interstitial_page_navigator_impl.h1
-rw-r--r--content/browser/frame_host/navigation_controller_android.cc4
-rw-r--r--content/browser/frame_host/navigation_controller_android.h2
-rw-r--r--content/browser/frame_host/navigation_controller_delegate.h10
-rw-r--r--content/browser/frame_host/navigation_controller_impl.cc19
-rw-r--r--content/browser/frame_host/navigation_controller_impl.h18
-rw-r--r--content/browser/frame_host/navigation_controller_impl_browsertest.cc19
-rw-r--r--content/browser/frame_host/navigation_controller_impl_unittest.cc20
-rw-r--r--content/browser/frame_host/navigation_entry_impl.cc13
-rw-r--r--content/browser/frame_host/navigation_entry_impl.h19
-rw-r--r--content/browser/frame_host/navigation_entry_impl_unittest.cc1
-rw-r--r--content/browser/frame_host/navigation_entry_screenshot_manager.cc1
-rw-r--r--content/browser/frame_host/navigation_entry_screenshot_manager.h1
-rw-r--r--content/browser/frame_host/navigation_handle_impl.h2
-rw-r--r--content/browser/frame_host/navigation_request.h2
-rw-r--r--content/browser/frame_host/navigation_request_info.h1
-rw-r--r--content/browser/frame_host/navigator_impl.h1
-rw-r--r--content/browser/frame_host/navigator_impl_unittest.cc22
-rw-r--r--content/browser/frame_host/popup_menu_helper_mac.h1
-rw-r--r--content/browser/frame_host/render_frame_host_delegate.cc5
-rw-r--r--content/browser/frame_host/render_frame_host_delegate.h10
-rw-r--r--content/browser/frame_host/render_frame_host_factory.cc4
-rw-r--r--content/browser/frame_host/render_frame_host_factory.h12
-rw-r--r--content/browser/frame_host/render_frame_host_impl.cc31
-rw-r--r--content/browser/frame_host/render_frame_host_impl.h29
-rw-r--r--content/browser/frame_host/render_frame_host_impl_browsertest.cc1
-rw-r--r--content/browser/frame_host/render_frame_host_manager.cc41
-rw-r--r--content/browser/frame_host/render_frame_host_manager.h25
-rw-r--r--content/browser/frame_host/render_frame_host_manager_browsertest.cc6
-rw-r--r--content/browser/frame_host/render_frame_host_manager_unittest.cc10
-rw-r--r--content/browser/frame_host/render_frame_message_filter.cc8
-rw-r--r--content/browser/frame_host/render_frame_message_filter.h8
-rw-r--r--content/browser/frame_host/render_frame_message_filter_browsertest.cc1
-rw-r--r--content/browser/frame_host/render_frame_proxy_host.cc4
-rw-r--r--content/browser/frame_host/render_frame_proxy_host.h5
-rw-r--r--content/browser/frame_host/render_widget_host_view_child_frame.cc7
-rw-r--r--content/browser/frame_host/render_widget_host_view_child_frame.h15
-rw-r--r--content/browser/frame_host/render_widget_host_view_child_frame_browsertest.cc1
-rw-r--r--content/browser/frame_host/render_widget_host_view_child_frame_unittest.cc9
-rw-r--r--content/browser/frame_host/render_widget_host_view_guest.cc3
-rw-r--r--content/browser/frame_host/render_widget_host_view_guest.h7
-rw-r--r--content/browser/frame_host/render_widget_host_view_guest_unittest.cc9
-rw-r--r--content/browser/gamepad/gamepad_consumer.h1
-rw-r--r--content/browser/gamepad/gamepad_data_fetcher.cc3
-rw-r--r--content/browser/gamepad/gamepad_platform_data_fetcher.h3
-rw-r--r--content/browser/gamepad/gamepad_platform_data_fetcher_android.cc2
-rw-r--r--content/browser/gamepad/gamepad_platform_data_fetcher_android.h1
-rw-r--r--content/browser/gamepad/gamepad_platform_data_fetcher_linux.cc1
-rw-r--r--content/browser/gamepad/gamepad_platform_data_fetcher_linux.h4
-rw-r--r--content/browser/gamepad/gamepad_platform_data_fetcher_mac.h4
-rw-r--r--content/browser/gamepad/gamepad_platform_data_fetcher_mac.mm3
-rw-r--r--content/browser/gamepad/gamepad_platform_data_fetcher_win.cc2
-rw-r--r--content/browser/gamepad/gamepad_platform_data_fetcher_win.h2
-rw-r--r--content/browser/gamepad/gamepad_provider.cc3
-rw-r--r--content/browser/gamepad/gamepad_provider.h1
-rw-r--r--content/browser/gamepad/gamepad_provider_unittest.cc2
-rw-r--r--content/browser/gamepad/gamepad_service.h2
-rw-r--r--content/browser/gamepad/gamepad_service_unittest.cc1
-rw-r--r--content/browser/gamepad/gamepad_standard_mappings_linux.cc3
-rw-r--r--content/browser/gamepad/gamepad_standard_mappings_mac.mm3
-rw-r--r--content/browser/gamepad/gamepad_standard_mappings_win.cc3
-rw-r--r--content/browser/gamepad/gamepad_test_helpers.h1
-rw-r--r--content/browser/gamepad/raw_input_data_fetcher_win.cc9
-rw-r--r--content/browser/gamepad/raw_input_data_fetcher_win.h4
-rw-r--r--content/browser/gamepad/xbox_data_fetcher_mac.cc86
-rw-r--r--content/browser/gamepad/xbox_data_fetcher_mac.h10
-rw-r--r--content/browser/geofencing/geofencing_dispatcher_host.cc6
-rw-r--r--content/browser/geofencing/geofencing_dispatcher_host.h9
-rw-r--r--content/browser/geofencing/geofencing_manager.cc43
-rw-r--r--content/browser/geofencing/geofencing_manager.h34
-rw-r--r--content/browser/geofencing/geofencing_manager_unittest.cc37
-rw-r--r--content/browser/geofencing/geofencing_provider.h7
-rw-r--r--content/browser/geofencing/geofencing_registration_delegate.h9
-rw-r--r--content/browser/geofencing/geofencing_service.cc20
-rw-r--r--content/browser/geofencing/geofencing_service.h26
-rw-r--r--content/browser/geofencing/geofencing_service_unittest.cc25
-rw-r--r--content/browser/geofencing/mock_geofencing_service.cc9
-rw-r--r--content/browser/geofencing/mock_geofencing_service.h12
-rw-r--r--content/browser/geolocation/empty_wifi_data_provider.h1
-rw-r--r--content/browser/geolocation/fake_access_token_store.h1
-rw-r--r--content/browser/geolocation/geolocation_provider_impl.h2
-rw-r--r--content/browser/geolocation/geolocation_provider_impl_unittest.cc1
-rw-r--r--content/browser/geolocation/geolocation_service_context.h1
-rw-r--r--content/browser/geolocation/geolocation_service_impl.h1
-rw-r--r--content/browser/geolocation/location_arbitrator_impl.cc3
-rw-r--r--content/browser/geolocation/location_arbitrator_impl.h5
-rw-r--r--content/browser/geolocation/location_provider_base.h1
-rw-r--r--content/browser/geolocation/mock_location_arbitrator.h2
-rw-r--r--content/browser/geolocation/mock_location_provider.h1
-rw-r--r--content/browser/geolocation/network_location_provider.h4
-rw-r--r--content/browser/geolocation/network_location_provider_unittest.cc3
-rw-r--r--content/browser/geolocation/network_location_request.h1
-rw-r--r--content/browser/geolocation/wifi_data.cc1
-rw-r--r--content/browser/geolocation/wifi_data_provider.h2
-rw-r--r--content/browser/geolocation/wifi_data_provider_chromeos.cc4
-rw-r--r--content/browser/geolocation/wifi_data_provider_chromeos.h1
-rw-r--r--content/browser/geolocation/wifi_data_provider_common.cc2
-rw-r--r--content/browser/geolocation/wifi_data_provider_common.h6
-rw-r--r--content/browser/geolocation/wifi_data_provider_common_unittest.cc2
-rw-r--r--content/browser/geolocation/wifi_data_provider_common_win.cc8
-rw-r--r--content/browser/geolocation/wifi_data_provider_corewlan_mac.mm6
-rw-r--r--content/browser/geolocation/wifi_data_provider_linux.cc14
-rw-r--r--content/browser/geolocation/wifi_data_provider_linux.h1
-rw-r--r--content/browser/geolocation/wifi_data_provider_linux_unittest.cc9
-rw-r--r--content/browser/geolocation/wifi_data_provider_mac.h1
-rw-r--r--content/browser/geolocation/wifi_data_provider_manager.h2
-rw-r--r--content/browser/geolocation/wifi_data_provider_win.h1
-rw-r--r--content/browser/geolocation/wifi_polling_policy.h2
-rw-r--r--content/browser/gpu/browser_gpu_channel_host_factory.cc13
-rw-r--r--content/browser/gpu/browser_gpu_channel_host_factory.h11
-rw-r--r--content/browser/gpu/browser_gpu_memory_buffer_manager.cc10
-rw-r--r--content/browser/gpu/browser_gpu_memory_buffer_manager.h12
-rw-r--r--content/browser/gpu/compositor_util.cc3
-rw-r--r--content/browser/gpu/gpu_data_manager_impl.cc3
-rw-r--r--content/browser/gpu/gpu_data_manager_impl.h6
-rw-r--r--content/browser/gpu/gpu_data_manager_impl_private.cc21
-rw-r--r--content/browser/gpu/gpu_data_manager_impl_private.h9
-rw-r--r--content/browser/gpu/gpu_data_manager_impl_private_unittest.cc4
-rw-r--r--content/browser/gpu/gpu_internals_ui.cc9
-rw-r--r--content/browser/gpu/gpu_ipc_browsertests.cc1
-rw-r--r--content/browser/gpu/gpu_process_host.cc15
-rw-r--r--content/browser/gpu/gpu_process_host.h17
-rw-r--r--content/browser/gpu/gpu_process_host_ui_shim.cc9
-rw-r--r--content/browser/gpu/gpu_process_host_ui_shim.h7
-rw-r--r--content/browser/gpu/gpu_surface_tracker.cc5
-rw-r--r--content/browser/gpu/gpu_surface_tracker.h4
-rw-r--r--content/browser/gpu/shader_disk_cache.cc9
-rw-r--r--content/browser/gpu/shader_disk_cache.h13
-rw-r--r--content/browser/gpu/shader_disk_cache_unittest.cc1
-rw-r--r--content/browser/histogram_controller.h1
-rw-r--r--content/browser/histogram_internals_request_job.h2
-rw-r--r--content/browser/histogram_message_filter.h1
-rw-r--r--content/browser/histogram_synchronizer.h2
-rw-r--r--content/browser/host_zoom_map_impl.h1
-rw-r--r--content/browser/host_zoom_map_impl_unittest.cc3
-rw-r--r--content/browser/indexed_db/indexed_db_active_blob_registry.cc24
-rw-r--r--content/browser/indexed_db/indexed_db_active_blob_registry.h26
-rw-r--r--content/browser/indexed_db/indexed_db_active_blob_registry_unittest.cc17
-rw-r--r--content/browser/indexed_db/indexed_db_backing_store.cc369
-rw-r--r--content/browser/indexed_db/indexed_db_backing_store.h169
-rw-r--r--content/browser/indexed_db/indexed_db_backing_store_unittest.cc48
-rw-r--r--content/browser/indexed_db/indexed_db_blob_info.cc25
-rw-r--r--content/browser/indexed_db/indexed_db_blob_info.h20
-rw-r--r--content/browser/indexed_db/indexed_db_browsertest.cc43
-rw-r--r--content/browser/indexed_db/indexed_db_callbacks.cc47
-rw-r--r--content/browser/indexed_db/indexed_db_callbacks.h40
-rw-r--r--content/browser/indexed_db/indexed_db_class_factory.cc4
-rw-r--r--content/browser/indexed_db/indexed_db_class_factory.h6
-rw-r--r--content/browser/indexed_db/indexed_db_cleanup_on_io_error_unittest.cc1
-rw-r--r--content/browser/indexed_db/indexed_db_connection.h1
-rw-r--r--content/browser/indexed_db/indexed_db_context_impl.cc22
-rw-r--r--content/browser/indexed_db/indexed_db_context_impl.h18
-rw-r--r--content/browser/indexed_db/indexed_db_cursor.cc6
-rw-r--r--content/browser/indexed_db/indexed_db_cursor.h8
-rw-r--r--content/browser/indexed_db/indexed_db_database.cc208
-rw-r--r--content/browser/indexed_db/indexed_db_database.h162
-rw-r--r--content/browser/indexed_db/indexed_db_database_callbacks.cc11
-rw-r--r--content/browser/indexed_db/indexed_db_database_callbacks.h10
-rw-r--r--content/browser/indexed_db/indexed_db_database_error.cc14
-rw-r--r--content/browser/indexed_db/indexed_db_database_error.h13
-rw-r--r--content/browser/indexed_db/indexed_db_database_unittest.cc37
-rw-r--r--content/browser/indexed_db/indexed_db_dispatcher_host.cc141
-rw-r--r--content/browser/indexed_db/indexed_db_dispatcher_host.h112
-rw-r--r--content/browser/indexed_db/indexed_db_factory.h4
-rw-r--r--content/browser/indexed_db/indexed_db_factory_impl.cc6
-rw-r--r--content/browser/indexed_db/indexed_db_factory_impl.h3
-rw-r--r--content/browser/indexed_db/indexed_db_factory_unittest.cc15
-rw-r--r--content/browser/indexed_db/indexed_db_fake_backing_store.cc86
-rw-r--r--content/browser/indexed_db/indexed_db_fake_backing_store.h90
-rw-r--r--content/browser/indexed_db/indexed_db_index_writer.cc22
-rw-r--r--content/browser/indexed_db/indexed_db_index_writer.h22
-rw-r--r--content/browser/indexed_db/indexed_db_internals_ui.cc1
-rw-r--r--content/browser/indexed_db/indexed_db_internals_ui.h3
-rw-r--r--content/browser/indexed_db/indexed_db_leveldb_coding.cc261
-rw-r--r--content/browser/indexed_db/indexed_db_leveldb_coding.h251
-rw-r--r--content/browser/indexed_db/indexed_db_leveldb_coding_unittest.cc29
-rw-r--r--content/browser/indexed_db/indexed_db_metadata.cc15
-rw-r--r--content/browser/indexed_db/indexed_db_metadata.h35
-rw-r--r--content/browser/indexed_db/indexed_db_pending_connection.cc4
-rw-r--r--content/browser/indexed_db/indexed_db_pending_connection.h11
-rw-r--r--content/browser/indexed_db/indexed_db_quota_client.cc6
-rw-r--r--content/browser/indexed_db/indexed_db_quota_client.h1
-rw-r--r--content/browser/indexed_db/indexed_db_quota_client_unittest.cc13
-rw-r--r--content/browser/indexed_db/indexed_db_transaction.cc6
-rw-r--r--content/browser/indexed_db/indexed_db_transaction.h16
-rw-r--r--content/browser/indexed_db/indexed_db_transaction_coordinator.cc5
-rw-r--r--content/browser/indexed_db/indexed_db_transaction_coordinator.h5
-rw-r--r--content/browser/indexed_db/indexed_db_transaction_unittest.cc27
-rw-r--r--content/browser/indexed_db/indexed_db_unittest.cc5
-rw-r--r--content/browser/indexed_db/indexed_db_value.h2
-rw-r--r--content/browser/indexed_db/leveldb/leveldb_database.cc9
-rw-r--r--content/browser/indexed_db/leveldb/leveldb_database.h1
-rw-r--r--content/browser/indexed_db/leveldb/leveldb_iterator_impl.h1
-rw-r--r--content/browser/indexed_db/leveldb/leveldb_transaction.h1
-rw-r--r--content/browser/indexed_db/leveldb/leveldb_unittest.cc2
-rw-r--r--content/browser/indexed_db/list_set.h2
-rw-r--r--content/browser/indexed_db/mock_browsertest_indexed_db_class_factory.cc10
-rw-r--r--content/browser/indexed_db/mock_browsertest_indexed_db_class_factory.h6
-rw-r--r--content/browser/indexed_db/mock_indexed_db_callbacks.cc3
-rw-r--r--content/browser/indexed_db/mock_indexed_db_callbacks.h5
-rw-r--r--content/browser/indexed_db/mock_indexed_db_database_callbacks.cc2
-rw-r--r--content/browser/indexed_db/mock_indexed_db_database_callbacks.h9
-rw-r--r--content/browser/indexed_db/mock_indexed_db_factory.h3
-rw-r--r--content/browser/loader/async_resource_handler.cc5
-rw-r--r--content/browser/loader/async_resource_handler.h5
-rw-r--r--content/browser/loader/async_resource_handler_browsertest.cc3
-rw-r--r--content/browser/loader/certificate_resource_handler.cc1
-rw-r--r--content/browser/loader/cross_site_resource_handler.h1
-rw-r--r--content/browser/loader/cross_site_resource_handler_browsertest.cc1
-rw-r--r--content/browser/loader/detachable_resource_handler.h2
-rw-r--r--content/browser/loader/mime_type_resource_handler.h1
-rw-r--r--content/browser/loader/mime_type_resource_handler_unittest.cc4
-rw-r--r--content/browser/loader/navigation_resource_throttle.h2
-rw-r--r--content/browser/loader/navigation_url_loader.h1
-rw-r--r--content/browser/loader/navigation_url_loader_impl_core.h1
-rw-r--r--content/browser/loader/power_save_block_resource_throttle.h2
-rw-r--r--content/browser/loader/redirect_to_file_resource_handler.cc1
-rw-r--r--content/browser/loader/redirect_to_file_resource_handler.h2
-rw-r--r--content/browser/loader/resource_buffer.h2
-rw-r--r--content/browser/loader/resource_dispatcher_host_browsertest.cc2
-rw-r--r--content/browser/loader/resource_dispatcher_host_impl.cc11
-rw-r--r--content/browser/loader/resource_dispatcher_host_impl.h12
-rw-r--r--content/browser/loader/resource_dispatcher_host_unittest.cc4
-rw-r--r--content/browser/loader/resource_loader.h1
-rw-r--r--content/browser/loader/resource_loader_unittest.cc7
-rw-r--r--content/browser/loader/resource_message_delegate.h2
-rw-r--r--content/browser/loader/resource_message_filter.h1
-rw-r--r--content/browser/loader/resource_request_info_impl.h2
-rw-r--r--content/browser/loader/resource_scheduler.cc11
-rw-r--r--content/browser/loader/resource_scheduler.h7
-rw-r--r--content/browser/loader/resource_scheduler_filter.cc8
-rw-r--r--content/browser/loader/stream_resource_handler.h1
-rw-r--r--content/browser/loader/sync_resource_handler.h4
-rw-r--r--content/browser/loader/temporary_file_stream_unittest.cc2
-rw-r--r--content/browser/loader/throttling_resource_handler.h2
-rw-r--r--content/browser/loader/upload_data_stream_builder.cc3
-rw-r--r--content/browser/loader/upload_data_stream_builder_unittest.cc11
-rw-r--r--content/browser/mach_broker_mac.h1
-rw-r--r--content/browser/manifest/manifest_browsertest.cc11
-rw-r--r--content/browser/manifest/manifest_manager_host.cc2
-rw-r--r--content/browser/manifest/manifest_manager_host.h1
-rw-r--r--content/browser/memory/memory_message_filter.h1
-rw-r--r--content/browser/memory/memory_pressure_controller.h1
-rw-r--r--content/browser/message_port_message_filter.cc2
-rw-r--r--content/browser/message_port_message_filter.h1
-rw-r--r--content/browser/message_port_provider.cc1
-rw-r--r--content/browser/message_port_provider_browsertest.cc1
-rw-r--r--content/browser/message_port_service.cc2
-rw-r--r--content/browser/message_port_service.h2
-rw-r--r--content/browser/mojo/mojo_app_connection_impl.cc2
-rw-r--r--content/browser/mojo/mojo_application_host.cc1
-rw-r--r--content/browser/mojo/mojo_application_host.h2
-rw-r--r--content/browser/mojo/mojo_shell_client_host.cc4
-rw-r--r--content/browser/navigator_connect/navigator_connect_context_impl.cc4
-rw-r--r--content/browser/navigator_connect/service_port_service_impl.h2
-rw-r--r--content/browser/net/browser_online_state_observer.h2
-rw-r--r--content/browser/net/quota_policy_cookie_store.cc1
-rw-r--r--content/browser/net/quota_policy_cookie_store.h3
-rw-r--r--content/browser/net/view_http_cache_job_factory.cc3
-rw-r--r--content/browser/net_info_browsertest.cc1
-rw-r--r--content/browser/notification_service_impl.h1
-rw-r--r--content/browser/notifications/notification_database.h1
-rw-r--r--content/browser/notifications/notification_database_data_conversions.cc2
-rw-r--r--content/browser/notifications/notification_database_data_unittest.cc4
-rw-r--r--content/browser/notifications/notification_database_unittest.cc4
-rw-r--r--content/browser/notifications/notification_event_dispatcher_impl.cc1
-rw-r--r--content/browser/notifications/notification_event_dispatcher_impl.h3
-rw-r--r--content/browser/notifications/notification_id_generator.cc1
-rw-r--r--content/browser/notifications/notification_id_generator_unittest.cc3
-rw-r--r--content/browser/notifications/notification_message_filter.cc2
-rw-r--r--content/browser/notifications/notification_message_filter.h5
-rw-r--r--content/browser/notifications/platform_notification_context_impl.h1
-rw-r--r--content/browser/notifications/platform_notification_context_unittest.cc2
-rw-r--r--content/browser/pepper_flash_settings_helper_impl.h2
-rw-r--r--content/browser/permissions/permission_service_impl.cc2
-rw-r--r--content/browser/plugin_content_origin_whitelist.h1
-rw-r--r--content/browser/plugin_data_remover_impl.cc17
-rw-r--r--content/browser/plugin_data_remover_impl.h1
-rw-r--r--content/browser/plugin_loader_posix.cc4
-rw-r--r--content/browser/plugin_loader_posix.h9
-rw-r--r--content/browser/plugin_loader_posix_unittest.cc7
-rw-r--r--content/browser/plugin_process_host.cc12
-rw-r--r--content/browser/plugin_process_host.h17
-rw-r--r--content/browser/plugin_process_host_mac.cc5
-rw-r--r--content/browser/plugin_service_impl.cc3
-rw-r--r--content/browser/plugin_service_impl.h2
-rw-r--r--content/browser/power_monitor_message_broadcaster.h2
-rw-r--r--content/browser/power_monitor_message_broadcaster_unittest.cc1
-rw-r--r--content/browser/power_save_blocker_android.cc1
-rw-r--r--content/browser/power_save_blocker_chromeos.cc2
-rw-r--r--content/browser/power_save_blocker_impl.cc1
-rw-r--r--content/browser/power_save_blocker_impl.h2
-rw-r--r--content/browser/power_save_blocker_ozone.cc1
-rw-r--r--content/browser/power_save_blocker_win.cc1
-rw-r--r--content/browser/power_save_blocker_x11.cc3
-rw-r--r--content/browser/power_usage_monitor_impl.cc2
-rw-r--r--content/browser/power_usage_monitor_impl.h2
-rw-r--r--content/browser/ppapi_plugin_process_host.cc14
-rw-r--r--content/browser/ppapi_plugin_process_host.h12
-rw-r--r--content/browser/presentation/presentation_service_impl.cc3
-rw-r--r--content/browser/presentation/presentation_service_impl.h1
-rw-r--r--content/browser/presentation/presentation_service_impl_unittest.cc21
-rw-r--r--content/browser/profiler_controller_impl.h1
-rw-r--r--content/browser/profiler_message_filter.cc2
-rw-r--r--content/browser/profiler_message_filter.h5
-rw-r--r--content/browser/push_messaging/push_messaging_message_filter.cc1
-rw-r--r--content/browser/push_messaging/push_messaging_message_filter.h1
-rw-r--r--content/browser/push_messaging/push_messaging_router.cc4
-rw-r--r--content/browser/push_messaging/push_messaging_router.h7
-rw-r--r--content/browser/quota/mock_quota_manager.h1
-rw-r--r--content/browser/quota/mock_quota_manager_proxy.h3
-rw-r--r--content/browser/quota/mock_quota_manager_unittest.cc1
-rw-r--r--content/browser/quota/quota_backend_impl_unittest.cc45
-rw-r--r--content/browser/quota/quota_database_unittest.cc12
-rw-r--r--content/browser/quota/quota_manager_unittest.cc124
-rw-r--r--content/browser/quota/quota_reservation_manager_unittest.cc49
-rw-r--r--content/browser/quota/quota_temporary_storage_evictor_unittest.cc76
-rw-r--r--content/browser/quota/storage_monitor_unittest.cc40
-rw-r--r--content/browser/quota/usage_tracker_unittest.cc53
-rw-r--r--content/browser/quota_dispatcher_host.cc36
-rw-r--r--content/browser/quota_dispatcher_host.h2
-rw-r--r--content/browser/resource_context_impl.cc4
-rw-r--r--content/browser/safe_util_win.cc1
-rw-r--r--content/browser/screen_orientation/screen_orientation_browsertest.cc2
-rw-r--r--content/browser/screen_orientation/screen_orientation_dispatcher_host_impl.h1
-rw-r--r--content/browser/screen_orientation/screen_orientation_message_filter_android.h1
-rw-r--r--content/browser/security_exploit_browsertest.cc4
-rw-r--r--content/browser/shared_worker/shared_worker_host.h1
-rw-r--r--content/browser/shared_worker/shared_worker_instance.h1
-rw-r--r--content/browser/shared_worker/shared_worker_instance_unittest.cc2
-rw-r--r--content/browser/shared_worker/shared_worker_message_filter.cc8
-rw-r--r--content/browser/shared_worker/shared_worker_message_filter.h1
-rw-r--r--content/browser/shared_worker/shared_worker_service_impl.cc3
-rw-r--r--content/browser/shared_worker/shared_worker_service_impl.h1
-rw-r--r--content/browser/shared_worker/shared_worker_service_impl_unittest.cc4
-rw-r--r--content/browser/shared_worker/worker_browsertest.cc1
-rw-r--r--content/browser/shared_worker/worker_document_set.h1
-rw-r--r--content/browser/signed_certificate_timestamp_store_impl.h1
-rw-r--r--content/browser/site_instance_impl.cc4
-rw-r--r--content/browser/site_instance_impl.h10
-rw-r--r--content/browser/site_instance_impl_unittest.cc2
-rw-r--r--content/browser/site_per_process_browsertest.cc13
-rw-r--r--content/browser/speech/audio_buffer.cc14
-rw-r--r--content/browser/speech/audio_buffer.h17
-rw-r--r--content/browser/speech/audio_encoder.cc2
-rw-r--r--content/browser/speech/chunked_byte_buffer.cc29
-rw-r--r--content/browser/speech/chunked_byte_buffer.h13
-rw-r--r--content/browser/speech/chunked_byte_buffer_unittest.cc20
-rw-r--r--content/browser/speech/endpointer/endpointer.cc12
-rw-r--r--content/browser/speech/endpointer/endpointer.h31
-rw-r--r--content/browser/speech/endpointer/endpointer_unittest.cc34
-rw-r--r--content/browser/speech/endpointer/energy_endpointer.cc39
-rw-r--r--content/browser/speech/endpointer/energy_endpointer.h22
-rw-r--r--content/browser/speech/endpointer/energy_endpointer_params.h1
-rw-r--r--content/browser/speech/google_one_shot_remote_engine.cc5
-rw-r--r--content/browser/speech/google_one_shot_remote_engine.h2
-rw-r--r--content/browser/speech/google_streaming_remote_engine.cc23
-rw-r--r--content/browser/speech/google_streaming_remote_engine.h11
-rw-r--r--content/browser/speech/google_streaming_remote_engine_unittest.cc5
-rw-r--r--content/browser/speech/speech_recognition_browsertest.cc9
-rw-r--r--content/browser/speech/speech_recognition_dispatcher_host.h1
-rw-r--r--content/browser/speech/speech_recognition_engine.cc2
-rw-r--r--content/browser/speech/speech_recognition_engine.h5
-rw-r--r--content/browser/speech/speech_recognition_manager_impl.cc1
-rw-r--r--content/browser/speech/speech_recognition_manager_impl.h1
-rw-r--r--content/browser/speech/speech_recognizer.h1
-rw-r--r--content/browser/speech/speech_recognizer_impl.cc14
-rw-r--r--content/browser/speech/speech_recognizer_impl.h2
-rw-r--r--content/browser/speech/speech_recognizer_impl_android.cc2
-rw-r--r--content/browser/speech/speech_recognizer_impl_android.h1
-rw-r--r--content/browser/speech/speech_recognizer_impl_unittest.cc7
-rw-r--r--content/browser/ssl/ssl_cert_error_handler.h1
-rw-r--r--content/browser/ssl/ssl_client_auth_handler.cc1
-rw-r--r--content/browser/ssl/ssl_client_auth_handler.h1
-rw-r--r--content/browser/ssl/ssl_error_handler.h2
-rw-r--r--content/browser/ssl/ssl_manager.cc1
-rw-r--r--content/browser/ssl/ssl_manager.h2
-rw-r--r--content/browser/ssl/ssl_policy.h1
-rw-r--r--content/browser/ssl/ssl_policy_backend.h2
-rw-r--r--content/browser/ssl/ssl_request_info.h1
-rw-r--r--content/browser/startup_task_runner.h1
-rw-r--r--content/browser/storage_partition_impl.cc44
-rw-r--r--content/browser/storage_partition_impl.h17
-rw-r--r--content/browser/storage_partition_impl_map.cc2
-rw-r--r--content/browser/storage_partition_impl_unittest.cc8
-rw-r--r--content/browser/streams/stream.h4
-rw-r--r--content/browser/streams/stream_handle_impl.cc2
-rw-r--r--content/browser/streams/stream_registry.h4
-rw-r--r--content/browser/streams/stream_unittest.cc2
-rw-r--r--content/browser/streams/stream_url_request_job.h5
-rw-r--r--content/browser/system_message_window_win.cc2
-rw-r--r--content/browser/system_message_window_win.h2
-rw-r--r--content/browser/theme_helper_mac.h1
-rw-r--r--content/browser/time_zone_monitor.cc1
-rw-r--r--content/browser/time_zone_monitor.h2
-rw-r--r--content/browser/time_zone_monitor_android.h2
-rw-r--r--content/browser/time_zone_monitor_chromeos.cc1
-rw-r--r--content/browser/time_zone_monitor_linux.cc4
-rw-r--r--content/browser/time_zone_monitor_mac.mm5
-rw-r--r--content/browser/time_zone_monitor_win.cc2
-rw-r--r--content/browser/tracing/background_tracing_config_impl.h1
-rw-r--r--content/browser/tracing/background_tracing_manager_browsertest.cc3
-rw-r--r--content/browser/tracing/background_tracing_manager_impl.h1
-rw-r--r--content/browser/tracing/background_tracing_rule.h1
-rw-r--r--content/browser/tracing/etw_system_event_consumer_win.cc9
-rw-r--r--content/browser/tracing/etw_system_event_consumer_win.h1
-rw-r--r--content/browser/tracing/memory_tracing_browsertest.cc8
-rw-r--r--content/browser/tracing/power_tracing_agent.h1
-rw-r--r--content/browser/tracing/trace_message_filter.cc4
-rw-r--r--content/browser/tracing/trace_message_filter.h9
-rw-r--r--content/browser/tracing/tracing_controller_browsertest.cc7
-rw-r--r--content/browser/tracing/tracing_controller_impl.cc7
-rw-r--r--content/browser/tracing/tracing_controller_impl.h12
-rw-r--r--content/browser/tracing/tracing_controller_impl_data_sinks.cc1
-rw-r--r--content/browser/tracing/tracing_ui.cc4
-rw-r--r--content/browser/tracing/tracing_ui.h5
-rw-r--r--content/browser/udev_linux.cc2
-rw-r--r--content/browser/udev_linux.h2
-rw-r--r--content/browser/utility_process_host_impl.cc2
-rw-r--r--content/browser/utility_process_host_impl.h3
-rw-r--r--content/browser/vibration_manager_integration_browsertest.cc8
-rw-r--r--content/browser/vr/android/cardboard/cardboard_vr_device.h2
-rw-r--r--content/browser/vr/android/cardboard/cardboard_vr_device_provider.h2
-rw-r--r--content/browser/vr/test/fake_vr_device.h1
-rw-r--r--content/browser/vr/vr_device_manager.cc1
-rw-r--r--content/browser/vr/vr_device_manager.h4
-rw-r--r--content/browser/vr/vr_device_manager_unittest.cc1
-rw-r--r--content/browser/wake_lock/wake_lock_service_context.cc1
-rw-r--r--content/browser/web_contents/aura/gesture_nav_simple.cc1
-rw-r--r--content/browser/web_contents/aura/gesture_nav_simple.h1
-rw-r--r--content/browser/web_contents/aura/overscroll_navigation_overlay.cc1
-rw-r--r--content/browser/web_contents/aura/overscroll_navigation_overlay_unittest.cc1
-rw-r--r--content/browser/web_contents/aura/overscroll_window_animation.h1
-rw-r--r--content/browser/web_contents/aura/overscroll_window_animation_unittest.cc1
-rw-r--r--content/browser/web_contents/aura/overscroll_window_delegate.h1
-rw-r--r--content/browser/web_contents/aura/overscroll_window_delegate_unittest.cc1
-rw-r--r--content/browser/web_contents/aura/shadow_layer_delegate.cc1
-rw-r--r--content/browser/web_contents/aura/shadow_layer_delegate.h1
-rw-r--r--content/browser/web_contents/opened_by_dom_browsertest.cc1
-rw-r--r--content/browser/web_contents/web_contents_android.cc12
-rw-r--r--content/browser/web_contents/web_contents_android.h2
-rw-r--r--content/browser/web_contents/web_contents_impl.cc47
-rw-r--r--content/browser/web_contents/web_contents_impl.h48
-rw-r--r--content/browser/web_contents/web_contents_impl_browsertest.cc2
-rw-r--r--content/browser/web_contents/web_contents_impl_unittest.cc9
-rw-r--r--content/browser/web_contents/web_contents_view.h2
-rw-r--r--content/browser/web_contents/web_contents_view_android.h1
-rw-r--r--content/browser/web_contents/web_contents_view_aura.cc7
-rw-r--r--content/browser/web_contents/web_contents_view_aura.h1
-rw-r--r--content/browser/web_contents/web_contents_view_aura_browsertest.cc11
-rw-r--r--content/browser/web_contents/web_contents_view_guest.h2
-rw-r--r--content/browser/web_contents/web_contents_view_mac.h1
-rw-r--r--content/browser/web_contents/web_contents_view_mus.h1
-rw-r--r--content/browser/webui/content_web_ui_controller_factory.cc1
-rw-r--r--content/browser/webui/content_web_ui_controller_factory.h2
-rw-r--r--content/browser/webui/shared_resources_data_source.cc2
-rw-r--r--content/browser/webui/shared_resources_data_source.h2
-rw-r--r--content/browser/webui/url_data_manager.cc2
-rw-r--r--content/browser/webui/url_data_manager.h1
-rw-r--r--content/browser/webui/url_data_manager_backend.cc2
-rw-r--r--content/browser/webui/url_data_manager_backend.h2
-rw-r--r--content/browser/webui/url_data_manager_backend_unittest.cc1
-rw-r--r--content/browser/webui/web_ui_controller_factory_registry.cc2
-rw-r--r--content/browser/webui/web_ui_controller_factory_registry.h1
-rw-r--r--content/browser/webui/web_ui_data_source_impl.cc3
-rw-r--r--content/browser/webui/web_ui_data_source_impl.h2
-rw-r--r--content/browser/webui/web_ui_data_source_unittest.cc1
-rw-r--r--content/browser/webui/web_ui_impl.cc2
-rw-r--r--content/browser/webui/web_ui_impl.h1
-rw-r--r--content/browser/webui/web_ui_mojo_browsertest.cc1
-rw-r--r--content/browser/zygote_host/zygote_host_impl_linux.cc2
-rw-r--r--content/browser/zygote_host/zygote_host_impl_linux.h2
884 files changed, 5116 insertions, 3609 deletions
diff --git a/content/browser/accessibility/accessibility_event_recorder_win.cc b/content/browser/accessibility/accessibility_event_recorder_win.cc
index b90fc8c..fa76749 100644
--- a/content/browser/accessibility/accessibility_event_recorder_win.cc
+++ b/content/browser/accessibility/accessibility_event_recorder_win.cc
@@ -5,6 +5,7 @@
#include "content/browser/accessibility/accessibility_event_recorder.h"
#include <oleacc.h>
+#include <stdint.h>
#include <string>
@@ -65,7 +66,7 @@ std::string BstrToUTF8(BSTR bstr) {
return base::UTF16ToUTF8(str16);
}
-std::string AccessibilityEventToStringUTF8(int32 event_id) {
+std::string AccessibilityEventToStringUTF8(int32_t event_id) {
return base::UTF16ToUTF8(AccessibilityEventToString(event_id));
}
diff --git a/content/browser/accessibility/accessibility_ipc_error_browsertest.cc b/content/browser/accessibility/accessibility_ipc_error_browsertest.cc
index d3b80a4..a8bd541 100644
--- a/content/browser/accessibility/accessibility_ipc_error_browsertest.cc
+++ b/content/browser/accessibility/accessibility_ipc_error_browsertest.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 "base/macros.h"
+#include "build/build_config.h"
#include "content/browser/frame_host/render_frame_host_impl.h"
#include "content/browser/web_contents/web_contents_impl.h"
#include "content/public/browser/ax_event_notification_details.h"
diff --git a/content/browser/accessibility/accessibility_tree_formatter.cc b/content/browser/accessibility/accessibility_tree_formatter.cc
index bf748d8..6e20e8a 100644
--- a/content/browser/accessibility/accessibility_tree_formatter.cc
+++ b/content/browser/accessibility/accessibility_tree_formatter.cc
@@ -4,6 +4,8 @@
#include "content/browser/accessibility/accessibility_tree_formatter.h"
+#include <stddef.h>
+
#include "base/logging.h"
#include "base/memory/scoped_ptr.h"
#include "base/strings/pattern.h"
@@ -88,13 +90,14 @@ void AccessibilityTreeFormatter::SetFilters(
filters_ = filters;
}
-uint32 AccessibilityTreeFormatter::ChildCount(
- const BrowserAccessibility& node) const{
+uint32_t AccessibilityTreeFormatter::ChildCount(
+ const BrowserAccessibility& node) const {
return node.PlatformChildCount();
}
BrowserAccessibility* AccessibilityTreeFormatter::GetChild(
- const BrowserAccessibility& node, uint32 i) const {
+ const BrowserAccessibility& node,
+ uint32_t i) const {
return node.PlatformGetChild(i);
}
diff --git a/content/browser/accessibility/accessibility_tree_formatter.h b/content/browser/accessibility/accessibility_tree_formatter.h
index 47d1808..fd86f91 100644
--- a/content/browser/accessibility/accessibility_tree_formatter.h
+++ b/content/browser/accessibility/accessibility_tree_formatter.h
@@ -5,9 +5,12 @@
#ifndef CONTENT_BROWSER_ACCESSIBILITY_ACCESSIBILITY_TREE_FORMATTER_H_
#define CONTENT_BROWSER_ACCESSIBILITY_ACCESSIBILITY_TREE_FORMATTER_H_
+#include <stdint.h>
+
#include <vector>
#include "base/files/file_path.h"
+#include "base/macros.h"
#include "base/strings/string16.h"
#include "base/strings/utf_string_conversions.h"
#include "base/values.h"
@@ -114,10 +117,10 @@ class CONTENT_EXPORT AccessibilityTreeFormatter {
// Overridden by platform subclasses.
//
- virtual uint32 ChildCount(const BrowserAccessibility& node) const;
+ virtual uint32_t ChildCount(const BrowserAccessibility& node) const;
- virtual BrowserAccessibility* GetChild(
- const BrowserAccessibility& node, uint32 i) const;
+ virtual BrowserAccessibility* GetChild(const BrowserAccessibility& node,
+ uint32_t i) const;
// Add the attributes for each node into the given dict.
virtual void AddProperties(const BrowserAccessibility& node,
diff --git a/content/browser/accessibility/accessibility_tree_formatter_android.cc b/content/browser/accessibility/accessibility_tree_formatter_android.cc
index 32d8da5..12321df 100644
--- a/content/browser/accessibility/accessibility_tree_formatter_android.cc
+++ b/content/browser/accessibility/accessibility_tree_formatter_android.cc
@@ -10,6 +10,7 @@
#include "base/android/jni_string.h"
#include "base/files/file_path.h"
#include "base/json/json_writer.h"
+#include "base/macros.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/string_util.h"
#include "base/strings/stringprintf.h"
diff --git a/content/browser/accessibility/accessibility_tree_formatter_blink.cc b/content/browser/accessibility/accessibility_tree_formatter_blink.cc
index bd5834d..27b9c9f 100644
--- a/content/browser/accessibility/accessibility_tree_formatter_blink.cc
+++ b/content/browser/accessibility/accessibility_tree_formatter_blink.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/strings/string_number_conversions.h"
#include "base/strings/stringprintf.h"
#include "content/browser/accessibility/accessibility_tree_formatter_blink.h"
@@ -15,13 +17,14 @@ AccessibilityTreeFormatterBlink::AccessibilityTreeFormatterBlink()
AccessibilityTreeFormatterBlink::~AccessibilityTreeFormatterBlink() {
}
-uint32 AccessibilityTreeFormatterBlink::ChildCount(
- const BrowserAccessibility& node) const{
+uint32_t AccessibilityTreeFormatterBlink::ChildCount(
+ const BrowserAccessibility& node) const {
return node.InternalChildCount();
}
BrowserAccessibility* AccessibilityTreeFormatterBlink::GetChild(
- const BrowserAccessibility& node, uint32 i) const {
+ const BrowserAccessibility& node,
+ uint32_t i) const {
return node.InternalGetChild(i);
}
@@ -82,7 +85,7 @@ void AccessibilityTreeFormatterBlink::AddProperties(
++attr_index) {
auto attr = static_cast<ui::AXIntListAttribute>(attr_index);
if (node.HasIntListAttribute(attr)) {
- std::vector<int32> values;
+ std::vector<int32_t> values;
node.GetIntListAttribute(attr, &values);
base::ListValue* value_list = new base::ListValue;
for (size_t i = 0; i < values.size(); ++i)
diff --git a/content/browser/accessibility/accessibility_tree_formatter_blink.h b/content/browser/accessibility/accessibility_tree_formatter_blink.h
index fd5a1a2..bbb5c68 100644
--- a/content/browser/accessibility/accessibility_tree_formatter_blink.h
+++ b/content/browser/accessibility/accessibility_tree_formatter_blink.h
@@ -5,6 +5,8 @@
#ifndef CONTENT_BROWSER_ACCESSIBILITY_ACCESSIBILITY_TREE_FORMATTER_BLINK_H_
#define CONTENT_BROWSER_ACCESSIBILITY_ACCESSIBILITY_TREE_FORMATTER_BLINK_H_
+#include <stdint.h>
+
#include "content/browser/accessibility/accessibility_tree_formatter.h"
namespace content {
@@ -20,9 +22,9 @@ class CONTENT_EXPORT AccessibilityTreeFormatterBlink
const std::string GetAllowEmptyString() override;
const std::string GetAllowString() override;
const std::string GetDenyString() override;
- uint32 ChildCount(const BrowserAccessibility& node) const override;
- BrowserAccessibility* GetChild(
- const BrowserAccessibility& node, uint32 i) const override;
+ uint32_t ChildCount(const BrowserAccessibility& node) const override;
+ BrowserAccessibility* GetChild(const BrowserAccessibility& node,
+ uint32_t i) const override;
void AddProperties(const BrowserAccessibility& node,
base::DictionaryValue* dict) override;
base::string16 ToString(const base::DictionaryValue& node) override;
diff --git a/content/browser/accessibility/accessibility_tree_formatter_mac.mm b/content/browser/accessibility/accessibility_tree_formatter_mac.mm
index c7fd092..88f7978 100644
--- a/content/browser/accessibility/accessibility_tree_formatter_mac.mm
+++ b/content/browser/accessibility/accessibility_tree_formatter_mac.mm
@@ -6,7 +6,6 @@
#import <Cocoa/Cocoa.h>
-#include "base/basictypes.h"
#include "base/files/file_path.h"
#include "base/json/json_writer.h"
#include "base/strings/string_number_conversions.h"
diff --git a/content/browser/accessibility/accessibility_tree_formatter_utils_win.cc b/content/browser/accessibility/accessibility_tree_formatter_utils_win.cc
index 9dd9e19..19e58a9 100644
--- a/content/browser/accessibility/accessibility_tree_formatter_utils_win.cc
+++ b/content/browser/accessibility/accessibility_tree_formatter_utils_win.cc
@@ -9,6 +9,7 @@
#include <map>
#include <string>
+#include "base/macros.h"
#include "base/memory/singleton.h"
#include "base/strings/string_util.h"
#include "base/strings/utf_string_conversions.h"
@@ -21,11 +22,11 @@ class AccessibilityEnumMap {
public:
static AccessibilityEnumMap* GetInstance();
- std::map<int32, base::string16> ia_role_string_map;
- std::map<int32, base::string16> ia2_role_string_map;
- std::map<int32, base::string16> ia_state_string_map;
- std::map<int32, base::string16> ia2_state_string_map;
- std::map<int32, base::string16> event_string_map;
+ std::map<int32_t, base::string16> ia_role_string_map;
+ std::map<int32_t, base::string16> ia2_role_string_map;
+ std::map<int32_t, base::string16> ia_state_string_map;
+ std::map<int32_t, base::string16> ia2_state_string_map;
+ std::map<int32_t, base::string16> event_string_map;
private:
AccessibilityEnumMap();
@@ -294,49 +295,49 @@ AccessibilityEnumMap::AccessibilityEnumMap() {
} // namespace.
-base::string16 IAccessibleRoleToString(int32 ia_role) {
+base::string16 IAccessibleRoleToString(int32_t ia_role) {
return AccessibilityEnumMap::GetInstance()->ia_role_string_map[ia_role];
}
-base::string16 IAccessible2RoleToString(int32 ia_role) {
+base::string16 IAccessible2RoleToString(int32_t ia_role) {
return AccessibilityEnumMap::GetInstance()->ia2_role_string_map[ia_role];
}
-void IAccessibleStateToStringVector(int32 ia_state,
+void IAccessibleStateToStringVector(int32_t ia_state,
std::vector<base::string16>* result) {
- const std::map<int32, base::string16>& state_string_map =
+ const std::map<int32_t, base::string16>& state_string_map =
AccessibilityEnumMap::GetInstance()->ia_state_string_map;
- std::map<int32, base::string16>::const_iterator it;
+ std::map<int32_t, base::string16>::const_iterator it;
for (it = state_string_map.begin(); it != state_string_map.end(); ++it) {
if (it->first & ia_state)
result->push_back(it->second);
}
}
-base::string16 IAccessibleStateToString(int32 ia_state) {
+base::string16 IAccessibleStateToString(int32_t ia_state) {
std::vector<base::string16> strings;
IAccessibleStateToStringVector(ia_state, &strings);
return base::JoinString(strings, base::ASCIIToUTF16(","));
}
-void IAccessible2StateToStringVector(int32 ia2_state,
+void IAccessible2StateToStringVector(int32_t ia2_state,
std::vector<base::string16>* result) {
- const std::map<int32, base::string16>& state_string_map =
+ const std::map<int32_t, base::string16>& state_string_map =
AccessibilityEnumMap::GetInstance()->ia2_state_string_map;
- std::map<int32, base::string16>::const_iterator it;
+ std::map<int32_t, base::string16>::const_iterator it;
for (it = state_string_map.begin(); it != state_string_map.end(); ++it) {
if (it->first & ia2_state)
result->push_back(it->second);
}
}
-base::string16 IAccessible2StateToString(int32 ia2_state) {
+base::string16 IAccessible2StateToString(int32_t ia2_state) {
std::vector<base::string16> strings;
IAccessible2StateToStringVector(ia2_state, &strings);
return base::JoinString(strings, base::ASCIIToUTF16(","));
}
-base::string16 AccessibilityEventToString(int32 event_id) {
+base::string16 AccessibilityEventToString(int32_t event_id) {
return AccessibilityEnumMap::GetInstance()->event_string_map[event_id];
}
diff --git a/content/browser/accessibility/accessibility_tree_formatter_utils_win.h b/content/browser/accessibility/accessibility_tree_formatter_utils_win.h
index 37d93b5..8312282 100644
--- a/content/browser/accessibility/accessibility_tree_formatter_utils_win.h
+++ b/content/browser/accessibility/accessibility_tree_formatter_utils_win.h
@@ -5,25 +5,28 @@
#ifndef CONTENT_BROWSER_ACCESSIBILITY_ACCESSIBILITY_TREE_FORMATTER_UTILS_WIN_H_
#define CONTENT_BROWSER_ACCESSIBILITY_ACCESSIBILITY_TREE_FORMATTER_UTILS_WIN_H_
+#include <stdint.h>
+
#include <vector>
-#include "base/basictypes.h"
#include "base/strings/string16.h"
#include "content/common/content_export.h"
namespace content {
-CONTENT_EXPORT base::string16 IAccessibleRoleToString(int32 ia_role);
-CONTENT_EXPORT base::string16 IAccessible2RoleToString(int32 ia_role);
-CONTENT_EXPORT base::string16 IAccessibleStateToString(int32 ia_state);
+CONTENT_EXPORT base::string16 IAccessibleRoleToString(int32_t ia_role);
+CONTENT_EXPORT base::string16 IAccessible2RoleToString(int32_t ia_role);
+CONTENT_EXPORT base::string16 IAccessibleStateToString(int32_t ia_state);
CONTENT_EXPORT void IAccessibleStateToStringVector(
- int32 ia_state, std::vector<base::string16>* result);
-CONTENT_EXPORT base::string16 IAccessible2StateToString(int32 ia2_state);
+ int32_t ia_state,
+ std::vector<base::string16>* result);
+CONTENT_EXPORT base::string16 IAccessible2StateToString(int32_t ia2_state);
CONTENT_EXPORT void IAccessible2StateToStringVector(
- int32 ia_state, std::vector<base::string16>* result);
+ int32_t ia_state,
+ std::vector<base::string16>* result);
// Handles both IAccessible/MSAA events and IAccessible2 events.
-CONTENT_EXPORT base::string16 AccessibilityEventToString(int32 event_id);
+CONTENT_EXPORT base::string16 AccessibilityEventToString(int32_t event_id);
} // namespace content
diff --git a/content/browser/accessibility/accessibility_tree_formatter_win.cc b/content/browser/accessibility/accessibility_tree_formatter_win.cc
index 111fe39..cbece3a 100644
--- a/content/browser/accessibility/accessibility_tree_formatter_win.cc
+++ b/content/browser/accessibility/accessibility_tree_formatter_win.cc
@@ -5,6 +5,8 @@
#include "content/browser/accessibility/accessibility_tree_formatter.h"
#include <oleacc.h>
+#include <stddef.h>
+#include <stdint.h>
#include <string>
@@ -174,7 +176,7 @@ void AccessibilityTreeFormatterWin::AddProperties(
temp_bstr.Reset();
std::vector<base::string16> state_strings;
- int32 ia_state = ax_object->ia_state();
+ int32_t ia_state = ax_object->ia_state();
// Avoid flakiness: these states depend on whether the window is focused
// and the position of the mouse cursor.
diff --git a/content/browser/accessibility/accessibility_ui.h b/content/browser/accessibility/accessibility_ui.h
index 35fc3c5..67799cb 100644
--- a/content/browser/accessibility/accessibility_ui.h
+++ b/content/browser/accessibility/accessibility_ui.h
@@ -5,6 +5,7 @@
#ifndef CONTENT_BROWSER_ACCESSIBILITY_ACCESSIBILITY_UI_H_
#define CONTENT_BROWSER_ACCESSIBILITY_ACCESSIBILITY_UI_H_
+#include "base/macros.h"
#include "content/public/browser/web_ui_controller.h"
#include "content/public/browser/web_ui_data_source.h"
diff --git a/content/browser/accessibility/accessibility_win_browsertest.cc b/content/browser/accessibility/accessibility_win_browsertest.cc
index a28a06b..e70b82f 100644
--- a/content/browser/accessibility/accessibility_win_browsertest.cc
+++ b/content/browser/accessibility/accessibility_win_browsertest.cc
@@ -2,8 +2,12 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include <stddef.h>
+#include <stdint.h>
+
#include <vector>
+#include "base/macros.h"
#include "base/memory/scoped_ptr.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/sys_string_conversions.h"
@@ -66,9 +70,9 @@ class AccessibilityWinBrowserTest : public ContentBrowserTest {
static HRESULT QueryIAccessible2(IAccessible* accessible,
IAccessible2** accessible2);
static void FindNodeInAccessibilityTree(IAccessible* node,
- int32 expected_role,
+ int32_t expected_role,
const std::wstring& expected_name,
- int32 depth,
+ int32_t depth,
bool* found);
static void CheckTextAtOffset(
base::win::ScopedComPtr<IAccessibleText>& element,
@@ -260,9 +264,9 @@ HRESULT AccessibilityWinBrowserTest::QueryIAccessible2(
// and name.
void AccessibilityWinBrowserTest::FindNodeInAccessibilityTree(
IAccessible* node,
- int32 expected_role,
+ int32_t expected_role,
const std::wstring& expected_name,
- int32 depth,
+ int32_t depth,
bool* found) {
base::win::ScopedBstr name_bstr;
base::win::ScopedVariant childid_self(CHILDID_SELF);
@@ -358,15 +362,15 @@ class AccessibilityWinBrowserTest::AccessibleChecker {
// This constructor can be used if the IA2 role will be the same as the MSAA
// role.
AccessibleChecker(const std::wstring& expected_name,
- int32 expected_role,
+ int32_t expected_role,
const std::wstring& expected_value);
AccessibleChecker(const std::wstring& expected_name,
- int32 expected_role,
- int32 expected_ia2_role,
+ int32_t expected_role,
+ int32_t expected_ia2_role,
const std::wstring& expected_value);
AccessibleChecker(const std::wstring& expected_name,
const std::wstring& expected_role,
- int32 expected_ia2_role,
+ int32_t expected_ia2_role,
const std::wstring& expected_value);
// Append an AccessibleChecker that verifies accessibility information for
@@ -402,7 +406,7 @@ class AccessibilityWinBrowserTest::AccessibleChecker {
base::win::ScopedVariant role_;
// Expected IAccessible2 role. Checked against IAccessible2::role.
- int32 ia2_role_;
+ int32_t ia2_role_;
// Expected accessible value. Checked against IAccessible::get_accValue.
std::wstring value_;
@@ -417,38 +421,35 @@ class AccessibilityWinBrowserTest::AccessibleChecker {
AccessibilityWinBrowserTest::AccessibleChecker::AccessibleChecker(
const std::wstring& expected_name,
- int32 expected_role,
+ int32_t expected_role,
const std::wstring& expected_value)
: name_(expected_name),
role_(expected_role),
ia2_role_(expected_role),
value_(expected_value),
- state_(-1) {
-}
+ state_(-1) {}
AccessibilityWinBrowserTest::AccessibleChecker::AccessibleChecker(
const std::wstring& expected_name,
- int32 expected_role,
- int32 expected_ia2_role,
+ int32_t expected_role,
+ int32_t expected_ia2_role,
const std::wstring& expected_value)
: name_(expected_name),
role_(expected_role),
ia2_role_(expected_ia2_role),
value_(expected_value),
- state_(-1) {
-}
+ state_(-1) {}
AccessibilityWinBrowserTest::AccessibleChecker::AccessibleChecker(
const std::wstring& expected_name,
const std::wstring& expected_role,
- int32 expected_ia2_role,
+ int32_t expected_ia2_role,
const std::wstring& expected_value)
: name_(expected_name),
role_(expected_role.c_str()),
ia2_role_(expected_ia2_role),
value_(expected_value),
- state_(-1) {
-}
+ state_(-1) {}
void AccessibilityWinBrowserTest::AccessibleChecker::AppendExpectedChild(
AccessibleChecker* expected_child) {
diff --git a/content/browser/accessibility/ax_tree_id_registry.h b/content/browser/accessibility/ax_tree_id_registry.h
index 7784683..fcb22e6 100644
--- a/content/browser/accessibility/ax_tree_id_registry.h
+++ b/content/browser/accessibility/ax_tree_id_registry.h
@@ -7,7 +7,9 @@
#include <map>
+#include "base/macros.h"
#include "base/stl_util.h"
+
namespace base {
template <typename T>
struct DefaultSingletonTraits;
diff --git a/content/browser/accessibility/browser_accessibility.cc b/content/browser/accessibility/browser_accessibility.cc
index 003e805..9f528bd 100644
--- a/content/browser/accessibility/browser_accessibility.cc
+++ b/content/browser/accessibility/browser_accessibility.cc
@@ -4,6 +4,8 @@
#include "content/browser/accessibility/browser_accessibility.h"
+#include <stddef.h>
+
#include <algorithm>
#include "base/logging.h"
@@ -66,7 +68,7 @@ bool BrowserAccessibility::PlatformIsLeaf() const {
}
}
-uint32 BrowserAccessibility::PlatformChildCount() const {
+uint32_t BrowserAccessibility::PlatformChildCount() const {
if (HasIntAttribute(ui::AX_ATTR_CHILD_TREE_ID)) {
BrowserAccessibilityManager* child_manager =
BrowserAccessibilityManager::FromID(
@@ -101,7 +103,7 @@ bool BrowserAccessibility::IsTextOnlyObject() const {
}
BrowserAccessibility* BrowserAccessibility::PlatformGetChild(
- uint32 child_index) const {
+ uint32_t child_index) const {
DCHECK(child_index < PlatformChildCount());
BrowserAccessibility* result = nullptr;
@@ -171,14 +173,14 @@ BrowserAccessibility* BrowserAccessibility::PlatformDeepestLastChild() const {
return deepest_child;
}
-uint32 BrowserAccessibility::InternalChildCount() const {
+uint32_t BrowserAccessibility::InternalChildCount() const {
if (!node_ || !manager_)
return 0;
- return static_cast<uint32>(node_->child_count());
+ return static_cast<uint32_t>(node_->child_count());
}
BrowserAccessibility* BrowserAccessibility::InternalGetChild(
- uint32 child_index) const {
+ uint32_t child_index) const {
if (!node_ || !manager_ || child_index >= InternalChildCount())
return nullptr;
@@ -207,11 +209,11 @@ BrowserAccessibility* BrowserAccessibility::InternalGetParent() const {
return nullptr;
}
-int32 BrowserAccessibility::GetIndexInParent() const {
+int32_t BrowserAccessibility::GetIndexInParent() const {
return node_ ? node_->index_in_parent() : -1;
}
-int32 BrowserAccessibility::GetId() const {
+int32_t BrowserAccessibility::GetId() const {
return node_ ? node_->id() : -1;
}
@@ -227,11 +229,11 @@ gfx::Rect BrowserAccessibility::GetLocation() const {
return GetData().location;
}
-int32 BrowserAccessibility::GetRole() const {
+int32_t BrowserAccessibility::GetRole() const {
return GetData().role;
}
-int32 BrowserAccessibility::GetState() const {
+int32_t BrowserAccessibility::GetState() const {
return GetData().state;
}
@@ -307,8 +309,8 @@ gfx::Rect BrowserAccessibility::GetLocalBoundsForRange(int start, int len)
gfx::Rect child_rect = child->GetLocation();
int text_direction = child->GetIntAttribute(
ui::AX_ATTR_TEXT_DIRECTION);
- const std::vector<int32>& character_offsets = child->GetIntListAttribute(
- ui::AX_ATTR_CHARACTER_OFFSETS);
+ const std::vector<int32_t>& character_offsets =
+ child->GetIntListAttribute(ui::AX_ATTR_CHARACTER_OFFSETS);
int start_pixel_offset =
local_start > 0 ? character_offsets[local_start - 1] : 0;
int end_pixel_offset =
@@ -400,15 +402,15 @@ int BrowserAccessibility::GetWordStartBoundary(
int child_len = static_cast<int>(child_text.size());
child_end += child_len; // End is one past the last character.
- const std::vector<int32>& word_starts = child->GetIntListAttribute(
- ui::AX_ATTR_WORD_STARTS);
+ const std::vector<int32_t>& word_starts =
+ child->GetIntListAttribute(ui::AX_ATTR_WORD_STARTS);
if (word_starts.empty()) {
word_start = child_end;
continue;
}
int local_start = start - child_start;
- std::vector<int32>::const_iterator iter = std::upper_bound(
+ std::vector<int32_t>::const_iterator iter = std::upper_bound(
word_starts.begin(), word_starts.end(), local_start);
if (iter != word_starts.end()) {
if (direction == ui::FORWARDS_DIRECTION) {
@@ -611,14 +613,14 @@ bool BrowserAccessibility::HasIntListAttribute(
return GetData().HasIntListAttribute(attribute);
}
-const std::vector<int32>& BrowserAccessibility::GetIntListAttribute(
+const std::vector<int32_t>& BrowserAccessibility::GetIntListAttribute(
ui::AXIntListAttribute attribute) const {
return GetData().GetIntListAttribute(attribute);
}
bool BrowserAccessibility::GetIntListAttribute(
ui::AXIntListAttribute attribute,
- std::vector<int32>* value) const {
+ std::vector<int32_t>* value) const {
return GetData().GetIntListAttribute(attribute, value);
}
@@ -675,7 +677,7 @@ bool BrowserAccessibility::HasCaret() const {
}
// The caret is always at the focus of the selection.
- int32 focus_id = manager()->GetTreeData().sel_focus_object_id;
+ int32_t focus_id = manager()->GetTreeData().sel_focus_object_id;
BrowserAccessibility* focus_object = manager()->GetFromID(focus_id);
if (!focus_object)
return false;
diff --git a/content/browser/accessibility/browser_accessibility.h b/content/browser/accessibility/browser_accessibility.h
index d24c7d3..72f5cd5 100644
--- a/content/browser/accessibility/browser_accessibility.h
+++ b/content/browser/accessibility/browser_accessibility.h
@@ -5,11 +5,13 @@
#ifndef CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_H_
#define CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_H_
+#include <stdint.h>
+
#include <map>
#include <utility>
#include <vector>
-#include "base/basictypes.h"
+#include "base/macros.h"
#include "base/strings/string16.h"
#include "base/strings/string_split.h"
#include "build/build_config.h"
@@ -103,11 +105,11 @@ class CONTENT_EXPORT BrowserAccessibility {
// Returns the number of children of this object, or 0 if PlatformIsLeaf()
// returns true.
- uint32 PlatformChildCount() const;
+ uint32_t PlatformChildCount() const;
// Return a pointer to the child at the given index, or NULL for an
// invalid index. Returns NULL if PlatformIsLeaf() returns true.
- BrowserAccessibility* PlatformGetChild(uint32 child_index) const;
+ BrowserAccessibility* PlatformGetChild(uint32_t child_index) const;
// Returns true if an ancestor of this node (not including itself) is a
// leaf node, meaning that this node is not actually exposed to the
@@ -188,18 +190,18 @@ class CONTENT_EXPORT BrowserAccessibility {
// reflect the accessibility tree that should be exposed on each platform.
// Use PlatformChildCount and PlatformGetChild to implement platform
// accessibility APIs.
- uint32 InternalChildCount() const;
- BrowserAccessibility* InternalGetChild(uint32 child_index) const;
+ uint32_t InternalChildCount() const;
+ BrowserAccessibility* InternalGetChild(uint32_t child_index) const;
BrowserAccessibility* InternalGetParent() const;
BrowserAccessibility* GetParent() const;
- int32 GetIndexInParent() const;
+ int32_t GetIndexInParent() const;
- int32 GetId() const;
+ int32_t GetId() const;
const ui::AXNodeData& GetData() const;
gfx::Rect GetLocation() const;
- int32 GetRole() const;
- int32 GetState() const;
+ int32_t GetRole() const;
+ int32_t GetState() const;
typedef base::StringPairs HtmlAttributes;
const HtmlAttributes& GetHtmlAttributes() const;
@@ -259,10 +261,10 @@ class CONTENT_EXPORT BrowserAccessibility {
ui::AXStringAttribute attribute) const;
bool HasIntListAttribute(ui::AXIntListAttribute attribute) const;
- const std::vector<int32>& GetIntListAttribute(
+ const std::vector<int32_t>& GetIntListAttribute(
ui::AXIntListAttribute attribute) const;
bool GetIntListAttribute(ui::AXIntListAttribute attribute,
- std::vector<int32>* value) const;
+ std::vector<int32_t>* value) const;
// Retrieve the value of a html attribute from the attribute map and
// returns true if found.
diff --git a/content/browser/accessibility/browser_accessibility_android.cc b/content/browser/accessibility/browser_accessibility_android.cc
index e9b8579..552f7fd 100644
--- a/content/browser/accessibility/browser_accessibility_android.cc
+++ b/content/browser/accessibility/browser_accessibility_android.cc
@@ -372,7 +372,7 @@ base::string16 BrowserAccessibilityAndroid::GetText() const {
if (text.empty() &&
(HasOnlyStaticTextChildren() ||
(IsFocusable() && HasOnlyTextAndImageChildren()))) {
- for (uint32 i = 0; i < InternalChildCount(); i++) {
+ for (uint32_t i = 0; i < InternalChildCount(); i++) {
BrowserAccessibility* child = InternalGetChild(i);
text += static_cast<BrowserAccessibilityAndroid*>(child)->GetText();
}
@@ -772,8 +772,8 @@ float BrowserAccessibilityAndroid::RangeCurrentValue() const {
void BrowserAccessibilityAndroid::GetGranularityBoundaries(
int granularity,
- std::vector<int32>* starts,
- std::vector<int32>* ends,
+ std::vector<int32_t>* starts,
+ std::vector<int32_t>* ends,
int offset) {
switch (granularity) {
case ANDROID_ACCESSIBILITY_NODE_INFO_MOVEMENT_GRANULARITY_LINE:
@@ -788,8 +788,8 @@ void BrowserAccessibilityAndroid::GetGranularityBoundaries(
}
void BrowserAccessibilityAndroid::GetLineBoundaries(
- std::vector<int32>* line_starts,
- std::vector<int32>* line_ends,
+ std::vector<int32_t>* line_starts,
+ std::vector<int32_t>* line_ends,
int offset) {
// If this node has no children, treat it as all one line.
if (GetText().size() > 0 && !InternalChildCount()) {
@@ -801,7 +801,7 @@ void BrowserAccessibilityAndroid::GetLineBoundaries(
// inline text boxes if possible.
if (GetRole() == ui::AX_ROLE_STATIC_TEXT) {
int last_y = 0;
- for (uint32 i = 0; i < InternalChildCount(); i++) {
+ for (uint32_t i = 0; i < InternalChildCount(); i++) {
BrowserAccessibilityAndroid* child =
static_cast<BrowserAccessibilityAndroid*>(InternalGetChild(i));
CHECK_EQ(ui::AX_ROLE_INLINE_TEXT_BOX, child->GetRole());
@@ -822,7 +822,7 @@ void BrowserAccessibilityAndroid::GetLineBoundaries(
}
// Otherwise, call GetLineBoundaries recursively on the children.
- for (uint32 i = 0; i < InternalChildCount(); i++) {
+ for (uint32_t i = 0; i < InternalChildCount(); i++) {
BrowserAccessibilityAndroid* child =
static_cast<BrowserAccessibilityAndroid*>(InternalGetChild(i));
child->GetLineBoundaries(line_starts, line_ends, offset);
@@ -831,14 +831,14 @@ void BrowserAccessibilityAndroid::GetLineBoundaries(
}
void BrowserAccessibilityAndroid::GetWordBoundaries(
- std::vector<int32>* word_starts,
- std::vector<int32>* word_ends,
+ std::vector<int32_t>* word_starts,
+ std::vector<int32_t>* word_ends,
int offset) {
if (GetRole() == ui::AX_ROLE_INLINE_TEXT_BOX) {
- const std::vector<int32>& starts = GetIntListAttribute(
- ui::AX_ATTR_WORD_STARTS);
- const std::vector<int32>& ends = GetIntListAttribute(
- ui::AX_ATTR_WORD_ENDS);
+ const std::vector<int32_t>& starts =
+ GetIntListAttribute(ui::AX_ATTR_WORD_STARTS);
+ const std::vector<int32_t>& ends =
+ GetIntListAttribute(ui::AX_ATTR_WORD_ENDS);
for (size_t i = 0; i < starts.size(); ++i) {
word_starts->push_back(offset + starts[i]);
word_ends->push_back(offset + ends[i]);
@@ -847,7 +847,7 @@ void BrowserAccessibilityAndroid::GetWordBoundaries(
}
base::string16 concatenated_text;
- for (uint32 i = 0; i < InternalChildCount(); i++) {
+ for (uint32_t i = 0; i < InternalChildCount(); i++) {
BrowserAccessibilityAndroid* child =
static_cast<BrowserAccessibilityAndroid*>(InternalGetChild(i));
base::string16 child_text = child->GetText();
@@ -858,7 +858,7 @@ void BrowserAccessibilityAndroid::GetWordBoundaries(
if (text.empty() || concatenated_text == text) {
// Great - this node is just the concatenation of its children, so
// we can get the word boundaries recursively.
- for (uint32 i = 0; i < InternalChildCount(); i++) {
+ for (uint32_t i = 0; i < InternalChildCount(); i++) {
BrowserAccessibilityAndroid* child =
static_cast<BrowserAccessibilityAndroid*>(InternalGetChild(i));
child->GetWordBoundaries(word_starts, word_ends, offset);
@@ -883,7 +883,7 @@ void BrowserAccessibilityAndroid::GetWordBoundaries(
bool BrowserAccessibilityAndroid::HasFocusableChild() const {
// This is called from PlatformIsLeaf, so don't call PlatformChildCount
// from within this!
- for (uint32 i = 0; i < InternalChildCount(); i++) {
+ for (uint32_t i = 0; i < InternalChildCount(); i++) {
BrowserAccessibility* child = InternalGetChild(i);
if (child->HasState(ui::AX_STATE_FOCUSABLE))
return true;
@@ -896,7 +896,7 @@ bool BrowserAccessibilityAndroid::HasFocusableChild() const {
bool BrowserAccessibilityAndroid::HasOnlyStaticTextChildren() const {
// This is called from PlatformIsLeaf, so don't call PlatformChildCount
// from within this!
- for (uint32 i = 0; i < InternalChildCount(); i++) {
+ for (uint32_t i = 0; i < InternalChildCount(); i++) {
BrowserAccessibility* child = InternalGetChild(i);
if (child->GetRole() != ui::AX_ROLE_STATIC_TEXT)
return false;
@@ -907,7 +907,7 @@ bool BrowserAccessibilityAndroid::HasOnlyStaticTextChildren() const {
bool BrowserAccessibilityAndroid::HasOnlyTextAndImageChildren() const {
// This is called from PlatformIsLeaf, so don't call PlatformChildCount
// from within this!
- for (uint32 i = 0; i < InternalChildCount(); i++) {
+ for (uint32_t i = 0; i < InternalChildCount(); i++) {
BrowserAccessibility* child = InternalGetChild(i);
if (child->GetRole() != ui::AX_ROLE_STATIC_TEXT &&
child->GetRole() != ui::AX_ROLE_IMAGE) {
@@ -964,7 +964,7 @@ void BrowserAccessibilityAndroid::NotifyLiveRegionUpdate(
int BrowserAccessibilityAndroid::CountChildrenWithRole(ui::AXRole role) const {
int count = 0;
- for (uint32 i = 0; i < PlatformChildCount(); i++) {
+ for (uint32_t i = 0; i < PlatformChildCount(); i++) {
if (PlatformGetChild(i)->GetRole() == role)
count++;
}
diff --git a/content/browser/accessibility/browser_accessibility_android.h b/content/browser/accessibility/browser_accessibility_android.h
index bcf4210..0655981 100644
--- a/content/browser/accessibility/browser_accessibility_android.h
+++ b/content/browser/accessibility/browser_accessibility_android.h
@@ -5,7 +5,11 @@
#ifndef CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_ANDROID_H_
#define CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_ANDROID_H_
+#include <stddef.h>
+#include <stdint.h>
+
#include "base/android/scoped_java_ref.h"
+#include "base/macros.h"
#include "content/browser/accessibility/browser_accessibility.h"
namespace content {
@@ -93,21 +97,21 @@ class CONTENT_EXPORT BrowserAccessibilityAndroid : public BrowserAccessibility {
// Calls GetLineBoundaries or GetWordBoundaries depending on the value
// of |granularity|, or fails if anything else is passed in |granularity|.
void GetGranularityBoundaries(int granularity,
- std::vector<int32>* starts,
- std::vector<int32>* ends,
+ std::vector<int32_t>* starts,
+ std::vector<int32_t>* ends,
int offset);
// Append line start and end indices for the text of this node
// (as returned by GetText()), adding |offset| to each one.
- void GetLineBoundaries(std::vector<int32>* line_starts,
- std::vector<int32>* line_ends,
+ void GetLineBoundaries(std::vector<int32_t>* line_starts,
+ std::vector<int32_t>* line_ends,
int offset);
// Append word start and end indices for the text of this node
// (as returned by GetText()) to |word_starts| and |word_ends|,
// adding |offset| to each one.
- void GetWordBoundaries(std::vector<int32>* word_starts,
- std::vector<int32>* word_ends,
+ void GetWordBoundaries(std::vector<int32_t>* word_starts,
+ std::vector<int32_t>* word_ends,
int offset);
private:
diff --git a/content/browser/accessibility/browser_accessibility_auralinux.cc b/content/browser/accessibility/browser_accessibility_auralinux.cc
index c5cea80..1a73eb9 100644
--- a/content/browser/accessibility/browser_accessibility_auralinux.cc
+++ b/content/browser/accessibility/browser_accessibility_auralinux.cc
@@ -4,6 +4,8 @@
#include "content/browser/accessibility/browser_accessibility_auralinux.h"
+#include <stdint.h>
+
#include "base/strings/utf_string_conversions.h"
#include "content/browser/accessibility/browser_accessibility_manager_auralinux.h"
#include "content/common/accessibility_messages.h"
@@ -532,7 +534,7 @@ static AtkStateSet* browser_accessibility_ref_state_set(AtkObject* atk_object) {
return NULL;
AtkStateSet* state_set = ATK_OBJECT_CLASS(browser_accessibility_parent_class)
->ref_state_set(atk_object);
- int32 state = obj->GetState();
+ int32_t state = obj->GetState();
if (state & (1 << ui::AX_STATE_FOCUSABLE))
atk_state_set_add_state(state_set, ATK_STATE_FOCUSABLE);
diff --git a/content/browser/accessibility/browser_accessibility_auralinux.h b/content/browser/accessibility/browser_accessibility_auralinux.h
index e115441..43a9c3f 100644
--- a/content/browser/accessibility/browser_accessibility_auralinux.h
+++ b/content/browser/accessibility/browser_accessibility_auralinux.h
@@ -8,6 +8,7 @@
#include <atk/atk.h>
#include "base/compiler_specific.h"
+#include "base/macros.h"
#include "content/browser/accessibility/browser_accessibility.h"
namespace content {
diff --git a/content/browser/accessibility/browser_accessibility_cocoa.mm b/content/browser/accessibility/browser_accessibility_cocoa.mm
index a5176c3..c3ac999 100644
--- a/content/browser/accessibility/browser_accessibility_cocoa.mm
+++ b/content/browser/accessibility/browser_accessibility_cocoa.mm
@@ -3,12 +3,13 @@
// found in the LICENSE file.
#include <execinfo.h>
+#include <stddef.h>
+#include <stdint.h>
#import "content/browser/accessibility/browser_accessibility_cocoa.h"
#include <map>
-#include "base/basictypes.h"
#include "base/strings/string16.h"
#include "base/strings/sys_string_conversions.h"
#include "base/strings/utf_string_conversions.h"
@@ -465,9 +466,9 @@ bool InitializeAccessibilityTreeSearch(
// accessibility children of this object.
- (NSArray*)children {
if (!children_) {
- uint32 childCount = browserAccessibility_->PlatformChildCount();
+ uint32_t childCount = browserAccessibility_->PlatformChildCount();
children_.reset([[NSMutableArray alloc] initWithCapacity:childCount]);
- for (uint32 index = 0; index < childCount; ++index) {
+ for (uint32_t index = 0; index < childCount; ++index) {
BrowserAccessibilityCocoa* child =
browserAccessibility_->PlatformGetChild(index)->
ToBrowserAccessibilityCocoa();
@@ -478,11 +479,11 @@ bool InitializeAccessibilityTreeSearch(
}
// Also, add indirect children (if any).
- const std::vector<int32>& indirectChildIds =
+ const std::vector<int32_t>& indirectChildIds =
browserAccessibility_->GetIntListAttribute(
ui::AX_ATTR_INDIRECT_CHILD_IDS);
- for (uint32 i = 0; i < indirectChildIds.size(); ++i) {
- int32 child_id = indirectChildIds[i];
+ for (uint32_t i = 0; i < indirectChildIds.size(); ++i) {
+ int32_t child_id = indirectChildIds[i];
BrowserAccessibility* child =
browserAccessibility_->manager()->GetFromID(child_id);
@@ -514,9 +515,8 @@ bool InitializeAccessibilityTreeSearch(
}
NSMutableArray* ret = [[[NSMutableArray alloc] init] autorelease];
- const std::vector<int32>& uniqueCellIds =
- browserAccessibility_->GetIntListAttribute(
- ui::AX_ATTR_UNIQUE_CELL_IDS);
+ const std::vector<int32_t>& uniqueCellIds =
+ browserAccessibility_->GetIntListAttribute(ui::AX_ATTR_UNIQUE_CELL_IDS);
for (size_t i = 0; i < uniqueCellIds.size(); ++i) {
int id = uniqueCellIds[i];
BrowserAccessibility* cell =
@@ -558,7 +558,7 @@ bool InitializeAccessibilityTreeSearch(
// If the name came from a single related element and it's present in the
// tree, it will be exposed in AXTitleUIElement.
- std::vector<int32> labelledby_ids =
+ std::vector<int32_t> labelledby_ids =
browserAccessibility_->GetIntListAttribute(ui::AX_ATTR_LABELLEDBY_IDS);
ui::AXNameFrom nameFrom = static_cast<ui::AXNameFrom>(
browserAccessibility_->GetIntAttribute(ui::AX_ATTR_NAME_FROM));
@@ -789,7 +789,7 @@ bool InitializeAccessibilityTreeSearch(
- (void)addLinkedUIElementsFromAttribute:(ui::AXIntListAttribute)attribute
addTo:(NSMutableArray*)outArray {
- const std::vector<int32>& attributeValues =
+ const std::vector<int32_t>& attributeValues =
browserAccessibility_->GetIntListAttribute(attribute);
for (size_t i = 0; i < attributeValues.size(); ++i) {
BrowserAccessibility* element =
@@ -1077,9 +1077,8 @@ bool InitializeAccessibilityTreeSearch(
}
NSMutableArray* ret = [[[NSMutableArray alloc] init] autorelease];
- const std::vector<int32>& uniqueCellIds =
- browserAccessibility_->GetIntListAttribute(
- ui::AX_ATTR_UNIQUE_CELL_IDS);
+ const std::vector<int32_t>& uniqueCellIds =
+ browserAccessibility_->GetIntListAttribute(ui::AX_ATTR_UNIQUE_CELL_IDS);
for (size_t i = 0; i < uniqueCellIds.size(); ++i) {
int id = uniqueCellIds[i];
BrowserAccessibility* cell =
@@ -1115,10 +1114,10 @@ bool InitializeAccessibilityTreeSearch(
[ret addObject:child];
}
} else if ([self internalRole] == ui::AX_ROLE_COLUMN) {
- const std::vector<int32>& indirectChildIds =
+ const std::vector<int32_t>& indirectChildIds =
browserAccessibility_->GetIntListAttribute(
ui::AX_ATTR_INDIRECT_CHILD_IDS);
- for (uint32 i = 0; i < indirectChildIds.size(); ++i) {
+ for (uint32_t i = 0; i < indirectChildIds.size(); ++i) {
int id = indirectChildIds[i];
BrowserAccessibility* rowElement =
browserAccessibility_->manager()->GetFromID(id);
@@ -1160,8 +1159,8 @@ bool InitializeAccessibilityTreeSearch(
// If it's multiselectable or if the previous attempts failed,
// return any children with the "selected" state, which may
// come from aria-selected.
- uint32 childCount = browserAccessibility_->PlatformChildCount();
- for (uint32 index = 0; index < childCount; ++index) {
+ uint32_t childCount = browserAccessibility_->PlatformChildCount();
+ for (uint32_t index = 0; index < childCount; ++index) {
BrowserAccessibility* child =
browserAccessibility_->PlatformGetChild(index);
if (child->HasState(ui::AX_STATE_SELECTED))
@@ -1246,7 +1245,7 @@ bool InitializeAccessibilityTreeSearch(
// If the name came from a single related element and it's present in the
// tree, it will be exposed in AXTitleUIElement.
- std::vector<int32> labelledby_ids =
+ std::vector<int32_t> labelledby_ids =
browserAccessibility_->GetIntListAttribute(ui::AX_ATTR_LABELLEDBY_IDS);
ui::AXNameFrom nameFrom = static_cast<ui::AXNameFrom>(
browserAccessibility_->GetIntAttribute(ui::AX_ATTR_NAME_FROM));
@@ -1270,7 +1269,7 @@ bool InitializeAccessibilityTreeSearch(
}
- (id)titleUIElement {
- std::vector<int32> labelledby_ids =
+ std::vector<int32_t> labelledby_ids =
browserAccessibility_->GetIntListAttribute(ui::AX_ATTR_LABELLEDBY_IDS);
ui::AXNameFrom nameFrom = static_cast<ui::AXNameFrom>(
browserAccessibility_->GetIntAttribute(ui::AX_ATTR_NAME_FROM));
@@ -1374,9 +1373,8 @@ bool InitializeAccessibilityTreeSearch(
- (NSArray*)visibleCells {
NSMutableArray* ret = [[[NSMutableArray alloc] init] autorelease];
- const std::vector<int32>& uniqueCellIds =
- browserAccessibility_->GetIntListAttribute(
- ui::AX_ATTR_UNIQUE_CELL_IDS);
+ const std::vector<int32_t>& uniqueCellIds =
+ browserAccessibility_->GetIntListAttribute(ui::AX_ATTR_UNIQUE_CELL_IDS);
for (size_t i = 0; i < uniqueCellIds.size(); ++i) {
int id = uniqueCellIds[i];
BrowserAccessibility* cell =
@@ -1389,8 +1387,8 @@ bool InitializeAccessibilityTreeSearch(
- (NSArray*)visibleChildren {
NSMutableArray* ret = [[[NSMutableArray alloc] init] autorelease];
- uint32 childCount = browserAccessibility_->PlatformChildCount();
- for (uint32 index = 0; index < childCount; ++index) {
+ uint32_t childCount = browserAccessibility_->PlatformChildCount();
+ for (uint32_t index = 0; index < childCount; ++index) {
BrowserAccessibilityCocoa* child =
browserAccessibility_->PlatformGetChild(index)->
ToBrowserAccessibilityCocoa();
@@ -1467,9 +1465,8 @@ bool InitializeAccessibilityTreeSearch(
int selLength = selEnd - selStart;
if ([attribute isEqualToString:
NSAccessibilityInsertionPointLineNumberAttribute]) {
- const std::vector<int32>& line_breaks =
- browserAccessibility_->GetIntListAttribute(
- ui::AX_ATTR_LINE_BREAKS);
+ const std::vector<int32_t>& line_breaks =
+ browserAccessibility_->GetIntListAttribute(ui::AX_ATTR_LINE_BREAKS);
for (int i = 0; i < static_cast<int>(line_breaks.size()); ++i) {
if (line_breaks[i] > selStart)
return [NSNumber numberWithInt:i];
@@ -1494,9 +1491,8 @@ bool InitializeAccessibilityTreeSearch(
if (!browserAccessibility_)
return nil;
- const std::vector<int32>& line_breaks =
- browserAccessibility_->GetIntListAttribute(
- ui::AX_ATTR_LINE_BREAKS);
+ const std::vector<int32_t>& line_breaks =
+ browserAccessibility_->GetIntListAttribute(ui::AX_ATTR_LINE_BREAKS);
base::string16 value = browserAccessibility_->GetValue();
int len = static_cast<int>(value.size());
diff --git a/content/browser/accessibility/browser_accessibility_mac.h b/content/browser/accessibility/browser_accessibility_mac.h
index a574086..aed8fd4 100644
--- a/content/browser/accessibility/browser_accessibility_mac.h
+++ b/content/browser/accessibility/browser_accessibility_mac.h
@@ -9,6 +9,7 @@
#include <utility>
#include <vector>
+#include "base/macros.h"
#include "content/browser/accessibility/browser_accessibility.h"
@class BrowserAccessibilityCocoa;
diff --git a/content/browser/accessibility/browser_accessibility_manager.cc b/content/browser/accessibility/browser_accessibility_manager.cc
index 6f95a6e..f56b848 100644
--- a/content/browser/accessibility/browser_accessibility_manager.cc
+++ b/content/browser/accessibility/browser_accessibility_manager.cc
@@ -4,7 +4,10 @@
#include "content/browser/accessibility/browser_accessibility_manager.h"
+#include <stddef.h>
+
#include "base/logging.h"
+#include "build/build_config.h"
#include "content/browser/accessibility/browser_accessibility.h"
#include "content/common/accessibility_messages.h"
#include "ui/accessibility/ax_tree_serializer.h"
@@ -54,7 +57,7 @@ ui::AXTreeUpdate MakeAXTreeUpdate(
const ui::AXNodeData& node11 /* = ui::AXNodeData() */,
const ui::AXNodeData& node12 /* = ui::AXNodeData() */) {
CR_DEFINE_STATIC_LOCAL(ui::AXNodeData, empty_data, ());
- int32 no_id = empty_data.id;
+ int32_t no_id = empty_data.id;
ui::AXTreeUpdate update;
update.nodes.push_back(node1);
@@ -197,7 +200,7 @@ BrowserAccessibility* BrowserAccessibilityManager::GetFromAXNode(
return GetFromID(node->id());
}
-BrowserAccessibility* BrowserAccessibilityManager::GetFromID(int32 id) const {
+BrowserAccessibility* BrowserAccessibilityManager::GetFromID(int32_t id) const {
const auto iter = id_wrapper_map_.find(id);
if (iter != id_wrapper_map_.end())
return iter->second;
@@ -287,7 +290,7 @@ void BrowserAccessibilityManager::OnAccessibilityEvents(
bool should_send_initial_focus = false;
// Process all changes to the accessibility tree first.
- for (uint32 index = 0; index < details.size(); ++index) {
+ for (uint32_t index = 0; index < details.size(); ++index) {
const AXEventNotificationDetails& detail = details[index];
if (!tree_->Unserialize(detail.update)) {
if (delegate_) {
@@ -310,7 +313,7 @@ void BrowserAccessibilityManager::OnAccessibilityEvents(
NotifyAccessibilityEvent(ui::AX_EVENT_FOCUS, GetFromAXNode(focus_));
// Now iterate over the events again and fire the events.
- for (uint32 index = 0; index < details.size(); index++) {
+ for (uint32_t index = 0; index < details.size(); index++) {
const AXEventNotificationDetails& detail = details[index];
// Find the node corresponding to the id that's the target of the
diff --git a/content/browser/accessibility/browser_accessibility_manager.h b/content/browser/accessibility/browser_accessibility_manager.h
index 872efad..e2e1756 100644
--- a/content/browser/accessibility/browser_accessibility_manager.h
+++ b/content/browser/accessibility/browser_accessibility_manager.h
@@ -5,9 +5,12 @@
#ifndef CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_MANAGER_H_
#define CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_MANAGER_H_
+#include <stdint.h>
+
#include <vector>
#include "base/containers/hash_tables.h"
+#include "base/macros.h"
#include "base/memory/scoped_ptr.h"
#include "build/build_config.h"
#include "content/browser/accessibility/ax_tree_id_registry.h"
@@ -143,7 +146,7 @@ class CONTENT_EXPORT BrowserAccessibilityManager : public ui::AXTreeDelegate {
// Return a pointer to the object corresponding to the given id,
// does not make a new reference.
- BrowserAccessibility* GetFromID(int32 id) const;
+ BrowserAccessibility* GetFromID(int32_t id) const;
// If this tree has a parent tree, return the parent node in that tree.
BrowserAccessibility* GetParentNodeFromParentTree();
@@ -338,7 +341,7 @@ class CONTENT_EXPORT BrowserAccessibilityManager : public ui::AXTreeDelegate {
ui::AXNode* focus_;
// A mapping from a node id to its wrapper of type BrowserAccessibility.
- base::hash_map<int32, BrowserAccessibility*> id_wrapper_map_;
+ base::hash_map<int32_t, BrowserAccessibility*> id_wrapper_map_;
// True if the user has initiated a navigation to another page.
bool user_is_navigating_away_;
diff --git a/content/browser/accessibility/browser_accessibility_manager_android.cc b/content/browser/accessibility/browser_accessibility_manager_android.cc
index fb140c2..6be3677 100644
--- a/content/browser/accessibility/browser_accessibility_manager_android.cc
+++ b/content/browser/accessibility/browser_accessibility_manager_android.cc
@@ -4,6 +4,8 @@
#include "content/browser/accessibility/browser_accessibility_manager_android.h"
+#include <stddef.h>
+
#include <cmath>
#include "base/android/jni_android.h"
@@ -700,12 +702,15 @@ jboolean BrowserAccessibilityManagerAndroid::PreviousAtGranularity(
}
bool BrowserAccessibilityManagerAndroid::NextAtGranularity(
- int32 granularity, int32 cursor_index,
- BrowserAccessibilityAndroid* node, int32* start_index, int32* end_index) {
+ int32_t granularity,
+ int32_t cursor_index,
+ BrowserAccessibilityAndroid* node,
+ int32_t* start_index,
+ int32_t* end_index) {
switch (granularity) {
case ANDROID_ACCESSIBILITY_NODE_INFO_MOVEMENT_GRANULARITY_CHARACTER: {
base::string16 text = node->GetText();
- if (cursor_index >= static_cast<int32>(text.length()))
+ if (cursor_index >= static_cast<int32_t>(text.length()))
return false;
base::i18n::UTF16CharIterator iter(text.data(), text.size());
while (!iter.end() && iter.array_pos() <= cursor_index)
@@ -716,8 +721,8 @@ bool BrowserAccessibilityManagerAndroid::NextAtGranularity(
}
case ANDROID_ACCESSIBILITY_NODE_INFO_MOVEMENT_GRANULARITY_WORD:
case ANDROID_ACCESSIBILITY_NODE_INFO_MOVEMENT_GRANULARITY_LINE: {
- std::vector<int32> starts;
- std::vector<int32> ends;
+ std::vector<int32_t> starts;
+ std::vector<int32_t> ends;
node->GetGranularityBoundaries(granularity, &starts, &ends, 0);
if (starts.size() == 0)
return false;
@@ -741,8 +746,11 @@ bool BrowserAccessibilityManagerAndroid::NextAtGranularity(
}
bool BrowserAccessibilityManagerAndroid::PreviousAtGranularity(
- int32 granularity, int32 cursor_index,
- BrowserAccessibilityAndroid* node, int32* start_index, int32* end_index) {
+ int32_t granularity,
+ int32_t cursor_index,
+ BrowserAccessibilityAndroid* node,
+ int32_t* start_index,
+ int32_t* end_index) {
switch (granularity) {
case ANDROID_ACCESSIBILITY_NODE_INFO_MOVEMENT_GRANULARITY_CHARACTER: {
if (cursor_index <= 0)
@@ -760,8 +768,8 @@ bool BrowserAccessibilityManagerAndroid::PreviousAtGranularity(
}
case ANDROID_ACCESSIBILITY_NODE_INFO_MOVEMENT_GRANULARITY_WORD:
case ANDROID_ACCESSIBILITY_NODE_INFO_MOVEMENT_GRANULARITY_LINE: {
- std::vector<int32> starts;
- std::vector<int32> ends;
+ std::vector<int32_t> starts;
+ std::vector<int32_t> ends;
node->GetGranularityBoundaries(granularity, &starts, &ends, 0);
if (starts.size() == 0)
return false;
diff --git a/content/browser/accessibility/browser_accessibility_manager_android.h b/content/browser/accessibility/browser_accessibility_manager_android.h
index 669b262..404676b 100644
--- a/content/browser/accessibility/browser_accessibility_manager_android.h
+++ b/content/browser/accessibility/browser_accessibility_manager_android.h
@@ -5,7 +5,10 @@
#ifndef CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_MANAGER_ANDROID_H_
#define CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_MANAGER_ANDROID_H_
+#include <stdint.h>
+
#include "base/android/scoped_java_ref.h"
+#include "base/macros.h"
#include "content/browser/accessibility/browser_accessibility_manager.h"
#include "content/browser/android/content_view_core_impl.h"
@@ -178,12 +181,16 @@ class CONTENT_EXPORT BrowserAccessibilityManagerAndroid
// take a single cursor index as input and return the boundaries surrounding
// the next word or line. If moving by character, the output start and
// end index will be the same.
- bool NextAtGranularity(
- int32 granularity, int cursor_index,
- BrowserAccessibilityAndroid* node, int32* start_index, int32* end_index);
- bool PreviousAtGranularity(
- int32 granularity, int cursor_index,
- BrowserAccessibilityAndroid* node, int32* start_index, int32* end_index);
+ bool NextAtGranularity(int32_t granularity,
+ int cursor_index,
+ BrowserAccessibilityAndroid* node,
+ int32_t* start_index,
+ int32_t* end_index);
+ bool PreviousAtGranularity(int32_t granularity,
+ int cursor_index,
+ BrowserAccessibilityAndroid* node,
+ int32_t* start_index,
+ int32_t* end_index);
// Set accessibility focus. This sends a message to the renderer to
// asynchronously load inline text boxes for this node only, enabling more
diff --git a/content/browser/accessibility/browser_accessibility_manager_auralinux.h b/content/browser/accessibility/browser_accessibility_manager_auralinux.h
index 2d03230..4ccd31f 100644
--- a/content/browser/accessibility/browser_accessibility_manager_auralinux.h
+++ b/content/browser/accessibility/browser_accessibility_manager_auralinux.h
@@ -5,6 +5,7 @@
#ifndef CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_MANAGER_AURALINUX_H_
#define CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_MANAGER_AURALINUX_H_
+#include "base/macros.h"
#include "content/browser/accessibility/browser_accessibility_manager.h"
struct ViewHostMsg_AccessibilityNotification_Params;
diff --git a/content/browser/accessibility/browser_accessibility_manager_mac.h b/content/browser/accessibility/browser_accessibility_manager_mac.h
index 0c91252..48a2c2e 100644
--- a/content/browser/accessibility/browser_accessibility_manager_mac.h
+++ b/content/browser/accessibility/browser_accessibility_manager_mac.h
@@ -7,6 +7,7 @@
#import <Cocoa/Cocoa.h>
+#include "base/macros.h"
#include "content/browser/accessibility/browser_accessibility_manager.h"
namespace content {
diff --git a/content/browser/accessibility/browser_accessibility_manager_mac.mm b/content/browser/accessibility/browser_accessibility_manager_mac.mm
index 0ec1abc..f51e2a8 100644
--- a/content/browser/accessibility/browser_accessibility_manager_mac.mm
+++ b/content/browser/accessibility/browser_accessibility_manager_mac.mm
@@ -4,6 +4,8 @@
#include "content/browser/accessibility/browser_accessibility_manager_mac.h"
+#include <stddef.h>
+
#import "base/logging.h"
#import "content/browser/accessibility/browser_accessibility_cocoa.h"
#import "content/browser/accessibility/browser_accessibility_mac.h"
diff --git a/content/browser/accessibility/browser_accessibility_manager_unittest.cc b/content/browser/accessibility/browser_accessibility_manager_unittest.cc
index 7604b3b..4041397 100644
--- a/content/browser/accessibility/browser_accessibility_manager_unittest.cc
+++ b/content/browser/accessibility/browser_accessibility_manager_unittest.cc
@@ -2,8 +2,12 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include <stddef.h>
+#include <stdint.h>
+
#include "base/strings/string16.h"
#include "base/strings/utf_string_conversions.h"
+#include "build/build_config.h"
#include "content/browser/accessibility/browser_accessibility.h"
#include "content/browser/accessibility/browser_accessibility_manager.h"
#if defined(OS_WIN)
@@ -41,7 +45,7 @@ class CountedBrowserAccessibility : public BrowserAccessibility {
// http://crbug.com/235508
// TODO(dmazzoni): Fix this properly.
static const size_t kDataSize = sizeof(int) + sizeof(BrowserAccessibility);
- uint8 padding_[sizeof(BrowserAccessibilityWin) - kDataSize];
+ uint8_t padding_[sizeof(BrowserAccessibilityWin) - kDataSize];
#endif
};
@@ -645,7 +649,7 @@ TEST(BrowserAccessibilityManagerTest, BoundsForRange) {
inline_text1.location = gfx::Rect(100, 100, 29, 9);
inline_text1.AddIntAttribute(ui::AX_ATTR_TEXT_DIRECTION,
ui::AX_TEXT_DIRECTION_LTR);
- std::vector<int32> character_offsets1;
+ std::vector<int32_t> character_offsets1;
character_offsets1.push_back(6); // 0
character_offsets1.push_back(11); // 1
character_offsets1.push_back(16); // 2
@@ -664,7 +668,7 @@ TEST(BrowserAccessibilityManagerTest, BoundsForRange) {
inline_text2.location = gfx::Rect(100, 109, 28, 9);
inline_text2.AddIntAttribute(ui::AX_ATTR_TEXT_DIRECTION,
ui::AX_TEXT_DIRECTION_LTR);
- std::vector<int32> character_offsets2;
+ std::vector<int32_t> character_offsets2;
character_offsets2.push_back(5);
character_offsets2.push_back(10);
character_offsets2.push_back(15);
@@ -740,7 +744,7 @@ TEST(BrowserAccessibilityManagerTest, BoundsForRangeBiDi) {
inline_text1.location = gfx::Rect(100, 100, 30, 20);
inline_text1.AddIntAttribute(ui::AX_ATTR_TEXT_DIRECTION,
ui::AX_TEXT_DIRECTION_LTR);
- std::vector<int32> character_offsets1;
+ std::vector<int32_t> character_offsets1;
character_offsets1.push_back(10); // 0
character_offsets1.push_back(20); // 1
character_offsets1.push_back(30); // 2
@@ -755,7 +759,7 @@ TEST(BrowserAccessibilityManagerTest, BoundsForRangeBiDi) {
inline_text2.location = gfx::Rect(130, 100, 30, 20);
inline_text2.AddIntAttribute(ui::AX_ATTR_TEXT_DIRECTION,
ui::AX_TEXT_DIRECTION_RTL);
- std::vector<int32> character_offsets2;
+ std::vector<int32_t> character_offsets2;
character_offsets2.push_back(10);
character_offsets2.push_back(20);
character_offsets2.push_back(30);
@@ -815,7 +819,7 @@ TEST(BrowserAccessibilityManagerTest, BoundsForRangeScrolledWindow) {
inline_text.location = gfx::Rect(100, 100, 16, 9);
inline_text.AddIntAttribute(ui::AX_ATTR_TEXT_DIRECTION,
ui::AX_TEXT_DIRECTION_LTR);
- std::vector<int32> character_offsets1;
+ std::vector<int32_t> character_offsets1;
character_offsets1.push_back(6); // 0
character_offsets1.push_back(11); // 1
character_offsets1.push_back(16); // 2
@@ -888,7 +892,7 @@ TEST(BrowserAccessibilityManagerTest, MAYBE_BoundsForRangeOnParentElement) {
inline_text1.location = gfx::Rect(100, 100, 40, 20);
inline_text1.AddIntAttribute(ui::AX_ATTR_TEXT_DIRECTION,
ui::AX_TEXT_DIRECTION_LTR);
- std::vector<int32> character_offsets1;
+ std::vector<int32_t> character_offsets1;
character_offsets1.push_back(20); // 0
character_offsets1.push_back(40); // 1
inline_text1.AddIntListAttribute(
@@ -901,7 +905,7 @@ TEST(BrowserAccessibilityManagerTest, MAYBE_BoundsForRangeOnParentElement) {
inline_text2.location = gfx::Rect(160, 100, 40, 20);
inline_text2.AddIntAttribute(ui::AX_ATTR_TEXT_DIRECTION,
ui::AX_TEXT_DIRECTION_LTR);
- std::vector<int32> character_offsets2;
+ std::vector<int32_t> character_offsets2;
character_offsets2.push_back(20); // 0
character_offsets2.push_back(40); // 1
inline_text2.AddIntListAttribute(
diff --git a/content/browser/accessibility/browser_accessibility_manager_win.cc b/content/browser/accessibility/browser_accessibility_manager_win.cc
index 6ae2e18a..4f963eb 100644
--- a/content/browser/accessibility/browser_accessibility_manager_win.cc
+++ b/content/browser/accessibility/browser_accessibility_manager_win.cc
@@ -4,6 +4,9 @@
#include "content/browser/accessibility/browser_accessibility_manager_win.h"
+#include <stddef.h>
+#include <stdint.h>
+
#include <vector>
#include "base/command_line.h"
@@ -268,7 +271,7 @@ void BrowserAccessibilityManagerWin::NotifyAccessibilityEvent(
break;
case ui::AX_EVENT_DOCUMENT_SELECTION_CHANGED: {
// Fire the event on the object where the focus of the selection is.
- int32 focus_id = GetTreeData().sel_focus_object_id;
+ int32_t focus_id = GetTreeData().sel_focus_object_id;
BrowserAccessibility* focus_object = GetFromID(focus_id);
if (focus_object)
node = focus_object;
diff --git a/content/browser/accessibility/browser_accessibility_manager_win.h b/content/browser/accessibility/browser_accessibility_manager_win.h
index 1f9434f..b9da9a1 100644
--- a/content/browser/accessibility/browser_accessibility_manager_win.h
+++ b/content/browser/accessibility/browser_accessibility_manager_win.h
@@ -7,6 +7,7 @@
#include <oleacc.h>
+#include "base/macros.h"
#include "base/memory/scoped_ptr.h"
#include "base/win/scoped_comptr.h"
#include "content/browser/accessibility/browser_accessibility_manager.h"
diff --git a/content/browser/accessibility/browser_accessibility_state_impl.cc b/content/browser/accessibility/browser_accessibility_state_impl.cc
index 31b9aeb..8fb3442 100644
--- a/content/browser/accessibility/browser_accessibility_state_impl.cc
+++ b/content/browser/accessibility/browser_accessibility_state_impl.cc
@@ -4,8 +4,11 @@
#include "content/browser/accessibility/browser_accessibility_state_impl.h"
+#include <stddef.h>
+
#include "base/command_line.h"
#include "base/metrics/histogram.h"
+#include "build/build_config.h"
#include "content/browser/accessibility/accessibility_mode_helper.h"
#include "content/browser/renderer_host/render_widget_host_impl.h"
#include "content/browser/web_contents/web_contents_impl.h"
diff --git a/content/browser/accessibility/browser_accessibility_state_impl.h b/content/browser/accessibility/browser_accessibility_state_impl.h
index e3da7f7..5beb762 100644
--- a/content/browser/accessibility/browser_accessibility_state_impl.h
+++ b/content/browser/accessibility/browser_accessibility_state_impl.h
@@ -7,8 +7,8 @@
#include <vector>
-#include "base/basictypes.h"
#include "base/compiler_specific.h"
+#include "base/macros.h"
#include "base/memory/singleton.h"
#include "content/common/accessibility_mode_enums.h"
#include "content/public/browser/browser_accessibility_state.h"
diff --git a/content/browser/accessibility/browser_accessibility_state_impl_win.cc b/content/browser/accessibility/browser_accessibility_state_impl_win.cc
index 058e3a7..1409b0f 100644
--- a/content/browser/accessibility/browser_accessibility_state_impl_win.cc
+++ b/content/browser/accessibility/browser_accessibility_state_impl_win.cc
@@ -6,6 +6,7 @@
#include <windows.h>
#include <psapi.h>
+#include <stddef.h>
#include "base/files/file_path.h"
#include "base/macros.h"
diff --git a/content/browser/accessibility/browser_accessibility_win.cc b/content/browser/accessibility/browser_accessibility_win.cc
index e44e912..1505d34 100644
--- a/content/browser/accessibility/browser_accessibility_win.cc
+++ b/content/browser/accessibility/browser_accessibility_win.cc
@@ -323,7 +323,7 @@ STDMETHODIMP BrowserAccessibilityWin::accNavigate(LONG nav_dir,
return E_INVALIDARG;
}
- uint32 child_count = target->PlatformChildCount();
+ uint32_t child_count = target->PlatformChildCount();
BrowserAccessibility* result = NULL;
switch (nav_dir) {
@@ -1106,8 +1106,8 @@ STDMETHODIMP BrowserAccessibilityWin::get_accessibleAt(
if (row < 0 || row >= rows || column < 0 || column >= columns)
return E_INVALIDARG;
- const std::vector<int32>& cell_ids = GetIntListAttribute(
- ui::AX_ATTR_CELL_IDS);
+ const std::vector<int32_t>& cell_ids =
+ GetIntListAttribute(ui::AX_ATTR_CELL_IDS);
DCHECK_EQ(columns * rows, static_cast<int>(cell_ids.size()));
int cell_id = cell_ids[row * columns + column];
@@ -1155,10 +1155,10 @@ STDMETHODIMP BrowserAccessibilityWin::get_childIndex(long row,
if (row < 0 || row >= rows || column < 0 || column >= columns)
return E_INVALIDARG;
- const std::vector<int32>& cell_ids = GetIntListAttribute(
- ui::AX_ATTR_CELL_IDS);
- const std::vector<int32>& unique_cell_ids = GetIntListAttribute(
- ui::AX_ATTR_UNIQUE_CELL_IDS);
+ const std::vector<int32_t>& cell_ids =
+ GetIntListAttribute(ui::AX_ATTR_CELL_IDS);
+ const std::vector<int32_t>& unique_cell_ids =
+ GetIntListAttribute(ui::AX_ATTR_UNIQUE_CELL_IDS);
DCHECK_EQ(columns * rows, static_cast<int>(cell_ids.size()));
int cell_id = cell_ids[row * columns + column];
for (size_t i = 0; i < unique_cell_ids.size(); ++i) {
@@ -1192,8 +1192,8 @@ STDMETHODIMP BrowserAccessibilityWin::get_columnDescription(long column,
if (column < 0 || column >= columns)
return E_INVALIDARG;
- const std::vector<int32>& cell_ids = GetIntListAttribute(
- ui::AX_ATTR_CELL_IDS);
+ const std::vector<int32_t>& cell_ids =
+ GetIntListAttribute(ui::AX_ATTR_CELL_IDS);
for (int i = 0; i < rows; ++i) {
int cell_id = cell_ids[i * columns + column];
BrowserAccessibilityWin* cell = static_cast<BrowserAccessibilityWin*>(
@@ -1239,8 +1239,8 @@ STDMETHODIMP BrowserAccessibilityWin::get_columnExtentAt(
if (row < 0 || row >= rows || column < 0 || column >= columns)
return E_INVALIDARG;
- const std::vector<int32>& cell_ids = GetIntListAttribute(
- ui::AX_ATTR_CELL_IDS);
+ const std::vector<int32_t>& cell_ids =
+ GetIntListAttribute(ui::AX_ATTR_CELL_IDS);
int cell_id = cell_ids[row * columns + column];
BrowserAccessibilityWin* cell = static_cast<BrowserAccessibilityWin*>(
manager()->GetFromID(cell_id));
@@ -1271,8 +1271,8 @@ STDMETHODIMP BrowserAccessibilityWin::get_columnIndex(long cell_index,
if (!column_index)
return E_INVALIDARG;
- const std::vector<int32>& unique_cell_ids = GetIntListAttribute(
- ui::AX_ATTR_UNIQUE_CELL_IDS);
+ const std::vector<int32_t>& unique_cell_ids =
+ GetIntListAttribute(ui::AX_ATTR_UNIQUE_CELL_IDS);
int cell_id_count = static_cast<int>(unique_cell_ids.size());
if (cell_index < 0)
return E_INVALIDARG;
@@ -1381,8 +1381,8 @@ STDMETHODIMP BrowserAccessibilityWin::get_rowDescription(long row,
if (row < 0 || row >= rows)
return E_INVALIDARG;
- const std::vector<int32>& cell_ids = GetIntListAttribute(
- ui::AX_ATTR_CELL_IDS);
+ const std::vector<int32_t>& cell_ids =
+ GetIntListAttribute(ui::AX_ATTR_CELL_IDS);
for (int i = 0; i < columns; ++i) {
int cell_id = cell_ids[row * columns + i];
BrowserAccessibilityWin* cell =
@@ -1427,8 +1427,8 @@ STDMETHODIMP BrowserAccessibilityWin::get_rowExtentAt(long row,
if (row < 0 || row >= rows || column < 0 || column >= columns)
return E_INVALIDARG;
- const std::vector<int32>& cell_ids = GetIntListAttribute(
- ui::AX_ATTR_CELL_IDS);
+ const std::vector<int32_t>& cell_ids =
+ GetIntListAttribute(ui::AX_ATTR_CELL_IDS);
int cell_id = cell_ids[row * columns + column];
BrowserAccessibilityWin* cell =
manager()->GetFromID(cell_id)->ToBrowserAccessibilityWin();
@@ -1459,8 +1459,8 @@ STDMETHODIMP BrowserAccessibilityWin::get_rowIndex(long cell_index,
if (!row_index)
return E_INVALIDARG;
- const std::vector<int32>& unique_cell_ids = GetIntListAttribute(
- ui::AX_ATTR_UNIQUE_CELL_IDS);
+ const std::vector<int32_t>& unique_cell_ids =
+ GetIntListAttribute(ui::AX_ATTR_UNIQUE_CELL_IDS);
int cell_id_count = static_cast<int>(unique_cell_ids.size());
if (cell_index < 0)
return E_INVALIDARG;
@@ -1588,8 +1588,8 @@ STDMETHODIMP BrowserAccessibilityWin::get_rowColumnExtentsAtIndex(
if (!row || !column || !row_extents || !column_extents || !is_selected)
return E_INVALIDARG;
- const std::vector<int32>& unique_cell_ids = GetIntListAttribute(
- ui::AX_ATTR_UNIQUE_CELL_IDS);
+ const std::vector<int32_t>& unique_cell_ids =
+ GetIntListAttribute(ui::AX_ATTR_UNIQUE_CELL_IDS);
int cell_id_count = static_cast<int>(unique_cell_ids.size());
if (index < 0)
return E_INVALIDARG;
@@ -1751,8 +1751,8 @@ STDMETHODIMP BrowserAccessibilityWin::get_columnHeaderCells(
if (columns <= 0 || rows <= 0 || column < 0 || column >= columns)
return S_FALSE;
- const std::vector<int32>& cell_ids = table->GetIntListAttribute(
- ui::AX_ATTR_CELL_IDS);
+ const std::vector<int32_t>& cell_ids =
+ table->GetIntListAttribute(ui::AX_ATTR_CELL_IDS);
for (int i = 0; i < rows; ++i) {
int cell_id = cell_ids[i * columns + column];
@@ -1849,8 +1849,8 @@ STDMETHODIMP BrowserAccessibilityWin::get_rowHeaderCells(
if (columns <= 0 || rows <= 0 || row < 0 || row >= rows)
return S_FALSE;
- const std::vector<int32>& cell_ids = table->GetIntListAttribute(
- ui::AX_ATTR_CELL_IDS);
+ const std::vector<int32_t>& cell_ids =
+ table->GetIntListAttribute(ui::AX_ATTR_CELL_IDS);
for (int i = 0; i < columns; ++i) {
int cell_id = cell_ids[row * columns + i];
@@ -2403,7 +2403,7 @@ STDMETHODIMP BrowserAccessibilityWin::get_hyperlink(
return E_INVALIDARG;
}
- int32 id = hyperlinks()[index];
+ int32_t id = hyperlinks()[index];
BrowserAccessibilityWin* child =
manager()->GetFromID(id)->ToBrowserAccessibilityWin();
if (child) {
@@ -2428,7 +2428,7 @@ STDMETHODIMP BrowserAccessibilityWin::get_hyperlinkIndex(
return E_INVALIDARG;
}
- std::map<int32, int32>::iterator it =
+ std::map<int32_t, int32_t>::iterator it =
hyperlink_offset_to_index().find(char_index);
if (it == hyperlink_offset_to_index().end()) {
*hyperlink_index = -1;
@@ -2500,7 +2500,7 @@ STDMETHODIMP BrowserAccessibilityWin::get_startIndex(long* index) {
if (!index)
return E_INVALIDARG;
- int32 hypertext_offset = 0;
+ int32_t hypertext_offset = 0;
const auto parent = GetParent();
if (parent) {
hypertext_offset =
@@ -3212,7 +3212,7 @@ HRESULT WINAPI BrowserAccessibilityWin::InternalQueryInterface(
void** object) {
BrowserAccessibilityWin* accessibility =
reinterpret_cast<BrowserAccessibilityWin*>(this_ptr);
- int32 ia_role = accessibility->ia_role();
+ int32_t ia_role = accessibility->ia_role();
if (iid == IID_IAccessibleImage) {
if (ia_role != ROLE_SYSTEM_GRAPHIC) {
*object = NULL;
@@ -3312,8 +3312,8 @@ void BrowserAccessibilityWin::UpdateStep1ComputeWinAttributes() {
while (table && table->GetRole() != ui::AX_ROLE_TABLE)
table = table->GetParent();
if (table) {
- const std::vector<int32>& unique_cell_ids = table->GetIntListAttribute(
- ui::AX_ATTR_UNIQUE_CELL_IDS);
+ const std::vector<int32_t>& unique_cell_ids =
+ table->GetIntListAttribute(ui::AX_ATTR_UNIQUE_CELL_IDS);
for (size_t i = 0; i < unique_cell_ids.size(); ++i) {
if (unique_cell_ids[i] == GetId()) {
win_attributes_->ia2_attributes.push_back(
@@ -3362,7 +3362,7 @@ void BrowserAccessibilityWin::UpdateStep1ComputeWinAttributes() {
}
// Expose row or column header sort direction.
- int32 sort_direction;
+ int32_t sort_direction;
if ((ia_role() == ROLE_SYSTEM_COLUMNHEADER ||
ia_role() == ROLE_SYSTEM_ROWHEADER) &&
GetIntAttribute(ui::AX_ATTR_SORT_DIRECTION, &sort_direction)) {
@@ -3446,9 +3446,9 @@ void BrowserAccessibilityWin::UpdateStep2ComputeHypertext() {
if (child->IsTextOnlyObject()) {
win_attributes_->hypertext += child->name();
} else {
- int32 char_offset = hypertext().size();
- int32 child_id = child->GetId();
- int32 index = hyperlinks().size();
+ int32_t char_offset = hypertext().size();
+ int32_t child_id = child->GetId();
+ int32_t index = hyperlinks().size();
win_attributes_->hyperlink_offset_to_index[char_offset] = index;
win_attributes_->hyperlinks.push_back(child_id);
win_attributes_->hypertext += kEmbeddedCharacter;
@@ -3665,7 +3665,7 @@ void BrowserAccessibilityWin::IntAttributeToIA2(
}
bool BrowserAccessibilityWin::IsHyperlink() const {
- int32 hyperlink_index = -1;
+ int32_t hyperlink_index = -1;
const auto parent = GetParent();
if (parent) {
hyperlink_index =
@@ -3677,7 +3677,7 @@ bool BrowserAccessibilityWin::IsHyperlink() const {
return false;
}
-int32 BrowserAccessibilityWin::GetHyperlinkIndexFromChild(
+int32_t BrowserAccessibilityWin::GetHyperlinkIndexFromChild(
const BrowserAccessibilityWin& child) const {
if (hyperlinks().empty())
return -1;
@@ -3687,11 +3687,11 @@ int32 BrowserAccessibilityWin::GetHyperlinkIndexFromChild(
if (iterator == hyperlinks().end())
return -1;
- return static_cast<int32>(iterator - hyperlinks().begin());
+ return static_cast<int32_t>(iterator - hyperlinks().begin());
}
-int32 BrowserAccessibilityWin::GetHypertextOffsetFromHyperlinkIndex(
- int32 hyperlink_index) const {
+int32_t BrowserAccessibilityWin::GetHypertextOffsetFromHyperlinkIndex(
+ int32_t hyperlink_index) const {
for (auto& offset_index : hyperlink_offset_to_index()) {
if (offset_index.second == hyperlink_index)
return offset_index.first;
@@ -3700,7 +3700,7 @@ int32 BrowserAccessibilityWin::GetHypertextOffsetFromHyperlinkIndex(
return -1;
}
-int32 BrowserAccessibilityWin::GetHypertextOffsetFromChild(
+int32_t BrowserAccessibilityWin::GetHypertextOffsetFromChild(
const BrowserAccessibilityWin& child) const {
DCHECK(child.GetParent() == this);
@@ -3710,11 +3710,11 @@ int32 BrowserAccessibilityWin::GetHypertextOffsetFromChild(
// children should not be present at tree roots and so no cross-tree traversal
// is necessary.)
if (child.IsTextOnlyObject()) {
- int32 hypertextOffset = 0;
- int32 index_in_parent = child.GetIndexInParent();
+ int32_t hypertextOffset = 0;
+ int32_t index_in_parent = child.GetIndexInParent();
DCHECK_GE(index_in_parent, 0);
- DCHECK_LT(index_in_parent, static_cast<int32>(InternalChildCount()));
- for (uint32 i = 0; i < static_cast<uint32>(index_in_parent); ++i) {
+ DCHECK_LT(index_in_parent, static_cast<int32_t>(InternalChildCount()));
+ for (uint32_t i = 0; i < static_cast<uint32_t>(index_in_parent); ++i) {
const BrowserAccessibilityWin* sibling =
InternalGetChild(i)->ToBrowserAccessibilityWin();
DCHECK(sibling);
@@ -3726,14 +3726,14 @@ int32 BrowserAccessibilityWin::GetHypertextOffsetFromChild(
return hypertextOffset;
}
- int32 hyperlink_index = GetHyperlinkIndexFromChild(child);
+ int32_t hyperlink_index = GetHyperlinkIndexFromChild(child);
if (hyperlink_index < 0)
return -1;
return GetHypertextOffsetFromHyperlinkIndex(hyperlink_index);
}
-int32 BrowserAccessibilityWin::GetHypertextOffsetFromDescendant(
+int32_t BrowserAccessibilityWin::GetHypertextOffsetFromDescendant(
const BrowserAccessibilityWin& descendant) const {
auto parent_object = descendant.GetParent()->ToBrowserAccessibilityWin();
auto current_object = const_cast<BrowserAccessibilityWin*>(&descendant);
@@ -3767,7 +3767,7 @@ int BrowserAccessibilityWin::GetHypertextOffsetFromEndpoint(
return endpoint_offset;
const BrowserAccessibility* common_parent = this;
- int32 index_in_common_parent = GetIndexInParent();
+ int32_t index_in_common_parent = GetIndexInParent();
while (common_parent && !endpoint_object.IsDescendantOf(common_parent)) {
index_in_common_parent = common_parent->GetIndexInParent();
common_parent = common_parent->GetParent();
@@ -3784,7 +3784,8 @@ int BrowserAccessibilityWin::GetHypertextOffsetFromEndpoint(
// We can safely assume that it is a descendant or in a completely different
// part of the tree.
if (common_parent == this) {
- int32 hypertext_offset = GetHypertextOffsetFromDescendant(endpoint_object);
+ int32_t hypertext_offset =
+ GetHypertextOffsetFromDescendant(endpoint_object);
if (endpoint_object.GetParent() == this &&
endpoint_object.IsTextOnlyObject()) {
hypertext_offset += endpoint_offset;
@@ -3797,8 +3798,8 @@ int BrowserAccessibilityWin::GetHypertextOffsetFromEndpoint(
//
// We can safely assume that the endpoint is in another part of the tree or
// at common parent, and that this object is a descendant of common parent.
- int32 endpoint_index_in_common_parent = -1;
- for (uint32 i = 0; i < common_parent->InternalChildCount(); ++i) {
+ int32_t endpoint_index_in_common_parent = -1;
+ for (uint32_t i = 0; i < common_parent->InternalChildCount(); ++i) {
const BrowserAccessibility* child = common_parent->InternalGetChild(i);
DCHECK(child);
if (endpoint_object.IsDescendantOf(child)) {
@@ -3818,7 +3819,7 @@ int BrowserAccessibilityWin::GetHypertextOffsetFromEndpoint(
}
int BrowserAccessibilityWin::GetSelectionAnchor() const {
- int32 anchor_id = manager()->GetTreeData().sel_anchor_object_id;
+ int32_t anchor_id = manager()->GetTreeData().sel_anchor_object_id;
const auto anchor_object =
manager()->GetFromID(anchor_id)->ToBrowserAccessibilityWin();
if (!anchor_object)
@@ -3829,7 +3830,7 @@ int BrowserAccessibilityWin::GetSelectionAnchor() const {
}
int BrowserAccessibilityWin::GetSelectionFocus() const {
- int32 focus_id = manager()->GetTreeData().sel_focus_object_id;
+ int32_t focus_id = manager()->GetTreeData().sel_focus_object_id;
const auto focus_object =
manager()->GetFromID(focus_id)->ToBrowserAccessibilityWin();
if (!focus_object)
@@ -3927,20 +3928,20 @@ bool BrowserAccessibilityWin::IsSameHypertextCharacter(size_t old_char_index,
// If it's an embedded character, they're only identical if the child id
// the hyperlink points to is the same.
- std::map<int32, int32>& old_offset_to_index =
+ std::map<int32_t, int32_t>& old_offset_to_index =
old_win_attributes_->hyperlink_offset_to_index;
- std::vector<int32>& old_hyperlinks = old_win_attributes_->hyperlinks;
- int32 old_hyperlinks_count = static_cast<int32>(old_hyperlinks.size());
- std::map<int32, int32>::iterator iter;
+ std::vector<int32_t>& old_hyperlinks = old_win_attributes_->hyperlinks;
+ int32_t old_hyperlinks_count = static_cast<int32_t>(old_hyperlinks.size());
+ std::map<int32_t, int32_t>::iterator iter;
iter = old_offset_to_index.find(old_char_index);
int old_index = (iter != old_offset_to_index.end()) ? iter->second : -1;
int old_child_id = (old_index >= 0 && old_index < old_hyperlinks_count) ?
old_hyperlinks[old_index] : -1;
- std::map<int32, int32>& new_offset_to_index =
+ std::map<int32_t, int32_t>& new_offset_to_index =
win_attributes_->hyperlink_offset_to_index;
- std::vector<int32>& new_hyperlinks = win_attributes_->hyperlinks;
- int32 new_hyperlinks_count = static_cast<int32>(new_hyperlinks.size());
+ std::vector<int32_t>& new_hyperlinks = win_attributes_->hyperlinks;
+ int32_t new_hyperlinks_count = static_cast<int32_t>(new_hyperlinks.size());
iter = new_offset_to_index.find(new_char_index);
int new_index = (iter != new_offset_to_index.end()) ? iter->second : -1;
int new_child_id = (new_index >= 0 && new_index < new_hyperlinks_count) ?
@@ -4021,13 +4022,13 @@ LONG BrowserAccessibilityWin::FindBoundary(
return GetWordStartBoundary(static_cast<int>(start_offset), direction);
ui::TextBoundaryType boundary = IA2TextBoundaryToTextBoundary(ia2_boundary);
- const std::vector<int32>& line_breaks = GetIntListAttribute(
- ui::AX_ATTR_LINE_BREAKS);
+ const std::vector<int32_t>& line_breaks =
+ GetIntListAttribute(ui::AX_ATTR_LINE_BREAKS);
return ui::FindAccessibleTextBoundary(
text, line_breaks, boundary, start_offset, direction);
}
-BrowserAccessibilityWin* BrowserAccessibilityWin::GetFromID(int32 id) {
+BrowserAccessibilityWin* BrowserAccessibilityWin::GetFromID(int32_t id) {
return manager()->GetFromID(id)->ToBrowserAccessibilityWin();
}
@@ -4035,8 +4036,8 @@ bool BrowserAccessibilityWin::IsListBoxOptionOrMenuListOption() {
if (!GetParent())
return false;
- int32 role = GetRole();
- int32 parent_role = GetParent()->GetRole();
+ int32_t role = GetRole();
+ int32_t parent_role = GetParent()->GetRole();
if (role == ui::AX_ROLE_LIST_BOX_OPTION &&
parent_role == ui::AX_ROLE_LIST_BOX) {
@@ -4120,7 +4121,7 @@ void BrowserAccessibilityWin::AddRelations(
if (!HasIntListAttribute(src_attr))
return;
- const std::vector<int32>& ids = GetIntListAttribute(src_attr);
+ const std::vector<int32_t>& ids = GetIntListAttribute(src_attr);
for (size_t i = 0; i < ids.size(); ++i) {
CComObject<BrowserAccessibilityRelation>* relation;
HRESULT hr = CComObject<BrowserAccessibilityRelation>::CreateInstance(
@@ -4134,11 +4135,11 @@ void BrowserAccessibilityWin::AddRelations(
}
void BrowserAccessibilityWin::InitRoleAndState() {
- int32 ia_role = 0;
- int32 ia_state = 0;
+ int32_t ia_role = 0;
+ int32_t ia_state = 0;
base::string16 role_name;
- int32 ia2_role = 0;
- int32 ia2_state = IA2_STATE_OPAQUE;
+ int32_t ia2_role = 0;
+ int32_t ia2_state = IA2_STATE_OPAQUE;
if (HasState(ui::AX_STATE_BUSY))
ia_state |= STATE_SYSTEM_BUSY;
diff --git a/content/browser/accessibility/browser_accessibility_win.h b/content/browser/accessibility/browser_accessibility_win.h
index c51d1d4..18924ac 100644
--- a/content/browser/accessibility/browser_accessibility_win.h
+++ b/content/browser/accessibility/browser_accessibility_win.h
@@ -8,12 +8,15 @@
#include <atlbase.h>
#include <atlcom.h>
#include <oleacc.h>
+#include <stddef.h>
+#include <stdint.h>
#include <UIAutomationCore.h>
#include <vector>
#include "base/compiler_specific.h"
#include "base/gtest_prod_util.h"
+#include "base/macros.h"
#include "content/browser/accessibility/browser_accessibility.h"
#include "content/common/content_export.h"
#include "third_party/iaccessible2/ia2_api_all.h"
@@ -87,8 +90,8 @@ BrowserAccessibilityWin
// Mappings from roles and states to human readable strings. Initialize
// with |InitializeStringMaps|.
- static std::map<int32, base::string16> role_string_map;
- static std::map<int32, base::string16> state_string_map;
+ static std::map<int32_t, base::string16> role_string_map;
+ static std::map<int32_t, base::string16> state_string_map;
CONTENT_EXPORT BrowserAccessibilityWin();
@@ -711,11 +714,11 @@ BrowserAccessibilityWin
void** object);
// Accessors.
- int32 ia_role() const { return win_attributes_->ia_role; }
- int32 ia_state() const { return win_attributes_->ia_state; }
+ int32_t ia_role() const { return win_attributes_->ia_role; }
+ int32_t ia_state() const { return win_attributes_->ia_state; }
const base::string16& role_name() const { return win_attributes_->role_name; }
- int32 ia2_role() const { return win_attributes_->ia2_role; }
- int32 ia2_state() const { return win_attributes_->ia2_state; }
+ int32_t ia2_role() const { return win_attributes_->ia2_role; }
+ int32_t ia2_state() const { return win_attributes_->ia2_state; }
const std::vector<base::string16>& ia2_attributes() const {
return win_attributes_->ia2_attributes;
}
@@ -723,10 +726,12 @@ BrowserAccessibilityWin
base::string16 description() const { return win_attributes_->description; }
base::string16 value() const { return win_attributes_->value; }
base::string16 hypertext() const { return win_attributes_->hypertext; }
- std::map<int32, int32>& hyperlink_offset_to_index() const {
+ std::map<int32_t, int32_t>& hyperlink_offset_to_index() const {
return win_attributes_->hyperlink_offset_to_index;
}
- std::vector<int32>& hyperlinks() const { return win_attributes_->hyperlinks; }
+ std::vector<int32_t>& hyperlinks() const {
+ return win_attributes_->hyperlinks;
+ }
private:
// Add one to the reference count and return the same object. Always
@@ -787,10 +792,12 @@ BrowserAccessibilityWin
// Functions for retrieving offsets for hyperlinks and hypertext.
// Return -1 in case of failure.
- int32 GetHyperlinkIndexFromChild(const BrowserAccessibilityWin& child) const;
- int32 GetHypertextOffsetFromHyperlinkIndex(int32 hyperlink_index) const;
- int32 GetHypertextOffsetFromChild(const BrowserAccessibilityWin& child) const;
- int32 GetHypertextOffsetFromDescendant(
+ int32_t GetHyperlinkIndexFromChild(
+ const BrowserAccessibilityWin& child) const;
+ int32_t GetHypertextOffsetFromHyperlinkIndex(int32_t hyperlink_index) const;
+ int32_t GetHypertextOffsetFromChild(
+ const BrowserAccessibilityWin& child) const;
+ int32_t GetHypertextOffsetFromDescendant(
const BrowserAccessibilityWin& descendant) const;
// If the selection endpoint is either equal to or an ancestor of this object,
@@ -845,7 +852,7 @@ BrowserAccessibilityWin
// Return a pointer to the object corresponding to the given id,
// does not make a new reference.
- BrowserAccessibilityWin* GetFromID(int32 id);
+ BrowserAccessibilityWin* GetFromID(int32_t id);
// Returns true if this is a list box option with a parent of type list box,
// or a menu list option with a parent of type menu list popup.
@@ -869,8 +876,8 @@ BrowserAccessibilityWin
~WinAttributes();
// IAccessible role and state.
- int32 ia_role;
- int32 ia_state;
+ int32_t ia_role;
+ int32_t ia_state;
base::string16 role_name;
// IAccessible name, description, help, value.
@@ -879,8 +886,8 @@ BrowserAccessibilityWin
base::string16 value;
// IAccessible2 role and state.
- int32 ia2_role;
- int32 ia2_state;
+ int32_t ia2_role;
+ int32_t ia2_state;
// IAccessible2 attributes.
std::vector<base::string16> ia2_attributes;
@@ -890,11 +897,11 @@ BrowserAccessibilityWin
// Maps the |hypertext_| embedded character offset to an index in
// |hyperlinks_|.
- std::map<int32, int32> hyperlink_offset_to_index;
+ std::map<int32_t, int32_t> hyperlink_offset_to_index;
// The id of a BrowserAccessibilityWin for each hyperlink.
// TODO(nektar): Replace object IDs with child indices.
- std::vector<int32> hyperlinks;
+ std::vector<int32_t> hyperlinks;
};
scoped_ptr<WinAttributes> win_attributes_;
diff --git a/content/browser/accessibility/browser_accessibility_win_unittest.cc b/content/browser/accessibility/browser_accessibility_win_unittest.cc
index 5ceb698..4b0bb62 100644
--- a/content/browser/accessibility/browser_accessibility_win_unittest.cc
+++ b/content/browser/accessibility/browser_accessibility_win_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 <stdint.h>
+
+#include "base/macros.h"
#include "base/memory/scoped_ptr.h"
#include "base/strings/utf_string_conversions.h"
#include "base/win/scoped_bstr.h"
@@ -337,7 +340,7 @@ TEST_F(BrowserAccessibilityTest, TestTextBoundaries) {
text_field.id = 2;
text_field.role = ui::AX_ROLE_TEXT_FIELD;
text_field.AddStringAttribute(ui::AX_ATTR_VALUE, text_value);
- std::vector<int32> line_start_offsets;
+ std::vector<int32_t> line_start_offsets;
line_start_offsets.push_back(15);
text_field.AddIntListAttribute(
ui::AX_ATTR_LINE_BREAKS, line_start_offsets);
@@ -355,7 +358,7 @@ TEST_F(BrowserAccessibilityTest, TestTextBoundaries) {
inline_box1.id = 4;
inline_box1.role = ui::AX_ROLE_INLINE_TEXT_BOX;
inline_box1.AddStringAttribute(ui::AX_ATTR_NAME, line1);
- std::vector<int32> word_start_offsets1;
+ std::vector<int32_t> word_start_offsets1;
word_start_offsets1.push_back(0);
word_start_offsets1.push_back(4);
word_start_offsets1.push_back(8);
@@ -377,7 +380,7 @@ TEST_F(BrowserAccessibilityTest, TestTextBoundaries) {
inline_box2.id = 7;
inline_box2.role = ui::AX_ROLE_INLINE_TEXT_BOX;
inline_box2.AddStringAttribute(ui::AX_ATTR_NAME, line2);
- std::vector<int32> word_start_offsets2;
+ std::vector<int32_t> word_start_offsets2;
word_start_offsets2.push_back(0);
word_start_offsets2.push_back(5);
word_start_offsets2.push_back(10);
@@ -720,9 +723,9 @@ TEST_F(BrowserAccessibilityTest, TestCreateEmptyDocument) {
// Try creating an empty document with busy state. Readonly is
// set automatically.
CountedBrowserAccessibility::reset();
- const int32 busy_state = 1 << ui::AX_STATE_BUSY;
- const int32 readonly_state = 1 << ui::AX_STATE_READ_ONLY;
- const int32 enabled_state = 1 << ui::AX_STATE_ENABLED;
+ const int32_t busy_state = 1 << ui::AX_STATE_BUSY;
+ const int32_t readonly_state = 1 << ui::AX_STATE_READ_ONLY;
+ const int32_t enabled_state = 1 << ui::AX_STATE_ENABLED;
scoped_ptr<BrowserAccessibilityManager> manager(
new BrowserAccessibilityManagerWin(
BrowserAccessibilityManagerWin::GetEmptyDocument(),
diff --git a/content/browser/accessibility/cross_platform_accessibility_browsertest.cc b/content/browser/accessibility/cross_platform_accessibility_browsertest.cc
index c179b17..9866b32 100644
--- a/content/browser/accessibility/cross_platform_accessibility_browsertest.cc
+++ b/content/browser/accessibility/cross_platform_accessibility_browsertest.cc
@@ -2,10 +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 <stdint.h>
+
#include <string>
#include <vector>
+#include "base/macros.h"
#include "base/strings/utf_string_conversions.h"
+#include "build/build_config.h"
#include "content/browser/renderer_host/render_view_host_impl.h"
#include "content/public/browser/notification_service.h"
#include "content/public/browser/notification_types.h"
@@ -287,7 +292,7 @@ IN_PROC_BROWSER_TEST_F(CrossPlatformAccessibilityBrowserTest,
EXPECT_EQ(1U, column1->data().intlist_attributes.size());
EXPECT_EQ(ui::AX_ATTR_INDIRECT_CHILD_IDS,
column1->data().intlist_attributes[0].first);
- const std::vector<int32> column1_indirect_child_ids =
+ const std::vector<int32_t> column1_indirect_child_ids =
column1->data().intlist_attributes[0].second;
EXPECT_EQ(1U, column1_indirect_child_ids.size());
EXPECT_EQ(cell1->id(), column1_indirect_child_ids[0]);
@@ -296,7 +301,7 @@ IN_PROC_BROWSER_TEST_F(CrossPlatformAccessibilityBrowserTest,
EXPECT_EQ(0, column2->child_count());
EXPECT_EQ(ui::AX_ATTR_INDIRECT_CHILD_IDS,
column2->data().intlist_attributes[0].first);
- const std::vector<int32> column2_indirect_child_ids =
+ const std::vector<int32_t> column2_indirect_child_ids =
column2->data().intlist_attributes[0].second;
EXPECT_EQ(1U, column2_indirect_child_ids.size());
EXPECT_EQ(cell2->id(), column2_indirect_child_ids[0]);
@@ -441,7 +446,7 @@ IN_PROC_BROWSER_TEST_F(CrossPlatformAccessibilityBrowserTest,
ASSERT_EQ(ui::AX_ATTR_CELL_IDS,
table->data().intlist_attributes[0].first);
- const std::vector<int32>& table_cell_ids =
+ const std::vector<int32_t>& table_cell_ids =
table->data().intlist_attributes[0].second;
ASSERT_EQ(6U, table_cell_ids.size());
EXPECT_EQ(cell1->id(), table_cell_ids[0]);
diff --git a/content/browser/accessibility/dump_accessibility_browsertest_base.cc b/content/browser/accessibility/dump_accessibility_browsertest_base.cc
index adcc3ab..b5dd329 100644
--- a/content/browser/accessibility/dump_accessibility_browsertest_base.cc
+++ b/content/browser/accessibility/dump_accessibility_browsertest_base.cc
@@ -15,6 +15,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 "content/browser/accessibility/accessibility_tree_formatter.h"
#include "content/browser/accessibility/accessibility_tree_formatter_blink.h"
#include "content/browser/accessibility/browser_accessibility.h"
diff --git a/content/browser/accessibility/dump_accessibility_browsertest_base.h b/content/browser/accessibility/dump_accessibility_browsertest_base.h
index 978b218..21ae32a 100644
--- a/content/browser/accessibility/dump_accessibility_browsertest_base.h
+++ b/content/browser/accessibility/dump_accessibility_browsertest_base.h
@@ -7,6 +7,7 @@
#include "base/debug/leak_annotations.h"
#include "base/strings/string16.h"
+#include "build/build_config.h"
#include "content/browser/accessibility/accessibility_tree_formatter.h"
#include "content/public/test/content_browser_test.h"
diff --git a/content/browser/accessibility/dump_accessibility_events_browsertest.cc b/content/browser/accessibility/dump_accessibility_events_browsertest.cc
index 3bd1fd7..e4d2fc4 100644
--- a/content/browser/accessibility/dump_accessibility_events_browsertest.cc
+++ b/content/browser/accessibility/dump_accessibility_events_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 <set>
#include <string>
#include <vector>
@@ -10,6 +12,7 @@
#include "base/strings/string16.h"
#include "base/strings/string_util.h"
#include "base/strings/utf_string_conversions.h"
+#include "build/build_config.h"
#include "content/browser/accessibility/accessibility_event_recorder.h"
#include "content/browser/accessibility/accessibility_tree_formatter.h"
#include "content/browser/accessibility/browser_accessibility.h"
diff --git a/content/browser/accessibility/dump_accessibility_tree_browsertest.cc b/content/browser/accessibility/dump_accessibility_tree_browsertest.cc
index 28bd3d54..87a89ce 100644
--- a/content/browser/accessibility/dump_accessibility_tree_browsertest.cc
+++ b/content/browser/accessibility/dump_accessibility_tree_browsertest.cc
@@ -12,6 +12,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 "content/browser/accessibility/accessibility_tree_formatter.h"
#include "content/browser/accessibility/accessibility_tree_formatter_blink.h"
#include "content/browser/accessibility/browser_accessibility.h"
diff --git a/content/browser/accessibility/one_shot_accessibility_tree_search.cc b/content/browser/accessibility/one_shot_accessibility_tree_search.cc
index f3daa6b..8b17f2d 100644
--- a/content/browser/accessibility/one_shot_accessibility_tree_search.cc
+++ b/content/browser/accessibility/one_shot_accessibility_tree_search.cc
@@ -4,6 +4,8 @@
#include "content/browser/accessibility/one_shot_accessibility_tree_search.h"
+#include <stdint.h>
+
#include "base/i18n/case_conversion.h"
#include "base/strings/string16.h"
#include "base/strings/utf_string_conversions.h"
@@ -115,7 +117,7 @@ void OneShotAccessibilityTreeSearch::SearchByIteratingOverChildren() {
// If start_node_ is specified, iterate over the first child past that
// node.
- uint32 count = scope_node_->PlatformChildCount();
+ uint32_t count = scope_node_->PlatformChildCount();
if (count == 0)
return;
@@ -125,7 +127,7 @@ void OneShotAccessibilityTreeSearch::SearchByIteratingOverChildren() {
while (start_node_ && start_node_->GetParent() != scope_node_)
start_node_ = start_node_->GetParent();
- uint32 index = (direction_ == FORWARDS ? 0 : count - 1);
+ uint32_t index = (direction_ == FORWARDS ? 0 : count - 1);
if (start_node_) {
index = start_node_->GetIndexInParent();
if (direction_ == FORWARDS)
diff --git a/content/browser/accessibility/one_shot_accessibility_tree_search.h b/content/browser/accessibility/one_shot_accessibility_tree_search.h
index 7e55a887..2538bb8 100644
--- a/content/browser/accessibility/one_shot_accessibility_tree_search.h
+++ b/content/browser/accessibility/one_shot_accessibility_tree_search.h
@@ -5,6 +5,8 @@
#ifndef CONTENT_BROWSER_ACCESSIBILITY_ACCESSIBILITY_TREE_SEARCH_H_
#define CONTENT_BROWSER_ACCESSIBILITY_ACCESSIBILITY_TREE_SEARCH_H_
+#include <stddef.h>
+
#include <string>
#include <vector>
diff --git a/content/browser/accessibility/one_shot_accessibility_tree_search_unittest.cc b/content/browser/accessibility/one_shot_accessibility_tree_search_unittest.cc
index f1fa317..be30284 100644
--- a/content/browser/accessibility/one_shot_accessibility_tree_search_unittest.cc
+++ b/content/browser/accessibility/one_shot_accessibility_tree_search_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 "content/browser/accessibility/browser_accessibility.h"
#include "content/browser/accessibility/browser_accessibility_manager.h"
diff --git a/content/browser/accessibility/site_per_process_accessibility_browsertest.cc b/content/browser/accessibility/site_per_process_accessibility_browsertest.cc
index cbbdccf..3710770 100644
--- a/content/browser/accessibility/site_per_process_accessibility_browsertest.cc
+++ b/content/browser/accessibility/site_per_process_accessibility_browsertest.cc
@@ -5,6 +5,7 @@
#include "base/command_line.h"
#include "base/strings/stringprintf.h"
#include "base/strings/utf_string_conversions.h"
+#include "build/build_config.h"
#include "content/browser/accessibility/browser_accessibility.h"
#include "content/browser/accessibility/browser_accessibility_manager.h"
#include "content/browser/accessibility/browser_accessibility_state_impl.h"
diff --git a/content/browser/accessibility/snapshot_ax_tree_browsertest.cc b/content/browser/accessibility/snapshot_ax_tree_browsertest.cc
index af82404..da6201f 100644
--- a/content/browser/accessibility/snapshot_ax_tree_browsertest.cc
+++ b/content/browser/accessibility/snapshot_ax_tree_browsertest.cc
@@ -3,6 +3,7 @@
// found in the LICENSE file.
#include "base/callback.h"
+#include "base/macros.h"
#include "content/browser/web_contents/web_contents_impl.h"
#include "content/public/test/content_browser_test.h"
#include "content/public/test/content_browser_test_utils.h"
diff --git a/content/browser/accessibility/touch_accessibility_aura_browsertest.cc b/content/browser/accessibility/touch_accessibility_aura_browsertest.cc
index fccadc4..0e2e0cc 100644
--- a/content/browser/accessibility/touch_accessibility_aura_browsertest.cc
+++ b/content/browser/accessibility/touch_accessibility_aura_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 "base/macros.h"
#include "base/strings/string_number_conversions.h"
#include "content/browser/accessibility/browser_accessibility.h"
#include "content/browser/web_contents/web_contents_impl.h"
diff --git a/content/browser/appcache/appcache.cc b/content/browser/appcache/appcache.cc
index aa0b224..f97d9cc 100644
--- a/content/browser/appcache/appcache.cc
+++ b/content/browser/appcache/appcache.cc
@@ -4,6 +4,8 @@
#include "content/browser/appcache/appcache.h"
+#include <stddef.h>
+
#include <algorithm>
#include "base/logging.h"
@@ -16,7 +18,7 @@
namespace content {
-AppCache::AppCache(AppCacheStorage* storage, int64 cache_id)
+AppCache::AppCache(AppCacheStorage* storage, int64_t cache_id)
: cache_id_(cache_id),
owning_group_(NULL),
online_whitelist_all_(false),
@@ -73,7 +75,8 @@ AppCacheEntry* AppCache::GetEntry(const GURL& url) {
}
const AppCacheEntry* AppCache::GetEntryAndUrlWithResponseId(
- int64 response_id, GURL* optional_url_out) {
+ int64_t response_id,
+ GURL* optional_url_out) {
for (EntryMap::const_iterator iter = entries_.begin();
iter != entries_.end(); ++iter) {
if (iter->second.response_id() == response_id) {
@@ -85,7 +88,7 @@ const AppCacheEntry* AppCache::GetEntryAndUrlWithResponseId(
return NULL;
}
-AppCacheExecutableHandler* AppCache::GetExecutableHandler(int64 response_id) {
+AppCacheExecutableHandler* AppCache::GetExecutableHandler(int64_t response_id) {
HandlerMap::const_iterator found = executable_handlers_.find(response_id);
if (found != executable_handlers_.end())
return found->second;
@@ -93,7 +96,8 @@ AppCacheExecutableHandler* AppCache::GetExecutableHandler(int64 response_id) {
}
AppCacheExecutableHandler* AppCache::GetOrCreateExecutableHandler(
- int64 response_id, net::IOBuffer* handler_source) {
+ int64_t response_id,
+ net::IOBuffer* handler_source) {
AppCacheExecutableHandler* handler = GetExecutableHandler(response_id);
if (handler)
return handler;
diff --git a/content/browser/appcache/appcache.h b/content/browser/appcache/appcache.h
index a444579..f619252 100644
--- a/content/browser/appcache/appcache.h
+++ b/content/browser/appcache/appcache.h
@@ -5,11 +5,14 @@
#ifndef CONTENT_BROWSER_APPCACHE_APPCACHE_H_
#define CONTENT_BROWSER_APPCACHE_APPCACHE_H_
+#include <stdint.h>
+
#include <map>
#include <set>
#include <vector>
#include "base/gtest_prod_util.h"
+#include "base/macros.h"
#include "base/memory/ref_counted.h"
#include "base/time/time.h"
#include "content/browser/appcache/appcache_database.h"
@@ -42,9 +45,9 @@ class CONTENT_EXPORT AppCache
typedef std::map<GURL, AppCacheEntry> EntryMap;
typedef std::set<AppCacheHost*> AppCacheHosts;
- AppCache(AppCacheStorage* storage, int64 cache_id);
+ AppCache(AppCacheStorage* storage, int64_t cache_id);
- int64 cache_id() const { return cache_id_; }
+ int64_t cache_id() const { return cache_id_; }
AppCacheGroup* owning_group() const { return owning_group_.get(); }
@@ -64,11 +67,11 @@ class CONTENT_EXPORT AppCache
// Do not store or delete the returned ptr, they're owned by 'this'.
AppCacheEntry* GetEntry(const GURL& url);
- const AppCacheEntry* GetEntryWithResponseId(int64 response_id) {
+ const AppCacheEntry* GetEntryWithResponseId(int64_t response_id) {
return GetEntryAndUrlWithResponseId(response_id, NULL);
}
- const AppCacheEntry* GetEntryAndUrlWithResponseId(
- int64 response_id, GURL* optional_url);
+ const AppCacheEntry* GetEntryAndUrlWithResponseId(int64_t response_id,
+ GURL* optional_url);
const EntryMap& entries() const { return entries_; }
// The AppCache owns the collection of executable handlers that have
@@ -76,9 +79,10 @@ class CONTENT_EXPORT AppCache
// handler returning null if not found, the GetOrCreate method will
// cons one up if not found.
// Do not store the returned ptrs, they're owned by 'this'.
- AppCacheExecutableHandler* GetExecutableHandler(int64 response_id);
+ AppCacheExecutableHandler* GetExecutableHandler(int64_t response_id);
AppCacheExecutableHandler* GetOrCreateExecutableHandler(
- int64 response_id, net::IOBuffer* handler_source);
+ int64_t response_id,
+ net::IOBuffer* handler_source);
// Returns the URL of the resource used as entry for 'namespace_url'.
GURL GetFallbackEntryUrl(const GURL& namespace_url) const {
@@ -105,7 +109,7 @@ class CONTENT_EXPORT AppCache
base::Time update_time() const { return update_time_; }
- int64 cache_size() const { return cache_size_; }
+ int64_t cache_size() const { return cache_size_; }
void set_update_time(base::Time ticks) { update_time_ = ticks; }
@@ -176,7 +180,7 @@ class CONTENT_EXPORT AppCache
}
void UnassociateHost(AppCacheHost* host);
- const int64 cache_id_;
+ const int64_t cache_id_;
scoped_refptr<AppCacheGroup> owning_group_;
AppCacheHosts associated_hosts_;
@@ -192,9 +196,9 @@ class CONTENT_EXPORT AppCache
// when this cache was last updated
base::Time update_time_;
- int64 cache_size_;
+ int64_t cache_size_;
- typedef std::map<int64, AppCacheExecutableHandler*> HandlerMap;
+ typedef std::map<int64_t, AppCacheExecutableHandler*> HandlerMap;
HandlerMap executable_handlers_;
// to notify storage when cache is deleted
diff --git a/content/browser/appcache/appcache_backend_impl.cc b/content/browser/appcache/appcache_backend_impl.cc
index 01eed000..c3bb533 100644
--- a/content/browser/appcache/appcache_backend_impl.cc
+++ b/content/browser/appcache/appcache_backend_impl.cc
@@ -65,7 +65,7 @@ bool AppCacheBackendImpl::SetSpawningHostId(
bool AppCacheBackendImpl::SelectCache(
int host_id,
const GURL& document_url,
- const int64 cache_document_was_loaded_from,
+ const int64_t cache_document_was_loaded_from,
const GURL& manifest_url) {
AppCacheHost* host = GetHost(host_id);
if (!host)
@@ -84,8 +84,8 @@ bool AppCacheBackendImpl::SelectCacheForWorker(
return host->SelectCacheForWorker(parent_process_id, parent_host_id);
}
-bool AppCacheBackendImpl::SelectCacheForSharedWorker(
- int host_id, int64 appcache_id) {
+bool AppCacheBackendImpl::SelectCacheForSharedWorker(int host_id,
+ int64_t appcache_id) {
AppCacheHost* host = GetHost(host_id);
if (!host)
return false;
@@ -96,7 +96,7 @@ bool AppCacheBackendImpl::SelectCacheForSharedWorker(
bool AppCacheBackendImpl::MarkAsForeignEntry(
int host_id,
const GURL& document_url,
- int64 cache_document_was_loaded_from) {
+ int64_t cache_document_was_loaded_from) {
AppCacheHost* host = GetHost(host_id);
if (!host)
return false;
diff --git a/content/browser/appcache/appcache_backend_impl.h b/content/browser/appcache/appcache_backend_impl.h
index bd6f440..b0136b4 100644
--- a/content/browser/appcache/appcache_backend_impl.h
+++ b/content/browser/appcache/appcache_backend_impl.h
@@ -5,6 +5,8 @@
#ifndef CONTENT_BROWSER_APPCACHE_APPCACHE_BACKEND_IMPL_H_
#define CONTENT_BROWSER_APPCACHE_APPCACHE_BACKEND_IMPL_H_
+#include <stdint.h>
+
#include "base/containers/hash_tables.h"
#include "content/browser/appcache/appcache_host.h"
#include "content/common/content_export.h"
@@ -32,15 +34,16 @@ class CONTENT_EXPORT AppCacheBackendImpl {
bool SetSpawningHostId(int host_id, int spawning_host_id);
bool SelectCache(int host_id,
const GURL& document_url,
- const int64 cache_document_was_loaded_from,
+ const int64_t cache_document_was_loaded_from,
const GURL& manifest_url);
void GetResourceList(
int host_id, std::vector<AppCacheResourceInfo>* resource_infos);
bool SelectCacheForWorker(int host_id, int parent_process_id,
int parent_host_id);
- bool SelectCacheForSharedWorker(int host_id, int64 appcache_id);
- bool MarkAsForeignEntry(int host_id, const GURL& document_url,
- int64 cache_document_was_loaded_from);
+ bool SelectCacheForSharedWorker(int host_id, int64_t appcache_id);
+ bool MarkAsForeignEntry(int host_id,
+ const GURL& document_url,
+ int64_t cache_document_was_loaded_from);
bool GetStatusWithCallback(int host_id, const GetStatusCallback& callback,
void* callback_param);
bool StartUpdateWithCallback(int host_id, const StartUpdateCallback& callback,
diff --git a/content/browser/appcache/appcache_database.cc b/content/browser/appcache/appcache_database.cc
index aaa2ed2..f9e83ac 100644
--- a/content/browser/appcache/appcache_database.cc
+++ b/content/browser/appcache/appcache_database.cc
@@ -9,6 +9,7 @@
#include "base/command_line.h"
#include "base/files/file_util.h"
#include "base/logging.h"
+#include "base/macros.h"
#include "base/strings/utf_string_conversions.h"
#include "content/browser/appcache/appcache_entry.h"
#include "content/browser/appcache/appcache_histograms.h"
diff --git a/content/browser/appcache/appcache_database.h b/content/browser/appcache/appcache_database.h
index 2b628a3..a6f017e 100644
--- a/content/browser/appcache/appcache_database.h
+++ b/content/browser/appcache/appcache_database.h
@@ -13,6 +13,7 @@
#include "base/files/file_path.h"
#include "base/gtest_prod_util.h"
+#include "base/macros.h"
#include "base/memory/scoped_ptr.h"
#include "base/time/time.h"
#include "content/common/appcache_interfaces.h"
diff --git a/content/browser/appcache/appcache_database_unittest.cc b/content/browser/appcache/appcache_database_unittest.cc
index 2f09a02..79751d9 100644
--- a/content/browser/appcache/appcache_database_unittest.cc
+++ b/content/browser/appcache/appcache_database_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 <stdint.h>
+
#include <limits>
#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 "content/browser/appcache/appcache_database.h"
#include "content/browser/appcache/appcache_entry.h"
diff --git a/content/browser/appcache/appcache_dispatcher_host.cc b/content/browser/appcache/appcache_dispatcher_host.cc
index 6a864f7..2eb90dd 100644
--- a/content/browser/appcache/appcache_dispatcher_host.cc
+++ b/content/browser/appcache/appcache_dispatcher_host.cc
@@ -23,7 +23,7 @@ AppCacheDispatcherHost::AppCacheDispatcherHost(
weak_factory_(this) {
}
-void AppCacheDispatcherHost::OnChannelConnected(int32 peer_pid) {
+void AppCacheDispatcherHost::OnChannelConnected(int32_t peer_pid) {
if (appcache_service_.get()) {
backend_impl_.Initialize(
appcache_service_.get(), &frontend_proxy_, process_id_);
@@ -89,8 +89,9 @@ void AppCacheDispatcherHost::OnSetSpawningHostId(
}
void AppCacheDispatcherHost::OnSelectCache(
- int host_id, const GURL& document_url,
- int64 cache_document_was_loaded_from,
+ int host_id,
+ const GURL& document_url,
+ int64_t cache_document_was_loaded_from,
const GURL& opt_manifest_url) {
if (appcache_service_.get()) {
if (!backend_impl_.SelectCache(host_id,
@@ -117,8 +118,8 @@ void AppCacheDispatcherHost::OnSelectCacheForWorker(
}
}
-void AppCacheDispatcherHost::OnSelectCacheForSharedWorker(
- int host_id, int64 appcache_id) {
+void AppCacheDispatcherHost::OnSelectCacheForSharedWorker(int host_id,
+ int64_t appcache_id) {
if (appcache_service_.get()) {
if (!backend_impl_.SelectCacheForSharedWorker(host_id, appcache_id))
bad_message::ReceivedBadMessage(
@@ -129,8 +130,9 @@ void AppCacheDispatcherHost::OnSelectCacheForSharedWorker(
}
void AppCacheDispatcherHost::OnMarkAsForeignEntry(
- int host_id, const GURL& document_url,
- int64 cache_document_was_loaded_from) {
+ int host_id,
+ const GURL& document_url,
+ int64_t cache_document_was_loaded_from) {
if (appcache_service_.get()) {
if (!backend_impl_.MarkAsForeignEntry(
host_id, document_url, cache_document_was_loaded_from)) {
diff --git a/content/browser/appcache/appcache_dispatcher_host.h b/content/browser/appcache/appcache_dispatcher_host.h
index f8909a8..4181b439 100644
--- a/content/browser/appcache/appcache_dispatcher_host.h
+++ b/content/browser/appcache/appcache_dispatcher_host.h
@@ -5,8 +5,11 @@
#ifndef CONTENT_BROWSER_APPCACHE_APPCACHE_DISPATCHER_HOST_H_
#define CONTENT_BROWSER_APPCACHE_APPCACHE_DISPATCHER_HOST_H_
+#include <stdint.h>
+
#include <vector>
+#include "base/macros.h"
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
#include "base/memory/weak_ptr.h"
@@ -28,7 +31,7 @@ class AppCacheDispatcherHost : public BrowserMessageFilter {
int process_id);
// BrowserIOMessageFilter implementation
- void OnChannelConnected(int32 peer_pid) override;
+ void OnChannelConnected(int32_t peer_pid) override;
bool OnMessageReceived(const IPC::Message& message) override;
protected:
@@ -39,14 +42,16 @@ class AppCacheDispatcherHost : public BrowserMessageFilter {
void OnRegisterHost(int host_id);
void OnUnregisterHost(int host_id);
void OnSetSpawningHostId(int host_id, int spawning_host_id);
- void OnSelectCache(int host_id, const GURL& document_url,
- int64 cache_document_was_loaded_from,
+ void OnSelectCache(int host_id,
+ const GURL& document_url,
+ int64_t cache_document_was_loaded_from,
const GURL& opt_manifest_url);
void OnSelectCacheForWorker(int host_id, int parent_process_id,
int parent_host_id);
- void OnSelectCacheForSharedWorker(int host_id, int64 appcache_id);
- void OnMarkAsForeignEntry(int host_id, const GURL& document_url,
- int64 cache_document_was_loaded_from);
+ void OnSelectCacheForSharedWorker(int host_id, int64_t appcache_id);
+ void OnMarkAsForeignEntry(int host_id,
+ const GURL& document_url,
+ int64_t cache_document_was_loaded_from);
void OnGetStatus(int host_id, IPC::Message* reply_msg);
void OnStartUpdate(int host_id, IPC::Message* reply_msg);
void OnSwapCache(int host_id, IPC::Message* reply_msg);
diff --git a/content/browser/appcache/appcache_entry.h b/content/browser/appcache/appcache_entry.h
index 7aaf425..3c3b89e 100644
--- a/content/browser/appcache/appcache_entry.h
+++ b/content/browser/appcache/appcache_entry.h
@@ -5,6 +5,8 @@
#ifndef CONTENT_BROWSER_APPCACHE_APPCACHE_ENTRY_H_
#define CONTENT_BROWSER_APPCACHE_APPCACHE_ENTRY_H_
+#include <stdint.h>
+
#include "content/common/appcache_interfaces.h"
namespace content {
@@ -33,11 +35,13 @@ class AppCacheEntry {
explicit AppCacheEntry(int type)
: types_(type), response_id_(kAppCacheNoResponseId), response_size_(0) {}
- AppCacheEntry(int type, int64 response_id)
- : types_(type), response_id_(response_id), response_size_(0) {}
+ AppCacheEntry(int type, int64_t response_id)
+ : types_(type), response_id_(response_id), response_size_(0) {}
- AppCacheEntry(int type, int64 response_id, int64 response_size)
- : types_(type), response_id_(response_id), response_size_(response_size) {}
+ AppCacheEntry(int type, int64_t response_id, int64_t response_size)
+ : types_(type),
+ response_id_(response_id),
+ response_size_(response_size) {}
int types() const { return types_; }
void add_types(int added_types) { types_ |= added_types; }
@@ -49,17 +53,17 @@ class AppCacheEntry {
bool IsIntercept() const { return (types_ & INTERCEPT) != 0; }
bool IsExecutable() const { return (types_ & EXECUTABLE) != 0; }
- int64 response_id() const { return response_id_; }
- void set_response_id(int64 id) { response_id_ = id; }
+ int64_t response_id() const { return response_id_; }
+ void set_response_id(int64_t id) { response_id_ = id; }
bool has_response_id() const { return response_id_ != kAppCacheNoResponseId; }
- int64 response_size() const { return response_size_; }
- void set_response_size(int64 size) { response_size_ = size; }
+ int64_t response_size() const { return response_size_; }
+ void set_response_size(int64_t size) { response_size_ = size; }
private:
int types_;
- int64 response_id_;
- int64 response_size_;
+ int64_t response_id_;
+ int64_t response_size_;
};
} // namespace content
diff --git a/content/browser/appcache/appcache_group.cc b/content/browser/appcache/appcache_group.cc
index 86660c2..8efd709 100644
--- a/content/browser/appcache/appcache_group.cc
+++ b/content/browser/appcache/appcache_group.cc
@@ -40,7 +40,7 @@ class AppCacheGroup::HostObserver : public AppCacheHost::Observer {
AppCacheGroup::AppCacheGroup(AppCacheStorage* storage,
const GURL& manifest_url,
- int64 group_id)
+ int64_t group_id)
: group_id_(group_id),
manifest_url_(manifest_url),
update_status_(IDLE),
@@ -137,7 +137,7 @@ void AppCacheGroup::RemoveCache(AppCache* cache) {
}
void AppCacheGroup::AddNewlyDeletableResponseIds(
- std::vector<int64>* response_ids) {
+ std::vector<int64_t>* response_ids) {
if (is_being_deleted() || (!is_obsolete() && old_caches_.empty())) {
storage_->DeleteResponses(manifest_url_, *response_ids);
response_ids->clear();
diff --git a/content/browser/appcache/appcache_group.h b/content/browser/appcache/appcache_group.h
index be29635..626deb7 100644
--- a/content/browser/appcache/appcache_group.h
+++ b/content/browser/appcache/appcache_group.h
@@ -5,12 +5,15 @@
#ifndef CONTENT_BROWSER_APPCACHE_APPCACHE_GROUP_H_
#define CONTENT_BROWSER_APPCACHE_APPCACHE_GROUP_H_
+#include <stdint.h>
+
#include <map>
#include <utility>
#include <vector>
#include "base/cancelable_callback.h"
#include "base/gtest_prod_util.h"
+#include "base/macros.h"
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
#include "base/observer_list.h"
@@ -51,15 +54,16 @@ class CONTENT_EXPORT AppCacheGroup
DOWNLOADING,
};
- AppCacheGroup(AppCacheStorage* storage, const GURL& manifest_url,
- int64 group_id);
+ AppCacheGroup(AppCacheStorage* storage,
+ const GURL& manifest_url,
+ int64_t group_id);
// Adds/removes an update observer, the AppCacheGroup does not take
// ownership of the observer.
void AddUpdateObserver(UpdateObserver* observer);
void RemoveUpdateObserver(UpdateObserver* observer);
- int64 group_id() const { return group_id_; }
+ int64_t group_id() const { return group_id_; }
const GURL& manifest_url() const { return manifest_url_; }
base::Time creation_time() const { return creation_time_; }
void set_creation_time(base::Time time) { creation_time_ = time; }
@@ -86,7 +90,7 @@ class CONTENT_EXPORT AppCacheGroup
void RemoveCache(AppCache* cache);
bool HasCache() const { return newest_complete_cache_ != NULL; }
- void AddNewlyDeletableResponseIds(std::vector<int64>* response_ids);
+ void AddNewlyDeletableResponseIds(std::vector<int64_t>* response_ids);
UpdateAppCacheStatus update_status() const { return update_status_; }
@@ -141,13 +145,13 @@ class CONTENT_EXPORT AppCacheGroup
void ScheduleUpdateRestart(int delay_ms);
void HostDestructionImminent(AppCacheHost* host);
- const int64 group_id_;
+ const int64_t group_id_;
const GURL manifest_url_;
base::Time creation_time_;
UpdateAppCacheStatus update_status_;
bool is_obsolete_;
bool is_being_deleted_;
- std::vector<int64> newly_deletable_response_ids_;
+ std::vector<int64_t> newly_deletable_response_ids_;
// Most update checks respect the cache control headers of the manifest
// resource, but we bypass the http cache for a "full" update check after 24
diff --git a/content/browser/appcache/appcache_group_unittest.cc b/content/browser/appcache/appcache_group_unittest.cc
index 64e321d..180e522 100644
--- a/content/browser/appcache/appcache_group_unittest.cc
+++ b/content/browser/appcache/appcache_group_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 <string>
#include "base/message_loop/message_loop.h"
@@ -51,7 +53,7 @@ class TestAppCacheFrontend : public content::AppCacheFrontend {
void OnContentBlocked(int host_id, const GURL& manifest_url) override {}
int last_host_id_;
- int64 last_cache_id_;
+ int64_t last_cache_id_;
content::AppCacheStatus last_status_;
};
diff --git a/content/browser/appcache/appcache_histograms.h b/content/browser/appcache/appcache_histograms.h
index 0fcc54c..57ba1f8 100644
--- a/content/browser/appcache/appcache_histograms.h
+++ b/content/browser/appcache/appcache_histograms.h
@@ -5,7 +5,7 @@
#ifndef CONTENT_BROWSER_APPCACHE_APPCACHE_HISTOGRAMS_H_
#define CONTENT_BROWSER_APPCACHE_APPCACHE_HISTOGRAMS_H_
-#include "base/basictypes.h"
+#include "base/macros.h"
#include "content/browser/appcache/appcache_update_job.h"
namespace base {
diff --git a/content/browser/appcache/appcache_host.cc b/content/browser/appcache/appcache_host.cc
index 9ec45f6..697b2bd 100644
--- a/content/browser/appcache/appcache_host.cc
+++ b/content/browser/appcache/appcache_host.cc
@@ -81,7 +81,7 @@ void AppCacheHost::RemoveObserver(Observer* observer) {
}
bool AppCacheHost::SelectCache(const GURL& document_url,
- const int64 cache_document_was_loaded_from,
+ const int64_t cache_document_was_loaded_from,
const GURL& manifest_url) {
if (was_select_cache_called_)
return false;
@@ -170,7 +170,7 @@ bool AppCacheHost::SelectCacheForWorker(int parent_process_id,
return true;
}
-bool AppCacheHost::SelectCacheForSharedWorker(int64 appcache_id) {
+bool AppCacheHost::SelectCacheForSharedWorker(int64_t appcache_id) {
if (was_select_cache_called_)
return false;
@@ -190,7 +190,7 @@ bool AppCacheHost::SelectCacheForSharedWorker(int64 appcache_id) {
// TODO(michaeln): change method name to MarkEntryAsForeign for consistency
bool AppCacheHost::MarkAsForeignEntry(const GURL& document_url,
- int64 cache_document_was_loaded_from) {
+ int64_t cache_document_was_loaded_from) {
if (was_select_cache_called_)
return false;
@@ -378,13 +378,13 @@ void AppCacheHost::OnGroupLoaded(AppCacheGroup* group,
FinishCacheSelection(NULL, group);
}
-void AppCacheHost::LoadSelectedCache(int64 cache_id) {
+void AppCacheHost::LoadSelectedCache(int64_t cache_id) {
DCHECK(cache_id != kAppCacheNoCacheId);
pending_selected_cache_id_ = cache_id;
storage()->LoadCache(cache_id, this);
}
-void AppCacheHost::OnCacheLoaded(AppCache* cache, int64 cache_id) {
+void AppCacheHost::OnCacheLoaded(AppCache* cache, int64_t cache_id) {
if (cache_id == pending_main_resource_cache_id_) {
pending_main_resource_cache_id_ = kAppCacheNoCacheId;
main_resource_cache_ = cache;
@@ -503,7 +503,7 @@ void AppCacheHost::SetSwappableCache(AppCacheGroup* group) {
}
}
-void AppCacheHost::LoadMainResourceCache(int64 cache_id) {
+void AppCacheHost::LoadMainResourceCache(int64_t cache_id) {
DCHECK(cache_id != kAppCacheNoCacheId);
if (pending_main_resource_cache_id_ == cache_id ||
(main_resource_cache_.get() &&
diff --git a/content/browser/appcache/appcache_host.h b/content/browser/appcache/appcache_host.h
index 3818f30..c5103c2 100644
--- a/content/browser/appcache/appcache_host.h
+++ b/content/browser/appcache/appcache_host.h
@@ -5,8 +5,11 @@
#ifndef CONTENT_BROWSER_APPCACHE_APPCACHE_HOST_H_
#define CONTENT_BROWSER_APPCACHE_APPCACHE_HOST_H_
+#include <stdint.h>
+
#include "base/callback.h"
#include "base/gtest_prod_util.h"
+#include "base/macros.h"
#include "base/memory/ref_counted.h"
#include "base/observer_list.h"
#include "content/browser/appcache/appcache_group.h"
@@ -78,13 +81,13 @@ class CONTENT_EXPORT AppCacheHost
// Support for cache selection and scriptable method calls.
bool SelectCache(const GURL& document_url,
- const int64 cache_document_was_loaded_from,
+ const int64_t cache_document_was_loaded_from,
const GURL& manifest_url);
bool SelectCacheForWorker(int parent_process_id,
int parent_host_id);
- bool SelectCacheForSharedWorker(int64 appcache_id);
+ bool SelectCacheForSharedWorker(int64_t appcache_id);
bool MarkAsForeignEntry(const GURL& document_url,
- int64 cache_document_was_loaded_from);
+ int64_t cache_document_was_loaded_from);
void GetStatusWithCallback(const GetStatusCallback& callback,
void* callback_param);
void StartUpdateWithCallback(const StartUpdateCallback& callback,
@@ -143,7 +146,7 @@ class CONTENT_EXPORT AppCacheHost
void SetSwappableCache(AppCacheGroup* group);
// Used to ensure that a loaded appcache survives a frame navigation.
- void LoadMainResourceCache(int64 cache_id);
+ void LoadMainResourceCache(int64_t cache_id);
// Used to notify the host that a namespace resource is being delivered as
// the main resource of the page and to provide its url.
@@ -187,14 +190,14 @@ class CONTENT_EXPORT AppCacheHost
friend class content::AppCacheUpdateJobTest;
AppCacheStatus GetStatus();
- void LoadSelectedCache(int64 cache_id);
+ void LoadSelectedCache(int64_t cache_id);
void LoadOrCreateGroup(const GURL& manifest_url);
// See public Associate*Host() methods above.
void AssociateCacheHelper(AppCache* cache, const GURL& manifest_url);
// AppCacheStorage::Delegate impl
- void OnCacheLoaded(AppCache* cache, int64 cache_id) override;
+ void OnCacheLoaded(AppCache* cache, int64_t cache_id) override;
void OnGroupLoaded(AppCacheGroup* group, const GURL& manifest_url) override;
// AppCacheServiceImpl::Observer impl
void OnServiceReinitialized(
@@ -262,12 +265,12 @@ class CONTENT_EXPORT AppCacheHost
// Keep a reference to the cache of the main resource so it survives frame
// navigations.
scoped_refptr<AppCache> main_resource_cache_;
- int64 pending_main_resource_cache_id_;
+ int64_t pending_main_resource_cache_id_;
// Cache loading is async, if we're loading a specific cache or group
// for the purposes of cache selection, one or the other of these will
// indicate which cache or group is being loaded.
- int64 pending_selected_cache_id_;
+ int64_t pending_selected_cache_id_;
GURL pending_selected_manifest_url_;
// Used to defend against bad IPC messages.
diff --git a/content/browser/appcache/appcache_host_unittest.cc b/content/browser/appcache/appcache_host_unittest.cc
index 255bfa9..ee935c1 100644
--- a/content/browser/appcache/appcache_host_unittest.cc
+++ b/content/browser/appcache/appcache_host_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/bind.h"
#include "base/bind_helpers.h"
#include "base/memory/scoped_ptr.h"
@@ -79,7 +81,7 @@ class AppCacheHostTest : public testing::Test {
}
int last_host_id_;
- int64 last_cache_id_;
+ int64_t last_cache_id_;
AppCacheStatus last_status_;
AppCacheStatus last_status_changed_;
AppCacheEventID last_event_id_;
@@ -98,7 +100,7 @@ class AppCacheHostTest : public testing::Test {
void NotifyStorageModified(storage::QuotaClient::ID client_id,
const GURL& origin,
storage::StorageType type,
- int64 delta) override {}
+ int64_t delta) override {}
void SetUsageCacheEnabled(storage::QuotaClient::ID client_id,
const GURL& origin,
storage::StorageType type,
diff --git a/content/browser/appcache/appcache_interceptor.cc b/content/browser/appcache/appcache_interceptor.cc
index 4ca2c69..81985fe 100644
--- a/content/browser/appcache/appcache_interceptor.cc
+++ b/content/browser/appcache/appcache_interceptor.cc
@@ -55,7 +55,7 @@ void AppCacheInterceptor::SetExtraRequestInfo(
}
void AppCacheInterceptor::GetExtraResponseInfo(net::URLRequest* request,
- int64* cache_id,
+ int64_t* cache_id,
GURL* manifest_url) {
DCHECK(*cache_id == kAppCacheNoCacheId);
DCHECK(manifest_url->is_empty());
diff --git a/content/browser/appcache/appcache_interceptor.h b/content/browser/appcache/appcache_interceptor.h
index be8110d..0e50983 100644
--- a/content/browser/appcache/appcache_interceptor.h
+++ b/content/browser/appcache/appcache_interceptor.h
@@ -5,7 +5,9 @@
#ifndef CONTENT_BROWSER_APPCACHE_APPCACHE_INTERCEPTOR_H_
#define CONTENT_BROWSER_APPCACHE_APPCACHE_INTERCEPTOR_H_
-#include "base/basictypes.h"
+#include <stdint.h>
+
+#include "base/macros.h"
#include "content/common/content_export.h"
#include "content/public/common/resource_type.h"
#include "net/url_request/url_request_interceptor.h"
@@ -35,7 +37,7 @@ class CONTENT_EXPORT AppCacheInterceptor : public net::URLRequestInterceptor {
// May be called after response headers are complete to retrieve extra
// info about the response.
static void GetExtraResponseInfo(net::URLRequest* request,
- int64* cache_id,
+ int64_t* cache_id,
GURL* manifest_url);
// Methods to support cross site navigations.
diff --git a/content/browser/appcache/appcache_internals_ui.cc b/content/browser/appcache/appcache_internals_ui.cc
index dfd06b1..3abd692 100644
--- a/content/browser/appcache/appcache_internals_ui.cc
+++ b/content/browser/appcache/appcache_internals_ui.cc
@@ -4,6 +4,8 @@
#include "content/browser/appcache/appcache_internals_ui.h"
+#include <stddef.h>
+
#include "base/bind.h"
#include "base/logging.h"
#include "base/strings/string_number_conversions.h"
@@ -42,8 +44,8 @@ const char kFunctionOnAppCacheDetailsReady[] =
const char kFunctionOnFileDetailsReady[] = "appcache.onFileDetailsReady";
const char kFunctionOnFileDetailsFailed[] = "appcache.onFileDetailsFailed";
-int64 ToInt64(const std::string& str) {
- int64 i = 0;
+int64_t ToInt64(const std::string& str) {
+ int64_t i = 0;
base::StringToInt64(str.c_str(), &i);
return i;
}
@@ -271,7 +273,7 @@ void AppCacheInternalsUI::Proxy::HandleFileDetailsRequest() {
void AppCacheInternalsUI::Proxy::OnResponseInfoLoaded(
AppCacheResponseInfo* response,
- int64 response_id) {
+ int64_t response_id) {
if (shutdown_called_)
return;
if (!appcache_service_)
@@ -280,8 +282,8 @@ void AppCacheInternalsUI::Proxy::OnResponseInfoLoaded(
response_enquiries_.pop_front();
if (response) {
scoped_refptr<AppCacheResponseInfo> response_info = response;
- const int64 kLimit = 100 * 1000;
- int64 amount_to_read =
+ const int64_t kLimit = 100 * 1000;
+ int64_t amount_to_read =
std::min(kLimit, response_info->response_data_size());
scoped_refptr<net::IOBuffer> response_data(new net::IOBuffer(
base::CheckedNumeric<size_t>(amount_to_read).ValueOrDie()));
diff --git a/content/browser/appcache/appcache_internals_ui.h b/content/browser/appcache/appcache_internals_ui.h
index 3b2ddfa..f5498db 100644
--- a/content/browser/appcache/appcache_internals_ui.h
+++ b/content/browser/appcache/appcache_internals_ui.h
@@ -5,8 +5,11 @@
#ifndef CONTENT_BROWSER_APPCACHE_APPCACHE_INTERNALS_UI_H_
#define CONTENT_BROWSER_APPCACHE_APPCACHE_INTERNALS_UI_H_
+#include <stdint.h>
+
#include <list>
+#include "base/macros.h"
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
#include "content/browser/appcache/appcache_group.h"
@@ -40,8 +43,8 @@ class AppCacheInternalsUI : public WebUIController {
struct ResponseEnquiry {
std::string manifest_url;
- int64 group_id;
- int64 response_id;
+ int64_t group_id;
+ int64_t response_id;
};
private:
@@ -64,7 +67,7 @@ class AppCacheInternalsUI : public WebUIController {
void OnGroupLoaded(AppCacheGroup* appcache_group,
const GURL& manifest_gurl) override;
void OnResponseInfoLoaded(AppCacheResponseInfo* response_info,
- int64 response_id) override;
+ int64_t response_id) override;
void OnResponseDataReadComplete(
const ResponseEnquiry& response_enquiry,
scoped_refptr<AppCacheResponseInfo> response_info,
diff --git a/content/browser/appcache/appcache_manifest_parser.cc b/content/browser/appcache/appcache_manifest_parser.cc
index bf936c2..8189858 100644
--- a/content/browser/appcache/appcache_manifest_parser.cc
+++ b/content/browser/appcache/appcache_manifest_parser.cc
@@ -31,9 +31,12 @@
#include "content/browser/appcache/appcache_manifest_parser.h"
+#include <stddef.h>
+
#include "base/command_line.h"
#include "base/i18n/icu_string_conversions.h"
#include "base/logging.h"
+#include "base/macros.h"
#include "base/strings/utf_string_conversions.h"
#include "url/gurl.h"
diff --git a/content/browser/appcache/appcache_manifest_parser_unittest.cc b/content/browser/appcache/appcache_manifest_parser_unittest.cc
index 6dd8c27..4f3d2f4 100644
--- a/content/browser/appcache/appcache_manifest_parser_unittest.cc
+++ b/content/browser/appcache/appcache_manifest_parser_unittest.cc
@@ -2,8 +2,11 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include <stddef.h>
+
#include <string>
+#include "base/macros.h"
#include "content/browser/appcache/appcache_manifest_parser.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "url/gurl.h"
diff --git a/content/browser/appcache/appcache_quota_client.h b/content/browser/appcache/appcache_quota_client.h
index e5c1251..d552831 100644
--- a/content/browser/appcache/appcache_quota_client.h
+++ b/content/browser/appcache/appcache_quota_client.h
@@ -9,6 +9,7 @@
#include <map>
#include <string>
+#include "base/macros.h"
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
#include "content/browser/appcache/appcache_storage.h"
diff --git a/content/browser/appcache/appcache_quota_client_unittest.cc b/content/browser/appcache/appcache_quota_client_unittest.cc
index de17324..a9e1be0 100644
--- a/content/browser/appcache/appcache_quota_client_unittest.cc
+++ b/content/browser/appcache/appcache_quota_client_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 <map>
#include <set>
@@ -36,9 +38,9 @@ class AppCacheQuotaClientTest : public testing::Test {
num_delete_origins_completions_(0),
weak_factory_(this) {}
- int64 GetOriginUsage(storage::QuotaClient* client,
- const GURL& origin,
- storage::StorageType type) {
+ int64_t GetOriginUsage(storage::QuotaClient* client,
+ const GURL& origin,
+ storage::StorageType type) {
usage_ = -1;
AsyncGetOriginUsage(client, origin, type);
base::RunLoop().RunUntilIdle();
@@ -106,7 +108,7 @@ class AppCacheQuotaClientTest : public testing::Test {
weak_factory_.GetWeakPtr()));
}
- void SetUsageMapEntry(const GURL& origin, int64 usage) {
+ void SetUsageMapEntry(const GURL& origin, int64_t usage) {
mock_service_.storage()->usage_map_[origin] = usage;
}
@@ -127,7 +129,7 @@ class AppCacheQuotaClientTest : public testing::Test {
}
protected:
- void OnGetOriginUsageComplete(int64 usage) {
+ void OnGetOriginUsageComplete(int64_t usage) {
++num_get_origin_usage_completions_;
usage_ = usage;
}
@@ -143,7 +145,7 @@ class AppCacheQuotaClientTest : public testing::Test {
}
base::MessageLoop message_loop_;
- int64 usage_;
+ int64_t usage_;
std::set<GURL> origins_;
storage::QuotaStatusCode delete_status_;
int num_get_origin_usage_completions_;
diff --git a/content/browser/appcache/appcache_request_handler.cc b/content/browser/appcache/appcache_request_handler.cc
index 450b431..a2d7c48 100644
--- a/content/browser/appcache/appcache_request_handler.cc
+++ b/content/browser/appcache/appcache_request_handler.cc
@@ -175,8 +175,8 @@ AppCacheURLRequestJob* AppCacheRequestHandler::MaybeLoadFallbackForResponse(
return job.release();
}
-void AppCacheRequestHandler::GetExtraResponseInfo(
- int64* cache_id, GURL* manifest_url) {
+void AppCacheRequestHandler::GetExtraResponseInfo(int64_t* cache_id,
+ GURL* manifest_url) {
*cache_id = cache_id_;
*manifest_url = manifest_url_;
}
@@ -222,8 +222,11 @@ void AppCacheRequestHandler::OnDestructionImminent(AppCacheHost* host) {
}
void AppCacheRequestHandler::DeliverAppCachedResponse(
- const AppCacheEntry& entry, int64 cache_id, int64 group_id,
- const GURL& manifest_url, bool is_fallback,
+ const AppCacheEntry& entry,
+ int64_t cache_id,
+ int64_t group_id,
+ const GURL& manifest_url,
+ bool is_fallback,
const GURL& namespace_entry_url) {
DCHECK(host_ && job_.get() && job_->is_waiting());
DCHECK(entry.has_response_id());
@@ -313,9 +316,13 @@ scoped_ptr<AppCacheURLRequestJob> AppCacheRequestHandler::MaybeLoadMainResource(
}
void AppCacheRequestHandler::OnMainResponseFound(
- const GURL& url, const AppCacheEntry& entry,
- const GURL& namespace_entry_url, const AppCacheEntry& fallback_entry,
- int64 cache_id, int64 group_id, const GURL& manifest_url) {
+ const GURL& url,
+ const AppCacheEntry& entry,
+ const GURL& namespace_entry_url,
+ const AppCacheEntry& fallback_entry,
+ int64_t cache_id,
+ int64_t group_id,
+ const GURL& manifest_url) {
DCHECK(host_);
DCHECK(is_main_resource());
DCHECK(!entry.IsForeign());
diff --git a/content/browser/appcache/appcache_request_handler.h b/content/browser/appcache/appcache_request_handler.h
index b801602..d7b55e5 100644
--- a/content/browser/appcache/appcache_request_handler.h
+++ b/content/browser/appcache/appcache_request_handler.h
@@ -5,7 +5,10 @@
#ifndef CONTENT_BROWSER_APPCACHE_APPCACHE_REQUEST_HANDLER_H_
#define CONTENT_BROWSER_APPCACHE_APPCACHE_REQUEST_HANDLER_H_
+#include <stdint.h>
+
#include "base/compiler_specific.h"
+#include "base/macros.h"
#include "base/memory/scoped_ptr.h"
#include "base/memory/weak_ptr.h"
#include "base/supports_user_data.h"
@@ -48,7 +51,7 @@ class CONTENT_EXPORT AppCacheRequestHandler
net::URLRequest* request,
net::NetworkDelegate* network_delegate);
- void GetExtraResponseInfo(int64* cache_id, GURL* manifest_url);
+ void GetExtraResponseInfo(int64_t* cache_id, GURL* manifest_url);
// Methods to support cross site navigations.
void PrepareForCrossSiteTransfer(int old_process_id);
@@ -72,8 +75,10 @@ class CONTENT_EXPORT AppCacheRequestHandler
// Helpers to instruct a waiting job with what response to
// deliver for the request we're handling.
- void DeliverAppCachedResponse(const AppCacheEntry& entry, int64 cache_id,
- int64 group_id, const GURL& manifest_url,
+ void DeliverAppCachedResponse(const AppCacheEntry& entry,
+ int64_t cache_id,
+ int64_t group_id,
+ const GURL& manifest_url,
bool is_fallback,
const GURL& namespace_entry_url);
void DeliverNetworkResponse();
@@ -108,8 +113,8 @@ class CONTENT_EXPORT AppCacheRequestHandler
const AppCacheEntry& entry,
const GURL& fallback_url,
const AppCacheEntry& fallback_entry,
- int64 cache_id,
- int64 group_id,
+ int64_t cache_id,
+ int64_t group_id,
const GURL& mainfest_url) override;
// Sub-resource loading -------------------------------------
@@ -139,8 +144,8 @@ class CONTENT_EXPORT AppCacheRequestHandler
// Info about the type of response we found for delivery.
// These are relevant for both main and subresource requests.
- int64 found_group_id_;
- int64 found_cache_id_;
+ int64_t found_group_id_;
+ int64_t found_cache_id_;
AppCacheEntry found_entry_;
AppCacheEntry found_fallback_entry_;
GURL found_namespace_entry_url_;
diff --git a/content/browser/appcache/appcache_request_handler_unittest.cc b/content/browser/appcache/appcache_request_handler_unittest.cc
index 2d08cc3..4a677f2 100644
--- a/content/browser/appcache/appcache_request_handler_unittest.cc
+++ b/content/browser/appcache/appcache_request_handler_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 <stack>
#include <string>
#include <vector>
@@ -10,6 +12,7 @@
#include "base/bind_helpers.h"
#include "base/callback.h"
#include "base/location.h"
+#include "base/macros.h"
#include "base/memory/weak_ptr.h"
#include "base/single_thread_task_runner.h"
#include "base/synchronization/waitable_event.h"
@@ -269,7 +272,7 @@ class AppCacheRequestHandlerTest : public testing::Test {
EXPECT_FALSE(job_->is_waiting());
EXPECT_TRUE(job_->is_delivering_network_response());
- int64 cache_id = kAppCacheNoCacheId;
+ int64_t cache_id = kAppCacheNoCacheId;
GURL manifest_url;
handler_->GetExtraResponseInfo(&cache_id, &manifest_url);
EXPECT_EQ(kAppCacheNoCacheId, cache_id);
@@ -322,7 +325,7 @@ class AppCacheRequestHandlerTest : public testing::Test {
EXPECT_FALSE(job_->is_waiting());
EXPECT_TRUE(job_->is_delivering_appcache_response());
- int64 cache_id = kAppCacheNoCacheId;
+ int64_t cache_id = kAppCacheNoCacheId;
GURL manifest_url;
handler_->GetExtraResponseInfo(&cache_id, &manifest_url);
EXPECT_EQ(1, cache_id);
@@ -408,7 +411,7 @@ class AppCacheRequestHandlerTest : public testing::Test {
EXPECT_TRUE(job_.get());
EXPECT_TRUE(job_->is_delivering_appcache_response());
- int64 cache_id = kAppCacheNoCacheId;
+ int64_t cache_id = kAppCacheNoCacheId;
GURL manifest_url;
handler_->GetExtraResponseInfo(&cache_id, &manifest_url);
EXPECT_EQ(1, cache_id);
@@ -483,7 +486,7 @@ class AppCacheRequestHandlerTest : public testing::Test {
EXPECT_FALSE(job_.get());
// GetExtraResponseInfo should return no information.
- int64 cache_id = kAppCacheNoCacheId;
+ int64_t cache_id = kAppCacheNoCacheId;
GURL manifest_url;
handler_->GetExtraResponseInfo(&cache_id, &manifest_url);
EXPECT_EQ(kAppCacheNoCacheId, cache_id);
diff --git a/content/browser/appcache/appcache_response.cc b/content/browser/appcache/appcache_response.cc
index eef2454..20a8b8a 100644
--- a/content/browser/appcache/appcache_response.cc
+++ b/content/browser/appcache/appcache_response.cc
@@ -4,6 +4,8 @@
#include "content/browser/appcache/appcache_response.h"
+#include <stddef.h>
+
#include "base/bind.h"
#include "base/bind_helpers.h"
#include "base/compiler_specific.h"
diff --git a/content/browser/appcache/appcache_response_unittest.cc b/content/browser/appcache/appcache_response_unittest.cc
index 743a624..cdce8e6 100644
--- a/content/browser/appcache/appcache_response_unittest.cc
+++ b/content/browser/appcache/appcache_response_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 <stack>
#include <string>
#include <utility>
@@ -11,6 +13,7 @@
#include "base/callback.h"
#include "base/compiler_specific.h"
#include "base/location.h"
+#include "base/macros.h"
#include "base/pickle.h"
#include "base/single_thread_task_runner.h"
#include "base/synchronization/waitable_event.h"
@@ -44,14 +47,14 @@ class AppCacheResponseTest : public testing::Test {
}
void OnResponseInfoLoaded(AppCacheResponseInfo* info,
- int64 response_id) override {
+ int64_t response_id) override {
loaded_info_ = info;
loaded_info_id_ = response_id;
test_->ScheduleNextTask();
}
scoped_refptr<AppCacheResponseInfo> loaded_info_;
- int64 loaded_info_id_;
+ int64_t loaded_info_id_;
AppCacheResponseTest* test_;
};
@@ -766,7 +769,7 @@ class AppCacheResponseTest : public testing::Test {
int reader_deletion_count_down_;
bool read_callback_was_called_;
- int64 written_response_id_;
+ int64_t written_response_id_;
scoped_ptr<AppCacheResponseWriter> writer_;
scoped_ptr<AppCacheResponseMetadataWriter> metadata_writer_;
scoped_refptr<HttpResponseInfoIOBuffer> write_info_buffer_;
diff --git a/content/browser/appcache/appcache_service_impl.cc b/content/browser/appcache/appcache_service_impl.cc
index 37d6424..fd8c686 100644
--- a/content/browser/appcache/appcache_service_impl.cc
+++ b/content/browser/appcache/appcache_service_impl.cc
@@ -10,6 +10,7 @@
#include "base/bind_helpers.h"
#include "base/location.h"
#include "base/logging.h"
+#include "base/macros.h"
#include "base/single_thread_task_runner.h"
#include "base/stl_util.h"
#include "base/thread_task_runner_handle.h"
@@ -255,9 +256,10 @@ void AppCacheServiceImpl::GetInfoHelper::OnAllInfo(
class AppCacheServiceImpl::CheckResponseHelper : AsyncHelper {
public:
- CheckResponseHelper(
- AppCacheServiceImpl* service, const GURL& manifest_url, int64 cache_id,
- int64 response_id)
+ CheckResponseHelper(AppCacheServiceImpl* service,
+ const GURL& manifest_url,
+ int64_t cache_id,
+ int64_t response_id)
: AsyncHelper(service, net::CompletionCallback()),
manifest_url_(manifest_url),
cache_id_(cache_id),
@@ -265,8 +267,7 @@ class AppCacheServiceImpl::CheckResponseHelper : AsyncHelper {
kIOBufferSize(32 * 1024),
expected_total_size_(0),
amount_headers_read_(0),
- amount_data_read_(0) {
- }
+ amount_data_read_(0) {}
void Start() override {
service_->storage()->LoadOrCreateGroup(manifest_url_, this);
@@ -286,8 +287,8 @@ class AppCacheServiceImpl::CheckResponseHelper : AsyncHelper {
// Inputs describing what to check.
GURL manifest_url_;
- int64 cache_id_;
- int64 response_id_;
+ int64_t cache_id_;
+ int64_t response_id_;
// Internals used to perform the checks.
const int kIOBufferSize;
@@ -295,7 +296,7 @@ class AppCacheServiceImpl::CheckResponseHelper : AsyncHelper {
scoped_ptr<AppCacheResponseReader> response_reader_;
scoped_refptr<HttpResponseInfoIOBuffer> info_buffer_;
scoped_refptr<net::IOBuffer> data_buffer_;
- int64 expected_total_size_;
+ int64_t expected_total_size_;
int amount_headers_read_;
int amount_data_read_;
DISALLOW_COPY_AND_ASSIGN(CheckResponseHelper);
@@ -498,8 +499,8 @@ void AppCacheServiceImpl::DeleteAppCachesForOrigin(
}
void AppCacheServiceImpl::CheckAppCacheResponse(const GURL& manifest_url,
- int64 cache_id,
- int64 response_id) {
+ int64_t cache_id,
+ int64_t response_id) {
CheckResponseHelper* helper = new CheckResponseHelper(
this, manifest_url, cache_id, response_id);
helper->Start();
diff --git a/content/browser/appcache/appcache_service_impl.h b/content/browser/appcache/appcache_service_impl.h
index d4efb64..acc660f7 100644
--- a/content/browser/appcache/appcache_service_impl.h
+++ b/content/browser/appcache/appcache_service_impl.h
@@ -5,10 +5,13 @@
#ifndef CONTENT_BROWSER_APPCACHE_APPCACHE_SERVICE_IMPL_H_
#define CONTENT_BROWSER_APPCACHE_APPCACHE_SERVICE_IMPL_H_
+#include <stdint.h>
+
#include <map>
#include <set>
#include "base/gtest_prod_util.h"
+#include "base/macros.h"
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
#include "base/observer_list.h"
@@ -112,8 +115,9 @@ class CONTENT_EXPORT AppCacheServiceImpl
// Checks the integrity of 'response_id' by reading the headers and data.
// If it cannot be read, the cache group for 'manifest_url' is deleted.
- void CheckAppCacheResponse(const GURL& manifest_url, int64 cache_id,
- int64 response_id);
+ void CheckAppCacheResponse(const GURL& manifest_url,
+ int64_t cache_id,
+ int64_t response_id);
// Context for use during cache updates, should only be accessed
// on the IO thread. We do NOT add a reference to the request context,
diff --git a/content/browser/appcache/appcache_service_unittest.cc b/content/browser/appcache/appcache_service_unittest.cc
index 62e6a4d..79febf7 100644
--- a/content/browser/appcache/appcache_service_unittest.cc
+++ b/content/browser/appcache/appcache_service_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 <stdint.h>
+
#include <string>
#include "base/bind.h"
#include "base/bind_helpers.h"
#include "base/location.h"
+#include "base/macros.h"
#include "base/pickle.h"
#include "base/run_loop.h"
#include "base/single_thread_task_runner.h"
@@ -22,11 +25,11 @@
namespace content {
namespace {
-const int64 kMockGroupId = 1;
-const int64 kMockCacheId = 1;
-const int64 kMockResponseId = 1;
-const int64 kMissingCacheId = 5;
-const int64 kMissingResponseId = 5;
+const int64_t kMockGroupId = 1;
+const int64_t kMockCacheId = 1;
+const int64_t kMockResponseId = 1;
+const int64_t kMissingCacheId = 5;
+const int64_t kMissingResponseId = 5;
const char kMockHeaders[] =
"HTTP/1.0 200 OK\0Content-Length: 5\0\0";
const char kMockBody[] = "Hello";
@@ -34,13 +37,16 @@ const int kMockBodySize = 5;
class MockResponseReader : public AppCacheResponseReader {
public:
- MockResponseReader(int64 response_id,
- net::HttpResponseInfo* info, int info_size,
- const char* data, int data_size)
+ MockResponseReader(int64_t response_id,
+ net::HttpResponseInfo* info,
+ int info_size,
+ const char* data,
+ int data_size)
: AppCacheResponseReader(response_id, 0, NULL),
- info_(info), info_size_(info_size),
- data_(data), data_size_(data_size) {
- }
+ info_(info),
+ info_size_(info_size),
+ data_(data),
+ data_size_(data_size) {}
void ReadInfo(HttpResponseInfoIOBuffer* info_buf,
const net::CompletionCallback& callback) override {
info_buffer_ = info_buf;
diff --git a/content/browser/appcache/appcache_storage.h b/content/browser/appcache/appcache_storage.h
index d10a893..42a77cd 100644
--- a/content/browser/appcache/appcache_storage.h
+++ b/content/browser/appcache/appcache_storage.h
@@ -5,6 +5,8 @@
#ifndef CONTENT_BROWSER_APPCACHE_APPCACHE_STORAGE_H_
#define CONTENT_BROWSER_APPCACHE_APPCACHE_STORAGE_H_
+#include <stdint.h>
+
#include <map>
#include <vector>
diff --git a/content/browser/appcache/appcache_storage_impl.cc b/content/browser/appcache/appcache_storage_impl.cc
index 8c9ded3..b144eb6 100644
--- a/content/browser/appcache/appcache_storage_impl.cc
+++ b/content/browser/appcache/appcache_storage_impl.cc
@@ -4,6 +4,8 @@
#include "content/browser/appcache/appcache_storage_impl.h"
+#include <stddef.h>
+
#include <algorithm>
#include <functional>
#include <limits>
diff --git a/content/browser/appcache/appcache_storage_impl.h b/content/browser/appcache/appcache_storage_impl.h
index c1e65f6..664ba31 100644
--- a/content/browser/appcache/appcache_storage_impl.h
+++ b/content/browser/appcache/appcache_storage_impl.h
@@ -5,6 +5,8 @@
#ifndef CONTENT_BROWSER_APPCACHE_APPCACHE_STORAGE_IMPL_H_
#define CONTENT_BROWSER_APPCACHE_APPCACHE_STORAGE_IMPL_H_
+#include <stdint.h>
+
#include <deque>
#include <map>
#include <set>
diff --git a/content/browser/appcache/appcache_storage_impl_unittest.cc b/content/browser/appcache/appcache_storage_impl_unittest.cc
index c726695..1a80274 100644
--- a/content/browser/appcache/appcache_storage_impl_unittest.cc
+++ b/content/browser/appcache/appcache_storage_impl_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 <stack>
#include "base/bind.h"
@@ -10,6 +12,7 @@
#include "base/files/file_util.h"
#include "base/files/scoped_temp_dir.h"
#include "base/location.h"
+#include "base/macros.h"
#include "base/memory/scoped_ptr.h"
#include "base/single_thread_task_runner.h"
#include "base/synchronization/waitable_event.h"
diff --git a/content/browser/appcache/appcache_unittest.cc b/content/browser/appcache/appcache_unittest.cc
index 4062498..6bf5d79 100644
--- a/content/browser/appcache/appcache_unittest.cc
+++ b/content/browser/appcache/appcache_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 "content/browser/appcache/appcache.h"
#include "content/browser/appcache/appcache_host.h"
#include "content/browser/appcache/mock_appcache_service.h"
@@ -62,8 +65,8 @@ TEST(AppCacheTest, AddModifyRemoveEntry) {
EXPECT_EQ(0L, cache->cache_size());
const GURL kFooUrl("http://foo.com");
- const int64 kFooResponseId = 1;
- const int64 kFooSize = 100;
+ const int64_t kFooResponseId = 1;
+ const int64_t kFooSize = 100;
AppCacheEntry entry1(AppCacheEntry::MASTER, kFooResponseId, kFooSize);
cache->AddEntry(kFooUrl, entry1);
EXPECT_EQ(entry1.types(), cache->GetEntry(kFooUrl)->types());
@@ -71,8 +74,8 @@ TEST(AppCacheTest, AddModifyRemoveEntry) {
EXPECT_EQ(kFooSize, cache->cache_size());
const GURL kBarUrl("http://bar.com");
- const int64 kBarResponseId = 2;
- const int64 kBarSize = 200;
+ const int64_t kBarResponseId = 2;
+ const int64_t kBarSize = 200;
AppCacheEntry entry2(AppCacheEntry::FALLBACK, kBarResponseId, kBarSize);
EXPECT_TRUE(cache->AddOrModifyEntry(kBarUrl, entry2));
EXPECT_EQ(entry2.types(), cache->GetEntry(kBarUrl)->types());
@@ -165,12 +168,12 @@ TEST(AppCacheTest, FindResponseForRequest) {
const GURL kOnlineNamespaceWithinOtherNamespaces(
"http://blah/fallback_namespace/intercept_namespace/1/online");
- const int64 kFallbackResponseId1 = 1;
- const int64 kFallbackResponseId2 = 2;
- const int64 kManifestResponseId = 3;
- const int64 kForeignExplicitResponseId = 4;
- const int64 kExplicitInOnlineNamespaceResponseId = 5;
- const int64 kInterceptResponseId = 6;
+ const int64_t kFallbackResponseId1 = 1;
+ const int64_t kFallbackResponseId2 = 2;
+ const int64_t kManifestResponseId = 3;
+ const int64_t kForeignExplicitResponseId = 4;
+ const int64_t kExplicitInOnlineNamespaceResponseId = 5;
+ const int64_t kInterceptResponseId = 6;
AppCacheManifest manifest;
manifest.online_whitelist_namespaces.push_back(
@@ -362,7 +365,7 @@ TEST(AppCacheTest, FindInterceptPatternResponseForRequest) {
const GURL kInterceptPatternNamespace(
kInterceptNamespaceBase.Resolve("*.hit*"));
const GURL kInterceptNamespaceEntry("http://blah/intercept_resource");
- const int64 kInterceptResponseId = 1;
+ const int64_t kInterceptResponseId = 1;
AppCacheManifest manifest;
manifest.intercept_namespaces.push_back(
AppCacheNamespace(APPCACHE_INTERCEPT_NAMESPACE,
@@ -433,7 +436,7 @@ TEST(AppCacheTest, FindFallbackPatternResponseForRequest) {
const GURL kFallbackPatternNamespace(
kFallbackNamespaceBase.Resolve("*.hit*"));
const GURL kFallbackNamespaceEntry("http://blah/fallback_resource");
- const int64 kFallbackResponseId = 1;
+ const int64_t kFallbackResponseId = 1;
AppCacheManifest manifest;
manifest.fallback_namespaces.push_back(
AppCacheNamespace(APPCACHE_FALLBACK_NAMESPACE, kFallbackPatternNamespace,
@@ -541,8 +544,8 @@ TEST(AppCacheTest, FindNetworkNamespacePatternResponseForRequest) {
TEST(AppCacheTest, ToFromDatabaseRecords) {
// Setup a cache with some entries.
- const int64 kCacheId = 1234;
- const int64 kGroupId = 4321;
+ const int64_t kCacheId = 1234;
+ const int64_t kGroupId = 4321;
const GURL kManifestUrl("http://foo.com/manifest");
const GURL kInterceptUrl("http://foo.com/intercept.html");
const GURL kFallbackUrl("http://foo.com/fallback.html");
diff --git a/content/browser/appcache/appcache_update_job.cc b/content/browser/appcache/appcache_update_job.cc
index 4b0d922..a3c8476 100644
--- a/content/browser/appcache/appcache_update_job.cc
+++ b/content/browser/appcache/appcache_update_job.cc
@@ -1447,7 +1447,8 @@ bool AppCacheUpdateJob::MaybeLoadFromNewestCache(const GURL& url,
}
void AppCacheUpdateJob::OnResponseInfoLoaded(
- AppCacheResponseInfo* response_info, int64 response_id) {
+ AppCacheResponseInfo* response_info,
+ int64_t response_id) {
const net::HttpResponseInfo* http_info = response_info ?
response_info->http_response_info() : NULL;
diff --git a/content/browser/appcache/appcache_update_job.h b/content/browser/appcache/appcache_update_job.h
index eaee83b..f1c7af0 100644
--- a/content/browser/appcache/appcache_update_job.h
+++ b/content/browser/appcache/appcache_update_job.h
@@ -5,6 +5,9 @@
#ifndef CONTENT_BROWSER_APPCACHE_APPCACHE_UPDATE_JOB_H_
#define CONTENT_BROWSER_APPCACHE_APPCACHE_UPDATE_JOB_H_
+#include <stddef.h>
+#include <stdint.h>
+
#include <deque>
#include <map>
#include <set>
@@ -12,6 +15,7 @@
#include <vector>
#include "base/gtest_prod_util.h"
+#include "base/macros.h"
#include "base/memory/ref_counted.h"
#include "base/memory/weak_ptr.h"
#include "base/time/time.h"
@@ -63,7 +67,7 @@ class CONTENT_EXPORT AppCacheUpdateJob
typedef std::vector<AppCacheHost*> PendingHosts;
typedef std::map<GURL, PendingHosts> PendingMasters;
typedef std::map<GURL, URLFetcher*> PendingUrlFetches;
- typedef std::map<int64, GURL> LoadingResponses;
+ typedef std::map<int64_t, GURL> LoadingResponses;
static const int kRerunDelayMs = 1000;
@@ -166,7 +170,7 @@ class CONTENT_EXPORT AppCacheUpdateJob
// Methods for AppCacheStorage::Delegate.
void OnResponseInfoLoaded(AppCacheResponseInfo* response_info,
- int64 response_id) override;
+ int64_t response_id) override;
void OnGroupAndNewestCacheStored(AppCacheGroup* group,
AppCache* newest_cache,
bool success,
@@ -325,14 +329,14 @@ class CONTENT_EXPORT AppCacheUpdateJob
// Response ids stored by this update job, used to cleanup in
// error conditions.
- std::vector<int64> stored_response_ids_;
+ std::vector<int64_t> stored_response_ids_;
// In some cases we fetch the same resource multiple times, and then
// have to delete the duplicates upon successful update. These ids
// are also in the stored_response_ids_ collection so we only schedule
// these for deletion on success.
// TODO(michaeln): Rework when we no longer fetches master entries directly.
- std::vector<int64> duplicate_response_ids_;
+ std::vector<int64_t> duplicate_response_ids_;
// Whether we've stored the resulting group/cache yet.
StoredState stored_state_;
diff --git a/content/browser/appcache/appcache_update_job_unittest.cc b/content/browser/appcache/appcache_update_job_unittest.cc
index 0233e59..39c2290 100644
--- a/content/browser/appcache/appcache_update_job_unittest.cc
+++ b/content/browser/appcache/appcache_update_job_unittest.cc
@@ -2,9 +2,13 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include <stddef.h>
+#include <stdint.h>
+
#include "base/bind.h"
#include "base/bind_helpers.h"
#include "base/location.h"
+#include "base/macros.h"
#include "base/single_thread_task_runner.h"
#include "base/stl_util.h"
#include "base/synchronization/waitable_event.h"
@@ -1233,10 +1237,9 @@ class AppCacheUpdateJobTest : public testing::Test,
expect_group_obsolete_ = false;
expect_group_has_cache_ = true;
expect_old_cache_ = cache;
- expect_response_ids_.insert(
- std::map<GURL, int64>::value_type(
- MockHttpServer::GetMockUrl("files/explicit1"),
- response_writer_->response_id()));
+ expect_response_ids_.insert(std::map<GURL, int64_t>::value_type(
+ MockHttpServer::GetMockUrl("files/explicit1"),
+ response_writer_->response_id()));
tested_manifest_ = MANIFEST1;
MockFrontend::HostIds ids(1, host->host_id());
frontend->AddExpectedEvent(ids, APPCACHE_CHECKING_EVENT);
@@ -1570,9 +1573,9 @@ class AppCacheUpdateJobTest : public testing::Test,
expect_extra_entries_.insert(AppCache::EntryMap::value_type(
MockHttpServer::GetMockUrl("files/notmodified"),
AppCacheEntry(AppCacheEntry::EXPLICIT)));
- expect_response_ids_.insert(std::map<GURL, int64>::value_type(
+ expect_response_ids_.insert(std::map<GURL, int64_t>::value_type(
MockHttpServer::GetMockUrl("files/servererror"), 444)); // copied
- expect_response_ids_.insert(std::map<GURL, int64>::value_type(
+ expect_response_ids_.insert(std::map<GURL, int64_t>::value_type(
MockHttpServer::GetMockUrl("files/notmodified"), 555)); // copied
MockFrontend::HostIds ids1(1, host1->host_id());
frontend1->AddExpectedEvent(ids1, APPCACHE_CHECKING_EVENT);
@@ -1931,7 +1934,7 @@ class AppCacheUpdateJobTest : public testing::Test,
storage->SimulateStoreGroupAndNewestCacheFailure();
const GURL kManifestUrl = MockHttpServer::GetMockUrl("files/notmodified");
- const int64 kManifestResponseId = 11;
+ const int64_t kManifestResponseId = 11;
// Seed the response_info working set with canned data for
// files/servererror and for files/notmodified to test that the
@@ -3058,13 +3061,14 @@ class AppCacheUpdateJobTest : public testing::Test,
service_->set_request_context(io_thread_->request_context());
}
- AppCache* MakeCacheForGroup(int64 cache_id, int64 manifest_response_id) {
+ AppCache* MakeCacheForGroup(int64_t cache_id, int64_t manifest_response_id) {
return MakeCacheForGroup(cache_id, group_->manifest_url(),
manifest_response_id);
}
- AppCache* MakeCacheForGroup(int64 cache_id, const GURL& manifest_entry_url,
- int64 manifest_response_id) {
+ AppCache* MakeCacheForGroup(int64_t cache_id,
+ const GURL& manifest_entry_url,
+ int64_t manifest_response_id) {
AppCache* cache = new AppCache(service_->storage(), cache_id);
cache->set_complete(true);
cache->set_update_time(base::Time::Now() - kOneHour);
@@ -3090,7 +3094,8 @@ class AppCacheUpdateJobTest : public testing::Test,
}
AppCacheResponseInfo* MakeAppCacheResponseInfo(
- const GURL& manifest_url, int64 response_id,
+ const GURL& manifest_url,
+ int64_t response_id,
const std::string& raw_headers) {
net::HttpResponseInfo* http_info = new net::HttpResponseInfo();
http_info->headers = new net::HttpResponseHeaders(raw_headers);
@@ -3172,7 +3177,7 @@ class AppCacheUpdateJobTest : public testing::Test,
// Check that any copied entries have the expected response id
// and that entries that are not copied have a different response id.
- std::map<GURL, int64>::iterator found =
+ std::map<GURL, int64_t>::iterator found =
expect_response_ids_.find(it->first);
if (found != expect_response_ids_.end()) {
EXPECT_EQ(found->second, it->second.response_id());
@@ -3448,7 +3453,7 @@ class AppCacheUpdateJobTest : public testing::Test,
TestedManifest tested_manifest_;
const char* tested_manifest_path_override_;
AppCache::EntryMap expect_extra_entries_;
- std::map<GURL, int64> expect_response_ids_;
+ std::map<GURL, int64_t> expect_response_ids_;
};
TEST_F(AppCacheUpdateJobTest, AlreadyChecking) {
diff --git a/content/browser/appcache/appcache_url_request_job.cc b/content/browser/appcache/appcache_url_request_job.cc
index 7612da4..05fe008 100644
--- a/content/browser/appcache/appcache_url_request_job.cc
+++ b/content/browser/appcache/appcache_url_request_job.cc
@@ -56,9 +56,11 @@ AppCacheURLRequestJob::~AppCacheURLRequestJob() {
storage_->CancelDelegateCallbacks(this);
}
-void AppCacheURLRequestJob::DeliverAppCachedResponse(
- const GURL& manifest_url, int64 group_id, int64 cache_id,
- const AppCacheEntry& entry, bool is_fallback) {
+void AppCacheURLRequestJob::DeliverAppCachedResponse(const GURL& manifest_url,
+ int64_t group_id,
+ int64_t cache_id,
+ const AppCacheEntry& entry,
+ bool is_fallback) {
DCHECK(!has_delivery_orders());
DCHECK(entry.has_response_id());
delivery_type_ = APPCACHED_DELIVERY;
@@ -167,7 +169,7 @@ void AppCacheURLRequestJob::BeginExecutableHandlerDelivery() {
storage_->LoadCache(cache_id_, this);
}
-void AppCacheURLRequestJob::OnCacheLoaded(AppCache* cache, int64 cache_id) {
+void AppCacheURLRequestJob::OnCacheLoaded(AppCache* cache, int64_t cache_id) {
DCHECK_EQ(cache_id_, cache_id);
DCHECK(!has_been_killed());
@@ -196,7 +198,7 @@ void AppCacheURLRequestJob::OnCacheLoaded(AppCache* cache, int64 cache_id) {
// Read the script data, truncating if its too large.
// NOTE: we just issue one read and don't bother chaining if the resource
// is very (very) large, close enough for now.
- const int64 kLimit = 500 * 1000;
+ const int64_t kLimit = 500 * 1000;
handler_source_buffer_ = new net::GrowableIOBuffer();
handler_source_buffer_->SetCapacity(kLimit);
handler_source_reader_.reset(storage_->CreateResponseReader(
@@ -276,7 +278,8 @@ void AppCacheURLRequestJob::BeginErrorDelivery(const char* message) {
}
void AppCacheURLRequestJob::OnResponseInfoLoaded(
- AppCacheResponseInfo* response_info, int64 response_id) {
+ AppCacheResponseInfo* response_info,
+ int64_t response_id) {
DCHECK(is_delivering_appcache_response());
if (response_info) {
info_ = response_info;
diff --git a/content/browser/appcache/appcache_url_request_job.h b/content/browser/appcache/appcache_url_request_job.h
index d3dfcf4..057c13b 100644
--- a/content/browser/appcache/appcache_url_request_job.h
+++ b/content/browser/appcache/appcache_url_request_job.h
@@ -5,6 +5,8 @@
#ifndef CONTENT_BROWSER_APPCACHE_APPCACHE_URL_REQUEST_JOB_H_
#define CONTENT_BROWSER_APPCACHE_APPCACHE_URL_REQUEST_JOB_H_
+#include <stdint.h>
+
#include <string>
#include "base/callback.h"
@@ -49,8 +51,10 @@ class CONTENT_EXPORT AppCacheURLRequestJob
// Informs the job of what response it should deliver. Only one of these
// methods should be called, and only once per job. A job will sit idle and
// wait indefinitely until one of the deliver methods is called.
- void DeliverAppCachedResponse(const GURL& manifest_url, int64 group_id,
- int64 cache_id, const AppCacheEntry& entry,
+ void DeliverAppCachedResponse(const GURL& manifest_url,
+ int64_t group_id,
+ int64_t cache_id,
+ const AppCacheEntry& entry,
bool is_fallback);
void DeliverNetworkResponse();
void DeliverErrorResponse();
@@ -75,8 +79,8 @@ class CONTENT_EXPORT AppCacheURLRequestJob
// that this job has been instructed to deliver. These are only
// valid to call if is_delivering_appcache_response.
const GURL& manifest_url() const { return manifest_url_; }
- int64 group_id() const { return group_id_; }
- int64 cache_id() const { return cache_id_; }
+ int64_t group_id() const { return group_id_; }
+ int64_t cache_id() const { return cache_id_; }
const AppCacheEntry& entry() const { return entry_; }
// net::URLRequestJob's Kill method is made public so the users of this
@@ -132,8 +136,8 @@ class CONTENT_EXPORT AppCacheURLRequestJob
// AppCacheStorage::Delegate methods
void OnResponseInfoLoaded(AppCacheResponseInfo* response_info,
- int64 response_id) override;
- void OnCacheLoaded(AppCache* cache, int64 cache_id) override;
+ int64_t response_id) override;
+ void OnCacheLoaded(AppCache* cache, int64_t cache_id) override;
const net::HttpResponseInfo* http_info() const;
bool is_range_request() const { return range_requested_.IsValid(); }
@@ -168,8 +172,8 @@ class CONTENT_EXPORT AppCacheURLRequestJob
bool has_been_killed_;
DeliveryType delivery_type_;
GURL manifest_url_;
- int64 group_id_;
- int64 cache_id_;
+ int64_t group_id_;
+ int64_t cache_id_;
AppCacheEntry entry_;
bool is_fallback_;
bool is_main_resource_; // Used for histogram logging.
diff --git a/content/browser/appcache/appcache_url_request_job_unittest.cc b/content/browser/appcache/appcache_url_request_job_unittest.cc
index 4483f9c..2fe413e 100644
--- a/content/browser/appcache/appcache_url_request_job_unittest.cc
+++ b/content/browser/appcache/appcache_url_request_job_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 <stack>
#include <utility>
@@ -11,6 +13,7 @@
#include "base/compiler_specific.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/pickle.h"
@@ -129,14 +132,14 @@ class AppCacheURLRequestJobTest : public testing::Test {
}
void OnResponseInfoLoaded(AppCacheResponseInfo* info,
- int64 response_id) override {
+ int64_t response_id) override {
loaded_info_ = info;
loaded_info_id_ = response_id;
test_->ScheduleNextTask();
}
scoped_refptr<AppCacheResponseInfo> loaded_info_;
- int64 loaded_info_id_;
+ int64_t loaded_info_id_;
AppCacheURLRequestJobTest* test_;
};
@@ -494,8 +497,8 @@ class AppCacheURLRequestJobTest : public testing::Test {
nullptr, false,
base::Bind(&ExpectNotRestarted)));
const GURL kManifestUrl("http://blah/");
- const int64 kCacheId(1);
- const int64 kGroupId(1);
+ const int64_t kCacheId(1);
+ const int64_t kGroupId(1);
const AppCacheEntry kEntry(AppCacheEntry::EXPLICIT, 1);
job->DeliverAppCachedResponse(kManifestUrl, kCacheId, kGroupId,
kEntry, false);
@@ -764,7 +767,7 @@ class AppCacheURLRequestJobTest : public testing::Test {
url_request_delegate_->received_info_.headers.get();
EXPECT_EQ(206, headers->response_code());
EXPECT_EQ(3, headers->GetContentLength());
- int64 range_start, range_end, object_size;
+ int64_t range_start, range_end, object_size;
EXPECT_TRUE(
headers->GetContentRange(&range_start, &range_end, &object_size));
EXPECT_EQ(1, range_start);
@@ -839,7 +842,7 @@ class AppCacheURLRequestJobTest : public testing::Test {
int expected_read_result_;
int reader_deletion_count_down_;
- int64 written_response_id_;
+ int64_t written_response_id_;
scoped_ptr<AppCacheResponseWriter> writer_;
scoped_refptr<HttpResponseInfoIOBuffer> write_info_buffer_;
scoped_refptr<IOBuffer> write_buffer_;
diff --git a/content/browser/appcache/appcache_working_set.cc b/content/browser/appcache/appcache_working_set.cc
index 4394097..6460684 100644
--- a/content/browser/appcache/appcache_working_set.cc
+++ b/content/browser/appcache/appcache_working_set.cc
@@ -33,7 +33,7 @@ void AppCacheWorkingSet::AddCache(AppCache* cache) {
if (is_disabled_)
return;
DCHECK(cache->cache_id() != kAppCacheNoCacheId);
- int64 cache_id = cache->cache_id();
+ int64_t cache_id = cache->cache_id();
DCHECK(caches_.find(cache_id) == caches_.end());
caches_.insert(CacheMap::value_type(cache_id, cache));
}
@@ -68,7 +68,7 @@ void AppCacheWorkingSet::AddResponseInfo(AppCacheResponseInfo* info) {
if (is_disabled_)
return;
DCHECK(info->response_id() != kAppCacheNoResponseId);
- int64 response_id = info->response_id();
+ int64_t response_id = info->response_id();
DCHECK(response_infos_.find(response_id) == response_infos_.end());
response_infos_.insert(ResponseInfoMap::value_type(response_id, info));
}
diff --git a/content/browser/appcache/appcache_working_set.h b/content/browser/appcache/appcache_working_set.h
index 5b9d00a..e9483b6 100644
--- a/content/browser/appcache/appcache_working_set.h
+++ b/content/browser/appcache/appcache_working_set.h
@@ -5,6 +5,8 @@
#ifndef CONTENT_BROWSER_APPCACHE_APPCACHE_WORKING_SET_H_
#define CONTENT_BROWSER_APPCACHE_APPCACHE_WORKING_SET_H_
+#include <stdint.h>
+
#include <map>
#include "base/containers/hash_tables.h"
@@ -31,7 +33,7 @@ class CONTENT_EXPORT AppCacheWorkingSet {
void AddCache(AppCache* cache);
void RemoveCache(AppCache* cache);
- AppCache* GetCache(int64 id) {
+ AppCache* GetCache(int64_t id) {
CacheMap::iterator it = caches_.find(id);
return (it != caches_.end()) ? it->second : NULL;
}
@@ -49,15 +51,15 @@ class CONTENT_EXPORT AppCacheWorkingSet {
void AddResponseInfo(AppCacheResponseInfo* response_info);
void RemoveResponseInfo(AppCacheResponseInfo* response_info);
- AppCacheResponseInfo* GetResponseInfo(int64 id) {
+ AppCacheResponseInfo* GetResponseInfo(int64_t id) {
ResponseInfoMap::iterator it = response_infos_.find(id);
return (it != response_infos_.end()) ? it->second : NULL;
}
private:
- typedef base::hash_map<int64, AppCache*> CacheMap;
+ typedef base::hash_map<int64_t, AppCache*> CacheMap;
typedef std::map<GURL, GroupMap> GroupsByOriginMap;
- typedef base::hash_map<int64, AppCacheResponseInfo*> ResponseInfoMap;
+ typedef base::hash_map<int64_t, AppCacheResponseInfo*> ResponseInfoMap;
GroupMap* GetMutableGroupsInOrigin(const GURL& origin_url) {
GroupsByOriginMap::iterator it = groups_by_origin_.find(origin_url);
diff --git a/content/browser/appcache/chrome_appcache_service.h b/content/browser/appcache/chrome_appcache_service.h
index 6976d87..a34cd08 100644
--- a/content/browser/appcache/chrome_appcache_service.h
+++ b/content/browser/appcache/chrome_appcache_service.h
@@ -6,6 +6,7 @@
#define CONTENT_BROWSER_APPCACHE_CHROME_APPCACHE_SERVICE_H_
#include "base/compiler_specific.h"
+#include "base/macros.h"
#include "base/memory/ref_counted.h"
#include "base/sequenced_task_runner_helpers.h"
#include "content/browser/appcache/appcache_policy.h"
diff --git a/content/browser/appcache/mock_appcache_storage.cc b/content/browser/appcache/mock_appcache_storage.cc
index a59fe30..09bdf03 100644
--- a/content/browser/appcache/mock_appcache_storage.cc
+++ b/content/browser/appcache/mock_appcache_storage.cc
@@ -4,6 +4,8 @@
#include "content/browser/appcache/mock_appcache_storage.h"
+#include <stddef.h>
+
#include "base/bind.h"
#include "base/location.h"
#include "base/logging.h"
@@ -54,7 +56,7 @@ void MockAppCacheStorage::GetAllInfo(Delegate* delegate) {
make_scoped_refptr(GetOrCreateDelegateReference(delegate))));
}
-void MockAppCacheStorage::LoadCache(int64 id, Delegate* delegate) {
+void MockAppCacheStorage::LoadCache(int64_t id, Delegate* delegate) {
DCHECK(delegate);
AppCache* cache = working_set_.GetCache(id);
if (ShouldCacheLoadAppearAsync(cache)) {
@@ -130,8 +132,8 @@ void MockAppCacheStorage::FindResponseForSubRequest(
found_network_namespace);
}
-void MockAppCacheStorage::MarkEntryAsForeign(
- const GURL& entry_url, int64 cache_id) {
+void MockAppCacheStorage::MarkEntryAsForeign(const GURL& entry_url,
+ int64_t cache_id) {
AppCache* cache = working_set_.GetCache(cache_id);
if (cache) {
AppCacheEntry* entry = cache->GetEntry(entry_url);
@@ -162,34 +164,39 @@ void MockAppCacheStorage::StoreEvictionTimes(AppCacheGroup* group) {
}
AppCacheResponseReader* MockAppCacheStorage::CreateResponseReader(
- const GURL& manifest_url, int64 group_id, int64 response_id) {
+ const GURL& manifest_url,
+ int64_t group_id,
+ int64_t response_id) {
if (simulated_reader_)
return simulated_reader_.release();
return new AppCacheResponseReader(response_id, group_id, disk_cache());
}
AppCacheResponseWriter* MockAppCacheStorage::CreateResponseWriter(
- const GURL& manifest_url, int64 group_id) {
+ const GURL& manifest_url,
+ int64_t group_id) {
return new AppCacheResponseWriter(NewResponseId(), group_id, disk_cache());
}
AppCacheResponseMetadataWriter*
-MockAppCacheStorage::CreateResponseMetadataWriter(int64 group_id,
- int64 response_id) {
+MockAppCacheStorage::CreateResponseMetadataWriter(int64_t group_id,
+ int64_t response_id) {
return new AppCacheResponseMetadataWriter(response_id, group_id,
disk_cache());
}
void MockAppCacheStorage::DoomResponses(
- const GURL& manifest_url, const std::vector<int64>& response_ids) {
+ const GURL& manifest_url,
+ const std::vector<int64_t>& response_ids) {
DeleteResponses(manifest_url, response_ids);
}
void MockAppCacheStorage::DeleteResponses(
- const GURL& manifest_url, const std::vector<int64>& response_ids) {
+ const GURL& manifest_url,
+ const std::vector<int64_t>& response_ids) {
// We don't bother with actually removing responses from the disk-cache,
// just keep track of which ids have been doomed or deleted
- std::vector<int64>::const_iterator it = response_ids.begin();
+ std::vector<int64_t>::const_iterator it = response_ids.begin();
while (it != response_ids.end()) {
doomed_response_ids_.insert(*it);
++it;
@@ -203,7 +210,8 @@ void MockAppCacheStorage::ProcessGetAllInfo(
}
void MockAppCacheStorage::ProcessLoadCache(
- int64 id, scoped_refptr<DelegateReference> delegate_ref) {
+ int64_t id,
+ scoped_refptr<DelegateReference> delegate_ref) {
AppCache* cache = working_set_.GetCache(id);
if (delegate_ref->delegate)
delegate_ref->delegate->OnCacheLoaded(cache, id);
@@ -256,8 +264,8 @@ namespace {
struct FoundCandidate {
GURL namespace_entry_url;
AppCacheEntry entry;
- int64 cache_id;
- int64 group_id;
+ int64_t cache_id;
+ int64_t group_id;
GURL manifest_url;
bool is_cache_in_use;
@@ -479,7 +487,7 @@ void MockAppCacheStorage::RunOnePendingTask() {
}
void MockAppCacheStorage::AddStoredCache(AppCache* cache) {
- int64 cache_id = cache->cache_id();
+ int64_t cache_id = cache->cache_id();
if (stored_caches_.find(cache_id) == stored_caches_.end()) {
stored_caches_.insert(
StoredCacheMap::value_type(cache_id, make_scoped_refptr(cache)));
diff --git a/content/browser/appcache/mock_appcache_storage.h b/content/browser/appcache/mock_appcache_storage.h
index 25c9584..22d0e8e 100644
--- a/content/browser/appcache/mock_appcache_storage.h
+++ b/content/browser/appcache/mock_appcache_storage.h
@@ -5,6 +5,8 @@
#ifndef CONTENT_BROWSER_APPCACHE_MOCK_APPCACHE_STORAGE_H_
#define CONTENT_BROWSER_APPCACHE_MOCK_APPCACHE_STORAGE_H_
+#include <stdint.h>
+
#include <deque>
#include <map>
#include <vector>
@@ -12,6 +14,7 @@
#include "base/callback.h"
#include "base/containers/hash_tables.h"
#include "base/gtest_prod_util.h"
+#include "base/macros.h"
#include "base/memory/scoped_ptr.h"
#include "base/memory/weak_ptr.h"
#include "content/browser/appcache/appcache.h"
@@ -50,7 +53,7 @@ class MockAppCacheStorage : public AppCacheStorage {
~MockAppCacheStorage() override;
void GetAllInfo(Delegate* delegate) override;
- void LoadCache(int64 id, Delegate* delegate) override;
+ void LoadCache(int64_t id, Delegate* delegate) override;
void LoadOrCreateGroup(const GURL& manifest_url, Delegate* delegate) override;
void StoreGroupAndNewestCache(AppCacheGroup* group,
AppCache* newest_cache,
@@ -63,23 +66,23 @@ class MockAppCacheStorage : public AppCacheStorage {
AppCacheEntry* found_entry,
AppCacheEntry* found_fallback_entry,
bool* found_network_namespace) override;
- void MarkEntryAsForeign(const GURL& entry_url, int64 cache_id) override;
+ void MarkEntryAsForeign(const GURL& entry_url, int64_t cache_id) override;
void MakeGroupObsolete(AppCacheGroup* group,
Delegate* delegate,
int response_code) override;
void StoreEvictionTimes(AppCacheGroup* group) override;
AppCacheResponseReader* CreateResponseReader(const GURL& manifest_url,
- int64 group_id,
- int64 response_id) override;
+ int64_t group_id,
+ int64_t response_id) override;
AppCacheResponseWriter* CreateResponseWriter(const GURL& manifest_url,
- int64 group_id) override;
+ int64_t group_id) override;
AppCacheResponseMetadataWriter* CreateResponseMetadataWriter(
- int64 group_id,
- int64 response_id) override;
+ int64_t group_id,
+ int64_t response_id) override;
void DoomResponses(const GURL& manifest_url,
- const std::vector<int64>& response_ids) override;
+ const std::vector<int64_t>& response_ids) override;
void DeleteResponses(const GURL& manifest_url,
- const std::vector<int64>& response_ids) override;
+ const std::vector<int64_t>& response_ids) override;
private:
friend class AppCacheRequestHandlerTest;
@@ -87,15 +90,15 @@ class MockAppCacheStorage : public AppCacheStorage {
friend class AppCacheUpdateJobTest;
friend class MockAppCacheStorageTest;
- typedef base::hash_map<int64, scoped_refptr<AppCache> > StoredCacheMap;
+ typedef base::hash_map<int64_t, scoped_refptr<AppCache>> StoredCacheMap;
typedef std::map<GURL, scoped_refptr<AppCacheGroup> > StoredGroupMap;
- typedef std::set<int64> DoomedResponseIds;
- typedef std::map<int64, std::pair<base::Time, base::Time>>
+ typedef std::set<int64_t> DoomedResponseIds;
+ typedef std::map<int64_t, std::pair<base::Time, base::Time>>
StoredEvictionTimesMap;
void ProcessGetAllInfo(scoped_refptr<DelegateReference> delegate_ref);
- void ProcessLoadCache(
- int64 id, scoped_refptr<DelegateReference> delegate_ref);
+ void ProcessLoadCache(int64_t id,
+ scoped_refptr<DelegateReference> delegate_ref);
void ProcessLoadOrCreateGroup(
const GURL& manifest_url, scoped_refptr<DelegateReference> delegate_ref);
void ProcessStoreGroupAndNewestCache(
@@ -156,13 +159,12 @@ class MockAppCacheStorage : public AppCacheStorage {
// provided values will be return on the next call to
// the corresponding Find method, subsequent calls are
// unaffected.
- void SimulateFindMainResource(
- const AppCacheEntry& entry,
- const GURL& fallback_url,
- const AppCacheEntry& fallback_entry,
- int64 cache_id,
- int64 group_id,
- const GURL& manifest_url) {
+ void SimulateFindMainResource(const AppCacheEntry& entry,
+ const GURL& fallback_url,
+ const AppCacheEntry& fallback_entry,
+ int64_t cache_id,
+ int64_t group_id,
+ const GURL& manifest_url) {
simulate_find_main_resource_ = true;
simulate_find_sub_resource_ = false;
simulated_found_entry_ = entry;
@@ -209,8 +211,8 @@ class MockAppCacheStorage : public AppCacheStorage {
bool simulate_find_sub_resource_;
AppCacheEntry simulated_found_entry_;
AppCacheEntry simulated_found_fallback_entry_;
- int64 simulated_found_cache_id_;
- int64 simulated_found_group_id_;
+ int64_t simulated_found_cache_id_;
+ int64_t simulated_found_group_id_;
GURL simulated_found_fallback_url_;
GURL simulated_found_manifest_url_;
bool simulated_found_network_namespace_;
diff --git a/content/browser/appcache/mock_appcache_storage_unittest.cc b/content/browser/appcache/mock_appcache_storage_unittest.cc
index 8f52912..bee5ff0 100644
--- a/content/browser/appcache/mock_appcache_storage_unittest.cc
+++ b/content/browser/appcache/mock_appcache_storage_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/run_loop.h"
#include "content/browser/appcache/appcache.h"
#include "content/browser/appcache/appcache_group.h"
@@ -21,7 +24,7 @@ class MockAppCacheStorageTest : public testing::Test {
obsoleted_success_(false), found_cache_id_(kAppCacheNoCacheId) {
}
- void OnCacheLoaded(AppCache* cache, int64 cache_id) override {
+ void OnCacheLoaded(AppCache* cache, int64_t cache_id) override {
loaded_cache_ = cache;
loaded_cache_id_ = cache_id;
}
@@ -51,8 +54,8 @@ class MockAppCacheStorageTest : public testing::Test {
const AppCacheEntry& entry,
const GURL& fallback_url,
const AppCacheEntry& fallback_entry,
- int64 cache_id,
- int64 group_id,
+ int64_t cache_id,
+ int64_t group_id,
const GURL& manifest_url) override {
found_url_ = url;
found_entry_ = entry;
@@ -63,7 +66,7 @@ class MockAppCacheStorageTest : public testing::Test {
}
scoped_refptr<AppCache> loaded_cache_;
- int64 loaded_cache_id_;
+ int64_t loaded_cache_id_;
scoped_refptr<AppCacheGroup> loaded_group_;
GURL loaded_manifest_url_;
scoped_refptr<AppCacheGroup> stored_group_;
@@ -74,7 +77,7 @@ class MockAppCacheStorageTest : public testing::Test {
AppCacheEntry found_entry_;
GURL found_fallback_url_;
AppCacheEntry found_fallback_entry_;
- int64 found_cache_id_;
+ int64_t found_cache_id_;
GURL found_manifest_url_;
};
@@ -102,7 +105,7 @@ TEST_F(MockAppCacheStorageTest, LoadCache_NearHit) {
// Setup some preconditions. Make an 'unstored' cache for
// us to load. The ctor should put it in the working set.
- int64 cache_id = service.storage()->NewCacheId();
+ int64_t cache_id = service.storage()->NewCacheId();
scoped_refptr<AppCache> cache(new AppCache(service.storage(), cache_id));
// Conduct the test.
@@ -170,7 +173,7 @@ TEST_F(MockAppCacheStorageTest, LoadGroupAndCache_FarHit) {
GURL manifest_url("http://blah/");
scoped_refptr<AppCacheGroup> group(
new AppCacheGroup(service.storage(), manifest_url, 111));
- int64 cache_id = storage->NewCacheId();
+ int64_t cache_id = storage->NewCacheId();
scoped_refptr<AppCache> cache(new AppCache(service.storage(), cache_id));
cache->set_complete(true);
group->AddCache(cache.get());
@@ -221,7 +224,7 @@ TEST_F(MockAppCacheStorageTest, StoreNewGroup) {
GURL manifest_url("http://blah/");
scoped_refptr<AppCacheGroup> group(
new AppCacheGroup(service.storage(), manifest_url, 111));
- int64 cache_id = storage->NewCacheId();
+ int64_t cache_id = storage->NewCacheId();
scoped_refptr<AppCache> cache(new AppCache(service.storage(), cache_id));
// Hold a ref to the cache simulate the UpdateJob holding that ref,
// and hold a ref to the group to simulate the CacheHost holding that ref.
@@ -253,14 +256,14 @@ TEST_F(MockAppCacheStorageTest, StoreExistingGroup) {
GURL manifest_url("http://blah/");
scoped_refptr<AppCacheGroup> group(
new AppCacheGroup(service.storage(), manifest_url, 111));
- int64 old_cache_id = storage->NewCacheId();
+ int64_t old_cache_id = storage->NewCacheId();
scoped_refptr<AppCache> old_cache(
new AppCache(service.storage(), old_cache_id));
old_cache->set_complete(true);
group->AddCache(old_cache.get());
storage->AddStoredGroup(group.get());
storage->AddStoredCache(old_cache.get());
- int64 new_cache_id = storage->NewCacheId();
+ int64_t new_cache_id = storage->NewCacheId();
scoped_refptr<AppCache> new_cache(
new AppCache(service.storage(), new_cache_id));
// Hold our refs to simulate the UpdateJob holding these refs.
@@ -298,7 +301,7 @@ TEST_F(MockAppCacheStorageTest, StoreExistingGroupExistingCache) {
GURL manifest_url("http://blah");
scoped_refptr<AppCacheGroup> group(
new AppCacheGroup(service.storage(), manifest_url, 111));
- int64 cache_id = storage->NewCacheId();
+ int64_t cache_id = storage->NewCacheId();
scoped_refptr<AppCache> cache(new AppCache(service.storage(), cache_id));
cache->set_complete(true);
group->AddCache(cache.get());
@@ -340,7 +343,7 @@ TEST_F(MockAppCacheStorageTest, MakeGroupObsolete) {
GURL manifest_url("http://blah/");
scoped_refptr<AppCacheGroup> group(
new AppCacheGroup(service.storage(), manifest_url, 111));
- int64 cache_id = storage->NewCacheId();
+ int64_t cache_id = storage->NewCacheId();
scoped_refptr<AppCache> cache(new AppCache(service.storage(), cache_id));
cache->set_complete(true);
group->AddCache(cache.get());
@@ -382,7 +385,7 @@ TEST_F(MockAppCacheStorageTest, MarkEntryAsForeign) {
// Setup some preconditions. Create a cache with an entry.
GURL entry_url("http://blah/entry");
- int64 cache_id = storage->NewCacheId();
+ int64_t cache_id = storage->NewCacheId();
scoped_refptr<AppCache> cache(new AppCache(service.storage(), cache_id));
cache->AddEntry(entry_url, AppCacheEntry(AppCacheEntry::EXPLICIT));
@@ -425,10 +428,10 @@ TEST_F(MockAppCacheStorageTest, BasicFindMainResponse) {
reinterpret_cast<MockAppCacheStorage*>(service.storage());
// Setup some preconditions. Create a complete cache with an entry.
- const int64 kCacheId = storage->NewCacheId();
+ const int64_t kCacheId = storage->NewCacheId();
const GURL kEntryUrl("http://blah/entry");
const GURL kManifestUrl("http://blah/manifest");
- const int64 kResponseId = 1;
+ const int64_t kResponseId = 1;
scoped_refptr<AppCache> cache(new AppCache(service.storage(), kCacheId));
cache->AddEntry(
kEntryUrl, AppCacheEntry(AppCacheEntry::EXPLICIT, kResponseId));
@@ -461,14 +464,14 @@ TEST_F(MockAppCacheStorageTest, BasicFindMainFallbackResponse) {
// Setup some preconditions. Create a complete cache with a
// fallback namespace and entry.
- const int64 kCacheId = storage->NewCacheId();
+ const int64_t kCacheId = storage->NewCacheId();
const GURL kFallbackEntryUrl1("http://blah/fallback_entry1");
const GURL kFallbackNamespaceUrl1("http://blah/fallback_namespace/");
const GURL kFallbackEntryUrl2("http://blah/fallback_entry2");
const GURL kFallbackNamespaceUrl2("http://blah/fallback_namespace/longer");
const GURL kManifestUrl("http://blah/manifest");
- const int64 kResponseId1 = 1;
- const int64 kResponseId2 = 2;
+ const int64_t kResponseId1 = 1;
+ const int64_t kResponseId2 = 2;
AppCacheManifest manifest;
manifest.fallback_namespaces.push_back(
@@ -521,12 +524,12 @@ TEST_F(MockAppCacheStorageTest, FindMainResponseWithMultipleCandidates) {
// for the same url.
const GURL kEntryUrl("http://blah/entry");
- const int64 kCacheId1 = storage->NewCacheId();
- const int64 kCacheId2 = storage->NewCacheId();
+ const int64_t kCacheId1 = storage->NewCacheId();
+ const int64_t kCacheId2 = storage->NewCacheId();
const GURL kManifestUrl1("http://blah/manifest1");
const GURL kManifestUrl2("http://blah/manifest2");
- const int64 kResponseId1 = 1;
- const int64 kResponseId2 = 2;
+ const int64_t kResponseId1 = 1;
+ const int64_t kResponseId2 = 2;
// The first cache.
scoped_refptr<AppCache> cache(new AppCache(service.storage(), kCacheId1));
@@ -576,11 +579,11 @@ TEST_F(MockAppCacheStorageTest, FindMainResponseExclusions) {
// Setup some preconditions. Create a complete cache with a
// foreign entry and an online namespace.
- const int64 kCacheId = storage->NewCacheId();
+ const int64_t kCacheId = storage->NewCacheId();
const GURL kEntryUrl("http://blah/entry");
const GURL kManifestUrl("http://blah/manifest");
const GURL kOnlineNamespaceUrl("http://blah/online_namespace");
- const int64 kResponseId = 1;
+ const int64_t kResponseId = 1;
AppCacheManifest manifest;
manifest.online_whitelist_namespaces.push_back(
diff --git a/content/browser/background_sync/background_sync_browsertest.cc b/content/browser/background_sync/background_sync_browsertest.cc
index 41ba9c0..e75feeb 100644
--- a/content/browser/background_sync/background_sync_browsertest.cc
+++ b/content/browser/background_sync/background_sync_browsertest.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 <stdint.h>
+
#include <set>
#include <string>
#include <vector>
#include "base/command_line.h"
+#include "base/macros.h"
#include "base/strings/string_split.h"
#include "base/strings/stringprintf.h"
#include "base/task_runner_util.h"
@@ -79,7 +82,7 @@ void OneShotPendingDidGetSWRegistration(
ServiceWorkerStatusCode status,
const scoped_refptr<ServiceWorkerRegistration>& registration) {
ASSERT_EQ(SERVICE_WORKER_OK, status);
- int64 service_worker_id = registration->id();
+ int64_t service_worker_id = registration->id();
BackgroundSyncManager* sync_manager = sync_context->background_sync_manager();
sync_manager->GetRegistration(
service_worker_id, tag, SYNC_ONE_SHOT,
@@ -244,9 +247,10 @@ void BackgroundSyncBrowserTest::ClearStoragePartitionData() {
// for service workers, for all origins, for an unbounded time range.
StoragePartition* storage = GetStorage();
- uint32 storage_partition_mask =
+ uint32_t storage_partition_mask =
StoragePartition::REMOVE_DATA_MASK_SERVICE_WORKERS;
- uint32 quota_storage_mask = StoragePartition::QUOTA_MANAGED_STORAGE_MASK_ALL;
+ uint32_t quota_storage_mask =
+ StoragePartition::QUOTA_MANAGED_STORAGE_MASK_ALL;
const GURL& delete_origin = GURL();
const base::Time delete_begin = base::Time();
base::Time delete_end = base::Time::Max();
diff --git a/content/browser/background_sync/background_sync_context_impl.h b/content/browser/background_sync/background_sync_context_impl.h
index c5a9103..f30a639 100644
--- a/content/browser/background_sync/background_sync_context_impl.h
+++ b/content/browser/background_sync/background_sync_context_impl.h
@@ -7,6 +7,7 @@
#include <set>
+#include "base/macros.h"
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
#include "content/common/background_sync_service.mojom.h"
diff --git a/content/browser/background_sync/background_sync_manager.cc b/content/browser/background_sync/background_sync_manager.cc
index 877b518..d5e86a5 100644
--- a/content/browser/background_sync/background_sync_manager.cc
+++ b/content/browser/background_sync/background_sync_manager.cc
@@ -10,6 +10,7 @@
#include "base/single_thread_task_runner.h"
#include "base/thread_task_runner_handle.h"
#include "base/time/default_clock.h"
+#include "build/build_config.h"
#include "content/browser/background_sync/background_sync_metrics.h"
#include "content/browser/background_sync/background_sync_network_observer.h"
#include "content/browser/background_sync/background_sync_power_observer.h"
@@ -166,7 +167,7 @@ BackgroundSyncManager::RegistrationKey::RegistrationKey(
}
void BackgroundSyncManager::Register(
- int64 sw_registration_id,
+ int64_t sw_registration_id,
const BackgroundSyncRegistrationOptions& options,
bool requested_from_service_worker,
const StatusAndRegistrationCallback& callback) {
@@ -194,7 +195,7 @@ void BackgroundSyncManager::Register(
}
void BackgroundSyncManager::GetRegistration(
- int64 sw_registration_id,
+ int64_t sw_registration_id,
const std::string& sync_registration_tag,
SyncPeriodicity periodicity,
const StatusAndRegistrationCallback& callback) {
@@ -214,7 +215,7 @@ void BackgroundSyncManager::GetRegistration(
}
void BackgroundSyncManager::GetRegistrations(
- int64 sw_registration_id,
+ int64_t sw_registration_id,
SyncPeriodicity periodicity,
const StatusAndRegistrationsCallback& callback) {
DCHECK_CURRENTLY_ON(BrowserThread::IO);
@@ -251,7 +252,7 @@ BackgroundSyncManager::DuplicateRegistrationHandle(
return CreateRegistrationHandle(ref_registration->get());
}
-void BackgroundSyncManager::OnRegistrationDeleted(int64 sw_registration_id,
+void BackgroundSyncManager::OnRegistrationDeleted(int64_t sw_registration_id,
const GURL& pattern) {
DCHECK_CURRENTLY_ON(BrowserThread::IO);
@@ -351,7 +352,7 @@ void BackgroundSyncManager::InitDidGetControllerParameters(
void BackgroundSyncManager::InitDidGetDataFromBackend(
const base::Closure& callback,
- const std::vector<std::pair<int64, std::string>>& user_data,
+ const std::vector<std::pair<int64_t, std::string>>& user_data,
ServiceWorkerStatusCode status) {
DCHECK_CURRENTLY_ON(BrowserThread::IO);
@@ -362,7 +363,7 @@ void BackgroundSyncManager::InitDidGetDataFromBackend(
}
bool corruption_detected = false;
- for (const std::pair<int64, std::string>& data : user_data) {
+ for (const std::pair<int64_t, std::string>& data : user_data) {
BackgroundSyncRegistrationsProto registrations_proto;
if (registrations_proto.ParseFromString(data.second)) {
BackgroundSyncRegistrations* registrations =
@@ -419,7 +420,7 @@ void BackgroundSyncManager::InitDidGetDataFromBackend(
}
void BackgroundSyncManager::RegisterCheckIfHasMainFrame(
- int64 sw_registration_id,
+ int64_t sw_registration_id,
const BackgroundSyncRegistrationOptions& options,
const StatusAndRegistrationCallback& callback) {
DCHECK_CURRENTLY_ON(BrowserThread::IO);
@@ -441,7 +442,7 @@ void BackgroundSyncManager::RegisterCheckIfHasMainFrame(
}
void BackgroundSyncManager::RegisterDidCheckIfMainFrame(
- int64 sw_registration_id,
+ int64_t sw_registration_id,
const BackgroundSyncRegistrationOptions& options,
const StatusAndRegistrationCallback& callback,
bool has_main_frame_client) {
@@ -457,7 +458,7 @@ void BackgroundSyncManager::RegisterDidCheckIfMainFrame(
}
void BackgroundSyncManager::RegisterImpl(
- int64 sw_registration_id,
+ int64_t sw_registration_id,
const BackgroundSyncRegistrationOptions& options,
const StatusAndRegistrationCallback& callback) {
DCHECK_CURRENTLY_ON(BrowserThread::IO);
@@ -578,7 +579,7 @@ void BackgroundSyncManager::DisableAndClearManager(
void BackgroundSyncManager::DisableAndClearDidGetRegistrations(
const base::Closure& callback,
- const std::vector<std::pair<int64, std::string>>& user_data,
+ const std::vector<std::pair<int64_t, std::string>>& user_data,
ServiceWorkerStatusCode status) {
DCHECK_CURRENTLY_ON(BrowserThread::IO);
@@ -611,7 +612,7 @@ void BackgroundSyncManager::DisableAndClearManagerClearedOne(
BackgroundSyncManager::RefCountedRegistration*
BackgroundSyncManager::LookupActiveRegistration(
- int64 sw_registration_id,
+ int64_t sw_registration_id,
const RegistrationKey& registration_key) {
DCHECK_CURRENTLY_ON(BrowserThread::IO);
@@ -633,7 +634,7 @@ BackgroundSyncManager::LookupActiveRegistration(
}
void BackgroundSyncManager::StoreRegistrations(
- int64 sw_registration_id,
+ int64_t sw_registration_id,
const ServiceWorkerStorage::StatusCallback& callback) {
DCHECK_CURRENTLY_ON(BrowserThread::IO);
@@ -669,7 +670,7 @@ void BackgroundSyncManager::StoreRegistrations(
}
void BackgroundSyncManager::RegisterDidStore(
- int64 sw_registration_id,
+ int64_t sw_registration_id,
const scoped_refptr<RefCountedRegistration>& new_registration_ref,
const StatusAndRegistrationCallback& callback,
ServiceWorkerStatusCode status) {
@@ -718,7 +719,7 @@ void BackgroundSyncManager::RegisterDidStore(
}
void BackgroundSyncManager::RemoveActiveRegistration(
- int64 sw_registration_id,
+ int64_t sw_registration_id,
const RegistrationKey& registration_key) {
DCHECK_CURRENTLY_ON(BrowserThread::IO);
DCHECK(LookupActiveRegistration(sw_registration_id, registration_key));
@@ -730,7 +731,7 @@ void BackgroundSyncManager::RemoveActiveRegistration(
}
void BackgroundSyncManager::AddActiveRegistration(
- int64 sw_registration_id,
+ int64_t sw_registration_id,
const GURL& origin,
const scoped_refptr<RefCountedRegistration>& sync_registration) {
DCHECK_CURRENTLY_ON(BrowserThread::IO);
@@ -745,7 +746,7 @@ void BackgroundSyncManager::AddActiveRegistration(
}
void BackgroundSyncManager::StoreDataInBackend(
- int64 sw_registration_id,
+ int64_t sw_registration_id,
const GURL& origin,
const std::string& backend_key,
const std::string& data,
@@ -829,7 +830,7 @@ void BackgroundSyncManager::ReleaseRegistrationHandle(
}
void BackgroundSyncManager::Unregister(
- int64 sw_registration_id,
+ int64_t sw_registration_id,
BackgroundSyncRegistrationHandle::HandleId handle_id,
const StatusCallback& callback) {
DCHECK_CURRENTLY_ON(BrowserThread::IO);
@@ -854,7 +855,7 @@ void BackgroundSyncManager::Unregister(
}
void BackgroundSyncManager::UnregisterImpl(
- int64 sw_registration_id,
+ int64_t sw_registration_id,
const RegistrationKey& registration_key,
BackgroundSyncRegistration::RegistrationId sync_registration_id,
SyncPeriodicity periodicity,
@@ -891,7 +892,7 @@ void BackgroundSyncManager::UnregisterImpl(
sw_registration_id, periodicity, callback));
}
-void BackgroundSyncManager::UnregisterDidStore(int64 sw_registration_id,
+void BackgroundSyncManager::UnregisterDidStore(int64_t sw_registration_id,
SyncPeriodicity periodicity,
const StatusCallback& callback,
ServiceWorkerStatusCode status) {
@@ -979,7 +980,7 @@ void BackgroundSyncManager::NotifyWhenFinishedInvokeCallback(
}
void BackgroundSyncManager::GetRegistrationImpl(
- int64 sw_registration_id,
+ int64_t sw_registration_id,
const RegistrationKey& registration_key,
const StatusAndRegistrationCallback& callback) {
DCHECK_CURRENTLY_ON(BrowserThread::IO);
@@ -1003,7 +1004,7 @@ void BackgroundSyncManager::GetRegistrationImpl(
}
void BackgroundSyncManager::GetRegistrationsImpl(
- int64 sw_registration_id,
+ int64_t sw_registration_id,
SyncPeriodicity periodicity,
const StatusAndRegistrationsCallback& callback) {
DCHECK_CURRENTLY_ON(BrowserThread::IO);
@@ -1136,10 +1137,10 @@ void BackgroundSyncManager::FireReadyEventsImpl(const base::Closure& callback) {
}
// Find the registrations that are ready to run.
- std::vector<std::pair<int64, RegistrationKey>> sw_id_and_keys_to_fire;
+ std::vector<std::pair<int64_t, RegistrationKey>> sw_id_and_keys_to_fire;
for (auto& sw_id_and_registrations : active_registrations_) {
- const int64 service_worker_id = sw_id_and_registrations.first;
+ const int64_t service_worker_id = sw_id_and_registrations.first;
for (auto& key_and_registration :
sw_id_and_registrations.second.registration_map) {
BackgroundSyncRegistration* registration =
@@ -1178,7 +1179,7 @@ void BackgroundSyncManager::FireReadyEventsImpl(const base::Closure& callback) {
sw_id_and_keys_to_fire.size()));
for (const auto& sw_id_and_key : sw_id_and_keys_to_fire) {
- int64 service_worker_id = sw_id_and_key.first;
+ int64_t service_worker_id = sw_id_and_key.first;
const RefCountedRegistration* registration =
LookupActiveRegistration(service_worker_id, sw_id_and_key.second);
DCHECK(registration);
@@ -1258,7 +1259,7 @@ void BackgroundSyncManager::FireReadyEventsAllEventsFiring(
// while the event is firing.
void BackgroundSyncManager::EventComplete(
const scoped_refptr<ServiceWorkerRegistration>& service_worker_registration,
- int64 service_worker_id,
+ int64_t service_worker_id,
scoped_ptr<BackgroundSyncRegistrationHandle> registration_handle,
const base::Closure& callback,
ServiceWorkerStatusCode status_code) {
@@ -1273,7 +1274,7 @@ void BackgroundSyncManager::EventComplete(
}
void BackgroundSyncManager::EventCompleteImpl(
- int64 service_worker_id,
+ int64_t service_worker_id,
scoped_ptr<BackgroundSyncRegistrationHandle> registration_handle,
ServiceWorkerStatusCode status_code,
const base::Closure& callback) {
@@ -1357,7 +1358,7 @@ void BackgroundSyncManager::EventCompleteImpl(
}
void BackgroundSyncManager::EventCompleteDidStore(
- int64 service_worker_id,
+ int64_t service_worker_id,
const base::Closure& callback,
ServiceWorkerStatusCode status_code) {
DCHECK_CURRENTLY_ON(BrowserThread::IO);
@@ -1394,7 +1395,7 @@ void BackgroundSyncManager::OnAllSyncEventsCompleted(
}
void BackgroundSyncManager::OnRegistrationDeletedImpl(
- int64 sw_registration_id,
+ int64_t sw_registration_id,
const base::Closure& callback) {
DCHECK_CURRENTLY_ON(BrowserThread::IO);
diff --git a/content/browser/background_sync/background_sync_manager.h b/content/browser/background_sync/background_sync_manager.h
index 95ecb5f..7b12f6c 100644
--- a/content/browser/background_sync/background_sync_manager.h
+++ b/content/browser/background_sync/background_sync_manager.h
@@ -5,6 +5,9 @@
#ifndef CONTENT_BROWSER_BACKGROUND_SYNC_BACKGROUND_SYNC_MANAGER_H_
#define CONTENT_BROWSER_BACKGROUND_SYNC_BACKGROUND_SYNC_MANAGER_H_
+#include <stddef.h>
+#include <stdint.h>
+
#include <map>
#include <string>
#include <utility>
@@ -12,6 +15,7 @@
#include "base/callback_forward.h"
#include "base/cancelable_callback.h"
+#include "base/macros.h"
#include "base/memory/scoped_ptr.h"
#include "base/memory/scoped_vector.h"
#include "base/memory/weak_ptr.h"
@@ -67,7 +71,7 @@ class CONTENT_EXPORT BackgroundSyncManager
// The accepted registration will have a unique id. It may also have altered
// parameters if the user or UA chose different parameters than those
// supplied.
- void Register(int64 sw_registration_id,
+ void Register(int64_t sw_registration_id,
const BackgroundSyncRegistrationOptions& options,
bool requested_from_service_worker,
const StatusAndRegistrationCallback& callback);
@@ -79,7 +83,7 @@ class CONTENT_EXPORT BackgroundSyncManager
// BACKGROUND_SYNC_STATUS_OK on success. If the callback's status
// is not BACKGROUND_SYNC_STATUS_OK then the callback's RegistrationHandle
// will be nullptr.
- void GetRegistration(int64 sw_registration_id,
+ void GetRegistration(int64_t sw_registration_id,
const std::string& sync_registration_tag,
SyncPeriodicity periodicity,
const StatusAndRegistrationCallback& callback);
@@ -87,7 +91,7 @@ class CONTENT_EXPORT BackgroundSyncManager
// Finds the background sync registrations associated with
// |sw_registration_id| and periodicity |periodicity|. Calls
// |callback| with BACKGROUND_SYNC_STATUS_OK on success.
- void GetRegistrations(int64 sw_registration_id,
+ void GetRegistrations(int64_t sw_registration_id,
SyncPeriodicity periodicity,
const StatusAndRegistrationsCallback& callback);
@@ -97,7 +101,7 @@ class CONTENT_EXPORT BackgroundSyncManager
BackgroundSyncRegistrationHandle::HandleId handle_id);
// ServiceWorkerContextObserver overrides.
- void OnRegistrationDeleted(int64 sw_registration_id,
+ void OnRegistrationDeleted(int64_t sw_registration_id,
const GURL& pattern) override;
void OnStorageWiped() override;
@@ -131,7 +135,7 @@ class CONTENT_EXPORT BackgroundSyncManager
// The following methods are virtual for testing.
virtual void StoreDataInBackend(
- int64 sw_registration_id,
+ int64_t sw_registration_id,
const GURL& origin,
const std::string& backend_key,
const std::string& data,
@@ -184,7 +188,7 @@ class CONTENT_EXPORT BackgroundSyncManager
};
using PermissionStatusCallback = base::Callback<void(bool)>;
- using SWIdToRegistrationsMap = std::map<int64, BackgroundSyncRegistrations>;
+ using SWIdToRegistrationsMap = std::map<int64_t, BackgroundSyncRegistrations>;
static const size_t kMaxTagLength = 10240;
@@ -211,27 +215,27 @@ class CONTENT_EXPORT BackgroundSyncManager
void DisableAndClearManager(const base::Closure& callback);
void DisableAndClearDidGetRegistrations(
const base::Closure& callback,
- const std::vector<std::pair<int64, std::string>>& user_data,
+ const std::vector<std::pair<int64_t, std::string>>& user_data,
ServiceWorkerStatusCode status);
void DisableAndClearManagerClearedOne(const base::Closure& barrier_closure,
ServiceWorkerStatusCode status);
// Returns the existing registration or nullptr if it cannot be found.
RefCountedRegistration* LookupActiveRegistration(
- int64 sw_registration_id,
+ int64_t sw_registration_id,
const RegistrationKey& registration_key);
// Write all registrations for a given |sw_registration_id| to persistent
// storage.
- void StoreRegistrations(int64 sw_registration_id,
+ void StoreRegistrations(int64_t sw_registration_id,
const ServiceWorkerStorage::StatusCallback& callback);
// Removes the active registration if it is in the map.
- void RemoveActiveRegistration(int64 sw_registration_id,
+ void RemoveActiveRegistration(int64_t sw_registration_id,
const RegistrationKey& registration_key);
void AddActiveRegistration(
- int64 sw_registration_id,
+ int64_t sw_registration_id,
const GURL& origin,
const scoped_refptr<RefCountedRegistration>& sync_registration);
@@ -241,24 +245,24 @@ class CONTENT_EXPORT BackgroundSyncManager
scoped_ptr<BackgroundSyncParameters> parameters);
void InitDidGetDataFromBackend(
const base::Closure& callback,
- const std::vector<std::pair<int64, std::string>>& user_data,
+ const std::vector<std::pair<int64_t, std::string>>& user_data,
ServiceWorkerStatusCode status);
// Register callbacks
void RegisterCheckIfHasMainFrame(
- int64 sw_registration_id,
+ int64_t sw_registration_id,
const BackgroundSyncRegistrationOptions& options,
const StatusAndRegistrationCallback& callback);
void RegisterDidCheckIfMainFrame(
- int64 sw_registration_id,
+ int64_t sw_registration_id,
const BackgroundSyncRegistrationOptions& options,
const StatusAndRegistrationCallback& callback,
bool has_main_frame_client);
- void RegisterImpl(int64 sw_registration_id,
+ void RegisterImpl(int64_t sw_registration_id,
const BackgroundSyncRegistrationOptions& options,
const StatusAndRegistrationCallback& callback);
void RegisterDidStore(
- int64 sw_registration_id,
+ int64_t sw_registration_id,
const scoped_refptr<RefCountedRegistration>& new_registration_ref,
const StatusAndRegistrationCallback& callback,
ServiceWorkerStatusCode status);
@@ -267,16 +271,16 @@ class CONTENT_EXPORT BackgroundSyncManager
// |sync_registration_id|. Calls |callback| with
// BACKGROUND_SYNC_STATUS_NOT_FOUND if no match is found. Calls |callback|
// with BACKGROUND_SYNC_STATUS_OK on success.
- void Unregister(int64 sw_registration_id,
+ void Unregister(int64_t sw_registration_id,
BackgroundSyncRegistrationHandle::HandleId handle_id,
const StatusCallback& callback);
void UnregisterImpl(
- int64 sw_registration_id,
+ int64_t sw_registration_id,
const RegistrationKey& key,
BackgroundSyncRegistration::RegistrationId sync_registration_id,
SyncPeriodicity periodicity,
const StatusCallback& callback);
- void UnregisterDidStore(int64 sw_registration_id,
+ void UnregisterDidStore(int64_t sw_registration_id,
SyncPeriodicity periodicity,
const StatusCallback& callback,
ServiceWorkerStatusCode status);
@@ -293,12 +297,12 @@ class CONTENT_EXPORT BackgroundSyncManager
BackgroundSyncState status);
// GetRegistration callbacks
- void GetRegistrationImpl(int64 sw_registration_id,
+ void GetRegistrationImpl(int64_t sw_registration_id,
const RegistrationKey& registration_key,
const StatusAndRegistrationCallback& callback);
// GetRegistrations callbacks
- void GetRegistrationsImpl(int64 sw_registration_id,
+ void GetRegistrationsImpl(int64_t sw_registration_id,
SyncPeriodicity periodicity,
const StatusAndRegistrationsCallback& callback);
@@ -333,16 +337,16 @@ class CONTENT_EXPORT BackgroundSyncManager
void EventComplete(
const scoped_refptr<ServiceWorkerRegistration>&
service_worker_registration,
- int64 service_worker_id,
+ int64_t service_worker_id,
scoped_ptr<BackgroundSyncRegistrationHandle> registration_handle,
const base::Closure& callback,
ServiceWorkerStatusCode status_code);
void EventCompleteImpl(
- int64 service_worker_id,
+ int64_t service_worker_id,
scoped_ptr<BackgroundSyncRegistrationHandle> registration_handle,
ServiceWorkerStatusCode status_code,
const base::Closure& callback);
- void EventCompleteDidStore(int64 service_worker_id,
+ void EventCompleteDidStore(int64_t service_worker_id,
const base::Closure& callback,
ServiceWorkerStatusCode status_code);
@@ -351,7 +355,7 @@ class CONTENT_EXPORT BackgroundSyncManager
int number_of_batched_sync_events);
// OnRegistrationDeleted callbacks
- void OnRegistrationDeletedImpl(int64 sw_registration_id,
+ void OnRegistrationDeletedImpl(int64_t sw_registration_id,
const base::Closure& callback);
// OnStorageWiped callbacks
diff --git a/content/browser/background_sync/background_sync_manager_unittest.cc b/content/browser/background_sync/background_sync_manager_unittest.cc
index 8580a6e..1bd17d6 100644
--- a/content/browser/background_sync/background_sync_manager_unittest.cc
+++ b/content/browser/background_sync/background_sync_manager_unittest.cc
@@ -4,9 +4,12 @@
#include "content/browser/background_sync/background_sync_manager.h"
+#include <stdint.h>
+
#include "base/files/scoped_temp_dir.h"
#include "base/location.h"
#include "base/logging.h"
+#include "base/macros.h"
#include "base/metrics/field_trial.h"
#include "base/power_monitor/power_monitor.h"
#include "base/power_monitor/power_monitor_source.h"
@@ -42,10 +45,10 @@ const char kScript1[] = "https://example.com/a/script.js";
const char kScript2[] = "https://example.com/b/script.js";
void RegisterServiceWorkerCallback(bool* called,
- int64* store_registration_id,
+ int64_t* store_registration_id,
ServiceWorkerStatusCode status,
const std::string& status_message,
- int64 registration_id) {
+ int64_t registration_id) {
EXPECT_EQ(SERVICE_WORKER_OK, status) << ServiceWorkerStatusToString(status);
*called = true;
*store_registration_id = registration_id;
@@ -170,7 +173,7 @@ class TestBackgroundSyncManager : public BackgroundSyncManager {
void DoInit() { Init(); }
void StoreDataInBackendContinue(
- int64 sw_registration_id,
+ int64_t sw_registration_id,
const GURL& origin,
const std::string& key,
const std::string& data,
@@ -217,7 +220,7 @@ class TestBackgroundSyncManager : public BackgroundSyncManager {
protected:
void StoreDataInBackend(
- int64 sw_registration_id,
+ int64_t sw_registration_id,
const GURL& origin,
const std::string& key,
const std::string& data,
@@ -246,7 +249,7 @@ class TestBackgroundSyncManager : public BackgroundSyncManager {
if (corrupt_backend_) {
base::ThreadTaskRunnerHandle::Get()->PostTask(
FROM_HERE,
- base::Bind(callback, std::vector<std::pair<int64, std::string>>(),
+ base::Bind(callback, std::vector<std::pair<int64_t, std::string>>(),
SERVICE_WORKER_ERROR_FAILED));
return;
}
@@ -482,7 +485,7 @@ class BackgroundSyncManagerTest : public testing::Test {
}
bool RegisterWithServiceWorkerId(
- int64 sw_registration_id,
+ int64_t sw_registration_id,
const BackgroundSyncRegistrationOptions& options) {
bool was_called = false;
background_sync_manager_->Register(
@@ -495,7 +498,7 @@ class BackgroundSyncManagerTest : public testing::Test {
}
bool RegisterFromDocumentWithServiceWorkerId(
- int64 sw_registration_id,
+ int64_t sw_registration_id,
const BackgroundSyncRegistrationOptions& options) {
bool was_called = false;
background_sync_manager_->Register(
@@ -513,7 +516,7 @@ class BackgroundSyncManagerTest : public testing::Test {
}
bool UnregisterWithServiceWorkerId(
- int64 sw_registration_id,
+ int64_t sw_registration_id,
BackgroundSyncRegistrationHandle* registration_handle) {
bool was_called = false;
registration_handle->Unregister(
@@ -555,7 +558,7 @@ class BackgroundSyncManagerTest : public testing::Test {
}
bool GetRegistrationWithServiceWorkerId(
- int64 sw_registration_id,
+ int64_t sw_registration_id,
const BackgroundSyncRegistrationOptions& registration_options) {
bool was_called = false;
background_sync_manager_->GetRegistration(
@@ -579,7 +582,7 @@ class BackgroundSyncManagerTest : public testing::Test {
periodicity);
}
- bool GetRegistrationWithServiceWorkerId(int64 sw_registration_id,
+ bool GetRegistrationWithServiceWorkerId(int64_t sw_registration_id,
SyncPeriodicity periodicity) {
bool was_called = false;
background_sync_manager_->GetRegistrations(
@@ -596,7 +599,7 @@ class BackgroundSyncManagerTest : public testing::Test {
callback_sw_status_code_ = result;
}
- void UnregisterServiceWorker(uint64 sw_registration_id) {
+ void UnregisterServiceWorker(uint64_t sw_registration_id) {
bool called = false;
helper_->context()->UnregisterServiceWorker(
PatternForSWId(sw_registration_id),
@@ -605,7 +608,7 @@ class BackgroundSyncManagerTest : public testing::Test {
EXPECT_TRUE(called);
}
- GURL PatternForSWId(int64 sw_id) {
+ GURL PatternForSWId(int64_t sw_id) {
EXPECT_TRUE(sw_id == sw_registration_id_1_ ||
sw_id == sw_registration_id_2_);
return sw_id == sw_registration_id_1_ ? GURL(kPattern1) : GURL(kPattern2);
@@ -670,8 +673,8 @@ class BackgroundSyncManagerTest : public testing::Test {
TestBackgroundSyncController* test_controller_;
base::SimpleTestClock* test_clock_ = nullptr;
- int64 sw_registration_id_1_;
- int64 sw_registration_id_2_;
+ int64_t sw_registration_id_1_;
+ int64_t sw_registration_id_2_;
scoped_refptr<ServiceWorkerRegistration> sw_registration_1_;
scoped_refptr<ServiceWorkerRegistration> sw_registration_2_;
diff --git a/content/browser/background_sync/background_sync_network_observer.h b/content/browser/background_sync/background_sync_network_observer.h
index 26700db..79aee8f 100644
--- a/content/browser/background_sync/background_sync_network_observer.h
+++ b/content/browser/background_sync/background_sync_network_observer.h
@@ -6,6 +6,7 @@
#define CONTENT_BROWSER_BACKGROUND_SYNC_BACKGROUND_SYNC_NETWORK_OBSERVER_H_
#include "base/bind.h"
+#include "base/macros.h"
#include "content/browser/background_sync/background_sync.pb.h"
#include "content/common/content_export.h"
#include "net/base/network_change_notifier.h"
diff --git a/content/browser/background_sync/background_sync_power_observer.h b/content/browser/background_sync/background_sync_power_observer.h
index 80b26f0..b0da8f9 100644
--- a/content/browser/background_sync/background_sync_power_observer.h
+++ b/content/browser/background_sync/background_sync_power_observer.h
@@ -6,6 +6,7 @@
#define CONTENT_BROWSER_BACKGROUND_SYNC_BACKGROUND_SYNC_POWER_OBSERVER_H_
#include "base/bind.h"
+#include "base/macros.h"
#include "base/power_monitor/power_observer.h"
#include "content/browser/background_sync/background_sync.pb.h"
#include "content/common/content_export.h"
diff --git a/content/browser/background_sync/background_sync_power_observer_unittest.cc b/content/browser/background_sync/background_sync_power_observer_unittest.cc
index 8d3ed32..857ac06 100644
--- a/content/browser/background_sync/background_sync_power_observer_unittest.cc
+++ b/content/browser/background_sync/background_sync_power_observer_unittest.cc
@@ -4,6 +4,7 @@
#include <content/browser/background_sync/background_sync_power_observer.h>
+#include "base/macros.h"
#include "base/run_loop.h"
#include "base/test/power_monitor_test_base.h"
#include "testing/gtest/include/gtest/gtest.h"
diff --git a/content/browser/background_sync/background_sync_registration.h b/content/browser/background_sync/background_sync_registration.h
index 3c1fc0d..4e4f1cd 100644
--- a/content/browser/background_sync/background_sync_registration.h
+++ b/content/browser/background_sync/background_sync_registration.h
@@ -5,6 +5,8 @@
#ifndef CONTENT_BROWSER_BACKGROUND_SYNC_BACKGROUND_SYNC_REGISTRATION_H_
#define CONTENT_BROWSER_BACKGROUND_SYNC_BACKGROUND_SYNC_REGISTRATION_H_
+#include <stdint.h>
+
#include <list>
#include "base/callback.h"
diff --git a/content/browser/background_sync/background_sync_registration_handle.h b/content/browser/background_sync/background_sync_registration_handle.h
index c738179..8b2b5a9 100644
--- a/content/browser/background_sync/background_sync_registration_handle.h
+++ b/content/browser/background_sync/background_sync_registration_handle.h
@@ -5,8 +5,11 @@
#ifndef CONTENT_BROWSER_BACKGROUND_SYNC_BACKGROUND_SYNC_REGISTRATION_HANDLE_H_
#define CONTENT_BROWSER_BACKGROUND_SYNC_BACKGROUND_SYNC_REGISTRATION_HANDLE_H_
+#include <stdint.h>
+
#include "base/callback.h"
#include "base/logging.h"
+#include "base/macros.h"
#include "base/memory/weak_ptr.h"
#include "content/browser/background_sync/background_sync_registration.h"
#include "content/browser/background_sync/background_sync_status.h"
diff --git a/content/browser/background_sync/background_sync_registration_options.h b/content/browser/background_sync/background_sync_registration_options.h
index 133c9f6..0429f2a 100644
--- a/content/browser/background_sync/background_sync_registration_options.h
+++ b/content/browser/background_sync/background_sync_registration_options.h
@@ -5,9 +5,10 @@
#ifndef CONTENT_BROWSER_BACKGROUND_SYNC_BACKGROUND_SYNC_REGISTRATION_OPTIONS_H_
#define CONTENT_BROWSER_BACKGROUND_SYNC_BACKGROUND_SYNC_REGISTRATION_OPTIONS_H_
+#include <stdint.h>
+
#include <string>
-#include "base/basictypes.h"
#include "content/browser/background_sync/background_sync.pb.h"
#include "content/common/content_export.h"
diff --git a/content/browser/background_sync/background_sync_service_impl.h b/content/browser/background_sync/background_sync_service_impl.h
index 2557e9b..a5b6d18 100644
--- a/content/browser/background_sync/background_sync_service_impl.h
+++ b/content/browser/background_sync/background_sync_service_impl.h
@@ -5,7 +5,10 @@
#ifndef CONTENT_BROWSER_BACKGROUND_SYNC_BACKGROUND_SYNC_SERVICE_IMPL_H_
#define CONTENT_BROWSER_BACKGROUND_SYNC_BACKGROUND_SYNC_SERVICE_IMPL_H_
+#include <stdint.h>
+
#include "base/id_map.h"
+#include "base/macros.h"
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_vector.h"
#include "content/browser/background_sync/background_sync_manager.h"
diff --git a/content/browser/background_sync/background_sync_service_impl_unittest.cc b/content/browser/background_sync/background_sync_service_impl_unittest.cc
index 55a7c01..306bbe5 100644
--- a/content/browser/background_sync/background_sync_service_impl_unittest.cc
+++ b/content/browser/background_sync/background_sync_service_impl_unittest.cc
@@ -4,6 +4,8 @@
#include "content/browser/background_sync/background_sync_service_impl.h"
+#include <stdint.h>
+
#include "base/bind.h"
#include "base/bind_helpers.h"
#include "base/memory/scoped_ptr.h"
@@ -30,10 +32,10 @@ const char kServiceWorkerScript[] = "https://example.com/a/script.js";
// Callbacks from SetUp methods
void RegisterServiceWorkerCallback(bool* called,
- int64* store_registration_id,
+ int64_t* store_registration_id,
ServiceWorkerStatusCode status,
const std::string& status_message,
- int64 registration_id) {
+ int64_t registration_id) {
EXPECT_EQ(SERVICE_WORKER_OK, status) << ServiceWorkerStatusToString(status);
*called = true;
*store_registration_id = registration_id;
@@ -195,7 +197,7 @@ class BackgroundSyncServiceImplTest : public testing::Test {
}
void UnregisterOneShot(
- int32 handle_id,
+ int32_t handle_id,
const BackgroundSyncService::UnregisterCallback& callback) {
service_impl_->Unregister(
handle_id, sw_registration_id_, callback);
@@ -220,7 +222,7 @@ class BackgroundSyncServiceImplTest : public testing::Test {
}
void NotifyWhenDone(
- int32 handle_id,
+ int32_t handle_id,
const BackgroundSyncService::NotifyWhenFinishedCallback& callback) {
service_impl_->NotifyWhenFinished(handle_id, callback);
base::RunLoop().RunUntilIdle();
@@ -231,7 +233,7 @@ class BackgroundSyncServiceImplTest : public testing::Test {
scoped_ptr<EmbeddedWorkerTestHelper> embedded_worker_helper_;
scoped_ptr<base::PowerMonitor> power_monitor_;
scoped_refptr<BackgroundSyncContextImpl> background_sync_context_;
- int64 sw_registration_id_;
+ int64_t sw_registration_id_;
scoped_refptr<ServiceWorkerRegistration> sw_registration_;
BackgroundSyncServicePtr service_ptr_;
BackgroundSyncServiceImpl*
diff --git a/content/browser/battery_status/battery_monitor_impl_browsertest.cc b/content/browser/battery_status/battery_monitor_impl_browsertest.cc
index 51fe83d..4c6a7e5 100644
--- a/content/browser/battery_status/battery_monitor_impl_browsertest.cc
+++ b/content/browser/battery_status/battery_monitor_impl_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 "base/macros.h"
#include "base/thread_task_runner_handle.h"
#include "content/public/browser/web_contents.h"
#include "content/public/test/content_browser_test.h"
diff --git a/content/browser/battery_status/battery_monitor_integration_browsertest.cc b/content/browser/battery_status/battery_monitor_integration_browsertest.cc
index d6e0bba..835e5f1 100644
--- a/content/browser/battery_status/battery_monitor_integration_browsertest.cc
+++ b/content/browser/battery_status/battery_monitor_integration_browsertest.cc
@@ -4,7 +4,9 @@
#include "base/callback_list.h"
#include "base/lazy_instance.h"
+#include "base/macros.h"
#include "base/thread_task_runner_handle.h"
+#include "build/build_config.h"
#include "content/public/browser/content_browser_client.h"
#include "content/public/browser/web_contents.h"
#include "content/public/common/content_client.h"
diff --git a/content/browser/blob_storage/blob_async_builder_host_unittest.cc b/content/browser/blob_storage/blob_async_builder_host_unittest.cc
index ddf2931..86c648e 100644
--- a/content/browser/blob_storage/blob_async_builder_host_unittest.cc
+++ b/content/browser/blob_storage/blob_async_builder_host_unittest.cc
@@ -4,6 +4,9 @@
#include "storage/browser/blob/blob_async_builder_host.h"
+#include <stddef.h>
+#include <stdint.h>
+
#include "base/bind.h"
#include "base/logging.h"
#include "base/memory/shared_memory.h"
diff --git a/content/browser/blob_storage/blob_async_transport_strategy_unittest.cc b/content/browser/blob_storage/blob_async_transport_strategy_unittest.cc
index dd45f2b..6318439 100644
--- a/content/browser/blob_storage/blob_async_transport_strategy_unittest.cc
+++ b/content/browser/blob_storage/blob_async_transport_strategy_unittest.cc
@@ -4,6 +4,9 @@
#include "storage/browser/blob/blob_async_transport_strategy.h"
+#include <stddef.h>
+#include <stdint.h>
+
#include <string>
#include "base/logging.h"
diff --git a/content/browser/bluetooth/bluetooth_dispatcher_host.cc b/content/browser/bluetooth/bluetooth_dispatcher_host.cc
index 7758a3e..3f93b2b 100644
--- a/content/browser/bluetooth/bluetooth_dispatcher_host.cc
+++ b/content/browser/bluetooth/bluetooth_dispatcher_host.cc
@@ -11,6 +11,8 @@
#include "content/browser/bluetooth/bluetooth_dispatcher_host.h"
+#include <stddef.h>
+
#include <utility>
#include "base/bind.h"
@@ -537,7 +539,7 @@ void BluetoothDispatcherHost::GattServicesDiscovered(
void BluetoothDispatcherHost::GattCharacteristicValueChanged(
device::BluetoothAdapter* adapter,
device::BluetoothGattCharacteristic* characteristic,
- const std::vector<uint8>& value) {
+ const std::vector<uint8_t>& value) {
VLOG(1) << "Characteristic updated: " << characteristic->GetIdentifier();
auto iter =
active_characteristic_threads_.find(characteristic->GetIdentifier());
@@ -565,7 +567,7 @@ void BluetoothDispatcherHost::GattCharacteristicValueChanged(
void BluetoothDispatcherHost::NotifyActiveCharacteristic(
int thread_id,
const std::string& characteristic_instance_id,
- const std::vector<uint8>& value) {
+ const std::vector<uint8_t>& value) {
Send(new BluetoothMsg_CharacteristicValueChanged(
thread_id, characteristic_instance_id, value));
}
@@ -819,7 +821,7 @@ void BluetoothDispatcherHost::OnGetCharacteristic(
// https://crbug.com/495379
Send(new BluetoothMsg_GetCharacteristicSuccess(
thread_id, request_id, characteristic_instance_id,
- static_cast<uint32>(characteristic->GetProperties())));
+ static_cast<uint32_t>(characteristic->GetProperties())));
return;
}
}
@@ -1180,7 +1182,7 @@ void BluetoothDispatcherHost::AddToServicesMapAndSendGetPrimaryServiceSuccess(
void BluetoothDispatcherHost::OnCharacteristicValueRead(
int thread_id,
int request_id,
- const std::vector<uint8>& value) {
+ const std::vector<uint8_t>& value) {
DCHECK_CURRENTLY_ON(BrowserThread::UI);
RecordCharacteristicReadValueOutcome(UMAGATTOperationOutcome::SUCCESS);
Send(new BluetoothMsg_ReadCharacteristicValueSuccess(thread_id, request_id,
diff --git a/content/browser/bluetooth/bluetooth_dispatcher_host.h b/content/browser/bluetooth/bluetooth_dispatcher_host.h
index 20170af..d45271d 100644
--- a/content/browser/bluetooth/bluetooth_dispatcher_host.h
+++ b/content/browser/bluetooth/bluetooth_dispatcher_host.h
@@ -5,10 +5,12 @@
#ifndef CONTENT_BROWSER_BLUETOOTH_BLUETOOTH_DISPATCHER_HOST_H_
#define CONTENT_BROWSER_BLUETOOTH_BLUETOOTH_DISPATCHER_HOST_H_
+#include <stdint.h>
+
#include <map>
-#include "base/basictypes.h"
#include "base/id_map.h"
+#include "base/macros.h"
#include "base/memory/scoped_vector.h"
#include "base/memory/weak_ptr.h"
#include "content/public/browser/bluetooth_chooser.h"
@@ -85,13 +87,13 @@ class CONTENT_EXPORT BluetoothDispatcherHost final
void GattCharacteristicValueChanged(
device::BluetoothAdapter* adapter,
device::BluetoothGattCharacteristic* characteristic,
- const std::vector<uint8>& value) override;
+ const std::vector<uint8_t>& value) override;
// Sends an IPC to the thread informing that a the characteristic's
// value changed.
void NotifyActiveCharacteristic(int thread_id,
const std::string& characteristic_instance_id,
- const std::vector<uint8>& value);
+ const std::vector<uint8_t>& value);
// IPC Handlers, see definitions in bluetooth_messages.h.
void OnRequestDevice(
@@ -173,7 +175,7 @@ class CONTENT_EXPORT BluetoothDispatcherHost final
// Callbacks for BluetoothGattCharacteristic::ReadRemoteCharacteristic.
void OnCharacteristicValueRead(int thread_id,
int request_id,
- const std::vector<uint8>& value);
+ const std::vector<uint8_t>& value);
void OnCharacteristicReadValueError(
int thread_id,
int request_id,
diff --git a/content/browser/bluetooth/bluetooth_metrics.cc b/content/browser/bluetooth/bluetooth_metrics.cc
index 32dde3b..ef82920 100644
--- a/content/browser/bluetooth/bluetooth_metrics.cc
+++ b/content/browser/bluetooth/bluetooth_metrics.cc
@@ -4,6 +4,8 @@
#include "content/browser/bluetooth/bluetooth_metrics.h"
+#include <stdint.h>
+
#include <map>
#include <set>
#include "base/hash.h"
@@ -18,7 +20,7 @@ namespace {
// TODO(ortuno): Remove once we have a macro to histogram strings.
// http://crbug.com/520284
int HashUUID(const std::string& uuid) {
- uint32 data = base::SuperFastHash(uuid.data(), uuid.size());
+ uint32_t data = base::SuperFastHash(uuid.data(), uuid.size());
// Strip off the signed bit because UMA doesn't support negative values,
// but takes a signed int as input.
diff --git a/content/browser/bootstrap_sandbox_manager_mac.h b/content/browser/bootstrap_sandbox_manager_mac.h
index 72233cb..edddde8 100644
--- a/content/browser/bootstrap_sandbox_manager_mac.h
+++ b/content/browser/bootstrap_sandbox_manager_mac.h
@@ -5,6 +5,7 @@
#ifndef CONTENT_BROWSER_BOOTSTRAP_SANDBOX_MANAGER_MAC_H_
#define CONTENT_BROWSER_BOOTSTRAP_SANDBOX_MANAGER_MAC_H_
+#include "base/macros.h"
#include "base/memory/scoped_ptr.h"
#include "base/memory/singleton.h"
#include "content/public/browser/browser_child_process_observer.h"
diff --git a/content/browser/browser_child_process_host_impl.cc b/content/browser/browser_child_process_host_impl.cc
index 3bd5b7a..f2b4f80 100644
--- a/content/browser/browser_child_process_host_impl.cc
+++ b/content/browser/browser_child_process_host_impl.cc
@@ -11,10 +11,12 @@
#include "base/files/file_path.h"
#include "base/lazy_instance.h"
#include "base/logging.h"
+#include "base/macros.h"
#include "base/metrics/histogram.h"
#include "base/stl_util.h"
#include "base/strings/string_util.h"
#include "base/synchronization/waitable_event.h"
+#include "build/build_config.h"
#include "components/tracing/tracing_switches.h"
#include "content/browser/histogram_message_filter.h"
#include "content/browser/loader/resource_message_filter.h"
@@ -281,7 +283,7 @@ bool BrowserChildProcessHostImpl::OnMessageReceived(
return delegate_->OnMessageReceived(message);
}
-void BrowserChildProcessHostImpl::OnChannelConnected(int32 peer_pid) {
+void BrowserChildProcessHostImpl::OnChannelConnected(int32_t peer_pid) {
DCHECK_CURRENTLY_ON(BrowserThread::IO);
is_channel_connected_ = true;
diff --git a/content/browser/browser_child_process_host_impl.h b/content/browser/browser_child_process_host_impl.h
index 63236fb..6b89e7f 100644
--- a/content/browser/browser_child_process_host_impl.h
+++ b/content/browser/browser_child_process_host_impl.h
@@ -5,12 +5,15 @@
#ifndef CONTENT_BROWSER_BROWSER_CHILD_PROCESS_HOST_IMPL_H_
#define CONTENT_BROWSER_BROWSER_CHILD_PROCESS_HOST_IMPL_H_
+#include <stdint.h>
+
#include <list>
#include "base/compiler_specific.h"
#include "base/memory/scoped_ptr.h"
#include "base/process/process.h"
#include "base/synchronization/waitable_event_watcher.h"
+#include "build/build_config.h"
#include "content/browser/child_process_launcher.h"
#include "content/browser/power_monitor_message_broadcaster.h"
#include "content/public/browser/browser_child_process_host.h"
@@ -69,7 +72,7 @@ class CONTENT_EXPORT BrowserChildProcessHostImpl
void OnChildDisconnected() override;
const base::Process& GetProcess() const override;
bool OnMessageReceived(const IPC::Message& message) override;
- void OnChannelConnected(int32 peer_pid) override;
+ void OnChannelConnected(int32_t peer_pid) override;
void OnChannelError() override;
void OnBadMessageReceived(const IPC::Message& message) override;
diff --git a/content/browser/browser_context.cc b/content/browser/browser_context.cc
index d516cd48..566cdb5 100644
--- a/content/browser/browser_context.cc
+++ b/content/browser/browser_context.cc
@@ -4,6 +4,11 @@
#include "content/public/browser/browser_context.h"
+#include <stddef.h>
+#include <stdint.h>
+
+#include "build/build_config.h"
+
#if !defined(OS_IOS)
#include "content/browser/download/download_manager_impl.h"
#include "content/browser/fileapi/chrome_blob_storage_context.h"
@@ -248,7 +253,7 @@ void BrowserContext::CreateFileBackedBlob(
void BrowserContext::DeliverPushMessage(
BrowserContext* browser_context,
const GURL& origin,
- int64 service_worker_registration_id,
+ int64_t service_worker_registration_id,
const std::string& data,
const base::Callback<void(PushDeliveryStatus)>& callback) {
DCHECK_CURRENTLY_ON(BrowserThread::UI);
diff --git a/content/browser/browser_main.h b/content/browser/browser_main.h
index ff52aef..8fab146 100644
--- a/content/browser/browser_main.h
+++ b/content/browser/browser_main.h
@@ -5,7 +5,6 @@
#ifndef CONTENT_BROWSER_BROWSER_MAIN_H_
#define CONTENT_BROWSER_BROWSER_MAIN_H_
-#include "base/basictypes.h"
#include "content/common/content_export.h"
namespace content {
diff --git a/content/browser/browser_main_loop.cc b/content/browser/browser_main_loop.cc
index b574596..81f56ea 100644
--- a/content/browser/browser_main_loop.cc
+++ b/content/browser/browser_main_loop.cc
@@ -4,11 +4,14 @@
#include "content/browser/browser_main_loop.h"
+#include <stddef.h>
+
#include "base/bind.h"
#include "base/command_line.h"
#include "base/feature_list.h"
#include "base/location.h"
#include "base/logging.h"
+#include "base/macros.h"
#include "base/memory/memory_pressure_monitor.h"
#include "base/metrics/field_trial.h"
#include "base/metrics/histogram.h"
@@ -27,6 +30,7 @@
#include "base/timer/hi_res_timer_manager.h"
#include "base/trace_event/memory_dump_manager.h"
#include "base/trace_event/trace_event.h"
+#include "build/build_config.h"
#include "components/tracing/trace_config_file.h"
#include "components/tracing/trace_to_console.h"
#include "components/tracing/tracing_switches.h"
@@ -65,6 +69,7 @@
#include "content/public/common/result_codes.h"
#include "device/battery/battery_status_service.h"
#include "ipc/ipc_channel.h"
+#include "ipc/mojo/scoped_ipc_support.h"
#include "media/audio/audio_manager.h"
#include "media/base/media.h"
#include "media/base/user_input_monitor.h"
@@ -72,7 +77,6 @@
#include "net/base/network_change_notifier.h"
#include "net/socket/client_socket_factory.h"
#include "net/ssl/ssl_config_service.h"
-#include "ipc/mojo/scoped_ipc_support.h"
#include "skia/ext/event_tracer_impl.h"
#include "skia/ext/skia_memory_dump_provider.h"
#include "sql/sql_memory_dump_provider.h"
diff --git a/content/browser/browser_main_loop.h b/content/browser/browser_main_loop.h
index 07c95ae..ae07f76 100644
--- a/content/browser/browser_main_loop.h
+++ b/content/browser/browser_main_loop.h
@@ -5,11 +5,12 @@
#ifndef CONTENT_BROWSER_BROWSER_MAIN_LOOP_H_
#define CONTENT_BROWSER_BROWSER_MAIN_LOOP_H_
-#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/timer/timer.h"
+#include "build/build_config.h"
#include "content/browser/browser_process_sub_thread.h"
#include "content/public/browser/browser_main_runner.h"
diff --git a/content/browser/browser_main_runner.cc b/content/browser/browser_main_runner.cc
index ebbad1c..2585c8d 100644
--- a/content/browser/browser_main_runner.cc
+++ b/content/browser/browser_main_runner.cc
@@ -8,6 +8,7 @@
#include "base/command_line.h"
#include "base/debug/leak_annotations.h"
#include "base/logging.h"
+#include "base/macros.h"
#include "base/metrics/histogram.h"
#include "base/metrics/histogram_macros.h"
#include "base/metrics/statistics_recorder.h"
@@ -16,6 +17,7 @@
#include "base/time/time.h"
#include "base/trace_event/trace_event.h"
#include "base/tracked_objects.h"
+#include "build/build_config.h"
#include "components/tracing/trace_config_file.h"
#include "components/tracing/tracing_switches.h"
#include "content/browser/browser_main_loop.h"
diff --git a/content/browser/browser_plugin/browser_plugin_embedder.h b/content/browser/browser_plugin/browser_plugin_embedder.h
index 4c37318..7bff623 100644
--- a/content/browser/browser_plugin/browser_plugin_embedder.h
+++ b/content/browser/browser_plugin/browser_plugin_embedder.h
@@ -14,6 +14,7 @@
#ifndef CONTENT_BROWSER_BROWSER_PLUGIN_BROWSER_PLUGIN_EMBEDDER_H_
#define CONTENT_BROWSER_BROWSER_PLUGIN_BROWSER_PLUGIN_EMBEDDER_H_
+#include "base/macros.h"
#include "base/memory/weak_ptr.h"
#include "content/public/browser/web_contents.h"
#include "content/public/browser/web_contents_observer.h"
diff --git a/content/browser/browser_plugin/browser_plugin_guest.cc b/content/browser/browser_plugin/browser_plugin_guest.cc
index 7d2ee45..33262a8 100644
--- a/content/browser/browser_plugin/browser_plugin_guest.cc
+++ b/content/browser/browser_plugin/browser_plugin_guest.cc
@@ -4,11 +4,15 @@
#include "content/browser/browser_plugin/browser_plugin_guest.h"
+#include <stddef.h>
+
#include <algorithm>
+#include "base/macros.h"
#include "base/message_loop/message_loop.h"
#include "base/pickle.h"
#include "base/strings/utf_string_conversions.h"
+#include "build/build_config.h"
#include "cc/surfaces/surface.h"
#include "cc/surfaces/surface_manager.h"
#include "content/browser/browser_plugin/browser_plugin_embedder.h"
@@ -396,7 +400,7 @@ void BrowserPluginGuest::PointerLockPermissionResponse(bool allow) {
// TODO(wjmaclean): Remove this once any remaining users of this pathway
// are gone.
void BrowserPluginGuest::SwapCompositorFrame(
- uint32 output_surface_id,
+ uint32_t output_surface_id,
int host_process_id,
int host_routing_id,
scoped_ptr<cc::CompositorFrame> frame) {
diff --git a/content/browser/browser_plugin/browser_plugin_guest.h b/content/browser/browser_plugin/browser_plugin_guest.h
index 34598d9..9cdc85e 100644
--- a/content/browser/browser_plugin/browser_plugin_guest.h
+++ b/content/browser/browser_plugin/browser_plugin_guest.h
@@ -18,13 +18,17 @@
#ifndef CONTENT_BROWSER_BROWSER_PLUGIN_BROWSER_PLUGIN_GUEST_H_
#define CONTENT_BROWSER_BROWSER_PLUGIN_BROWSER_PLUGIN_GUEST_H_
+#include <stdint.h>
+
#include <map>
#include <queue>
#include "base/compiler_specific.h"
+#include "base/macros.h"
#include "base/memory/linked_ptr.h"
#include "base/memory/weak_ptr.h"
#include "base/values.h"
+#include "build/build_config.h"
#include "content/common/edit_command.h"
#include "content/common/input/input_event_ack_state.h"
#include "content/public/browser/browser_plugin_guest_delegate.h"
@@ -238,7 +242,7 @@ class CONTENT_EXPORT BrowserPluginGuest : public GuestHost,
void PointerLockPermissionResponse(bool allow);
// The next two functions are virtual for test purposes.
- virtual void SwapCompositorFrame(uint32 output_surface_id,
+ virtual void SwapCompositorFrame(uint32_t output_surface_id,
int host_process_id,
int host_routing_id,
scoped_ptr<cc::CompositorFrame> frame);
diff --git a/content/browser/browser_plugin/browser_plugin_message_filter.h b/content/browser/browser_plugin/browser_plugin_message_filter.h
index 9c89f81..ff17d6f 100644
--- a/content/browser/browser_plugin/browser_plugin_message_filter.h
+++ b/content/browser/browser_plugin/browser_plugin_message_filter.h
@@ -5,6 +5,7 @@
#ifndef CONTENT_BROWSER_BROWSER_PLUGIN_BROWSER_PLUGIN_MESSAGE_FILTER_H_
#define CONTENT_BROWSER_BROWSER_PLUGIN_BROWSER_PLUGIN_MESSAGE_FILTER_H_
+#include "base/macros.h"
#include "content/public/browser/browser_message_filter.h"
namespace content {
diff --git a/content/browser/browser_plugin/browser_plugin_popup_menu_helper_mac.h b/content/browser/browser_plugin/browser_plugin_popup_menu_helper_mac.h
index 600cb362..7dc9b65 100644
--- a/content/browser/browser_plugin/browser_plugin_popup_menu_helper_mac.h
+++ b/content/browser/browser_plugin/browser_plugin_popup_menu_helper_mac.h
@@ -5,6 +5,7 @@
#ifndef CONTENT_BROWSER_BROWSER_PLUGIN_BROWSER_PLUGIN_POPUP_MENU_HELPER_MAC_H_
#define CONTENT_BROWSER_BROWSER_PLUGIN_BROWSER_PLUGIN_POPUP_MENU_HELPER_MAC_H_
+#include "base/macros.h"
#include "content/browser/frame_host/popup_menu_helper_mac.h"
namespace content {
diff --git a/content/browser/browser_process_sub_thread.h b/content/browser/browser_process_sub_thread.h
index 5899fa3..2276d6d 100644
--- a/content/browser/browser_process_sub_thread.h
+++ b/content/browser/browser_process_sub_thread.h
@@ -5,7 +5,8 @@
#ifndef CONTENT_BROWSER_BROWSER_PROCESS_SUB_THREAD_H_
#define CONTENT_BROWSER_BROWSER_PROCESS_SUB_THREAD_H_
-#include "base/basictypes.h"
+#include "base/macros.h"
+#include "build/build_config.h"
#include "content/browser/browser_thread_impl.h"
#include "content/common/content_export.h"
diff --git a/content/browser/browser_shutdown_profile_dumper.h b/content/browser/browser_shutdown_profile_dumper.h
index cc8666e..859811a 100644
--- a/content/browser/browser_shutdown_profile_dumper.h
+++ b/content/browser/browser_shutdown_profile_dumper.h
@@ -5,10 +5,12 @@
#ifndef CONTENT_BROWSER_BROWSER_SHUTDOWN_PROFILE_DUMPER_H_
#define CONTENT_BROWSER_BROWSER_SHUTDOWN_PROFILE_DUMPER_H_
+#include <stddef.h>
+
#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/ref_counted_memory.h"
#include "content/common/content_export.h"
diff --git a/content/browser/browser_side_navigation_browsertest.cc b/content/browser/browser_side_navigation_browsertest.cc
index cf081e7..3ffef7d 100644
--- a/content/browser/browser_side_navigation_browsertest.cc
+++ b/content/browser/browser_side_navigation_browsertest.cc
@@ -2,7 +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 <stdint.h>
+
#include "base/command_line.h"
#include "base/strings/stringprintf.h"
#include "content/browser/web_contents/web_contents_impl.h"
@@ -137,7 +138,7 @@ IN_PROC_BROWSER_TEST_F(BrowserSideNavigationBrowserTest,
TestNavigationObserver observer(shell()->web_contents());
const char kReplacePortNumber[] =
"window.domAutomationController.send(setPortNumber(%d));";
- uint16 port_number = embedded_test_server()->port();
+ uint16_t port_number = embedded_test_server()->port();
GURL url = embedded_test_server()->GetURL("foo.com", "/title2.html");
bool success = false;
EXPECT_TRUE(ExecuteScriptAndExtractBool(
diff --git a/content/browser/browser_thread_impl.cc b/content/browser/browser_thread_impl.cc
index b0a24ae..d7f7394 100644
--- a/content/browser/browser_thread_impl.cc
+++ b/content/browser/browser_thread_impl.cc
@@ -10,9 +10,11 @@
#include "base/bind.h"
#include "base/compiler_specific.h"
#include "base/lazy_instance.h"
+#include "base/macros.h"
#include "base/single_thread_task_runner.h"
#include "base/threading/sequenced_worker_pool.h"
#include "base/threading/thread_restrictions.h"
+#include "build/build_config.h"
#include "content/public/browser/browser_thread_delegate.h"
#include "content/public/browser/content_browser_client.h"
#include "net/disk_cache/simple/simple_backend_impl.h"
diff --git a/content/browser/browser_url_handler_impl.cc b/content/browser/browser_url_handler_impl.cc
index 4f1ed35..a79b89d 100644
--- a/content/browser/browser_url_handler_impl.cc
+++ b/content/browser/browser_url_handler_impl.cc
@@ -4,6 +4,9 @@
#include "content/browser/browser_url_handler_impl.h"
+#include <stddef.h>
+
+#include "base/macros.h"
#include "base/strings/string_util.h"
#include "content/browser/frame_host/debug_urls.h"
#include "content/browser/webui/web_ui_impl.h"
diff --git a/content/browser/browser_url_handler_impl.h b/content/browser/browser_url_handler_impl.h
index c5ba416..6e76431 100644
--- a/content/browser/browser_url_handler_impl.h
+++ b/content/browser/browser_url_handler_impl.h
@@ -5,10 +5,11 @@
#ifndef CONTENT_BROWSER_BROWSER_URL_HANDLER_IMPL_H_
#define CONTENT_BROWSER_BROWSER_URL_HANDLER_IMPL_H_
-#include <vector>
#include <utility>
+#include <vector>
#include "base/gtest_prod_util.h"
+#include "base/macros.h"
#include "base/memory/singleton.h"
#include "content/public/browser/browser_url_handler.h"
diff --git a/content/browser/browsing_instance.h b/content/browser/browsing_instance.h
index 60518b07..0cb80ac 100644
--- a/content/browser/browsing_instance.h
+++ b/content/browser/browsing_instance.h
@@ -5,9 +5,12 @@
#ifndef CONTENT_BROWSER_BROWSING_INSTANCE_H_
#define CONTENT_BROWSER_BROWSING_INSTANCE_H_
+#include <stddef.h>
+
#include "base/containers/hash_tables.h"
#include "base/lazy_instance.h"
#include "base/logging.h"
+#include "base/macros.h"
#include "base/memory/ref_counted.h"
#include "content/common/content_export.h"
#include "content/public/browser/browser_context.h"
diff --git a/content/browser/byte_stream.cc b/content/browser/byte_stream.cc
index 5c836bd..b51cded 100644
--- a/content/browser/byte_stream.cc
+++ b/content/browser/byte_stream.cc
@@ -10,6 +10,7 @@
#include "base/bind.h"
#include "base/location.h"
+#include "base/macros.h"
#include "base/memory/ref_counted.h"
#include "base/sequenced_task_runner.h"
diff --git a/content/browser/byte_stream.h b/content/browser/byte_stream.h
index 60b0163..8590645 100644
--- a/content/browser/byte_stream.h
+++ b/content/browser/byte_stream.h
@@ -5,6 +5,8 @@
#ifndef CONTENT_BROWSER_BYTE_STREAM_H_
#define CONTENT_BROWSER_BYTE_STREAM_H_
+#include <stddef.h>
+
#include "base/callback.h"
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
diff --git a/content/browser/byte_stream_unittest.cc b/content/browser/byte_stream_unittest.cc
index f750cf2..4c348b7 100644
--- a/content/browser/byte_stream_unittest.cc
+++ b/content/browser/byte_stream_unittest.cc
@@ -4,6 +4,8 @@
#include "content/browser/byte_stream.h"
+#include <stddef.h>
+
#include <deque>
#include <limits>
diff --git a/content/browser/cache_storage/cache_storage.cc b/content/browser/cache_storage/cache_storage.cc
index ffdeed1..6697f91 100644
--- a/content/browser/cache_storage/cache_storage.cc
+++ b/content/browser/cache_storage/cache_storage.cc
@@ -4,6 +4,8 @@
#include "content/browser/cache_storage/cache_storage.h"
+#include <stddef.h>
+
#include <set>
#include <string>
@@ -571,13 +573,13 @@ void CacheStorage::CloseAllCaches(const base::Closure& callback) {
pending_callback));
}
-int64 CacheStorage::MemoryBackedSize() const {
+int64_t CacheStorage::MemoryBackedSize() const {
DCHECK_CURRENTLY_ON(BrowserThread::IO);
if (!initialized_ || !memory_only_)
return 0;
- int64 sum = 0;
+ int64_t sum = 0;
for (auto& key_value : cache_map_) {
if (key_value.second)
sum += key_value.second->MemoryBackedSize();
diff --git a/content/browser/cache_storage/cache_storage.h b/content/browser/cache_storage/cache_storage.h
index b2ea387..b1bf67e 100644
--- a/content/browser/cache_storage/cache_storage.h
+++ b/content/browser/cache_storage/cache_storage.h
@@ -5,11 +5,14 @@
#ifndef CONTENT_BROWSER_CACHE_STORAGE_CACHE_STORAGE_H_
#define CONTENT_BROWSER_CACHE_STORAGE_CACHE_STORAGE_H_
+#include <stdint.h>
+
#include <map>
#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/weak_ptr.h"
#include "content/browser/cache_storage/cache_storage_cache.h"
@@ -94,7 +97,7 @@ class CONTENT_EXPORT CacheStorage {
// The size of all of the origin's contents in memory. Returns 0 if the cache
// backend is not a memory backend. Runs synchronously.
- int64 MemoryBackedSize() const;
+ int64_t MemoryBackedSize() const;
// The functions below are for tests to verify that the operations run
// serially.
diff --git a/content/browser/cache_storage/cache_storage_blob_to_disk_cache.h b/content/browser/cache_storage/cache_storage_blob_to_disk_cache.h
index 226ebf1..18e6fd9 100644
--- a/content/browser/cache_storage/cache_storage_blob_to_disk_cache.h
+++ b/content/browser/cache_storage/cache_storage_blob_to_disk_cache.h
@@ -6,6 +6,7 @@
#define CONTENT_BROWSER_CACHE_STORAGE_CACHE_STORAGE_BLOB_TO_DISK_CACHE_H_
#include "base/callback.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/content/browser/cache_storage/cache_storage_cache.cc b/content/browser/cache_storage/cache_storage_cache.cc
index 687f690..6233737 100644
--- a/content/browser/cache_storage/cache_storage_cache.cc
+++ b/content/browser/cache_storage/cache_storage_cache.cc
@@ -4,11 +4,14 @@
#include "content/browser/cache_storage/cache_storage_cache.h"
+#include <stddef.h>
+
#include <string>
#include "base/barrier_closure.h"
#include "base/files/file_path.h"
#include "base/guid.h"
+#include "base/macros.h"
#include "base/metrics/histogram_macros.h"
#include "base/strings/string_split.h"
#include "base/strings/string_util.h"
@@ -423,7 +426,7 @@ void CacheStorageCache::Close(const base::Closure& callback) {
pending_callback));
}
-int64 CacheStorageCache::MemoryBackedSize() const {
+int64_t CacheStorageCache::MemoryBackedSize() const {
if (backend_state_ != BACKEND_OPEN || !memory_only_)
return 0;
@@ -431,7 +434,7 @@ int64 CacheStorageCache::MemoryBackedSize() const {
backend_->CreateIterator();
disk_cache::Entry* entry = nullptr;
- int64 sum = 0;
+ int64_t sum = 0;
std::vector<disk_cache::Entry*> entries;
int rv = net::OK;
diff --git a/content/browser/cache_storage/cache_storage_cache.h b/content/browser/cache_storage/cache_storage_cache.h
index 75d0c86..a9dcd4c 100644
--- a/content/browser/cache_storage/cache_storage_cache.h
+++ b/content/browser/cache_storage/cache_storage_cache.h
@@ -5,11 +5,14 @@
#ifndef CONTENT_BROWSER_CACHE_STORAGE_CACHE_STORAGE_CACHE_H_
#define CONTENT_BROWSER_CACHE_STORAGE_CACHE_STORAGE_CACHE_H_
+#include <stdint.h>
+
#include <vector>
#include "base/callback.h"
#include "base/files/file_path.h"
#include "base/id_map.h"
+#include "base/macros.h"
#include "base/memory/ref_counted.h"
#include "base/memory/weak_ptr.h"
#include "content/common/cache_storage/cache_storage_types.h"
@@ -105,7 +108,7 @@ class CONTENT_EXPORT CacheStorageCache
// The size of the cache contents in memory. Returns 0 if the cache backend is
// not a memory cache backend.
- int64 MemoryBackedSize() const;
+ int64_t MemoryBackedSize() const;
base::FilePath path() const { return path_; }
diff --git a/content/browser/cache_storage/cache_storage_cache_unittest.cc b/content/browser/cache_storage/cache_storage_cache_unittest.cc
index 51f6736..d87baa7 100644
--- a/content/browser/cache_storage/cache_storage_cache_unittest.cc
+++ b/content/browser/cache_storage/cache_storage_cache_unittest.cc
@@ -4,8 +4,12 @@
#include "content/browser/cache_storage/cache_storage_cache.h"
+#include <stddef.h>
+#include <stdint.h>
+
#include "base/files/file_path.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/run_loop.h"
@@ -57,7 +61,7 @@ class DelayableBackend : public disk_cache::Backend {
net::CacheType GetCacheType() const override {
return backend_->GetCacheType();
}
- int32 GetEntryCount() const override { return backend_->GetEntryCount(); }
+ int32_t GetEntryCount() const override { return backend_->GetEntryCount(); }
int OpenEntry(const std::string& key,
disk_cache::Entry** entry,
const CompletionCallback& callback) override {
@@ -139,7 +143,7 @@ void CopyBody(const storage::BlobDataHandle& blob_handle, std::string* output) {
}
case storage::DataElement::TYPE_DISK_CACHE_ENTRY: {
disk_cache::Entry* entry = item->disk_cache_entry();
- int32 body_size = entry->GetDataSize(item->disk_cache_stream_index());
+ int32_t body_size = entry->GetDataSize(item->disk_cache_stream_index());
scoped_refptr<net::IOBuffer> io_buffer = new net::IOBuffer(body_size);
net::TestCompletionCallback callback;
@@ -912,7 +916,7 @@ TEST_P(CacheStorageCacheTestP, QuotaManagerModified) {
EXPECT_TRUE(Put(no_body_request_, no_body_response_));
EXPECT_EQ(1, quota_manager_proxy_->notify_storage_modified_count());
EXPECT_LT(0, quota_manager_proxy_->last_notified_delta());
- int64 sum_delta = quota_manager_proxy_->last_notified_delta();
+ int64_t sum_delta = quota_manager_proxy_->last_notified_delta();
EXPECT_TRUE(Put(body_request_, body_response_));
EXPECT_EQ(2, quota_manager_proxy_->notify_storage_modified_count());
@@ -934,7 +938,7 @@ TEST_F(CacheStorageCacheMemoryOnlyTest, MemoryBackedSize) {
EXPECT_EQ(0, cache_->MemoryBackedSize());
EXPECT_TRUE(Put(no_body_request_, no_body_response_));
EXPECT_LT(0, cache_->MemoryBackedSize());
- int64 no_body_size = cache_->MemoryBackedSize();
+ int64_t no_body_size = cache_->MemoryBackedSize();
EXPECT_TRUE(Delete(no_body_request_));
EXPECT_EQ(0, cache_->MemoryBackedSize());
diff --git a/content/browser/cache_storage/cache_storage_dispatcher_host.cc b/content/browser/cache_storage/cache_storage_dispatcher_host.cc
index 3dd8d45..c912c15 100644
--- a/content/browser/cache_storage/cache_storage_dispatcher_host.cc
+++ b/content/browser/cache_storage/cache_storage_dispatcher_host.cc
@@ -4,8 +4,11 @@
#include "content/browser/cache_storage/cache_storage_dispatcher_host.h"
+#include <stddef.h>
+
#include "base/bind.h"
#include "base/logging.h"
+#include "base/macros.h"
#include "base/strings/string16.h"
#include "base/strings/utf_string_conversions.h"
#include "base/trace_event/trace_event.h"
@@ -23,7 +26,7 @@ namespace content {
namespace {
-const uint32 kFilteredMessageClasses[] = {CacheStorageMsgStart};
+const uint32_t kFilteredMessageClasses[] = {CacheStorageMsgStart};
blink::WebServiceWorkerCacheError ToWebServiceWorkerCacheError(
CacheStorageError err) {
diff --git a/content/browser/cache_storage/cache_storage_dispatcher_host.h b/content/browser/cache_storage/cache_storage_dispatcher_host.h
index 966d461..7743509 100644
--- a/content/browser/cache_storage/cache_storage_dispatcher_host.h
+++ b/content/browser/cache_storage/cache_storage_dispatcher_host.h
@@ -5,8 +5,11 @@
#ifndef CONTENT_BROWSER_CACHE_STORAGE_CACHE_STORAGE_DISPATCHER_HOST_H_
#define CONTENT_BROWSER_CACHE_STORAGE_CACHE_STORAGE_DISPATCHER_HOST_H_
+#include <stdint.h>
+
#include <list>
+#include "base/macros.h"
#include "content/browser/cache_storage/cache_storage.h"
#include "content/public/browser/browser_message_filter.h"
diff --git a/content/browser/cache_storage/cache_storage_manager.cc b/content/browser/cache_storage/cache_storage_manager.cc
index 84bb8e9..4b55bd4 100644
--- a/content/browser/cache_storage/cache_storage_manager.cc
+++ b/content/browser/cache_storage/cache_storage_manager.cc
@@ -4,6 +4,8 @@
#include "content/browser/cache_storage/cache_storage_manager.h"
+#include <stdint.h>
+
#include <map>
#include <string>
@@ -72,7 +74,7 @@ std::vector<CacheStorageUsageInfo> GetAllOriginsUsageOnTaskRunner(
for (const GURL& origin : origins) {
base::FilePath path =
CacheStorageManager::ConstructOriginPath(root_path, origin);
- int64 size = base::ComputeDirectorySize(path);
+ int64_t size = base::ComputeDirectorySize(path);
base::File::Info file_info;
base::Time last_modified;
if (base::GetFileInfo(path, &file_info))
@@ -229,7 +231,7 @@ void CacheStorageManager::GetOriginUsage(
DCHECK_CURRENTLY_ON(BrowserThread::IO);
if (IsMemoryBacked()) {
- int64 usage = 0;
+ int64_t usage = 0;
if (ContainsKey(cache_storage_map_, origin_url))
usage = cache_storage_map_[origin_url]->MemoryBackedSize();
callback.Run(usage);
diff --git a/content/browser/cache_storage/cache_storage_manager.h b/content/browser/cache_storage/cache_storage_manager.h
index 6f2dc16..121a252 100644
--- a/content/browser/cache_storage/cache_storage_manager.h
+++ b/content/browser/cache_storage/cache_storage_manager.h
@@ -8,8 +8,8 @@
#include <map>
#include <string>
-#include "base/basictypes.h"
#include "base/files/file_path.h"
+#include "base/macros.h"
#include "base/memory/ref_counted.h"
#include "content/browser/cache_storage/cache_storage.h"
#include "content/common/content_export.h"
diff --git a/content/browser/cache_storage/cache_storage_manager_unittest.cc b/content/browser/cache_storage/cache_storage_manager_unittest.cc
index 83e80aa..89b9db4 100644
--- a/content/browser/cache_storage/cache_storage_manager_unittest.cc
+++ b/content/browser/cache_storage/cache_storage_manager_unittest.cc
@@ -4,10 +4,14 @@
#include "content/browser/cache_storage/cache_storage_manager.h"
+#include <stddef.h>
+#include <stdint.h>
+
#include "base/files/file_path.h"
#include "base/files/file_util.h"
#include "base/files/scoped_temp_dir.h"
#include "base/guid.h"
+#include "base/macros.h"
#include "base/run_loop.h"
#include "base/sha1.h"
#include "base/stl_util.h"
@@ -263,7 +267,7 @@ class CacheStorageManagerTest : public testing::Test {
return cache_manager_->FindOrCreateCacheStorage(origin);
}
- int64 GetOriginUsage(const GURL& origin) {
+ int64_t GetOriginUsage(const GURL& origin) {
base::RunLoop loop;
cache_manager_->GetOriginUsage(
origin, base::Bind(&CacheStorageManagerTest::UsageCallback,
@@ -272,7 +276,7 @@ class CacheStorageManagerTest : public testing::Test {
return callback_usage_;
}
- void UsageCallback(base::RunLoop* run_loop, int64 usage) {
+ void UsageCallback(base::RunLoop* run_loop, int64_t usage) {
callback_usage_ = usage;
run_loop->Quit();
}
@@ -315,7 +319,7 @@ class CacheStorageManagerTest : public testing::Test {
const GURL origin1_;
const GURL origin2_;
- int64 callback_usage_;
+ int64_t callback_usage_;
std::vector<CacheStorageUsageInfo> callback_all_origins_usage_;
private:
@@ -622,7 +626,7 @@ TEST_F(CacheStorageManagerMemoryOnlyTest, MemoryBackedSize) {
EXPECT_TRUE(CachePut(foo_cache, GURL("http://example.com/foo")));
EXPECT_LT(0, cache_storage->MemoryBackedSize());
- int64 foo_size = cache_storage->MemoryBackedSize();
+ int64_t foo_size = cache_storage->MemoryBackedSize();
EXPECT_TRUE(CachePut(bar_cache, GURL("http://example.com/foo")));
EXPECT_EQ(foo_size * 2, cache_storage->MemoryBackedSize());
@@ -855,7 +859,7 @@ class CacheStorageQuotaClientTest : public CacheStorageManagerTest {
new CacheStorageQuotaClient(cache_manager_->AsWeakPtr()));
}
- void QuotaUsageCallback(base::RunLoop* run_loop, int64 usage) {
+ void QuotaUsageCallback(base::RunLoop* run_loop, int64_t usage) {
callback_quota_usage_ = usage;
run_loop->Quit();
}
@@ -871,7 +875,7 @@ class CacheStorageQuotaClientTest : public CacheStorageManagerTest {
run_loop->Quit();
}
- int64 QuotaGetOriginUsage(const GURL& origin) {
+ int64_t QuotaGetOriginUsage(const GURL& origin) {
base::RunLoop loop;
quota_client_->GetOriginUsage(
origin, storage::kStorageTypeTemporary,
@@ -918,7 +922,7 @@ class CacheStorageQuotaClientTest : public CacheStorageManagerTest {
scoped_ptr<CacheStorageQuotaClient> quota_client_;
storage::QuotaStatusCode callback_status_;
- int64 callback_quota_usage_ = 0;
+ int64_t callback_quota_usage_ = 0;
std::set<GURL> callback_origins_;
DISALLOW_COPY_AND_ASSIGN(CacheStorageQuotaClientTest);
diff --git a/content/browser/cache_storage/cache_storage_quota_client.h b/content/browser/cache_storage/cache_storage_quota_client.h
index 94df1d9..941bf8b 100644
--- a/content/browser/cache_storage/cache_storage_quota_client.h
+++ b/content/browser/cache_storage/cache_storage_quota_client.h
@@ -5,6 +5,7 @@
#ifndef CONTENT_BROWSER_CACHE_STORAGE_CACHE_STORAGE_QUOTA_CLIENT_H_
#define CONTENT_BROWSER_CACHE_STORAGE_CACHE_STORAGE_QUOTA_CLIENT_H_
+#include "base/macros.h"
#include "base/memory/weak_ptr.h"
#include "content/common/content_export.h"
#include "storage/browser/quota/quota_client.h"
diff --git a/content/browser/cache_storage/cache_storage_scheduler.h b/content/browser/cache_storage/cache_storage_scheduler.h
index dec6cbe..d5a4877 100644
--- a/content/browser/cache_storage/cache_storage_scheduler.h
+++ b/content/browser/cache_storage/cache_storage_scheduler.h
@@ -8,6 +8,7 @@
#include <list>
#include "base/callback.h"
+#include "base/macros.h"
#include "content/common/content_export.h"
namespace content {
diff --git a/content/browser/cert_store_impl.h b/content/browser/cert_store_impl.h
index f5afe83..2b08c52c 100644
--- a/content/browser/cert_store_impl.h
+++ b/content/browser/cert_store_impl.h
@@ -5,6 +5,7 @@
#ifndef CONTENT_BROWSER_CERT_STORE_IMPL_H_
#define CONTENT_BROWSER_CERT_STORE_IMPL_H_
+#include "base/macros.h"
#include "base/memory/singleton.h"
#include "content/browser/renderer_data_memoizing_store.h"
#include "content/public/browser/cert_store.h"
diff --git a/content/browser/child_process_launcher.cc b/content/browser/child_process_launcher.cc
index c705b7db..b0052d5 100644
--- a/content/browser/child_process_launcher.cc
+++ b/content/browser/child_process_launcher.cc
@@ -17,6 +17,7 @@
#include "base/strings/string_number_conversions.h"
#include "base/synchronization/lock.h"
#include "base/threading/thread.h"
+#include "build/build_config.h"
#include "content/public/browser/content_browser_client.h"
#include "content/public/common/content_descriptors.h"
#include "content/public/common/content_switches.h"
diff --git a/content/browser/child_process_launcher.h b/content/browser/child_process_launcher.h
index 768367d..c4f6321 100644
--- a/content/browser/child_process_launcher.h
+++ b/content/browser/child_process_launcher.h
@@ -5,13 +5,14 @@
#ifndef CONTENT_BROWSER_CHILD_PROCESS_LAUNCHER_H_
#define CONTENT_BROWSER_CHILD_PROCESS_LAUNCHER_H_
-#include "base/basictypes.h"
#include "base/files/scoped_file.h"
+#include "base/macros.h"
#include "base/memory/weak_ptr.h"
#include "base/process/kill.h"
#include "base/process/launch.h"
#include "base/process/process.h"
#include "base/threading/non_thread_safe.h"
+#include "build/build_config.h"
#include "content/common/content_export.h"
#include "content/public/browser/browser_thread.h"
diff --git a/content/browser/child_process_security_policy_browsertest.cc b/content/browser/child_process_security_policy_browsertest.cc
index c1e3c39..30d85db 100644
--- a/content/browser/child_process_security_policy_browsertest.cc
+++ b/content/browser/child_process_security_policy_browsertest.cc
@@ -4,8 +4,8 @@
#include <string>
-#include "base/basictypes.h"
#include "base/files/file_path.h"
+#include "build/build_config.h"
#include "content/browser/child_process_security_policy_impl.h"
#include "content/browser/web_contents/web_contents_impl.h"
#include "content/public/browser/render_process_host.h"
diff --git a/content/browser/child_process_security_policy_impl.cc b/content/browser/child_process_security_policy_impl.cc
index 9e94f34..639401f 100644
--- a/content/browser/child_process_security_policy_impl.cc
+++ b/content/browser/child_process_security_policy_impl.cc
@@ -9,9 +9,11 @@
#include "base/command_line.h"
#include "base/files/file_path.h"
#include "base/logging.h"
+#include "base/macros.h"
#include "base/metrics/histogram.h"
#include "base/stl_util.h"
#include "base/strings/string_util.h"
+#include "build/build_config.h"
#include "content/browser/plugin_process_host.h"
#include "content/browser/site_instance_impl.h"
#include "content/common/site_isolation_policy.h"
diff --git a/content/browser/child_process_security_policy_impl.h b/content/browser/child_process_security_policy_impl.h
index cc5a699..46d2d7a 100644
--- a/content/browser/child_process_security_policy_impl.h
+++ b/content/browser/child_process_security_policy_impl.h
@@ -12,6 +12,7 @@
#include "base/compiler_specific.h"
#include "base/gtest_prod_util.h"
+#include "base/macros.h"
#include "base/memory/singleton.h"
#include "base/synchronization/lock.h"
#include "content/public/browser/child_process_security_policy.h"
diff --git a/content/browser/child_process_security_policy_unittest.cc b/content/browser/child_process_security_policy_unittest.cc
index 6cba102..2360468 100644
--- a/content/browser/child_process_security_policy_unittest.cc
+++ b/content/browser/child_process_security_policy_unittest.cc
@@ -5,7 +5,6 @@
#include <set>
#include <string>
-#include "base/basictypes.h"
#include "base/files/file_path.h"
#include "content/browser/child_process_security_policy_impl.h"
#include "content/public/common/url_constants.h"
diff --git a/content/browser/cocoa/system_hotkey_helper_mac.h b/content/browser/cocoa/system_hotkey_helper_mac.h
index 7cfe165..d8e0153 100644
--- a/content/browser/cocoa/system_hotkey_helper_mac.h
+++ b/content/browser/cocoa/system_hotkey_helper_mac.h
@@ -5,6 +5,7 @@
#ifndef CONTENT_BROWSER_COCOA_SYSTEM_HOTKEY_HELPER_MAC_H_
#define CONTENT_BROWSER_COCOA_SYSTEM_HOTKEY_HELPER_MAC_H_
+#include "base/macros.h"
#include "base/memory/singleton.h"
#include "base/memory/weak_ptr.h"
diff --git a/content/browser/compositor/browser_compositor_output_surface.h b/content/browser/compositor/browser_compositor_output_surface.h
index db815ef..6e5ac77 100644
--- a/content/browser/compositor/browser_compositor_output_surface.h
+++ b/content/browser/compositor/browser_compositor_output_surface.h
@@ -5,7 +5,9 @@
#ifndef CONTENT_BROWSER_COMPOSITOR_BROWSER_COMPOSITOR_OUTPUT_SURFACE_H_
#define CONTENT_BROWSER_COMPOSITOR_BROWSER_COMPOSITOR_OUTPUT_SURFACE_H_
+#include "base/macros.h"
#include "base/threading/non_thread_safe.h"
+#include "build/build_config.h"
#include "cc/output/output_surface.h"
#include "content/common/content_export.h"
#include "ui/compositor/compositor_vsync_manager.h"
diff --git a/content/browser/compositor/browser_compositor_overlay_candidate_validator.h b/content/browser/compositor/browser_compositor_overlay_candidate_validator.h
index 0c62e2b..933e7bf 100644
--- a/content/browser/compositor/browser_compositor_overlay_candidate_validator.h
+++ b/content/browser/compositor/browser_compositor_overlay_candidate_validator.h
@@ -7,6 +7,7 @@
#include "cc/output/overlay_candidate_validator.h"
+#include "base/macros.h"
#include "content/common/content_export.h"
namespace content {
diff --git a/content/browser/compositor/browser_compositor_overlay_candidate_validator_mac.h b/content/browser/compositor/browser_compositor_overlay_candidate_validator_mac.h
index 29d6461..d3b1bd1 100644
--- a/content/browser/compositor/browser_compositor_overlay_candidate_validator_mac.h
+++ b/content/browser/compositor/browser_compositor_overlay_candidate_validator_mac.h
@@ -5,6 +5,7 @@
#ifndef CONTENT_BROWSER_COMPOSITOR_OVERLAY_CANDIDATE_VALIDATOR_MAC_H_
#define CONTENT_BROWSER_COMPOSITOR_OVERLAY_CANDIDATE_VALIDATOR_MAC_H_
+#include "base/macros.h"
#include "base/memory/scoped_ptr.h"
#include "content/browser/compositor/browser_compositor_overlay_candidate_validator.h"
#include "ui/gfx/native_widget_types.h"
diff --git a/content/browser/compositor/browser_compositor_overlay_candidate_validator_mac.mm b/content/browser/compositor/browser_compositor_overlay_candidate_validator_mac.mm
index cdcc89d..9c12c7e 100644
--- a/content/browser/compositor/browser_compositor_overlay_candidate_validator_mac.mm
+++ b/content/browser/compositor/browser_compositor_overlay_candidate_validator_mac.mm
@@ -4,6 +4,8 @@
#include "content/browser/compositor/browser_compositor_overlay_candidate_validator_mac.h"
+#include <stddef.h>
+
#include "cc/output/overlay_strategy_sandwich.h"
#include "content/browser/gpu/gpu_data_manager_impl.h"
#include "gpu/config/gpu_driver_bug_workaround_type.h"
diff --git a/content/browser/compositor/browser_compositor_overlay_candidate_validator_ozone.cc b/content/browser/compositor/browser_compositor_overlay_candidate_validator_ozone.cc
index d246219..23e54da 100644
--- a/content/browser/compositor/browser_compositor_overlay_candidate_validator_ozone.cc
+++ b/content/browser/compositor/browser_compositor_overlay_candidate_validator_ozone.cc
@@ -4,6 +4,8 @@
#include "content/browser/compositor/browser_compositor_overlay_candidate_validator_ozone.h"
+#include <stddef.h>
+
#include "cc/output/overlay_strategy_single_on_top.h"
#include "cc/output/overlay_strategy_underlay.h"
#include "ui/ozone/public/overlay_candidates_ozone.h"
diff --git a/content/browser/compositor/browser_compositor_overlay_candidate_validator_ozone.h b/content/browser/compositor/browser_compositor_overlay_candidate_validator_ozone.h
index b2a5722..0ad4855 100644
--- a/content/browser/compositor/browser_compositor_overlay_candidate_validator_ozone.h
+++ b/content/browser/compositor/browser_compositor_overlay_candidate_validator_ozone.h
@@ -5,6 +5,7 @@
#ifndef CONTENT_BROWSER_COMPOSITOR_OVERLAY_CANDIDATE_VALIDATOR_OZONE_H_
#define CONTENT_BROWSER_COMPOSITOR_OVERLAY_CANDIDATE_VALIDATOR_OZONE_H_
+#include "base/macros.h"
#include "base/memory/scoped_ptr.h"
#include "content/browser/compositor/browser_compositor_overlay_candidate_validator.h"
#include "ui/gfx/native_widget_types.h"
diff --git a/content/browser/compositor/browser_compositor_view_mac.h b/content/browser/compositor/browser_compositor_view_mac.h
index 28b824e..c6ee6ff 100644
--- a/content/browser/compositor/browser_compositor_view_mac.h
+++ b/content/browser/compositor/browser_compositor_view_mac.h
@@ -5,6 +5,7 @@
#ifndef CONTENT_BROWSER_COMPOSITOR_BROWSER_COMPOSITOR_VIEW_MAC_H_
#define CONTENT_BROWSER_COMPOSITOR_BROWSER_COMPOSITOR_VIEW_MAC_H_
+#include "base/macros.h"
#include "ui/accelerated_widget_mac/accelerated_widget_mac.h"
#include "ui/compositor/compositor.h"
#include "ui/compositor/compositor_observer.h"
diff --git a/content/browser/compositor/browser_compositor_view_mac.mm b/content/browser/compositor/browser_compositor_view_mac.mm
index b33f832..d4104d2 100644
--- a/content/browser/compositor/browser_compositor_view_mac.mm
+++ b/content/browser/compositor/browser_compositor_view_mac.mm
@@ -4,6 +4,8 @@
#include "content/browser/compositor/browser_compositor_view_mac.h"
+#include <stdint.h>
+
#include "base/lazy_instance.h"
#include "base/trace_event/trace_event.h"
#include "content/browser/compositor/image_transport_factory.h"
@@ -26,7 +28,7 @@ bool g_has_shut_down = false;
// The number of placeholder objects allocated. If this reaches zero, then
// the BrowserCompositorMac being held on to for recycling,
// |g_recyclable_browser_compositor|, will be freed.
-uint32 g_placeholder_count = 0;
+uint32_t g_placeholder_count = 0;
// A spare BrowserCompositorMac kept around for recycling.
base::LazyInstance<scoped_ptr<BrowserCompositorMac>>
diff --git a/content/browser/compositor/buffer_queue.cc b/content/browser/compositor/buffer_queue.cc
index 15cfcc6..cb6bd79 100644
--- a/content/browser/compositor/buffer_queue.cc
+++ b/content/browser/compositor/buffer_queue.cc
@@ -5,6 +5,7 @@
#include "content/browser/compositor/buffer_queue.h"
#include "base/containers/adapters.h"
+#include "build/build_config.h"
#include "content/browser/compositor/image_transport_factory.h"
#include "content/browser/gpu/browser_gpu_memory_buffer_manager.h"
#include "content/common/gpu/client/context_provider_command_buffer.h"
diff --git a/content/browser/compositor/buffer_queue.h b/content/browser/compositor/buffer_queue.h
index 9a301be..4c7d943 100644
--- a/content/browser/compositor/buffer_queue.h
+++ b/content/browser/compositor/buffer_queue.h
@@ -5,9 +5,12 @@
#ifndef CONTENT_BROWSER_COMPOSITOR_BUFFER_QUEUE_H_
#define CONTENT_BROWSER_COMPOSITOR_BUFFER_QUEUE_H_
+#include <stddef.h>
+
#include <deque>
#include <vector>
+#include "base/macros.h"
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
#include "content/common/content_export.h"
diff --git a/content/browser/compositor/buffer_queue_unittest.cc b/content/browser/compositor/buffer_queue_unittest.cc
index 90d8b12..0ec1796 100644
--- a/content/browser/compositor/buffer_queue_unittest.cc
+++ b/content/browser/compositor/buffer_queue_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 "cc/test/test_context_provider.h"
@@ -56,7 +59,7 @@ class StubBrowserGpuMemoryBufferManager : public BrowserGpuMemoryBufferManager {
scoped_ptr<gfx::GpuMemoryBuffer> AllocateGpuMemoryBufferForScanout(
const gfx::Size& size,
gfx::BufferFormat format,
- int32 surface_id) override {
+ int32_t surface_id) override {
if (allocate_succeeds_)
return make_scoped_ptr<gfx::GpuMemoryBuffer>(new StubGpuMemoryBufferImpl);
return nullptr;
diff --git a/content/browser/compositor/delegated_frame_host.cc b/content/browser/compositor/delegated_frame_host.cc
index 21de012..c780212 100644
--- a/content/browser/compositor/delegated_frame_host.cc
+++ b/content/browser/compositor/delegated_frame_host.cc
@@ -286,7 +286,7 @@ void DelegatedFrameHost::AttemptFrameSubscriberCapture(
if (vsync_interval_ <= base::TimeDelta()) {
present_time = now;
} else {
- const int64 intervals_elapsed = (now - vsync_timebase_) / vsync_interval_;
+ const int64_t intervals_elapsed = (now - vsync_timebase_) / vsync_interval_;
present_time = vsync_timebase_ + (intervals_elapsed + 1) * vsync_interval_;
}
@@ -341,7 +341,7 @@ void DelegatedFrameHost::AttemptFrameSubscriberCapture(
}
void DelegatedFrameHost::SwapDelegatedFrame(
- uint32 output_surface_id,
+ uint32_t output_surface_id,
scoped_ptr<cc::CompositorFrame> frame) {
DCHECK(frame->delegated_frame_data.get());
cc::DelegatedFrameData* frame_data = frame->delegated_frame_data.get();
@@ -520,7 +520,7 @@ void DelegatedFrameHost::ClearDelegatedFrame() {
EvictDelegatedFrame();
}
-void DelegatedFrameHost::SendDelegatedFrameAck(uint32 output_surface_id) {
+void DelegatedFrameHost::SendDelegatedFrameAck(uint32_t output_surface_id) {
cc::CompositorFrameAck ack;
if (!surface_returned_resources_.empty())
ack.resources.swap(surface_returned_resources_);
@@ -531,7 +531,7 @@ void DelegatedFrameHost::SendDelegatedFrameAck(uint32 output_surface_id) {
pending_delegated_ack_count_--;
}
-void DelegatedFrameHost::SurfaceDrawn(uint32 output_surface_id,
+void DelegatedFrameHost::SurfaceDrawn(uint32_t output_surface_id,
cc::SurfaceDrawStatus drawn) {
SendDelegatedFrameAck(output_surface_id);
}
@@ -544,7 +544,7 @@ void DelegatedFrameHost::UnusedResourcesAreAvailable() {
}
void DelegatedFrameHost::SendReturnedDelegatedResources(
- uint32 output_surface_id) {
+ uint32_t output_surface_id) {
cc::CompositorFrameAck ack;
if (!surface_returned_resources_.empty()) {
ack.resources.swap(surface_returned_resources_);
@@ -673,7 +673,7 @@ void DelegatedFrameHost::PrepareTextureCopyOutputResult(
scoped_ptr<SkAutoLockPixels> bitmap_pixels_lock(
new SkAutoLockPixels(*bitmap));
- uint8* pixels = static_cast<uint8*>(bitmap->getPixels());
+ uint8_t* pixels = static_cast<uint8_t*>(bitmap->getPixels());
cc::TextureMailbox texture_mailbox;
scoped_ptr<cc::SingleReleaseCallback> release_callback;
@@ -836,10 +836,8 @@ void DelegatedFrameHost::CopyFromCompositingSurfaceHasResultForVideo(
SkAutoLockPixels scaled_bitmap_locker(scaled_bitmap);
media::CopyRGBToVideoFrame(
- reinterpret_cast<uint8*>(scaled_bitmap.getPixels()),
- scaled_bitmap.rowBytes(),
- region_in_frame,
- video_frame.get());
+ reinterpret_cast<uint8_t*>(scaled_bitmap.getPixels()),
+ scaled_bitmap.rowBytes(), region_in_frame, video_frame.get());
}
ignore_result(scoped_callback_runner.Release());
callback.Run(region_in_frame, true);
diff --git a/content/browser/compositor/delegated_frame_host.h b/content/browser/compositor/delegated_frame_host.h
index de883be..21dc4e0 100644
--- a/content/browser/compositor/delegated_frame_host.h
+++ b/content/browser/compositor/delegated_frame_host.h
@@ -5,6 +5,8 @@
#ifndef CONTENT_BROWSER_COMPOSITOR_DELEGATED_FRAME_HOST_H_
#define CONTENT_BROWSER_COMPOSITOR_DELEGATED_FRAME_HOST_H_
+#include <stdint.h>
+
#include <vector>
#include "base/gtest_prod_util.h"
@@ -127,7 +129,7 @@ class CONTENT_EXPORT DelegatedFrameHost
// Public interface exposed to RenderWidgetHostView.
- void SwapDelegatedFrame(uint32 output_surface_id,
+ void SwapDelegatedFrame(uint32_t output_surface_id,
scoped_ptr<cc::CompositorFrame> frame);
void ClearDelegatedFrame();
void WasHidden();
@@ -249,9 +251,9 @@ class CONTENT_EXPORT DelegatedFrameHost
scoped_refptr<OwnedMailbox> subscriber_texture,
const gpu::SyncToken& sync_token);
- void SendDelegatedFrameAck(uint32 output_surface_id);
- void SurfaceDrawn(uint32 output_surface_id, cc::SurfaceDrawStatus drawn);
- void SendReturnedDelegatedResources(uint32 output_surface_id);
+ void SendDelegatedFrameAck(uint32_t output_surface_id);
+ void SurfaceDrawn(uint32_t output_surface_id, cc::SurfaceDrawStatus drawn);
+ void SendReturnedDelegatedResources(uint32_t output_surface_id);
// Called to consult the current |frame_subscriber_|, to determine and maybe
// initiate a copy-into-video-frame request.
@@ -280,7 +282,7 @@ class CONTENT_EXPORT DelegatedFrameHost
// With delegated renderer, this is the last output surface, used to
// disambiguate resources with the same id coming from different output
// surfaces.
- uint32 last_output_surface_id_;
+ uint32_t last_output_surface_id_;
// The number of delegated frame acks that are pending, to delay resource
// returns until the acks are sent.
diff --git a/content/browser/compositor/gpu_browser_compositor_output_surface.cc b/content/browser/compositor/gpu_browser_compositor_output_surface.cc
index c65ba73..2cc9306 100644
--- a/content/browser/compositor/gpu_browser_compositor_output_surface.cc
+++ b/content/browser/compositor/gpu_browser_compositor_output_surface.cc
@@ -4,6 +4,7 @@
#include "content/browser/compositor/gpu_browser_compositor_output_surface.h"
+#include "build/build_config.h"
#include "cc/output/compositor_frame.h"
#include "cc/output/output_surface_client.h"
#include "content/browser/compositor/browser_compositor_overlay_candidate_validator.h"
diff --git a/content/browser/compositor/gpu_browser_compositor_output_surface.h b/content/browser/compositor/gpu_browser_compositor_output_surface.h
index dd6f5ff..ae08e8d 100644
--- a/content/browser/compositor/gpu_browser_compositor_output_surface.h
+++ b/content/browser/compositor/gpu_browser_compositor_output_surface.h
@@ -6,6 +6,8 @@
#define CONTENT_BROWSER_COMPOSITOR_GPU_BROWSER_COMPOSITOR_OUTPUT_SURFACE_H_
#include "base/cancelable_callback.h"
+#include "base/macros.h"
+#include "build/build_config.h"
#include "content/browser/compositor/browser_compositor_output_surface.h"
#include "ui/gfx/swap_result.h"
diff --git a/content/browser/compositor/gpu_process_transport_factory.cc b/content/browser/compositor/gpu_process_transport_factory.cc
index 1ae2b11..aa13944 100644
--- a/content/browser/compositor/gpu_process_transport_factory.cc
+++ b/content/browser/compositor/gpu_process_transport_factory.cc
@@ -14,6 +14,7 @@
#include "base/thread_task_runner_handle.h"
#include "base/threading/simple_thread.h"
#include "base/threading/thread.h"
+#include "build/build_config.h"
#include "cc/base/histograms.h"
#include "cc/output/compositor_frame.h"
#include "cc/output/output_surface.h"
@@ -446,7 +447,7 @@ void GpuProcessTransportFactory::RemoveCompositor(ui::Compositor* compositor) {
bool GpuProcessTransportFactory::DoesCreateTestContexts() { return false; }
-uint32 GpuProcessTransportFactory::GetImageTextureTarget(
+uint32_t GpuProcessTransportFactory::GetImageTextureTarget(
gfx::BufferFormat format,
gfx::BufferUsage usage) {
return BrowserGpuMemoryBufferManager::GetImageTextureTarget(format, usage);
diff --git a/content/browser/compositor/gpu_process_transport_factory.h b/content/browser/compositor/gpu_process_transport_factory.h
index 9f57291..ee8d60e 100644
--- a/content/browser/compositor/gpu_process_transport_factory.h
+++ b/content/browser/compositor/gpu_process_transport_factory.h
@@ -5,13 +5,17 @@
#ifndef CONTENT_BROWSER_COMPOSITOR_GPU_PROCESS_TRANSPORT_FACTORY_H_
#define CONTENT_BROWSER_COMPOSITOR_GPU_PROCESS_TRANSPORT_FACTORY_H_
+#include <stdint.h>
+
#include <map>
#include "base/id_map.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/observer_list.h"
+#include "build/build_config.h"
#include "content/browser/compositor/image_transport_factory.h"
#include "content/common/gpu/client/gpu_channel_host.h"
#include "ui/compositor/compositor.h"
@@ -54,8 +58,8 @@ class GpuProcessTransportFactory
void RemoveCompositor(ui::Compositor* compositor) override;
scoped_refptr<cc::ContextProvider> SharedMainThreadContextProvider() override;
bool DoesCreateTestContexts() override;
- uint32 GetImageTextureTarget(gfx::BufferFormat format,
- gfx::BufferUsage usage) override;
+ uint32_t GetImageTextureTarget(gfx::BufferFormat format,
+ gfx::BufferUsage usage) override;
cc::SharedBitmapManager* GetSharedBitmapManager() override;
gpu::GpuMemoryBufferManager* GetGpuMemoryBufferManager() override;
cc::TaskGraphRunner* GetTaskGraphRunner() override;
diff --git a/content/browser/compositor/image_transport_factory.h b/content/browser/compositor/image_transport_factory.h
index bc19afe..744d2c0 100644
--- a/content/browser/compositor/image_transport_factory.h
+++ b/content/browser/compositor/image_transport_factory.h
@@ -9,6 +9,7 @@
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
+#include "build/build_config.h"
#include "cc/surfaces/surface_id_allocator.h"
#include "content/common/content_export.h"
#include "ui/events/latency_info.h"
diff --git a/content/browser/compositor/image_transport_factory_browsertest.cc b/content/browser/compositor/image_transport_factory_browsertest.cc
index 327db05..bd2f2c1 100644
--- a/content/browser/compositor/image_transport_factory_browsertest.cc
+++ b/content/browser/compositor/image_transport_factory_browsertest.cc
@@ -5,6 +5,7 @@
#include "content/browser/compositor/image_transport_factory.h"
#include "base/run_loop.h"
+#include "build/build_config.h"
#include "cc/output/context_provider.h"
#include "content/browser/compositor/owned_mailbox.h"
#include "content/public/browser/gpu_data_manager.h"
diff --git a/content/browser/compositor/offscreen_browser_compositor_output_surface.cc b/content/browser/compositor/offscreen_browser_compositor_output_surface.cc
index 10a3fb6..e2d6662 100644
--- a/content/browser/compositor/offscreen_browser_compositor_output_surface.cc
+++ b/content/browser/compositor/offscreen_browser_compositor_output_surface.cc
@@ -5,6 +5,7 @@
#include "content/browser/compositor/offscreen_browser_compositor_output_surface.h"
#include "base/logging.h"
+#include "build/build_config.h"
#include "cc/output/compositor_frame.h"
#include "cc/output/compositor_frame_ack.h"
#include "cc/output/gl_frame_data.h"
diff --git a/content/browser/compositor/offscreen_browser_compositor_output_surface.h b/content/browser/compositor/offscreen_browser_compositor_output_surface.h
index 3110b07..abbb20c 100644
--- a/content/browser/compositor/offscreen_browser_compositor_output_surface.h
+++ b/content/browser/compositor/offscreen_browser_compositor_output_surface.h
@@ -5,9 +5,13 @@
#ifndef CONTENT_BROWSER_COMPOSITOR_OFFSCREEN_BROWSER_COMPOSITOR_OUTPUT_SURFACE_H_
#define CONTENT_BROWSER_COMPOSITOR_OFFSCREEN_BROWSER_COMPOSITOR_OUTPUT_SURFACE_H_
+#include <stdint.h>
+
#include "base/cancelable_callback.h"
+#include "base/macros.h"
#include "base/memory/scoped_ptr.h"
#include "base/memory/weak_ptr.h"
+#include "build/build_config.h"
#include "content/browser/compositor/browser_compositor_output_surface.h"
namespace ui {
@@ -49,7 +53,7 @@ class OffscreenBrowserCompositorOutputSurface
bool SurfaceShouldNotShowFramesAfterSuspendForRecycle() const override;
#endif
- uint32 fbo_;
+ uint32_t fbo_;
bool is_backbuffer_discarded_;
scoped_ptr<ReflectorTexture> reflector_texture_;
diff --git a/content/browser/compositor/owned_mailbox.h b/content/browser/compositor/owned_mailbox.h
index 07aac97..796e02e 100644
--- a/content/browser/compositor/owned_mailbox.h
+++ b/content/browser/compositor/owned_mailbox.h
@@ -5,6 +5,8 @@
#ifndef CONTENT_BROWSER_COMPOSITOR_OWNED_MAILBOX_H_
#define CONTENT_BROWSER_COMPOSITOR_OWNED_MAILBOX_H_
+#include <stdint.h>
+
#include "base/memory/ref_counted.h"
#include "content/browser/compositor/image_transport_factory.h"
#include "content/common/content_export.h"
@@ -27,8 +29,8 @@ class CONTENT_EXPORT OwnedMailbox : public base::RefCounted<OwnedMailbox>,
const gpu::SyncToken& sync_token() const {
return mailbox_holder_.sync_token;
}
- uint32 texture_id() const { return texture_id_; }
- uint32 target() const { return mailbox_holder_.texture_target; }
+ uint32_t texture_id() const { return texture_id_; }
+ uint32_t target() const { return mailbox_holder_.texture_target; }
void UpdateSyncToken(const gpu::SyncToken& sync_token);
void Destroy();
@@ -41,7 +43,7 @@ class CONTENT_EXPORT OwnedMailbox : public base::RefCounted<OwnedMailbox>,
private:
friend class base::RefCounted<OwnedMailbox>;
- uint32 texture_id_;
+ uint32_t texture_id_;
gpu::MailboxHolder mailbox_holder_;
GLHelper* gl_helper_;
};
diff --git a/content/browser/compositor/reflector_impl_unittest.cc b/content/browser/compositor/reflector_impl_unittest.cc
index 77c48e8..13103b4 100644
--- a/content/browser/compositor/reflector_impl_unittest.cc
+++ b/content/browser/compositor/reflector_impl_unittest.cc
@@ -4,6 +4,7 @@
#include "base/run_loop.h"
#include "base/single_thread_task_runner.h"
+#include "build/build_config.h"
#include "cc/test/fake_output_surface_client.h"
#include "cc/test/test_context_provider.h"
#include "cc/test/test_web_graphics_context_3d.h"
diff --git a/content/browser/compositor/reflector_texture.h b/content/browser/compositor/reflector_texture.h
index cacabd3..cc8f98c 100644
--- a/content/browser/compositor/reflector_texture.h
+++ b/content/browser/compositor/reflector_texture.h
@@ -5,6 +5,9 @@
#ifndef CONTENT_BROWSER_COMPOSITOR_REFLECTOR_TEXTURE_H_
#define CONTENT_BROWSER_COMPOSITOR_REFLECTOR_TEXTURE_H_
+#include <stdint.h>
+
+#include "base/macros.h"
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
#include "content/browser/compositor/owned_mailbox.h"
@@ -31,13 +34,13 @@ class CONTENT_EXPORT ReflectorTexture {
void CopyTextureFullImage(const gfx::Size& size);
void CopyTextureSubImage(const gfx::Rect& size);
- uint32 texture_id() const { return texture_id_; }
+ uint32_t texture_id() const { return texture_id_; }
scoped_refptr<OwnedMailbox> mailbox() { return mailbox_; }
private:
scoped_refptr<OwnedMailbox> mailbox_;
scoped_ptr<GLHelper> gl_helper_;
- uint32 texture_id_;
+ uint32_t texture_id_;
DISALLOW_COPY_AND_ASSIGN(ReflectorTexture);
};
diff --git a/content/browser/compositor/resize_lock.h b/content/browser/compositor/resize_lock.h
index 306a19d..8b48297 100644
--- a/content/browser/compositor/resize_lock.h
+++ b/content/browser/compositor/resize_lock.h
@@ -5,7 +5,7 @@
#ifndef CONTENT_BROWSER_COMPOSITOR_RESIZE_LOCK_H_
#define CONTENT_BROWSER_COMPOSITOR_RESIZE_LOCK_H_
-#include "base/basictypes.h"
+#include "base/macros.h"
#include "content/common/content_export.h"
#include "ui/gfx/geometry/size.h"
diff --git a/content/browser/compositor/software_browser_compositor_output_surface.cc b/content/browser/compositor/software_browser_compositor_output_surface.cc
index 6b5a98d..11dee4b 100644
--- a/content/browser/compositor/software_browser_compositor_output_surface.cc
+++ b/content/browser/compositor/software_browser_compositor_output_surface.cc
@@ -9,6 +9,7 @@
#include "base/single_thread_task_runner.h"
#include "base/thread_task_runner_handle.h"
#include "base/time/time.h"
+#include "build/build_config.h"
#include "cc/output/compositor_frame.h"
#include "cc/output/output_surface_client.h"
#include "cc/output/software_output_device.h"
diff --git a/content/browser/compositor/software_browser_compositor_output_surface.h b/content/browser/compositor/software_browser_compositor_output_surface.h
index 2b56c12..9e8bbcf 100644
--- a/content/browser/compositor/software_browser_compositor_output_surface.h
+++ b/content/browser/compositor/software_browser_compositor_output_surface.h
@@ -5,7 +5,9 @@
#ifndef CONTENT_BROWSER_COMPOSITOR_SOFTWARE_BROWSER_COMPOSITOR_OUTPUT_SURFACE_H_
#define CONTENT_BROWSER_COMPOSITOR_SOFTWARE_BROWSER_COMPOSITOR_OUTPUT_SURFACE_H_
+#include "base/macros.h"
#include "base/memory/weak_ptr.h"
+#include "build/build_config.h"
#include "content/browser/compositor/browser_compositor_output_surface.h"
#include "content/common/content_export.h"
diff --git a/content/browser/compositor/software_browser_compositor_output_surface_unittest.cc b/content/browser/compositor/software_browser_compositor_output_surface_unittest.cc
index 9fbef4e..d8422db 100644
--- a/content/browser/compositor/software_browser_compositor_output_surface_unittest.cc
+++ b/content/browser/compositor/software_browser_compositor_output_surface_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/thread_task_runner_handle.h"
#include "cc/output/compositor_frame.h"
#include "cc/test/fake_output_surface_client.h"
diff --git a/content/browser/compositor/software_output_device_mac.h b/content/browser/compositor/software_output_device_mac.h
index d0b3d44..a613ab4 100644
--- a/content/browser/compositor/software_output_device_mac.h
+++ b/content/browser/compositor/software_output_device_mac.h
@@ -8,6 +8,7 @@
#include <IOSurface/IOSurface.h>
#include "base/mac/scoped_cftyperef.h"
+#include "base/macros.h"
#include "cc/output/software_output_device.h"
#include "third_party/skia/include/core/SkRegion.h"
#include "ui/gfx/vsync_provider.h"
diff --git a/content/browser/compositor/software_output_device_mac.mm b/content/browser/compositor/software_output_device_mac.mm
index df60ac8..e71f678 100644
--- a/content/browser/compositor/software_output_device_mac.mm
+++ b/content/browser/compositor/software_output_device_mac.mm
@@ -5,6 +5,8 @@
#include "content/browser/compositor/software_output_device_mac.h"
#import <Cocoa/Cocoa.h>
+#include <stddef.h>
+#include <stdint.h>
#include "base/mac/foundation_util.h"
#include "third_party/skia/include/core/SkCanvas.h"
diff --git a/content/browser/compositor/software_output_device_mus.cc b/content/browser/compositor/software_output_device_mus.cc
index c8c8505..080be43 100644
--- a/content/browser/compositor/software_output_device_mus.cc
+++ b/content/browser/compositor/software_output_device_mus.cc
@@ -4,6 +4,8 @@
#include "content/browser/compositor/software_output_device_mus.h"
+#include <stddef.h>
+
#include "components/bitmap_uploader/bitmap_uploader.h"
#include "third_party/skia/include/core/SkImageInfo.h"
#include "ui/base/view_prop.h"
diff --git a/content/browser/compositor/software_output_device_ozone.h b/content/browser/compositor/software_output_device_ozone.h
index 3a7684d..1e9e308 100644
--- a/content/browser/compositor/software_output_device_ozone.h
+++ b/content/browser/compositor/software_output_device_ozone.h
@@ -5,6 +5,7 @@
#ifndef CONTENT_BROWSER_COMPOSITOR_SOFTWARE_OUTPUT_DEVICE_OZONE_H_
#define CONTENT_BROWSER_COMPOSITOR_SOFTWARE_OUTPUT_DEVICE_OZONE_H_
+#include "base/macros.h"
#include "cc/output/software_output_device.h"
#include "content/common/content_export.h"
#include "ui/gfx/native_widget_types.h"
diff --git a/content/browser/compositor/software_output_device_ozone_unittest.cc b/content/browser/compositor/software_output_device_ozone_unittest.cc
index 030d2de..78a00f1 100644
--- a/content/browser/compositor/software_output_device_ozone_unittest.cc
+++ b/content/browser/compositor/software_output_device_ozone_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/message_loop/message_loop.h"
#include "base/thread_task_runner_handle.h"
diff --git a/content/browser/compositor/software_output_device_win.h b/content/browser/compositor/software_output_device_win.h
index 65de1c4..1cc267d 100644
--- a/content/browser/compositor/software_output_device_win.h
+++ b/content/browser/compositor/software_output_device_win.h
@@ -5,13 +5,15 @@
#ifndef CONTENT_BROWSER_COMPOSITOR_SOFTWARE_OUTPUT_DEVICE_WIN_H_
#define CONTENT_BROWSER_COMPOSITOR_SOFTWARE_OUTPUT_DEVICE_WIN_H_
+#include <windows.h>
+#include <stddef.h>
+
#include <vector>
+#include "base/macros.h"
#include "base/memory/scoped_ptr.h"
#include "cc/output/software_output_device.h"
-#include <windows.h>
-
namespace base {
class SharedMemory;
}
diff --git a/content/browser/compositor/software_output_device_x11.cc b/content/browser/compositor/software_output_device_x11.cc
index b611639..62695a3 100644
--- a/content/browser/compositor/software_output_device_x11.cc
+++ b/content/browser/compositor/software_output_device_x11.cc
@@ -4,6 +4,8 @@
#include "content/browser/compositor/software_output_device_x11.h"
+#include <stddef.h>
+#include <stdint.h>
#include <X11/Xlib.h>
#include <X11/Xutil.h>
@@ -116,20 +118,11 @@ void SoftwareOutputDeviceX11::EndPaint() {
SkImageInfo info;
size_t rowBytes;
const void* addr = surface_->peekPixels(&info, &rowBytes);
- gfx::PutARGBImage(display_,
- attributes_.visual,
- attributes_.depth,
- compositor_->widget(),
- gc_,
- static_cast<const uint8*>(addr),
- viewport_pixel_size_.width(),
- viewport_pixel_size_.height(),
- rect.x(),
- rect.y(),
- rect.x(),
- rect.y(),
- rect.width(),
- rect.height());
+ gfx::PutARGBImage(
+ display_, attributes_.visual, attributes_.depth, compositor_->widget(),
+ gc_, static_cast<const uint8_t*>(addr), viewport_pixel_size_.width(),
+ viewport_pixel_size_.height(), rect.x(), rect.y(), rect.x(), rect.y(),
+ rect.width(), rect.height());
}
} // namespace content
diff --git a/content/browser/compositor/software_output_device_x11.h b/content/browser/compositor/software_output_device_x11.h
index c6d87a3..9fe571d 100644
--- a/content/browser/compositor/software_output_device_x11.h
+++ b/content/browser/compositor/software_output_device_x11.h
@@ -7,6 +7,7 @@
#include <X11/Xlib.h>
+#include "base/macros.h"
#include "cc/output/software_output_device.h"
#include "ui/gfx/x/x11_types.h"
diff --git a/content/browser/compositor/surface_utils.cc b/content/browser/compositor/surface_utils.cc
index 772199d..7ae0591 100644
--- a/content/browser/compositor/surface_utils.cc
+++ b/content/browser/compositor/surface_utils.cc
@@ -4,6 +4,7 @@
#include "content/browser/compositor/surface_utils.h"
+#include "build/build_config.h"
#include "cc/surfaces/surface_id_allocator.h"
#if defined(OS_ANDROID) && !defined(USE_AURA)
diff --git a/content/browser/compositor/test/no_transport_image_transport_factory.cc b/content/browser/compositor/test/no_transport_image_transport_factory.cc
index 5a9cfe1..e9fb0ff 100644
--- a/content/browser/compositor/test/no_transport_image_transport_factory.cc
+++ b/content/browser/compositor/test/no_transport_image_transport_factory.cc
@@ -4,6 +4,7 @@
#include "content/browser/compositor/test/no_transport_image_transport_factory.h"
+#include "build/build_config.h"
#include "cc/output/context_provider.h"
#include "cc/surfaces/surface_manager.h"
#include "content/browser/gpu/compositor_util.h"
diff --git a/content/browser/compositor/test/no_transport_image_transport_factory.h b/content/browser/compositor/test/no_transport_image_transport_factory.h
index 4aa6839..52f4ebe 100644
--- a/content/browser/compositor/test/no_transport_image_transport_factory.h
+++ b/content/browser/compositor/test/no_transport_image_transport_factory.h
@@ -5,8 +5,10 @@
#ifndef CONTENT_BROWSER_COMPOSITOR_TEST_NO_TRANSPORT_IMAGE_TRANSPORT_FACTORY_H_
#define CONTENT_BROWSER_COMPOSITOR_TEST_NO_TRANSPORT_IMAGE_TRANSPORT_FACTORY_H_
+#include "base/macros.h"
#include "base/memory/scoped_ptr.h"
#include "base/observer_list.h"
+#include "build/build_config.h"
#include "content/browser/compositor/image_transport_factory.h"
namespace cc {
diff --git a/content/browser/cross_site_transfer_browsertest.cc b/content/browser/cross_site_transfer_browsertest.cc
index 560547d..fbe720d 100644
--- a/content/browser/cross_site_transfer_browsertest.cc
+++ b/content/browser/cross_site_transfer_browsertest.cc
@@ -3,6 +3,7 @@
// found in the LICENSE file.
#include "base/command_line.h"
+#include "base/macros.h"
#include "base/strings/stringprintf.h"
#include "content/browser/loader/resource_dispatcher_host_impl.h"
#include "content/public/browser/navigation_entry.h"
diff --git a/content/browser/database_quota_client_unittest.cc b/content/browser/database_quota_client_unittest.cc
index 3c2c6f3..908d418 100644
--- a/content/browser/database_quota_client_unittest.cc
+++ b/content/browser/database_quota_client_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 <map>
#include "base/bind.h"
@@ -135,9 +137,9 @@ class DatabaseQuotaClientTest : public testing::Test {
weak_factory_(this) {
}
- int64 GetOriginUsage(storage::QuotaClient* client,
- const GURL& origin,
- storage::StorageType type) {
+ int64_t GetOriginUsage(storage::QuotaClient* client,
+ const GURL& origin,
+ storage::StorageType type) {
usage_ = 0;
client->GetOriginUsage(
origin, type,
@@ -186,9 +188,7 @@ class DatabaseQuotaClientTest : public testing::Test {
private:
- void OnGetOriginUsageComplete(int64 usage) {
- usage_ = usage;
- }
+ void OnGetOriginUsageComplete(int64_t usage) { usage_ = usage; }
void OnGetOriginsComplete(const std::set<GURL>& origins) {
origins_ = origins;
@@ -199,7 +199,7 @@ class DatabaseQuotaClientTest : public testing::Test {
}
base::MessageLoop message_loop_;
- int64 usage_;
+ int64_t usage_;
std::set<GURL> origins_;
storage::QuotaStatusCode delete_status_;
scoped_refptr<MockDatabaseTracker> mock_tracker_;
diff --git a/content/browser/database_tracker_unittest.cc b/content/browser/database_tracker_unittest.cc
index a068b4d..189257f 100644
--- a/content/browser/database_tracker_unittest.cc
+++ b/content/browser/database_tracker_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/files/file.h"
#include "base/files/file_path.h"
#include "base/files/file_util.h"
@@ -46,7 +49,7 @@ class TestObserver : public storage::DatabaseTracker::Observer {
~TestObserver() override {}
void OnDatabaseSizeChanged(const std::string& origin_identifier,
const base::string16& database_name,
- int64 database_size) override {
+ int64_t database_size) override {
if (!observe_size_changes_)
return;
new_notification_received_ = true;
@@ -72,7 +75,7 @@ class TestObserver : public storage::DatabaseTracker::Observer {
return origin_identifier_;
}
base::string16 GetNotificationDatabaseName() { return database_name_; }
- int64 GetNotificationDatabaseSize() { return database_size_; }
+ int64_t GetNotificationDatabaseSize() { return database_size_; }
private:
bool new_notification_received_;
@@ -80,13 +83,13 @@ class TestObserver : public storage::DatabaseTracker::Observer {
bool observe_scheduled_deletions_;
std::string origin_identifier_;
base::string16 database_name_;
- int64 database_size_;
+ int64_t database_size_;
};
void CheckNotificationReceived(TestObserver* observer,
const std::string& expected_origin_identifier,
const base::string16& expected_database_name,
- int64 expected_database_size) {
+ int64_t expected_database_size) {
EXPECT_TRUE(observer->DidReceiveNewNotification());
EXPECT_EQ(expected_origin_identifier,
observer->GetNotificationOriginIdentifier());
@@ -119,7 +122,7 @@ class TestQuotaManagerProxy : public storage::QuotaManagerProxy {
void NotifyStorageModified(storage::QuotaClient::ID client_id,
const GURL& origin,
storage::StorageType type,
- int64 delta) override {
+ int64_t delta) override {
EXPECT_EQ(storage::QuotaClient::kDatabase, client_id);
EXPECT_EQ(storage::kStorageTypeTemporary, type);
modifications_[origin].first += 1;
@@ -149,7 +152,7 @@ class TestQuotaManagerProxy : public storage::QuotaManagerProxy {
return accesses_[origin] != 0;
}
- bool WasModificationNotified(const GURL& origin, int64 amount) {
+ bool WasModificationNotified(const GURL& origin, int64_t amount) {
return modifications_[origin].first != 0 &&
modifications_[origin].second == amount;
}
@@ -165,14 +168,13 @@ class TestQuotaManagerProxy : public storage::QuotaManagerProxy {
std::map<GURL, int> accesses_;
// Map from origin to <count, sum of deltas>
- std::map<GURL, std::pair<int, int64> > modifications_;
+ std::map<GURL, std::pair<int, int64_t>> modifications_;
protected:
~TestQuotaManagerProxy() override { EXPECT_FALSE(registered_client_); }
};
-
-bool EnsureFileOfSize(const base::FilePath& file_path, int64 length) {
+bool EnsureFileOfSize(const base::FilePath& file_path, int64_t length) {
base::File file(file_path,
base::File::FLAG_OPEN_ALWAYS | base::File::FLAG_WRITE);
if (!file.IsValid())
@@ -206,7 +208,7 @@ class DatabaseTracker_TestHelper_Test {
NULL));
// Create and open three databases.
- int64 database_size = 0;
+ int64_t database_size = 0;
const std::string kOrigin1 =
storage::GetIdentifierFromOrigin(GURL(kOrigin1Url));
const std::string kOrigin2 =
@@ -320,7 +322,7 @@ class DatabaseTracker_TestHelper_Test {
tracker->AddObserver(&observer2);
// Open three new databases.
- int64 database_size = 0;
+ int64_t database_size = 0;
const std::string kOrigin1 =
storage::GetIdentifierFromOrigin(GURL(kOrigin1Url));
const std::string kOrigin2 =
@@ -470,7 +472,7 @@ class DatabaseTracker_TestHelper_Test {
// Create a database and modify it a couple of times, close it,
// then delete it. Observe the tracker notifies accordingly.
- int64 database_size = 0;
+ int64_t database_size = 0;
tracker->DatabaseOpened(kOriginId, kName, kDescription, 0,
&database_size);
EXPECT_TRUE(test_quota_proxy->WasAccessNotified(kOrigin));
@@ -545,7 +547,7 @@ class DatabaseTracker_TestHelper_Test {
}
static void DatabaseTrackerClearSessionOnlyDatabasesOnExit() {
- int64 database_size = 0;
+ int64_t database_size = 0;
const std::string kOrigin1 =
storage::GetIdentifierFromOrigin(GURL(kOrigin1Url));
const std::string kOrigin2 =
@@ -622,7 +624,7 @@ class DatabaseTracker_TestHelper_Test {
}
static void DatabaseTrackerSetForceKeepSessionState() {
- int64 database_size = 0;
+ int64_t database_size = 0;
const std::string kOrigin1 =
storage::GetIdentifierFromOrigin(GURL(kOrigin1Url));
const std::string kOrigin2 =
@@ -718,7 +720,7 @@ class DatabaseTracker_TestHelper_Test {
EXPECT_TRUE(infos.empty());
// Create a db with an empty name.
- int64 database_size = -1;
+ int64_t database_size = -1;
tracker->DatabaseOpened(kOriginId, kEmptyName, kDescription, 0,
&database_size);
EXPECT_EQ(0, database_size);
@@ -770,7 +772,7 @@ class DatabaseTracker_TestHelper_Test {
// --------------------------------------------------------
// Create a record of a database in the tracker db and create
// a spoof_db_file on disk in the expected location.
- int64 database_size = 0;
+ int64_t database_size = 0;
tracker->DatabaseOpened(kOriginId, kName, kDescription, 0,
&database_size);
base::FilePath spoof_db_file = tracker->GetFullDBFilePath(kOriginId, kName);
diff --git a/content/browser/databases_table_unittest.cc b/content/browser/databases_table_unittest.cc
index ee864cd..9353ad4 100644
--- a/content/browser/databases_table_unittest.cc
+++ b/content/browser/databases_table_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/bind.h"
#include "base/strings/string_util.h"
#include "base/strings/utf_string_conversions.h"
diff --git a/content/browser/device_monitor_mac.h b/content/browser/device_monitor_mac.h
index b3d3f9f..05eab15 100644
--- a/content/browser/device_monitor_mac.h
+++ b/content/browser/device_monitor_mac.h
@@ -5,7 +5,7 @@
#ifndef CONTENT_BROWSER_DEVICE_MONITOR_MAC_H_
#define CONTENT_BROWSER_DEVICE_MONITOR_MAC_H_
-#include "base/basictypes.h"
+#include "base/macros.h"
#include "base/system_monitor/system_monitor.h"
#include "base/threading/thread_checker.h"
diff --git a/content/browser/device_monitor_mac.mm b/content/browser/device_monitor_mac.mm
index c135011..248b99d 100644
--- a/content/browser/device_monitor_mac.mm
+++ b/content/browser/device_monitor_mac.mm
@@ -12,6 +12,7 @@
#include "base/logging.h"
#include "base/mac/bind_objc_block.h"
#include "base/mac/scoped_nsobject.h"
+#include "base/macros.h"
#include "base/profiler/scoped_tracker.h"
#include "base/threading/thread_checker.h"
#include "content/public/browser/browser_thread.h"
diff --git a/content/browser/device_monitor_udev.cc b/content/browser/device_monitor_udev.cc
index 82529e1..822e995 100644
--- a/content/browser/device_monitor_udev.cc
+++ b/content/browser/device_monitor_udev.cc
@@ -6,8 +6,11 @@
#include "content/browser/device_monitor_udev.h"
+#include <stddef.h>
+
#include <string>
+#include "base/macros.h"
#include "base/system_monitor/system_monitor.h"
#include "content/browser/udev_linux.h"
#include "content/public/browser/browser_thread.h"
diff --git a/content/browser/device_monitor_udev.h b/content/browser/device_monitor_udev.h
index 4a879ef..965055d 100644
--- a/content/browser/device_monitor_udev.h
+++ b/content/browser/device_monitor_udev.h
@@ -8,7 +8,7 @@
#ifndef CONTENT_BROWSER_DEVICE_MONITOR_UDEV_H_
#define CONTENT_BROWSER_DEVICE_MONITOR_UDEV_H_
-#include "base/basictypes.h"
+#include "base/macros.h"
#include "base/memory/scoped_ptr.h"
#include "base/message_loop/message_loop.h"
diff --git a/content/browser/device_sensors/ambient_light_mac.h b/content/browser/device_sensors/ambient_light_mac.h
index 8d34e16..36eff8b 100644
--- a/content/browser/device_sensors/ambient_light_mac.h
+++ b/content/browser/device_sensors/ambient_light_mac.h
@@ -6,7 +6,9 @@
#define CONTENT_BROWSER_DEVICE_SENSORS_AMBIENT_LIGHT_MAC_H_
#include <IOKit/IOKitLib.h>
+#include <stdint.h>
+#include "base/macros.h"
#include "base/memory/scoped_ptr.h"
namespace content {
diff --git a/content/browser/device_sensors/data_fetcher_shared_memory.h b/content/browser/device_sensors/data_fetcher_shared_memory.h
index d98a02f..e1e97e3 100644
--- a/content/browser/device_sensors/data_fetcher_shared_memory.h
+++ b/content/browser/device_sensors/data_fetcher_shared_memory.h
@@ -5,6 +5,8 @@
#ifndef CONTENT_BROWSER_DEVICE_SENSORS_DATA_FETCHER_SHARED_MEMORY_H_
#define CONTENT_BROWSER_DEVICE_SENSORS_DATA_FETCHER_SHARED_MEMORY_H_
+#include "base/macros.h"
+#include "build/build_config.h"
#include "content/browser/device_sensors/data_fetcher_shared_memory_base.h"
#if !defined(OS_ANDROID)
diff --git a/content/browser/device_sensors/data_fetcher_shared_memory_base.cc b/content/browser/device_sensors/data_fetcher_shared_memory_base.cc
index 17efaa5..b3d993e 100644
--- a/content/browser/device_sensors/data_fetcher_shared_memory_base.cc
+++ b/content/browser/device_sensors/data_fetcher_shared_memory_base.cc
@@ -4,9 +4,12 @@
#include "content/browser/device_sensors/data_fetcher_shared_memory_base.h"
+#include <stddef.h>
+
#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/stl_util.h"
#include "base/threading/thread.h"
diff --git a/content/browser/device_sensors/data_fetcher_shared_memory_base.h b/content/browser/device_sensors/data_fetcher_shared_memory_base.h
index 954b62a..f36ad7c 100644
--- a/content/browser/device_sensors/data_fetcher_shared_memory_base.h
+++ b/content/browser/device_sensors/data_fetcher_shared_memory_base.h
@@ -7,6 +7,7 @@
#include <map>
+#include "base/macros.h"
#include "base/memory/scoped_ptr.h"
#include "base/memory/shared_memory.h"
#include "base/message_loop/message_loop.h"
diff --git a/content/browser/device_sensors/data_fetcher_shared_memory_base_unittest.cc b/content/browser/device_sensors/data_fetcher_shared_memory_base_unittest.cc
index 8cc24c1..ea44220 100644
--- a/content/browser/device_sensors/data_fetcher_shared_memory_base_unittest.cc
+++ b/content/browser/device_sensors/data_fetcher_shared_memory_base_unittest.cc
@@ -5,6 +5,7 @@
#include "content/browser/device_sensors/data_fetcher_shared_memory_base.h"
#include "base/logging.h"
+#include "base/macros.h"
#include "base/process/process_handle.h"
#include "base/synchronization/waitable_event.h"
#include "base/threading/thread.h"
diff --git a/content/browser/device_sensors/data_fetcher_shared_memory_mac.cc b/content/browser/device_sensors/data_fetcher_shared_memory_mac.cc
index d15fca1..a9ab2ff 100644
--- a/content/browser/device_sensors/data_fetcher_shared_memory_mac.cc
+++ b/content/browser/device_sensors/data_fetcher_shared_memory_mac.cc
@@ -4,6 +4,8 @@
#include "content/browser/device_sensors/data_fetcher_shared_memory.h"
+#include <stdint.h>
+
#include "base/logging.h"
#include "base/metrics/histogram.h"
#include "content/browser/device_sensors/ambient_light_mac.h"
diff --git a/content/browser/device_sensors/data_fetcher_shared_memory_win.cc b/content/browser/device_sensors/data_fetcher_shared_memory_win.cc
index 7839f4e..709c25b 100644
--- a/content/browser/device_sensors/data_fetcher_shared_memory_win.cc
+++ b/content/browser/device_sensors/data_fetcher_shared_memory_win.cc
@@ -10,6 +10,7 @@
#include <Sensors.h>
#include "base/logging.h"
+#include "base/macros.h"
#include "base/metrics/histogram.h"
#include "base/win/iunknown_impl.h"
#include "base/win/windows_version.h"
diff --git a/content/browser/device_sensors/device_inertial_sensor_browsertest.cc b/content/browser/device_sensors/device_inertial_sensor_browsertest.cc
index 665b012..b5d09c5 100644
--- a/content/browser/device_sensors/device_inertial_sensor_browsertest.cc
+++ b/content/browser/device_sensors/device_inertial_sensor_browsertest.cc
@@ -3,6 +3,7 @@
// found in the LICENSE file.
#include "base/command_line.h"
+#include "base/macros.h"
#include "base/synchronization/waitable_event.h"
#include "base/threading/platform_thread.h"
#include "content/browser/device_sensors/data_fetcher_shared_memory.h"
diff --git a/content/browser/device_sensors/device_inertial_sensor_service.h b/content/browser/device_sensors/device_inertial_sensor_service.h
index 07456e1..f25abc6 100644
--- a/content/browser/device_sensors/device_inertial_sensor_service.h
+++ b/content/browser/device_sensors/device_inertial_sensor_service.h
@@ -5,8 +5,8 @@
#ifndef CONTENT_BROWSER_DEVICE_SENSORS_DEVICE_INERTIAL_SENSOR_SERVICE_H_
#define CONTENT_BROWSER_DEVICE_SENSORS_DEVICE_INERTIAL_SENSOR_SERVICE_H_
-#include "base/basictypes.h"
#include "base/callback_forward.h"
+#include "base/macros.h"
#include "base/memory/scoped_ptr.h"
#include "base/memory/shared_memory.h"
#include "base/memory/singleton.h"
diff --git a/content/browser/device_sensors/device_light_message_filter.h b/content/browser/device_sensors/device_light_message_filter.h
index eb10bbf..5824693 100644
--- a/content/browser/device_sensors/device_light_message_filter.h
+++ b/content/browser/device_sensors/device_light_message_filter.h
@@ -5,6 +5,7 @@
#ifndef CONTENT_BROWSER_DEVICE_SENSORS_DEVICE_LIGHT_MESSAGE_FILTER_H_
#define CONTENT_BROWSER_DEVICE_SENSORS_DEVICE_LIGHT_MESSAGE_FILTER_H_
+#include "base/macros.h"
#include "content/public/browser/browser_message_filter.h"
namespace content {
diff --git a/content/browser/device_sensors/device_motion_message_filter.h b/content/browser/device_sensors/device_motion_message_filter.h
index ffe9ff7..36eb42a 100644
--- a/content/browser/device_sensors/device_motion_message_filter.h
+++ b/content/browser/device_sensors/device_motion_message_filter.h
@@ -5,6 +5,7 @@
#ifndef CONTENT_BROWSER_DEVICE_SENSORS_DEVICE_MOTION_MESSAGE_FILTER_H_
#define CONTENT_BROWSER_DEVICE_SENSORS_DEVICE_MOTION_MESSAGE_FILTER_H_
+#include "base/macros.h"
#include "content/public/browser/browser_message_filter.h"
namespace content {
diff --git a/content/browser/device_sensors/device_orientation_message_filter.h b/content/browser/device_sensors/device_orientation_message_filter.h
index acc772d..fb375d9 100644
--- a/content/browser/device_sensors/device_orientation_message_filter.h
+++ b/content/browser/device_sensors/device_orientation_message_filter.h
@@ -5,6 +5,7 @@
#ifndef CONTENT_BROWSER_DEVICE_SENSORS_DEVICE_ORIENTATION_MESSAGE_FILTER_H_
#define CONTENT_BROWSER_DEVICE_SENSORS_DEVICE_ORIENTATION_MESSAGE_FILTER_H_
+#include "base/macros.h"
#include "content/public/browser/browser_message_filter.h"
namespace content {
diff --git a/content/browser/device_sensors/sensor_manager_android.h b/content/browser/device_sensors/sensor_manager_android.h
index 3626aba..0eb2f6c 100644
--- a/content/browser/device_sensors/sensor_manager_android.h
+++ b/content/browser/device_sensors/sensor_manager_android.h
@@ -6,6 +6,7 @@
#define CONTENT_BROWSER_DEVICE_SENSORS_SENSOR_MANAGER_ANDROID_H_
#include "base/android/scoped_java_ref.h"
+#include "base/macros.h"
#include "base/memory/scoped_ptr.h"
#include "base/synchronization/lock.h"
#include "content/browser/device_sensors/device_sensors_consts.h"
diff --git a/content/browser/device_sensors/sensor_manager_chromeos_unittest.cc b/content/browser/device_sensors/sensor_manager_chromeos_unittest.cc
index 184a315..6d9f776 100644
--- a/content/browser/device_sensors/sensor_manager_chromeos_unittest.cc
+++ b/content/browser/device_sensors/sensor_manager_chromeos_unittest.cc
@@ -4,6 +4,7 @@
#include "content/browser/device_sensors/sensor_manager_chromeos.h"
+#include "base/macros.h"
#include "base/memory/scoped_ptr.h"
#include "chromeos/accelerometer/accelerometer_types.h"
#include "content/common/device_sensors/device_motion_hardware_buffer.h"
diff --git a/content/browser/devtools/devtools_agent_host_impl.cc b/content/browser/devtools/devtools_agent_host_impl.cc
index 7385def..df27d12 100644
--- a/content/browser/devtools/devtools_agent_host_impl.cc
+++ b/content/browser/devtools/devtools_agent_host_impl.cc
@@ -7,7 +7,6 @@
#include <map>
#include <vector>
-#include "base/basictypes.h"
#include "base/guid.h"
#include "base/json/json_writer.h"
#include "base/lazy_instance.h"
diff --git a/content/browser/devtools/devtools_agent_host_impl.h b/content/browser/devtools/devtools_agent_host_impl.h
index 2dc09cc..f3b0624 100644
--- a/content/browser/devtools/devtools_agent_host_impl.h
+++ b/content/browser/devtools/devtools_agent_host_impl.h
@@ -5,6 +5,8 @@
#ifndef CONTENT_BROWSER_DEVTOOLS_DEVTOOLS_AGENT_HOST_IMPL_H_
#define CONTENT_BROWSER_DEVTOOLS_DEVTOOLS_AGENT_HOST_IMPL_H_
+#include <stdint.h>
+
#include <string>
#include "base/compiler_specific.h"
@@ -87,7 +89,7 @@ class DevToolsMessageChunkProcessor {
private:
SendMessageCallback callback_;
std::string message_buffer_;
- uint32 message_buffer_size_;
+ uint32_t message_buffer_size_;
std::string state_cookie_;
int last_call_id_;
};
diff --git a/content/browser/devtools/devtools_frame_trace_recorder.cc b/content/browser/devtools/devtools_frame_trace_recorder.cc
index f4f2fce..618bbf8 100644
--- a/content/browser/devtools/devtools_frame_trace_recorder.cc
+++ b/content/browser/devtools/devtools_frame_trace_recorder.cc
@@ -4,6 +4,8 @@
#include "content/browser/devtools/devtools_frame_trace_recorder.h"
+#include <stddef.h>
+
#include <string>
#include <vector>
diff --git a/content/browser/devtools/devtools_frame_trace_recorder.h b/content/browser/devtools/devtools_frame_trace_recorder.h
index 97d133a..1d02667 100644
--- a/content/browser/devtools/devtools_frame_trace_recorder.h
+++ b/content/browser/devtools/devtools_frame_trace_recorder.h
@@ -6,6 +6,7 @@
#define CONTENT_BROWSER_DEVTOOLS_DEVTOOLS_FRAME_TRACE_RECORDER_H_
#include "base/compiler_specific.h"
+#include "base/macros.h"
#include "base/memory/weak_ptr.h"
namespace cc {
diff --git a/content/browser/devtools/devtools_frontend_host_impl.cc b/content/browser/devtools/devtools_frontend_host_impl.cc
index 8302a41..37613b36 100644
--- a/content/browser/devtools/devtools_frontend_host_impl.cc
+++ b/content/browser/devtools/devtools_frontend_host_impl.cc
@@ -4,6 +4,8 @@
#include "content/browser/devtools/devtools_frontend_host_impl.h"
+#include <stddef.h>
+
#include "content/browser/bad_message.h"
#include "content/common/devtools_messages.h"
#include "content/public/browser/navigation_entry.h"
diff --git a/content/browser/devtools/devtools_frontend_host_impl.h b/content/browser/devtools/devtools_frontend_host_impl.h
index b2d6e3c..b2e3dba 100644
--- a/content/browser/devtools/devtools_frontend_host_impl.h
+++ b/content/browser/devtools/devtools_frontend_host_impl.h
@@ -5,6 +5,7 @@
#ifndef CONTENT_BROWSER_DEVTOOLS_DEVTOOLS_FRONTEND_HOST_IMPL_H_
#define CONTENT_BROWSER_DEVTOOLS_DEVTOOLS_FRONTEND_HOST_IMPL_H_
+#include "base/macros.h"
#include "content/public/browser/devtools_frontend_host.h"
#include "content/public/browser/web_contents_observer.h"
diff --git a/content/browser/devtools/devtools_io_context.h b/content/browser/devtools/devtools_io_context.h
index 7e43233..54b4a72 100644
--- a/content/browser/devtools/devtools_io_context.h
+++ b/content/browser/devtools/devtools_io_context.h
@@ -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 <map>
#include "base/callback.h"
diff --git a/content/browser/devtools/devtools_manager.h b/content/browser/devtools/devtools_manager.h
index f8b1b45..57b9ea0 100644
--- a/content/browser/devtools/devtools_manager.h
+++ b/content/browser/devtools/devtools_manager.h
@@ -6,6 +6,7 @@
#define CONTENT_BROWSER_DEVTOOLS_DEVTOOLS_MANAGER_H_
#include "base/compiler_specific.h"
+#include "base/macros.h"
#include "base/memory/singleton.h"
#include "content/common/content_export.h"
#include "content/public/browser/devtools_manager_delegate.h"
diff --git a/content/browser/devtools/devtools_manager_unittest.cc b/content/browser/devtools/devtools_manager_unittest.cc
index 009350a..24d8dc0 100644
--- a/content/browser/devtools/devtools_manager_unittest.cc
+++ b/content/browser/devtools/devtools_manager_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/location.h"
+#include "base/macros.h"
#include "base/memory/scoped_ptr.h"
#include "base/single_thread_task_runner.h"
#include "base/thread_task_runner_handle.h"
diff --git a/content/browser/devtools/devtools_netlog_observer.cc b/content/browser/devtools/devtools_netlog_observer.cc
index 6b1c1ba..24448e3 100644
--- a/content/browser/devtools/devtools_netlog_observer.cc
+++ b/content/browser/devtools/devtools_netlog_observer.cc
@@ -4,6 +4,8 @@
#include "content/browser/devtools/devtools_netlog_observer.h"
+#include <stddef.h>
+
#include "base/strings/string_util.h"
#include "base/values.h"
#include "content/browser/loader/resource_request_info_impl.h"
@@ -28,8 +30,8 @@ DevToolsNetLogObserver::DevToolsNetLogObserver() {
DevToolsNetLogObserver::~DevToolsNetLogObserver() {
}
-DevToolsNetLogObserver::ResourceInfo*
-DevToolsNetLogObserver::GetResourceInfo(uint32 id) {
+DevToolsNetLogObserver::ResourceInfo* DevToolsNetLogObserver::GetResourceInfo(
+ uint32_t id) {
RequestToInfoMap::iterator it = request_to_info_.find(id);
if (it != request_to_info_.end())
return it->second.get();
@@ -193,7 +195,7 @@ void DevToolsNetLogObserver::PopulateResponseInfo(
if (!request_info || !request_info->ShouldReportRawHeaders())
return;
- uint32 source_id = request->net_log().source().id;
+ uint32_t source_id = request->net_log().source().id;
DevToolsNetLogObserver* dev_tools_net_log_observer =
DevToolsNetLogObserver::GetInstance();
if (dev_tools_net_log_observer == NULL)
diff --git a/content/browser/devtools/devtools_netlog_observer.h b/content/browser/devtools/devtools_netlog_observer.h
index da58589..cde0133 100644
--- a/content/browser/devtools/devtools_netlog_observer.h
+++ b/content/browser/devtools/devtools_netlog_observer.h
@@ -5,7 +5,10 @@
#ifndef CONTENT_BROWSER_DEVTOOLS_DEVTOOLS_NETLOG_OBSERVER_H_
#define CONTENT_BROWSER_DEVTOOLS_DEVTOOLS_NETLOG_OBSERVER_H_
+#include <stdint.h>
+
#include "base/containers/hash_tables.h"
+#include "base/macros.h"
#include "base/memory/ref_counted.h"
#include "content/public/common/resource_devtools_info.h"
#include "net/log/net_log.h"
@@ -48,9 +51,10 @@ class DevToolsNetLogObserver : public net::NetLog::ThreadSafeObserver {
DevToolsNetLogObserver();
~DevToolsNetLogObserver() override;
- ResourceInfo* GetResourceInfo(uint32 id);
+ ResourceInfo* GetResourceInfo(uint32_t id);
- typedef base::hash_map<uint32, scoped_refptr<ResourceInfo> > RequestToInfoMap;
+ typedef base::hash_map<uint32_t, scoped_refptr<ResourceInfo>>
+ RequestToInfoMap;
RequestToInfoMap request_to_info_;
DISALLOW_COPY_AND_ASSIGN(DevToolsNetLogObserver);
diff --git a/content/browser/devtools/protocol/color_picker.cc b/content/browser/devtools/protocol/color_picker.cc
index d298927..b87c303 100644
--- a/content/browser/devtools/protocol/color_picker.cc
+++ b/content/browser/devtools/protocol/color_picker.cc
@@ -5,6 +5,7 @@
#include "content/browser/devtools/protocol/color_picker.h"
#include "base/bind.h"
+#include "build/build_config.h"
#include "content/browser/renderer_host/render_view_host_impl.h"
#include "content/browser/renderer_host/render_widget_host_view_base.h"
#include "content/common/cursors/webcursor.h"
diff --git a/content/browser/devtools/protocol/color_picker.h b/content/browser/devtools/protocol/color_picker.h
index e4de525..297500f 100644
--- a/content/browser/devtools/protocol/color_picker.h
+++ b/content/browser/devtools/protocol/color_picker.h
@@ -6,6 +6,7 @@
#define CONTENT_BROWSER_DEVTOOLS_PROTOCOL_COLOR_PICKER_H_
#include "base/callback.h"
+#include "base/macros.h"
#include "content/public/browser/render_widget_host.h"
#include "third_party/skia/include/core/SkBitmap.h"
diff --git a/content/browser/devtools/protocol/devtools_protocol_browsertest.cc b/content/browser/devtools/protocol/devtools_protocol_browsertest.cc
index 6917762..218579c 100644
--- a/content/browser/devtools/protocol/devtools_protocol_browsertest.cc
+++ b/content/browser/devtools/protocol/devtools_protocol_browsertest.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 "base/base64.h"
#include "base/command_line.h"
#include "base/json/json_reader.h"
#include "base/json/json_writer.h"
#include "base/values.h"
+#include "build/build_config.h"
#include "content/public/browser/devtools_agent_host.h"
#include "content/public/browser/render_view_host.h"
#include "content/public/browser/web_contents.h"
diff --git a/content/browser/devtools/protocol/devtools_protocol_client.h b/content/browser/devtools/protocol/devtools_protocol_client.h
index 780bc74..fe17c99 100644
--- a/content/browser/devtools/protocol/devtools_protocol_client.h
+++ b/content/browser/devtools/protocol/devtools_protocol_client.h
@@ -6,6 +6,7 @@
#define CONTENT_BROWSER_DEVTOOLS_PROTOCOL_DEVTOOLS_PROTOCOL_CLIENT_H_
#include "base/callback.h"
+#include "base/macros.h"
#include "base/values.h"
namespace content {
diff --git a/content/browser/devtools/protocol/dom_handler.cc b/content/browser/devtools/protocol/dom_handler.cc
index 0022c2e..8396255 100644
--- a/content/browser/devtools/protocol/dom_handler.cc
+++ b/content/browser/devtools/protocol/dom_handler.cc
@@ -5,6 +5,7 @@
#include "content/browser/devtools/protocol/dom_handler.h"
#include "base/strings/utf_string_conversions.h"
+#include "build/build_config.h"
#include "content/browser/child_process_security_policy_impl.h"
#include "content/browser/frame_host/render_frame_host_impl.h"
diff --git a/content/browser/devtools/protocol/dom_handler.h b/content/browser/devtools/protocol/dom_handler.h
index 375cf2b..56f80e2 100644
--- a/content/browser/devtools/protocol/dom_handler.h
+++ b/content/browser/devtools/protocol/dom_handler.h
@@ -5,6 +5,7 @@
#ifndef CONTENT_BROWSER_DEVTOOLS_PROTOCOL_DOM_HANDLER_H_
#define CONTENT_BROWSER_DEVTOOLS_PROTOCOL_DOM_HANDLER_H_
+#include "base/macros.h"
#include "content/browser/devtools/protocol/devtools_protocol_dispatcher.h"
namespace content {
diff --git a/content/browser/devtools/protocol/emulation_handler.cc b/content/browser/devtools/protocol/emulation_handler.cc
index 7761ef6..915c3ae 100644
--- a/content/browser/devtools/protocol/emulation_handler.cc
+++ b/content/browser/devtools/protocol/emulation_handler.cc
@@ -5,6 +5,7 @@
#include "content/browser/devtools/protocol/emulation_handler.h"
#include "base/strings/string_number_conversions.h"
+#include "build/build_config.h"
#include "content/browser/frame_host/render_frame_host_impl.h"
#include "content/browser/geolocation/geolocation_service_context.h"
#include "content/browser/renderer_host/render_widget_host_impl.h"
diff --git a/content/browser/devtools/protocol/emulation_handler.h b/content/browser/devtools/protocol/emulation_handler.h
index a6c703a..bcaeb0d 100644
--- a/content/browser/devtools/protocol/emulation_handler.h
+++ b/content/browser/devtools/protocol/emulation_handler.h
@@ -5,6 +5,7 @@
#ifndef CONTENT_BROWSER_DEVTOOLS_PROTOCOL_EMULATION_HANDLER_H_
#define CONTENT_BROWSER_DEVTOOLS_PROTOCOL_EMULATION_HANDLER_H_
+#include "base/macros.h"
#include "content/browser/devtools/protocol/devtools_protocol_dispatcher.h"
#include "third_party/WebKit/public/web/WebDeviceEmulationParams.h"
diff --git a/content/browser/devtools/protocol/input_handler.cc b/content/browser/devtools/protocol/input_handler.cc
index c0def4e..d9c17f3 100644
--- a/content/browser/devtools/protocol/input_handler.cc
+++ b/content/browser/devtools/protocol/input_handler.cc
@@ -4,6 +4,8 @@
#include "content/browser/devtools/protocol/input_handler.h"
+#include <stddef.h>
+
#include "base/message_loop/message_loop.h"
#include "base/strings/stringprintf.h"
#include "base/strings/utf_string_conversions.h"
diff --git a/content/browser/devtools/protocol/input_handler.h b/content/browser/devtools/protocol/input_handler.h
index cb6a5fc..1bb7be9 100644
--- a/content/browser/devtools/protocol/input_handler.h
+++ b/content/browser/devtools/protocol/input_handler.h
@@ -5,6 +5,7 @@
#ifndef CONTENT_BROWSER_DEVTOOLS_PROTOCOL_INPUT_HANDLER_H_
#define CONTENT_BROWSER_DEVTOOLS_PROTOCOL_INPUT_HANDLER_H_
+#include "base/macros.h"
#include "base/memory/weak_ptr.h"
#include "content/browser/devtools/protocol/devtools_protocol_dispatcher.h"
#include "content/browser/renderer_host/input/synthetic_gesture.h"
diff --git a/content/browser/devtools/protocol/inspector_handler.h b/content/browser/devtools/protocol/inspector_handler.h
index c533a25..08c1e5e 100644
--- a/content/browser/devtools/protocol/inspector_handler.h
+++ b/content/browser/devtools/protocol/inspector_handler.h
@@ -5,6 +5,7 @@
#ifndef CONTENT_BROWSER_DEVTOOLS_PROTOCOL_INSPECTOR_HANDLER_H_
#define CONTENT_BROWSER_DEVTOOLS_PROTOCOL_INSPECTOR_HANDLER_H_
+#include "base/macros.h"
#include "content/browser/devtools/protocol/devtools_protocol_dispatcher.h"
namespace content {
diff --git a/content/browser/devtools/protocol/io_handler.cc b/content/browser/devtools/protocol/io_handler.cc
index 1cc1354..59bef41 100644
--- a/content/browser/devtools/protocol/io_handler.cc
+++ b/content/browser/devtools/protocol/io_handler.cc
@@ -4,6 +4,7 @@
#include "content/browser/devtools/protocol/io_handler.h"
+#include <stddef.h>
#include <stdint.h>
#include "base/bind.h"
diff --git a/content/browser/devtools/protocol/io_handler.h b/content/browser/devtools/protocol/io_handler.h
index d6ae25b..951df50 100644
--- a/content/browser/devtools/protocol/io_handler.h
+++ b/content/browser/devtools/protocol/io_handler.h
@@ -5,6 +5,7 @@
#ifndef CONTENT_BROWSER_DEVTOOLS_PROTOCOL_IO_HANDLER_H_
#define CONTENT_BROWSER_DEVTOOLS_PROTOCOL_IO_HANDLER_H_
+#include "base/macros.h"
#include "base/memory/weak_ptr.h"
#include "content/browser/devtools/protocol/devtools_protocol_dispatcher.h"
diff --git a/content/browser/devtools/protocol/memory_handler.h b/content/browser/devtools/protocol/memory_handler.h
index 0d66855..b080f50 100644
--- a/content/browser/devtools/protocol/memory_handler.h
+++ b/content/browser/devtools/protocol/memory_handler.h
@@ -5,6 +5,7 @@
#ifndef CONTENT_BROWSER_DEVTOOLS_PROTOCOL_MEMORY_HANDLER_H_
#define CONTENT_BROWSER_DEVTOOLS_PROTOCOL_MEMORY_HANDLER_H_
+#include "base/macros.h"
#include "content/browser/devtools/protocol/devtools_protocol_dispatcher.h"
namespace content {
diff --git a/content/browser/devtools/protocol/network_handler.cc b/content/browser/devtools/protocol/network_handler.cc
index fd83a43..d18d87a 100644
--- a/content/browser/devtools/protocol/network_handler.cc
+++ b/content/browser/devtools/protocol/network_handler.cc
@@ -4,6 +4,8 @@
#include "content/browser/devtools/protocol/network_handler.h"
+#include <stddef.h>
+
#include "base/containers/hash_tables.h"
#include "base/strings/stringprintf.h"
#include "base/time/time.h"
diff --git a/content/browser/devtools/protocol/network_handler.h b/content/browser/devtools/protocol/network_handler.h
index 0c8a989..3b1456b 100644
--- a/content/browser/devtools/protocol/network_handler.h
+++ b/content/browser/devtools/protocol/network_handler.h
@@ -5,6 +5,7 @@
#ifndef CONTENT_BROWSER_DEVTOOLS_PROTOCOL_NETWORK_HANDLER_H_
#define CONTENT_BROWSER_DEVTOOLS_PROTOCOL_NETWORK_HANDLER_H_
+#include "base/macros.h"
#include "base/memory/weak_ptr.h"
#include "content/browser/devtools/protocol/devtools_protocol_dispatcher.h"
#include "net/cookies/canonical_cookie.h"
diff --git a/content/browser/devtools/protocol/page_handler.h b/content/browser/devtools/protocol/page_handler.h
index 8560bf4..02b685a 100644
--- a/content/browser/devtools/protocol/page_handler.h
+++ b/content/browser/devtools/protocol/page_handler.h
@@ -5,8 +5,10 @@
#ifndef CONTENT_BROWSER_DEVTOOLS_PROTOCOL_PAGE_HANDLER_H_
#define CONTENT_BROWSER_DEVTOOLS_PROTOCOL_PAGE_HANDLER_H_
-#include "base/basictypes.h"
+#include <stddef.h>
+
#include "base/compiler_specific.h"
+#include "base/macros.h"
#include "base/memory/weak_ptr.h"
#include "base/time/time.h"
#include "cc/output/compositor_frame_metadata.h"
diff --git a/content/browser/devtools/protocol/security_handler.h b/content/browser/devtools/protocol/security_handler.h
index 407d93c..3f9ce2b1 100644
--- a/content/browser/devtools/protocol/security_handler.h
+++ b/content/browser/devtools/protocol/security_handler.h
@@ -5,6 +5,7 @@
#ifndef CONTENT_BROWSER_DEVTOOLS_PROTOCOL_SECURITY_HANDLER_H_
#define CONTENT_BROWSER_DEVTOOLS_PROTOCOL_SECURITY_HANDLER_H_
+#include "base/macros.h"
#include "content/browser/devtools/devtools_protocol_handler.h"
#include "content/browser/devtools/protocol/devtools_protocol_dispatcher.h"
#include "content/public/browser/web_contents_observer.h"
diff --git a/content/browser/devtools/protocol/service_worker_handler.cc b/content/browser/devtools/protocol/service_worker_handler.cc
index fcac273..a84091c 100644
--- a/content/browser/devtools/protocol/service_worker_handler.cc
+++ b/content/browser/devtools/protocol/service_worker_handler.cc
@@ -182,7 +182,7 @@ bool CollectURLs(std::set<GURL>* urls, FrameTreeNode* tree_node) {
}
void StopServiceWorkerOnIO(scoped_refptr<ServiceWorkerContextWrapper> context,
- int64 version_id) {
+ int64_t version_id) {
if (content::ServiceWorkerVersion* version =
context->GetLiveVersion(version_id)) {
version->StopWorker(base::Bind(&StatusNoOp));
@@ -191,7 +191,7 @@ void StopServiceWorkerOnIO(scoped_refptr<ServiceWorkerContextWrapper> context,
void GetDevToolsRouteInfoOnIO(
scoped_refptr<ServiceWorkerContextWrapper> context,
- int64 version_id,
+ int64_t version_id,
const base::Callback<void(int, int)>& callback) {
if (content::ServiceWorkerVersion* version =
context->GetLiveVersion(version_id)) {
@@ -376,7 +376,7 @@ Response ServiceWorkerHandler::StopWorker(const std::string& version_id) {
return Response::OK();
if (!context_)
return CreateContextErrorResponse();
- int64 id = 0;
+ int64_t id = 0;
if (!base::StringToInt64(version_id, &id))
return CreateInvalidVersionIdErrorResponse();
BrowserThread::PostTask(BrowserThread::IO, FROM_HERE,
@@ -400,7 +400,7 @@ Response ServiceWorkerHandler::InspectWorker(const std::string& version_id) {
if (!context_)
return CreateContextErrorResponse();
- int64 id = kInvalidServiceWorkerVersionId;
+ int64_t id = kInvalidServiceWorkerVersionId;
if (!base::StringToInt64(version_id, &id))
return CreateInvalidVersionIdErrorResponse();
BrowserThread::PostTask(
@@ -422,7 +422,7 @@ Response ServiceWorkerHandler::SetForceUpdateOnPageLoad(
bool force_update_on_page_load) {
if (!context_)
return CreateContextErrorResponse();
- int64 id = kInvalidServiceWorkerRegistrationId;
+ int64_t id = kInvalidServiceWorkerRegistrationId;
if (!base::StringToInt64(registration_id, &id))
return CreateInvalidVersionIdErrorResponse();
context_->SetForceUpdateOnPageLoad(id, force_update_on_page_load);
@@ -437,7 +437,7 @@ Response ServiceWorkerHandler::DeliverPushMessage(
return Response::OK();
if (!render_frame_host_)
return CreateContextErrorResponse();
- int64 id = 0;
+ int64_t id = 0;
if (!base::StringToInt64(registration_id, &id))
return CreateInvalidVersionIdErrorResponse();
BrowserContext::DeliverPushMessage(
@@ -504,8 +504,8 @@ void ServiceWorkerHandler::OnWorkerVersionUpdated(
}
void ServiceWorkerHandler::OnErrorReported(
- int64 registration_id,
- int64 version_id,
+ int64_t registration_id,
+ int64_t version_id,
const ServiceWorkerContextObserver::ErrorInfo& info) {
client_->WorkerErrorReported(
WorkerErrorReportedParams::Create()->set_error_message(
diff --git a/content/browser/devtools/protocol/service_worker_handler.h b/content/browser/devtools/protocol/service_worker_handler.h
index a67c37f..1508f5d 100644
--- a/content/browser/devtools/protocol/service_worker_handler.h
+++ b/content/browser/devtools/protocol/service_worker_handler.h
@@ -5,8 +5,11 @@
#ifndef CONTENT_BROWSER_DEVTOOLS_PROTOCOL_SERVICE_WORKER_HANDLER_H_
#define CONTENT_BROWSER_DEVTOOLS_PROTOCOL_SERVICE_WORKER_HANDLER_H_
+#include <stdint.h>
+
#include <set>
+#include "base/macros.h"
#include "base/memory/weak_ptr.h"
#include "content/browser/devtools/protocol/devtools_protocol_dispatcher.h"
#include "content/browser/devtools/service_worker_devtools_agent_host.h"
@@ -84,8 +87,8 @@ class ServiceWorkerHandler : public DevToolsAgentHostClient,
const std::vector<ServiceWorkerRegistrationInfo>& registrations);
void OnWorkerVersionUpdated(
const std::vector<ServiceWorkerVersionInfo>& registrations);
- void OnErrorReported(int64 registration_id,
- int64 version_id,
+ void OnErrorReported(int64_t registration_id,
+ int64_t version_id,
const ServiceWorkerContextObserver::ErrorInfo& info);
void OpenNewDevToolsWindow(int process_id, int devtools_agent_route_id);
diff --git a/content/browser/devtools/protocol/system_info_handler.cc b/content/browser/devtools/protocol/system_info_handler.cc
index aa32e58..7e070f0 100644
--- a/content/browser/devtools/protocol/system_info_handler.cc
+++ b/content/browser/devtools/protocol/system_info_handler.cc
@@ -4,6 +4,8 @@
#include "content/browser/devtools/protocol/system_info_handler.h"
+#include <stdint.h>
+
#include "base/bind.h"
#include "content/browser/gpu/compositor_util.h"
#include "content/public/browser/gpu_data_manager.h"
@@ -26,7 +28,7 @@ class AuxGPUInfoEnumerator : public gpu::GPUInfo::Enumerator {
: dictionary_(dictionary),
in_aux_attributes_(false) { }
- void AddInt64(const char* name, int64 value) override {
+ void AddInt64(const char* name, int64_t value) override {
if (in_aux_attributes_)
dictionary_->SetDouble(name, value);
}
diff --git a/content/browser/devtools/protocol/system_info_handler.h b/content/browser/devtools/protocol/system_info_handler.h
index 8131c9e..40b14e8 100644
--- a/content/browser/devtools/protocol/system_info_handler.h
+++ b/content/browser/devtools/protocol/system_info_handler.h
@@ -7,6 +7,7 @@
#include <set>
+#include "base/macros.h"
#include "content/browser/devtools/protocol/devtools_protocol_dispatcher.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/gpu_data_manager_observer.h"
diff --git a/content/browser/devtools/protocol/tethering_handler.cc b/content/browser/devtools/protocol/tethering_handler.cc
index 9b964f4..a58b534 100644
--- a/content/browser/devtools/protocol/tethering_handler.cc
+++ b/content/browser/devtools/protocol/tethering_handler.cc
@@ -156,7 +156,7 @@ class SocketPump {
class BoundSocket {
public:
- typedef base::Callback<void(uint16, const std::string&)> AcceptedCallback;
+ typedef base::Callback<void(uint16_t, const std::string&)> AcceptedCallback;
BoundSocket(AcceptedCallback accepted_callback,
const CreateServerSocketCallback& socket_callback)
@@ -169,7 +169,7 @@ class BoundSocket {
virtual ~BoundSocket() {
}
- bool Listen(uint16 port) {
+ bool Listen(uint16_t port) {
port_ = port;
net::IPAddressNumber ip_number;
if (!net::ParseIPLiteralToNumber(kLocalhost, &ip_number))
@@ -224,7 +224,7 @@ class BoundSocket {
CreateServerSocketCallback socket_callback_;
scoped_ptr<net::ServerSocket> socket_;
scoped_ptr<net::StreamSocket> accept_socket_;
- uint16 port_;
+ uint16_t port_;
};
} // namespace
@@ -238,9 +238,9 @@ class TetheringHandler::TetheringImpl {
const CreateServerSocketCallback& socket_callback);
~TetheringImpl();
- void Bind(DevToolsCommandId command_id, uint16 port);
- void Unbind(DevToolsCommandId command_id, uint16 port);
- void Accepted(uint16 port, const std::string& name);
+ void Bind(DevToolsCommandId command_id, uint16_t port);
+ void Unbind(DevToolsCommandId command_id, uint16_t port);
+ void Accepted(uint16_t port, const std::string& name);
private:
void SendInternalError(DevToolsCommandId command_id,
@@ -249,7 +249,7 @@ class TetheringHandler::TetheringImpl {
base::WeakPtr<TetheringHandler> handler_;
CreateServerSocketCallback socket_callback_;
- typedef std::map<uint16, BoundSocket*> BoundSockets;
+ typedef std::map<uint16_t, BoundSocket*> BoundSockets;
BoundSockets bound_sockets_;
};
@@ -264,8 +264,8 @@ TetheringHandler::TetheringImpl::~TetheringImpl() {
STLDeleteValues(&bound_sockets_);
}
-void TetheringHandler::TetheringImpl::Bind(
- DevToolsCommandId command_id, uint16 port) {
+void TetheringHandler::TetheringImpl::Bind(DevToolsCommandId command_id,
+ uint16_t port) {
if (bound_sockets_.find(port) != bound_sockets_.end()) {
SendInternalError(command_id, "Port already bound");
return;
@@ -287,9 +287,8 @@ void TetheringHandler::TetheringImpl::Bind(
base::Bind(&TetheringHandler::SendBindSuccess, handler_, command_id));
}
-void TetheringHandler::TetheringImpl::Unbind(
- DevToolsCommandId command_id, uint16 port) {
-
+void TetheringHandler::TetheringImpl::Unbind(DevToolsCommandId command_id,
+ uint16_t port) {
BoundSockets::iterator it = bound_sockets_.find(port);
if (it == bound_sockets_.end()) {
SendInternalError(command_id, "Port is not bound");
@@ -304,8 +303,8 @@ void TetheringHandler::TetheringImpl::Unbind(
base::Bind(&TetheringHandler::SendUnbindSuccess, handler_, command_id));
}
-void TetheringHandler::TetheringImpl::Accepted(
- uint16 port, const std::string& name) {
+void TetheringHandler::TetheringImpl::Accepted(uint16_t port,
+ const std::string& name) {
BrowserThread::PostTask(
BrowserThread::UI,
FROM_HERE,
@@ -348,7 +347,7 @@ void TetheringHandler::SetClient(scoped_ptr<Client> client) {
client_.swap(client);
}
-void TetheringHandler::Accepted(uint16 port, const std::string& name) {
+void TetheringHandler::Accepted(uint16_t port, const std::string& name) {
client_->Accepted(AcceptedParams::Create()->set_port(port)
->set_connection_id(name));
}
diff --git a/content/browser/devtools/protocol/tethering_handler.h b/content/browser/devtools/protocol/tethering_handler.h
index 21f1a9a..fc6b8e5 100644
--- a/content/browser/devtools/protocol/tethering_handler.h
+++ b/content/browser/devtools/protocol/tethering_handler.h
@@ -5,6 +5,9 @@
#ifndef CONTENT_BROWSER_DEVTOOLS_PROTOCOL_TETHERING_HANDLER_H_
#define CONTENT_BROWSER_DEVTOOLS_PROTOCOL_TETHERING_HANDLER_H_
+#include <stdint.h>
+
+#include "base/macros.h"
#include "base/memory/weak_ptr.h"
#include "content/browser/devtools/protocol/devtools_protocol_dispatcher.h"
@@ -35,7 +38,7 @@ class TetheringHandler {
private:
class TetheringImpl;
- void Accepted(uint16 port, const std::string& name);
+ void Accepted(uint16_t port, const std::string& name);
bool Activate();
void SendBindSuccess(DevToolsCommandId command_id);
diff --git a/content/browser/devtools/protocol/tracing_handler.cc b/content/browser/devtools/protocol/tracing_handler.cc
index 2fd8e4b..11cc188 100644
--- a/content/browser/devtools/protocol/tracing_handler.cc
+++ b/content/browser/devtools/protocol/tracing_handler.cc
@@ -224,7 +224,7 @@ Response TracingHandler::RequestMemoryDump(DevToolsCommandId command_id) {
}
void TracingHandler::OnMemoryDumpFinished(DevToolsCommandId command_id,
- uint64 dump_guid,
+ uint64_t dump_guid,
bool success) {
client_->SendRequestMemoryDumpResponse(
command_id,
diff --git a/content/browser/devtools/protocol/tracing_handler.h b/content/browser/devtools/protocol/tracing_handler.h
index 9e00f63..f45d7e9 100644
--- a/content/browser/devtools/protocol/tracing_handler.h
+++ b/content/browser/devtools/protocol/tracing_handler.h
@@ -5,9 +5,13 @@
#ifndef CONTENT_BROWSER_DEVTOOLS_PROTOCOL_TRACING_HANDLER_H_
#define CONTENT_BROWSER_DEVTOOLS_PROTOCOL_TRACING_HANDLER_H_
+#include <stddef.h>
+#include <stdint.h>
+
#include <set>
#include <string>
+#include "base/macros.h"
#include "base/memory/weak_ptr.h"
#include "base/trace_event/trace_event.h"
#include "content/browser/devtools/protocol/devtools_protocol_dispatcher.h"
@@ -58,7 +62,7 @@ class TracingHandler {
void OnCategoriesReceived(DevToolsCommandId command_id,
const std::set<std::string>& category_set);
void OnMemoryDumpFinished(DevToolsCommandId command_id,
- uint64 dump_guid,
+ uint64_t dump_guid,
bool success);
void SetupTimer(double usage_reporting_interval);
diff --git a/content/browser/devtools/render_frame_devtools_agent_host.cc b/content/browser/devtools/render_frame_devtools_agent_host.cc
index 7f1b5f0..eb27196 100644
--- a/content/browser/devtools/render_frame_devtools_agent_host.cc
+++ b/content/browser/devtools/render_frame_devtools_agent_host.cc
@@ -4,9 +4,9 @@
#include "content/browser/devtools/render_frame_devtools_agent_host.h"
-#include "base/basictypes.h"
#include "base/lazy_instance.h"
#include "base/strings/utf_string_conversions.h"
+#include "build/build_config.h"
#include "content/browser/child_process_security_policy_impl.h"
#include "content/browser/devtools/devtools_frame_trace_recorder.h"
#include "content/browser/devtools/devtools_protocol_handler.h"
diff --git a/content/browser/devtools/render_frame_devtools_agent_host.h b/content/browser/devtools/render_frame_devtools_agent_host.h
index 7d53f85..6840934 100644
--- a/content/browser/devtools/render_frame_devtools_agent_host.h
+++ b/content/browser/devtools/render_frame_devtools_agent_host.h
@@ -7,9 +7,10 @@
#include <map>
-#include "base/basictypes.h"
#include "base/compiler_specific.h"
+#include "base/macros.h"
#include "base/memory/scoped_ptr.h"
+#include "build/build_config.h"
#include "content/browser/devtools/devtools_agent_host_impl.h"
#include "content/common/content_export.h"
#include "content/public/browser/web_contents_observer.h"
diff --git a/content/browser/devtools/service_worker_devtools_agent_host.cc b/content/browser/devtools/service_worker_devtools_agent_host.cc
index 5d65a22..3755d15 100644
--- a/content/browser/devtools/service_worker_devtools_agent_host.cc
+++ b/content/browser/devtools/service_worker_devtools_agent_host.cc
@@ -21,7 +21,7 @@ void StatusNoOp(ServiceWorkerStatusCode status) {}
void TerminateServiceWorkerOnIO(
base::WeakPtr<ServiceWorkerContextCore> context_weak,
- int64 version_id) {
+ int64_t version_id) {
if (ServiceWorkerContextCore* context = context_weak.get()) {
if (ServiceWorkerVersion* version = context->GetLiveVersion(version_id))
version->StopWorker(base::Bind(&StatusNoOp));
@@ -30,7 +30,7 @@ void TerminateServiceWorkerOnIO(
void UnregisterServiceWorkerOnIO(
base::WeakPtr<ServiceWorkerContextCore> context_weak,
- int64 version_id) {
+ int64_t version_id) {
if (ServiceWorkerContextCore* context = context_weak.get()) {
if (ServiceWorkerVersion* version = context->GetLiveVersion(version_id)) {
version->StopWorker(base::Bind(&StatusNoOp));
@@ -42,7 +42,7 @@ void UnregisterServiceWorkerOnIO(
void SetDevToolsAttachedOnIO(
base::WeakPtr<ServiceWorkerContextCore> context_weak,
- int64 version_id,
+ int64_t version_id,
bool attached) {
if (ServiceWorkerContextCore* context = context_weak.get()) {
if (ServiceWorkerVersion* version = context->GetLiveVersion(version_id))
@@ -105,7 +105,7 @@ void ServiceWorkerDevToolsAgentHost::OnAttachedStateChanged(bool attached) {
attached));
}
-int64 ServiceWorkerDevToolsAgentHost::service_worker_version_id() const {
+int64_t ServiceWorkerDevToolsAgentHost::service_worker_version_id() const {
return service_worker_->version_id();
}
diff --git a/content/browser/devtools/service_worker_devtools_agent_host.h b/content/browser/devtools/service_worker_devtools_agent_host.h
index 04857f8..89b48b1 100644
--- a/content/browser/devtools/service_worker_devtools_agent_host.h
+++ b/content/browser/devtools/service_worker_devtools_agent_host.h
@@ -5,8 +5,11 @@
#ifndef CONTENT_BROWSER_DEVTOOLS_SERVICE_WORKER_DEVTOOLS_AGENT_HOST_H_
#define CONTENT_BROWSER_DEVTOOLS_SERVICE_WORKER_DEVTOOLS_AGENT_HOST_H_
+#include <stdint.h>
+
#include <map>
+#include "base/macros.h"
#include "content/browser/devtools/protocol/network_handler.h"
#include "content/browser/devtools/service_worker_devtools_manager.h"
#include "content/browser/devtools/worker_devtools_agent_host.h"
@@ -36,7 +39,7 @@ class ServiceWorkerDevToolsAgentHost : public WorkerDevToolsAgentHost {
// WorkerDevToolsAgentHost overrides.
void OnAttachedStateChanged(bool attached) override;
- int64 service_worker_version_id() const;
+ int64_t service_worker_version_id() const;
bool Matches(const ServiceWorkerIdentifier& other);
diff --git a/content/browser/devtools/service_worker_devtools_manager.cc b/content/browser/devtools/service_worker_devtools_manager.cc
index c6cf7c7..b94f1a9 100644
--- a/content/browser/devtools/service_worker_devtools_manager.cc
+++ b/content/browser/devtools/service_worker_devtools_manager.cc
@@ -15,13 +15,12 @@ namespace content {
ServiceWorkerDevToolsManager::ServiceWorkerIdentifier::ServiceWorkerIdentifier(
const ServiceWorkerContextCore* context,
base::WeakPtr<ServiceWorkerContextCore> context_weak,
- int64 version_id,
+ int64_t version_id,
const GURL& url)
: context_(context),
context_weak_(context_weak),
version_id_(version_id),
- url_(url) {
-}
+ url_(url) {}
ServiceWorkerDevToolsManager::ServiceWorkerIdentifier::ServiceWorkerIdentifier(
const ServiceWorkerIdentifier& other)
diff --git a/content/browser/devtools/service_worker_devtools_manager.h b/content/browser/devtools/service_worker_devtools_manager.h
index 2c8e997..306edd7 100644
--- a/content/browser/devtools/service_worker_devtools_manager.h
+++ b/content/browser/devtools/service_worker_devtools_manager.h
@@ -5,9 +5,11 @@
#ifndef CONTENT_BROWSER_DEVTOOLS_SERVICE_WORKER_DEVTOOLS_MANAGER_H_
#define CONTENT_BROWSER_DEVTOOLS_SERVICE_WORKER_DEVTOOLS_MANAGER_H_
+#include <stdint.h>
+
#include <map>
-#include "base/basictypes.h"
+#include "base/macros.h"
#include "base/memory/singleton.h"
#include "base/memory/weak_ptr.h"
#include "base/observer_list.h"
@@ -44,7 +46,7 @@ class CONTENT_EXPORT ServiceWorkerDevToolsManager {
ServiceWorkerIdentifier(
const ServiceWorkerContextCore* context,
base::WeakPtr<ServiceWorkerContextCore> context_weak,
- int64 version_id,
+ int64_t version_id,
const GURL& url);
ServiceWorkerIdentifier(const ServiceWorkerIdentifier& other);
~ServiceWorkerIdentifier();
@@ -55,13 +57,13 @@ class CONTENT_EXPORT ServiceWorkerDevToolsManager {
base::WeakPtr<ServiceWorkerContextCore> context_weak() const {
return context_weak_;
}
- int64 version_id() const { return version_id_; }
+ int64_t version_id() const { return version_id_; }
GURL url() const { return url_; }
private:
const ServiceWorkerContextCore* const context_;
const base::WeakPtr<ServiceWorkerContextCore> context_weak_;
- const int64 version_id_;
+ const int64_t version_id_;
const GURL url_;
};
diff --git a/content/browser/devtools/shared_worker_devtools_agent_host.h b/content/browser/devtools/shared_worker_devtools_agent_host.h
index 21f8a38..5ac6d6b 100644
--- a/content/browser/devtools/shared_worker_devtools_agent_host.h
+++ b/content/browser/devtools/shared_worker_devtools_agent_host.h
@@ -5,6 +5,7 @@
#ifndef CONTENT_BROWSER_DEVTOOLS_SHARED_WORKER_DEVTOOLS_AGENT_HOST_H_
#define CONTENT_BROWSER_DEVTOOLS_SHARED_WORKER_DEVTOOLS_AGENT_HOST_H_
+#include "base/macros.h"
#include "content/browser/devtools/worker_devtools_agent_host.h"
namespace content {
diff --git a/content/browser/devtools/shared_worker_devtools_manager.h b/content/browser/devtools/shared_worker_devtools_manager.h
index 22842f5..40d1ffc 100644
--- a/content/browser/devtools/shared_worker_devtools_manager.h
+++ b/content/browser/devtools/shared_worker_devtools_manager.h
@@ -7,8 +7,8 @@
#include <map>
-#include "base/basictypes.h"
#include "base/gtest_prod_util.h"
+#include "base/macros.h"
#include "base/memory/singleton.h"
#include "content/public/browser/devtools_agent_host.h"
diff --git a/content/browser/devtools/shared_worker_devtools_manager_unittest.cc b/content/browser/devtools/shared_worker_devtools_manager_unittest.cc
index 554b83e..98a7152 100644
--- a/content/browser/devtools/shared_worker_devtools_manager_unittest.cc
+++ b/content/browser/devtools/shared_worker_devtools_manager_unittest.cc
@@ -4,6 +4,9 @@
#include "content/browser/devtools/shared_worker_devtools_manager.h"
+#include <stddef.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/content/browser/devtools/site_per_process_devtools_browsertest.cc b/content/browser/devtools/site_per_process_devtools_browsertest.cc
index 489cd50..cfa2b4a 100644
--- a/content/browser/devtools/site_per_process_devtools_browsertest.cc
+++ b/content/browser/devtools/site_per_process_devtools_browsertest.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-
+#include "build/build_config.h"
#include "content/browser/frame_host/frame_tree.h"
#include "content/browser/site_per_process_browsertest.h"
#include "content/browser/web_contents/web_contents_impl.h"
diff --git a/content/browser/devtools/worker_devtools_agent_host.h b/content/browser/devtools/worker_devtools_agent_host.h
index 668f029..4f21257 100644
--- a/content/browser/devtools/worker_devtools_agent_host.h
+++ b/content/browser/devtools/worker_devtools_agent_host.h
@@ -5,6 +5,7 @@
#ifndef CONTENT_BROWSER_DEVTOOLS_WORKER_DEVTOOLS_AGENT_HOST_H_
#define CONTENT_BROWSER_DEVTOOLS_WORKER_DEVTOOLS_AGENT_HOST_H_
+#include "base/macros.h"
#include "content/browser/devtools/devtools_agent_host_impl.h"
#include "ipc/ipc_listener.h"
diff --git a/content/browser/dom_storage/dom_storage_area.cc b/content/browser/dom_storage/dom_storage_area.cc
index e76f5c9..50ef7ff 100644
--- a/content/browser/dom_storage/dom_storage_area.cc
+++ b/content/browser/dom_storage/dom_storage_area.cc
@@ -118,7 +118,7 @@ DOMStorageArea::DOMStorageArea(const GURL& origin,
}
}
-DOMStorageArea::DOMStorageArea(int64 namespace_id,
+DOMStorageArea::DOMStorageArea(int64_t namespace_id,
const std::string& persistent_namespace_id,
const GURL& origin,
SessionStorageDatabase* session_storage_backing,
@@ -247,7 +247,7 @@ void DOMStorageArea::FastClear() {
}
DOMStorageArea* DOMStorageArea::ShallowCopy(
- int64 destination_namespace_id,
+ int64_t destination_namespace_id,
const std::string& destination_persistent_namespace_id) {
DCHECK_NE(kLocalStorageNamespaceId, namespace_id_);
DCHECK_NE(kLocalStorageNamespaceId, destination_namespace_id);
diff --git a/content/browser/dom_storage/dom_storage_area.h b/content/browser/dom_storage/dom_storage_area.h
index dd0df52..50082fd 100644
--- a/content/browser/dom_storage/dom_storage_area.h
+++ b/content/browser/dom_storage/dom_storage_area.h
@@ -5,10 +5,14 @@
#ifndef CONTENT_BROWSER_DOM_STORAGE_DOM_STORAGE_AREA_H_
#define CONTENT_BROWSER_DOM_STORAGE_DOM_STORAGE_AREA_H_
+#include <stddef.h>
+#include <stdint.h>
+
#include <string>
#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/strings/nullable_string16.h"
@@ -47,14 +51,14 @@ class CONTENT_EXPORT DOMStorageArea
DOMStorageTaskRunner* task_runner);
// Session storage. Backed on disk if |session_storage_backing| is not NULL.
- DOMStorageArea(int64 namespace_id,
+ DOMStorageArea(int64_t namespace_id,
const std::string& persistent_namespace_id,
const GURL& origin,
SessionStorageDatabase* session_storage_backing,
DOMStorageTaskRunner* task_runner);
const GURL& origin() const { return origin_; }
- int64 namespace_id() const { return namespace_id_; }
+ int64_t namespace_id() const { return namespace_id_; }
// Writes a copy of the current set of values in the area to the |map|.
void ExtractValues(DOMStorageValuesMap* map);
@@ -69,7 +73,7 @@ class CONTENT_EXPORT DOMStorageArea
void FastClear();
DOMStorageArea* ShallowCopy(
- int64 destination_namespace_id,
+ int64_t destination_namespace_id,
const std::string& destination_persistent_namespace_id);
bool HasUncommittedChanges() const;
@@ -161,7 +165,7 @@ class CONTENT_EXPORT DOMStorageArea
static bool s_aggressive_flushing_enabled_;
- int64 namespace_id_;
+ int64_t namespace_id_;
std::string persistent_namespace_id_;
GURL origin_;
base::FilePath directory_;
diff --git a/content/browser/dom_storage/dom_storage_area_unittest.cc b/content/browser/dom_storage/dom_storage_area_unittest.cc
index ba91f26..e4de22e 100644
--- a/content/browser/dom_storage/dom_storage_area_unittest.cc
+++ b/content/browser/dom_storage/dom_storage_area_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 "base/bind.h"
#include "base/files/file_util.h"
#include "base/files/scoped_temp_dir.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"
@@ -139,7 +143,7 @@ TEST_F(DOMStorageAreaTest, DOMStorageAreaBasics) {
}
TEST_F(DOMStorageAreaTest, BackingDatabaseOpened) {
- const int64 kSessionStorageNamespaceId = kLocalStorageNamespaceId + 1;
+ const int64_t kSessionStorageNamespaceId = kLocalStorageNamespaceId + 1;
base::ScopedTempDir temp_dir;
ASSERT_TRUE(temp_dir.CreateUniqueTempDir());
const base::FilePath kExpectedOriginFilePath = temp_dir.path().Append(
diff --git a/content/browser/dom_storage/dom_storage_context_impl.cc b/content/browser/dom_storage/dom_storage_context_impl.cc
index cef7b57..7fee39c 100644
--- a/content/browser/dom_storage/dom_storage_context_impl.cc
+++ b/content/browser/dom_storage/dom_storage_context_impl.cc
@@ -4,6 +4,7 @@
#include "content/browser/dom_storage/dom_storage_context_impl.h"
+#include <stddef.h>
#include <stdlib.h>
#include "base/bind.h"
@@ -68,7 +69,7 @@ DOMStorageContextImpl::~DOMStorageContextImpl() {
}
DOMStorageNamespace* DOMStorageContextImpl::GetStorageNamespace(
- int64 namespace_id) {
+ int64_t namespace_id) {
if (is_shutdown_)
return NULL;
StorageNamespaceMap::iterator found = namespaces_.find(namespace_id);
@@ -148,13 +149,13 @@ void DOMStorageContextImpl::DeleteSessionStorage(
const SessionStorageUsageInfo& usage_info) {
DCHECK(!is_shutdown_);
DOMStorageNamespace* dom_storage_namespace = NULL;
- std::map<std::string, int64>::const_iterator it =
+ std::map<std::string, int64_t>::const_iterator it =
persistent_namespace_id_to_namespace_id_.find(
usage_info.persistent_namespace_id);
if (it != persistent_namespace_id_to_namespace_id_.end()) {
dom_storage_namespace = GetStorageNamespace(it->second);
} else {
- int64 namespace_id = AllocateSessionId();
+ int64_t namespace_id = AllocateSessionId();
CreateSessionNamespace(namespace_id, usage_info.persistent_namespace_id);
dom_storage_namespace = GetStorageNamespace(namespace_id);
}
@@ -239,7 +240,7 @@ void DOMStorageContextImpl::NotifyAreaCleared(
OnDOMStorageAreaCleared(area, page_url));
}
-int64 DOMStorageContextImpl::AllocateSessionId() {
+int64_t DOMStorageContextImpl::AllocateSessionId() {
return session_id_sequence_.GetNext() + session_id_offset_;
}
@@ -250,7 +251,7 @@ std::string DOMStorageContextImpl::AllocatePersistentSessionId() {
}
void DOMStorageContextImpl::CreateSessionNamespace(
- int64 namespace_id,
+ int64_t namespace_id,
const std::string& persistent_namespace_id) {
if (is_shutdown_)
return;
@@ -263,8 +264,8 @@ void DOMStorageContextImpl::CreateSessionNamespace(
namespace_id;
}
-void DOMStorageContextImpl::DeleteSessionNamespace(
- int64 namespace_id, bool should_persist_data) {
+void DOMStorageContextImpl::DeleteSessionNamespace(int64_t namespace_id,
+ bool should_persist_data) {
DCHECK_NE(kLocalStorageNamespaceId, namespace_id);
StorageNamespaceMap::const_iterator it = namespaces_.find(namespace_id);
if (it == namespaces_.end())
@@ -293,7 +294,8 @@ void DOMStorageContextImpl::DeleteSessionNamespace(
}
void DOMStorageContextImpl::CloneSessionNamespace(
- int64 existing_id, int64 new_id,
+ int64_t existing_id,
+ int64_t new_id,
const std::string& new_persistent_id) {
if (is_shutdown_)
return;
diff --git a/content/browser/dom_storage/dom_storage_context_impl.h b/content/browser/dom_storage/dom_storage_context_impl.h
index c2b72be..e38e438 100644
--- a/content/browser/dom_storage/dom_storage_context_impl.h
+++ b/content/browser/dom_storage/dom_storage_context_impl.h
@@ -5,13 +5,14 @@
#ifndef CONTENT_BROWSER_DOM_STORAGE_DOM_STORAGE_CONTEXT_IMPL_H_
#define CONTENT_BROWSER_DOM_STORAGE_DOM_STORAGE_CONTEXT_IMPL_H_
+#include <stdint.h>
+
#include <map>
#include <set>
#include <string>
#include <vector>
#include "base/atomic_sequence_num.h"
-#include "base/basictypes.h"
#include "base/files/file_path.h"
#include "base/gtest_prod_util.h"
#include "base/memory/ref_counted.h"
@@ -106,7 +107,7 @@ class CONTENT_EXPORT DOMStorageContextImpl
}
DOMStorageTaskRunner* task_runner() const { return task_runner_.get(); }
- DOMStorageNamespace* GetStorageNamespace(int64 namespace_id);
+ DOMStorageNamespace* GetStorageNamespace(int64_t namespace_id);
void GetLocalStorageUsage(std::vector<LocalStorageUsageInfo>* infos,
bool include_file_info);
@@ -152,14 +153,15 @@ class CONTENT_EXPORT DOMStorageContextImpl
const GURL& page_url);
// May be called on any thread.
- int64 AllocateSessionId();
+ int64_t AllocateSessionId();
std::string AllocatePersistentSessionId();
// Must be called on the background thread.
- void CreateSessionNamespace(int64 namespace_id,
+ void CreateSessionNamespace(int64_t namespace_id,
const std::string& persistent_namespace_id);
- void DeleteSessionNamespace(int64 namespace_id, bool should_persist_data);
- void CloneSessionNamespace(int64 existing_id, int64 new_id,
+ void DeleteSessionNamespace(int64_t namespace_id, bool should_persist_data);
+ void CloneSessionNamespace(int64_t existing_id,
+ int64_t new_id,
const std::string& new_persistent_id);
// Starts backing sessionStorage on disk. This function must be called right
@@ -175,7 +177,7 @@ class CONTENT_EXPORT DOMStorageContextImpl
friend class DOMStorageContextImplTest;
FRIEND_TEST_ALL_PREFIXES(DOMStorageContextImplTest, Basics);
friend class base::RefCountedThreadSafe<DOMStorageContextImpl>;
- typedef std::map<int64, scoped_refptr<DOMStorageNamespace> >
+ typedef std::map<int64_t, scoped_refptr<DOMStorageNamespace>>
StorageNamespaceMap;
~DOMStorageContextImpl();
@@ -229,7 +231,7 @@ class CONTENT_EXPORT DOMStorageContextImpl
// Mapping between persistent namespace IDs and namespace IDs for
// sessionStorage.
- std::map<std::string, int64> persistent_namespace_id_to_namespace_id_;
+ std::map<std::string, int64_t> persistent_namespace_id_to_namespace_id_;
};
} // namespace content
diff --git a/content/browser/dom_storage/dom_storage_context_impl_unittest.cc b/content/browser/dom_storage/dom_storage_context_impl_unittest.cc
index fe99fbf..5173ac1 100644
--- a/content/browser/dom_storage/dom_storage_context_impl_unittest.cc
+++ b/content/browser/dom_storage/dom_storage_context_impl_unittest.cc
@@ -5,6 +5,7 @@
#include "base/bind.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/strings/utf_string_conversions.h"
#include "base/thread_task_runner_handle.h"
diff --git a/content/browser/dom_storage/dom_storage_context_wrapper.h b/content/browser/dom_storage/dom_storage_context_wrapper.h
index 6ef2abf..5303344 100644
--- a/content/browser/dom_storage/dom_storage_context_wrapper.h
+++ b/content/browser/dom_storage/dom_storage_context_wrapper.h
@@ -7,6 +7,7 @@
#include <string>
+#include "base/macros.h"
#include "base/memory/ref_counted.h"
#include "content/common/content_export.h"
#include "content/public/browser/dom_storage_context.h"
diff --git a/content/browser/dom_storage/dom_storage_host.h b/content/browser/dom_storage/dom_storage_host.h
index a628907..9b79406 100644
--- a/content/browser/dom_storage/dom_storage_host.h
+++ b/content/browser/dom_storage/dom_storage_host.h
@@ -7,6 +7,7 @@
#include <map>
+#include "base/macros.h"
#include "base/memory/ref_counted.h"
#include "base/strings/nullable_string16.h"
#include "base/strings/string16.h"
diff --git a/content/browser/dom_storage/dom_storage_message_filter.cc b/content/browser/dom_storage/dom_storage_message_filter.cc
index e792c29..6c59175 100644
--- a/content/browser/dom_storage/dom_storage_message_filter.cc
+++ b/content/browser/dom_storage/dom_storage_message_filter.cc
@@ -88,7 +88,7 @@ bool DOMStorageMessageFilter::OnMessageReceived(const IPC::Message& message) {
}
void DOMStorageMessageFilter::OnOpenStorageArea(int connection_id,
- int64 namespace_id,
+ int64_t namespace_id,
const GURL& origin) {
DCHECK(!BrowserThread::CurrentlyOn(BrowserThread::IO));
if (!host_->OpenStorageArea(connection_id, namespace_id, origin)) {
diff --git a/content/browser/dom_storage/dom_storage_message_filter.h b/content/browser/dom_storage/dom_storage_message_filter.h
index 8ac7523..791ddf1 100644
--- a/content/browser/dom_storage/dom_storage_message_filter.h
+++ b/content/browser/dom_storage/dom_storage_message_filter.h
@@ -5,6 +5,9 @@
#ifndef CONTENT_BROWSER_DOM_STORAGE_DOM_STORAGE_MESSAGE_FILTER_H_
#define CONTENT_BROWSER_DOM_STORAGE_DOM_STORAGE_MESSAGE_FILTER_H_
+#include <stdint.h>
+
+#include "base/macros.h"
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
#include "content/browser/dom_storage/dom_storage_context_impl.h"
@@ -46,7 +49,8 @@ class DOMStorageMessageFilter
bool OnMessageReceived(const IPC::Message& message) override;
// Message Handlers.
- void OnOpenStorageArea(int connection_id, int64 namespace_id,
+ void OnOpenStorageArea(int connection_id,
+ int64_t namespace_id,
const GURL& origin);
void OnCloseStorageArea(int connection_id);
void OnLoadStorageArea(int connection_id, DOMStorageValuesMap* map);
diff --git a/content/browser/dom_storage/dom_storage_namespace.cc b/content/browser/dom_storage/dom_storage_namespace.cc
index f554ac5..25e44e5 100644
--- a/content/browser/dom_storage/dom_storage_namespace.cc
+++ b/content/browser/dom_storage/dom_storage_namespace.cc
@@ -4,7 +4,6 @@
#include "content/browser/dom_storage/dom_storage_namespace.h"
-#include "base/basictypes.h"
#include "base/bind.h"
#include "base/location.h"
#include "base/logging.h"
@@ -24,7 +23,7 @@ DOMStorageNamespace::DOMStorageNamespace(
}
DOMStorageNamespace::DOMStorageNamespace(
- int64 namespace_id,
+ int64_t namespace_id,
const std::string& persistent_namespace_id,
SessionStorageDatabase* session_storage_database,
DOMStorageTaskRunner* task_runner)
@@ -72,7 +71,7 @@ DOMStorageArea* DOMStorageNamespace::GetOpenStorageArea(const GURL& origin) {
}
DOMStorageNamespace* DOMStorageNamespace::Clone(
- int64 clone_namespace_id,
+ int64_t clone_namespace_id,
const std::string& clone_persistent_namespace_id) {
DCHECK_NE(kLocalStorageNamespaceId, namespace_id_);
DCHECK_NE(kLocalStorageNamespaceId, clone_namespace_id);
diff --git a/content/browser/dom_storage/dom_storage_namespace.h b/content/browser/dom_storage/dom_storage_namespace.h
index 48f449a..a9f6569 100644
--- a/content/browser/dom_storage/dom_storage_namespace.h
+++ b/content/browser/dom_storage/dom_storage_namespace.h
@@ -5,10 +5,11 @@
#ifndef CONTENT_BROWSER_DOM_STORAGE_DOM_STORAGE_NAMESPACE_H_
#define CONTENT_BROWSER_DOM_STORAGE_DOM_STORAGE_NAMESPACE_H_
+#include <stdint.h>
+
#include <map>
#include <string>
-#include "base/basictypes.h"
#include "base/files/file_path.h"
#include "base/memory/ref_counted.h"
#include "content/common/content_export.h"
@@ -42,12 +43,12 @@ class CONTENT_EXPORT DOMStorageNamespace
// Constructor for a SessionStorage namespace with a non-zero id and an
// optional backing on disk via |session_storage_database| (may be NULL).
- DOMStorageNamespace(int64 namespace_id,
+ DOMStorageNamespace(int64_t namespace_id,
const std::string& persistent_namespace_id,
SessionStorageDatabase* session_storage_database,
DOMStorageTaskRunner* task_runner);
- int64 namespace_id() const { return namespace_id_; }
+ int64_t namespace_id() const { return namespace_id_; }
const std::string& persistent_namespace_id() const {
return persistent_namespace_id_;
}
@@ -64,7 +65,7 @@ class CONTENT_EXPORT DOMStorageNamespace
// Creates a clone of |this| namespace including
// shallow copies of all contained areas.
// Should only be called for session storage namespaces.
- DOMStorageNamespace* Clone(int64 clone_namespace_id,
+ DOMStorageNamespace* Clone(int64_t clone_namespace_id,
const std::string& clone_persistent_namespace_id);
void DeleteLocalStorageOrigin(const GURL& origin);
@@ -94,7 +95,7 @@ class CONTENT_EXPORT DOMStorageNamespace
// Returns a pointer to the area holder in our map or NULL.
AreaHolder* GetAreaHolder(const GURL& origin);
- int64 namespace_id_;
+ int64_t namespace_id_;
std::string persistent_namespace_id_;
base::FilePath directory_;
AreaMap areas_;
diff --git a/content/browser/dom_storage/dom_storage_session.cc b/content/browser/dom_storage/dom_storage_session.cc
index 7706ec8..338b6cc 100644
--- a/content/browser/dom_storage/dom_storage_session.cc
+++ b/content/browser/dom_storage/dom_storage_session.cc
@@ -54,8 +54,8 @@ DOMStorageSession* DOMStorageSession::Clone() {
// static
DOMStorageSession* DOMStorageSession::CloneFrom(DOMStorageContextImpl* context,
- int64 namepace_id_to_clone) {
- int64 clone_id = context->AllocateSessionId();
+ int64_t namepace_id_to_clone) {
+ int64_t clone_id = context->AllocateSessionId();
std::string persistent_clone_id = context->AllocatePersistentSessionId();
context->task_runner()->PostTask(
FROM_HERE,
@@ -65,7 +65,7 @@ DOMStorageSession* DOMStorageSession::CloneFrom(DOMStorageContextImpl* context,
}
DOMStorageSession::DOMStorageSession(DOMStorageContextImpl* context,
- int64 namespace_id,
+ int64_t namespace_id,
const std::string& persistent_namespace_id)
: context_(context),
namespace_id_(namespace_id),
diff --git a/content/browser/dom_storage/dom_storage_session.h b/content/browser/dom_storage/dom_storage_session.h
index 62c6d97..08e54f3 100644
--- a/content/browser/dom_storage/dom_storage_session.h
+++ b/content/browser/dom_storage/dom_storage_session.h
@@ -5,9 +5,11 @@
#ifndef CONTENT_BROWSER_DOM_STORAGE_DOM_STORAGE_SESSION_H_
#define CONTENT_BROWSER_DOM_STORAGE_DOM_STORAGE_SESSION_H_
+#include <stdint.h>
+
#include <string>
-#include "base/basictypes.h"
+#include "base/macros.h"
#include "base/memory/ref_counted.h"
#include "content/common/content_export.h"
@@ -30,7 +32,7 @@ class CONTENT_EXPORT DOMStorageSession
DOMStorageSession(DOMStorageContextImpl* context,
const std::string& persistent_namespace_id);
- int64 namespace_id() const { return namespace_id_; }
+ int64_t namespace_id() const { return namespace_id_; }
const std::string& persistent_namespace_id() const {
return persistent_namespace_id_;
}
@@ -42,18 +44,18 @@ class CONTENT_EXPORT DOMStorageSession
// Constructs a |DOMStorageSession| by cloning
// |namespace_id_to_clone|. Allocates new IDs for it.
static DOMStorageSession* CloneFrom(DOMStorageContextImpl* context,
- int64 namepace_id_to_clone);
+ int64_t namepace_id_to_clone);
private:
friend class base::RefCountedThreadSafe<DOMStorageSession>;
DOMStorageSession(DOMStorageContextImpl* context,
- int64 namespace_id,
+ int64_t namespace_id,
const std::string& persistent_namespace_id);
~DOMStorageSession();
scoped_refptr<DOMStorageContextImpl> context_;
- int64 namespace_id_;
+ int64_t namespace_id_;
std::string persistent_namespace_id_;
bool should_persist_;
diff --git a/content/browser/dom_storage/local_storage_database_adapter.h b/content/browser/dom_storage/local_storage_database_adapter.h
index fca55d0..a8db4a3 100644
--- a/content/browser/dom_storage/local_storage_database_adapter.h
+++ b/content/browser/dom_storage/local_storage_database_adapter.h
@@ -6,6 +6,7 @@
#define CONTENT_BROWSER_DOM_STORAGE_LOCAL_STORAGE_DATABASE_ADAPTER_H_
#include "base/gtest_prod_util.h"
+#include "base/macros.h"
#include "base/memory/scoped_ptr.h"
#include "content/browser/dom_storage/dom_storage_database_adapter.h"
#include "content/common/content_export.h"
diff --git a/content/browser/dom_storage/session_storage_database.cc b/content/browser/dom_storage/session_storage_database.cc
index d0ab442..ec24616 100644
--- a/content/browser/dom_storage/session_storage_database.cc
+++ b/content/browser/dom_storage/session_storage_database.cc
@@ -4,6 +4,8 @@
#include "content/browser/dom_storage/session_storage_database.h"
+#include <stddef.h>
+
#include <vector>
#include "base/files/file_util.h"
@@ -148,7 +150,7 @@ bool SessionStorageDatabase::CommitAreaChanges(
&exists, &map_id))
return false;
if (exists) {
- int64 ref_count;
+ int64_t ref_count;
if (!GetMapRefCount(map_id, &ref_count))
return false;
if (ref_count > 1) {
@@ -535,7 +537,7 @@ bool SessionStorageDatabase::CreateMapForArea(const std::string& namespace_id,
leveldb::Status s = db_->Get(leveldb::ReadOptions(), next_map_id_key, map_id);
if (!DatabaseErrorCheck(s.ok() || s.IsNotFound()))
return false;
- int64 next_map_id = 0;
+ int64_t next_map_id = 0;
if (s.IsNotFound()) {
*map_id = "0";
} else {
@@ -610,7 +612,7 @@ void SessionStorageDatabase::WriteValuesToMap(const std::string& map_id,
}
bool SessionStorageDatabase::GetMapRefCount(const std::string& map_id,
- int64* ref_count) {
+ int64_t* ref_count) {
std::string ref_count_string;
leveldb::Status s = db_->Get(leveldb::ReadOptions(),
MapRefCountKey(map_id), &ref_count_string);
@@ -623,7 +625,7 @@ bool SessionStorageDatabase::GetMapRefCount(const std::string& map_id,
bool SessionStorageDatabase::IncreaseMapRefCount(const std::string& map_id,
leveldb::WriteBatch* batch) {
// Increase the ref count for the map.
- int64 old_ref_count;
+ int64_t old_ref_count;
if (!GetMapRefCount(map_id, &old_ref_count))
return false;
batch->Put(MapRefCountKey(map_id), base::Int64ToString(++old_ref_count));
@@ -634,7 +636,7 @@ bool SessionStorageDatabase::DecreaseMapRefCount(const std::string& map_id,
int decrease,
leveldb::WriteBatch* batch) {
// Decrease the ref count for the map.
- int64 ref_count;
+ int64_t ref_count;
if (!GetMapRefCount(map_id, &ref_count))
return false;
if (!ConsistencyCheck(decrease <= ref_count))
diff --git a/content/browser/dom_storage/session_storage_database.h b/content/browser/dom_storage/session_storage_database.h
index 4260e4a..d4e80e4 100644
--- a/content/browser/dom_storage/session_storage_database.h
+++ b/content/browser/dom_storage/session_storage_database.h
@@ -5,10 +5,13 @@
#ifndef CONTENT_BROWSER_DOM_STORAGE_SESSION_STORAGE_DATABASE_H_
#define CONTENT_BROWSER_DOM_STORAGE_SESSION_STORAGE_DATABASE_H_
+#include <stdint.h>
+
#include <map>
#include <string>
#include "base/files/file_path.h"
+#include "base/macros.h"
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
#include "base/synchronization/lock.h"
@@ -158,7 +161,7 @@ class CONTENT_EXPORT SessionStorageDatabase :
const DOMStorageValuesMap& values,
leveldb::WriteBatch* batch);
- bool GetMapRefCount(const std::string& map_id, int64* ref_count);
+ bool GetMapRefCount(const std::string& map_id, int64_t* ref_count);
bool IncreaseMapRefCount(const std::string& map_id,
leveldb::WriteBatch* batch);
// Decreases the ref count of a map by |decrease|. If the ref count goes to 0,
diff --git a/content/browser/dom_storage/session_storage_database_adapter.h b/content/browser/dom_storage/session_storage_database_adapter.h
index 1b5a91d..de92984 100644
--- a/content/browser/dom_storage/session_storage_database_adapter.h
+++ b/content/browser/dom_storage/session_storage_database_adapter.h
@@ -5,6 +5,7 @@
#ifndef CONTENT_BROWSER_DOM_STORAGE_SESSION_STORAGE_DATABASE_ADAPTER_H_
#define CONTENT_BROWSER_DOM_STORAGE_SESSION_STORAGE_DATABASE_ADAPTER_H_
+#include "base/macros.h"
#include "base/memory/ref_counted.h"
#include "content/browser/dom_storage/dom_storage_database_adapter.h"
#include "url/gurl.h"
diff --git a/content/browser/dom_storage/session_storage_database_unittest.cc b/content/browser/dom_storage/session_storage_database_unittest.cc
index f8397ac..8ca4b08 100644
--- a/content/browser/dom_storage/session_storage_database_unittest.cc
+++ b/content/browser/dom_storage/session_storage_database_unittest.cc
@@ -5,6 +5,9 @@
#include "content/browser/dom_storage/session_storage_database.h"
+#include <stddef.h>
+#include <stdint.h>
+
#include <algorithm>
#include <map>
#include <string>
@@ -12,6 +15,7 @@
#include "base/files/file_util.h"
#include "base/files/scoped_temp_dir.h"
#include "base/logging.h"
+#include "base/macros.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/utf_string_conversions.h"
#include "content/common/dom_storage/dom_storage_types.h"
@@ -37,10 +41,8 @@ class SessionStorageDatabaseTest : public testing::Test {
std::string* namespace_id);
static bool IsNamespaceOriginKey(const std::string& key,
std::string* namespace_id);
- static bool IsMapRefCountKey(const std::string& key,
- int64* map_id);
- static bool IsMapValueKey(const std::string& key,
- int64* map_id);
+ static bool IsMapRefCountKey(const std::string& key, int64_t* map_id);
+ static bool IsMapValueKey(const std::string& key, int64_t* map_id);
void ResetDatabase();
void ReadData(DataMap* data) const;
void CheckDatabaseConsistency() const;
@@ -58,7 +60,7 @@ class SessionStorageDatabaseTest : public testing::Test {
const std::set<GURL>& expected_origins) const;
std::string GetMapForArea(const std::string& namespace_id,
const GURL& origin) const;
- int64 GetMapRefCount(const std::string& map_id) const;
+ int64_t GetMapRefCount(const std::string& map_id) const;
base::ScopedTempDir temp_dir_;
scoped_refptr<SessionStorageDatabase> db_;
@@ -148,7 +150,7 @@ bool SessionStorageDatabaseTest::IsNamespaceOriginKey(
// static
bool SessionStorageDatabaseTest::IsMapRefCountKey(const std::string& key,
- int64* map_id) {
+ int64_t* map_id) {
std::string map_prefix = "map-";
if (key.find(map_prefix) != 0)
return false;
@@ -165,7 +167,7 @@ bool SessionStorageDatabaseTest::IsMapRefCountKey(const std::string& key,
// static
bool SessionStorageDatabaseTest::IsMapValueKey(const std::string& key,
- int64* map_id) {
+ int64_t* map_id) {
std::string map_prefix = "map-";
if (key.find(map_prefix) != 0)
return false;
@@ -214,8 +216,8 @@ void SessionStorageDatabaseTest::CheckDatabaseConsistency() const {
// Iterate the "namespace-" keys.
std::set<std::string> found_namespace_ids;
std::set<std::string> namespaces_with_areas;
- std::map<int64, int64> expected_map_refcounts;
- int64 max_map_id = -1;
+ std::map<int64_t, int64_t> expected_map_refcounts;
+ int64_t max_map_id = -1;
for (DataMap::const_iterator it = data.begin(); it != data.end(); ++it) {
std::string namespace_id;
@@ -229,7 +231,7 @@ void SessionStorageDatabaseTest::CheckDatabaseConsistency() const {
ASSERT_TRUE(found_namespace_ids.find(namespace_id) !=
found_namespace_ids.end());
namespaces_with_areas.insert(namespace_id);
- int64 map_id;
+ int64_t map_id;
bool conversion_ok = base::StringToInt64(it->second, &map_id);
ASSERT_TRUE(conversion_ok);
ASSERT_GE(map_id, 0);
@@ -245,7 +247,7 @@ void SessionStorageDatabaseTest::CheckDatabaseConsistency() const {
if (max_map_id != -1) {
// The database contains maps.
ASSERT_TRUE(data.find(next_map_id_key) != data.end());
- int64 next_map_id;
+ int64_t next_map_id;
bool conversion_ok =
base::StringToInt64(data[next_map_id_key], &next_map_id);
ASSERT_TRUE(conversion_ok);
@@ -253,11 +255,11 @@ void SessionStorageDatabaseTest::CheckDatabaseConsistency() const {
}
// Iterate the "map-" keys.
- std::set<int64> found_map_ids;
+ std::set<int64_t> found_map_ids;
for (DataMap::const_iterator it = data.begin(); it != data.end(); ++it) {
- int64 map_id;
+ int64_t map_id;
if (IsMapRefCountKey(it->first, &map_id)) {
- int64 ref_count;
+ int64_t ref_count;
bool conversion_ok = base::StringToInt64(it->second, &ref_count);
ASSERT_TRUE(conversion_ok);
// Check that the map is not stale.
@@ -299,7 +301,7 @@ void SessionStorageDatabaseTest::DumpData() const {
scoped_ptr<leveldb::Iterator> it(
db_->db_->NewIterator(leveldb::ReadOptions()));
for (it->SeekToFirst(); it->Valid(); it->Next()) {
- int64 dummy_map_id;
+ int64_t dummy_map_id;
if (IsMapValueKey(it->key().ToString(), &dummy_map_id)) {
// Convert the value back to base::string16.
base::string16 value;
@@ -374,9 +376,9 @@ std::string SessionStorageDatabaseTest::GetMapForArea(
return map_id;
}
-int64 SessionStorageDatabaseTest::GetMapRefCount(
+int64_t SessionStorageDatabaseTest::GetMapRefCount(
const std::string& map_id) const {
- int64 ref_count;
+ int64_t ref_count;
EXPECT_TRUE(db_->GetMapRefCount(map_id, &ref_count));
return ref_count;
}
diff --git a/content/browser/dom_storage/session_storage_namespace_impl.cc b/content/browser/dom_storage/session_storage_namespace_impl.cc
index a1f7f2d..0811fab 100644
--- a/content/browser/dom_storage/session_storage_namespace_impl.cc
+++ b/content/browser/dom_storage/session_storage_namespace_impl.cc
@@ -15,17 +15,17 @@ SessionStorageNamespaceImpl::SessionStorageNamespaceImpl(
}
SessionStorageNamespaceImpl::SessionStorageNamespaceImpl(
- DOMStorageContextWrapper* context, int64 namepace_id_to_clone)
+ DOMStorageContextWrapper* context,
+ int64_t namepace_id_to_clone)
: session_(DOMStorageSession::CloneFrom(context->context(),
- namepace_id_to_clone)) {
-}
+ namepace_id_to_clone)) {}
SessionStorageNamespaceImpl::SessionStorageNamespaceImpl(
DOMStorageContextWrapper* context, const std::string& persistent_id)
: session_(new DOMStorageSession(context->context(), persistent_id)) {
}
-int64 SessionStorageNamespaceImpl::id() const {
+int64_t SessionStorageNamespaceImpl::id() const {
return session_->namespace_id();
}
diff --git a/content/browser/dom_storage/session_storage_namespace_impl.h b/content/browser/dom_storage/session_storage_namespace_impl.h
index 83a9866..4823efb 100644
--- a/content/browser/dom_storage/session_storage_namespace_impl.h
+++ b/content/browser/dom_storage/session_storage_namespace_impl.h
@@ -5,7 +5,9 @@
#ifndef CONTENT_BROWSER_DOM_STORAGE_SESSION_STORAGE_NAMESPACE_IMPL_H_
#define CONTENT_BROWSER_DOM_STORAGE_SESSION_STORAGE_NAMESPACE_IMPL_H_
-#include "base/basictypes.h"
+#include <stdint.h>
+
+#include "base/macros.h"
#include "base/memory/ref_counted.h"
#include "content/common/content_export.h"
#include "content/public/browser/session_storage_namespace.h"
@@ -27,7 +29,7 @@ class SessionStorageNamespaceImpl
// Constructs a |SessionStorageNamespaceImpl| by cloning
// |namespace_to_clone|. Allocates new IDs for it.
SessionStorageNamespaceImpl(DOMStorageContextWrapper* context,
- int64 namepace_id_to_clone);
+ int64_t namepace_id_to_clone);
// Constructs a |SessionStorageNamespaceImpl| and assigns |persistent_id|
// to it. Allocates a new non-persistent ID.
@@ -35,7 +37,7 @@ class SessionStorageNamespaceImpl
const std::string& persistent_id);
// SessionStorageNamespace implementation.
- int64 id() const override;
+ int64_t id() const override;
const std::string& persistent_id() const override;
void SetShouldPersist(bool should_persist) override;
bool should_persist() const override;
diff --git a/content/browser/download/base_file.cc b/content/browser/download/base_file.cc
index f9b8015..b90ba74 100644
--- a/content/browser/download/base_file.cc
+++ b/content/browser/download/base_file.cc
@@ -12,6 +12,7 @@
#include "base/pickle.h"
#include "base/strings/stringprintf.h"
#include "base/threading/thread_restrictions.h"
+#include "build/build_config.h"
#include "content/browser/download/download_interrupt_reasons_impl.h"
#include "content/browser/download/download_net_log_parameters.h"
#include "content/browser/download/download_stats.h"
@@ -28,7 +29,7 @@ const unsigned char BaseFile::kEmptySha256Hash[] = { 0 };
BaseFile::BaseFile(const base::FilePath& full_path,
const GURL& source_url,
const GURL& referrer_url,
- int64 received_bytes,
+ int64_t received_bytes,
bool calculate_hash,
const std::string& hash_state_bytes,
base::File file,
@@ -272,7 +273,7 @@ DownloadInterruptReason BaseFile::Open() {
// We may be re-opening the file after rename. Always make sure we're
// writing at the end of the file.
- int64 file_size = file_.Seek(base::File::FROM_END, 0);
+ int64_t file_size = file_.Seek(base::File::FROM_END, 0);
if (file_size < 0) {
logging::SystemErrorCode error = logging::GetLastSystemErrorCode();
ClearFile();
diff --git a/content/browser/download/base_file.h b/content/browser/download/base_file.h
index 9016755..9a98d09 100644
--- a/content/browser/download/base_file.h
+++ b/content/browser/download/base_file.h
@@ -5,12 +5,16 @@
#ifndef CONTENT_BROWSER_DOWNLOAD_BASE_FILE_H_
#define CONTENT_BROWSER_DOWNLOAD_BASE_FILE_H_
+#include <stddef.h>
+#include <stdint.h>
+
#include <string>
#include "base/files/file.h"
#include "base/files/file_path.h"
#include "base/gtest_prod_util.h"
#include "base/logging.h"
+#include "base/macros.h"
#include "base/memory/linked_ptr.h"
#include "base/memory/scoped_ptr.h"
#include "base/time/time.h"
@@ -36,7 +40,7 @@ class CONTENT_EXPORT BaseFile {
BaseFile(const base::FilePath& full_path,
const GURL& source_url,
const GURL& referrer_url,
- int64 received_bytes,
+ int64_t received_bytes,
bool calculate_hash,
const std::string& hash_state,
base::File file,
@@ -91,7 +95,7 @@ class CONTENT_EXPORT BaseFile {
bool in_progress() const { return file_.IsValid(); }
// Returns the number of bytes in the file pointed to by full_path().
- int64 bytes_so_far() const { return bytes_so_far_; }
+ int64_t bytes_so_far() const { return bytes_so_far_; }
// Fills |hash| with the hash digest for the file.
// Returns true if digest is successfully calculated.
@@ -127,7 +131,7 @@ class CONTENT_EXPORT BaseFile {
const base::FilePath& new_path);
// Split out from CurrentSpeed to enable testing.
- int64 CurrentSpeedAtTime(base::TimeTicks current_time) const;
+ int64_t CurrentSpeedAtTime(base::TimeTicks current_time) const;
// Log a TYPE_DOWNLOAD_FILE_ERROR NetLog event with |error| and passes error
// on through, converting to a |DownloadInterruptReason|.
@@ -161,7 +165,7 @@ class CONTENT_EXPORT BaseFile {
base::File file_;
// Amount of data received up so far, in bytes.
- int64 bytes_so_far_;
+ int64_t bytes_so_far_;
// Start time for calculating speed.
base::TimeTicks start_tick_;
diff --git a/content/browser/download/base_file_unittest.cc b/content/browser/download/base_file_unittest.cc
index 7e27ffe..84f0d9e 100644
--- a/content/browser/download/base_file_unittest.cc
+++ b/content/browser/download/base_file_unittest.cc
@@ -4,13 +4,18 @@
#include "content/browser/download/base_file.h"
+#include <stddef.h>
+#include <stdint.h>
+
#include "base/files/file.h"
#include "base/files/file_util.h"
#include "base/files/scoped_temp_dir.h"
#include "base/logging.h"
+#include "base/macros.h"
#include "base/message_loop/message_loop.h"
#include "base/strings/string_number_conversions.h"
#include "base/test/test_file_util.h"
+#include "build/build_config.h"
#include "content/browser/browser_thread_impl.h"
#include "content/public/browser/download_interrupt_reasons.h"
#include "crypto/secure_hash.h"
@@ -61,7 +66,7 @@ class BaseFileTest : public testing::Test {
void TearDown() override {
EXPECT_FALSE(base_file_->in_progress());
if (!expected_error_) {
- EXPECT_EQ(static_cast<int64>(expected_data_.size()),
+ EXPECT_EQ(static_cast<int64_t>(expected_data_.size()),
base_file_->bytes_so_far());
}
@@ -126,7 +131,7 @@ class BaseFileTest : public testing::Test {
if (base_file_->in_progress()) {
expected_data_ += data;
if (expected_error_ == DOWNLOAD_INTERRUPT_REASON_NONE) {
- EXPECT_EQ(static_cast<int64>(expected_data_.size()),
+ EXPECT_EQ(static_cast<int64_t>(expected_data_.size()),
base_file_->bytes_so_far());
}
}
@@ -181,7 +186,7 @@ class BaseFileTest : public testing::Test {
duplicate_file.Detach();
}
- int64 CurrentSpeedAtTime(base::TimeTicks current_time) {
+ int64_t CurrentSpeedAtTime(base::TimeTicks current_time) {
EXPECT_TRUE(base_file_.get());
return base_file_->CurrentSpeedAtTime(current_time);
}
diff --git a/content/browser/download/base_file_win.cc b/content/browser/download/base_file_win.cc
index 870feb6..bfdf3aa 100644
--- a/content/browser/download/base_file_win.cc
+++ b/content/browser/download/base_file_win.cc
@@ -12,6 +12,7 @@
#include "base/files/file.h"
#include "base/files/file_util.h"
#include "base/guid.h"
+#include "base/macros.h"
#include "base/metrics/histogram.h"
#include "base/strings/utf_string_conversions.h"
#include "base/threading/thread_restrictions.h"
diff --git a/content/browser/download/download_browsertest.cc b/content/browser/download/download_browsertest.cc
index 77e438c..1a22451 100644
--- a/content/browser/download/download_browsertest.cc
+++ b/content/browser/download/download_browsertest.cc
@@ -5,6 +5,9 @@
// This file contains download browser tests that are known to be runnable
// in a pure content context. Over time tests should be migrated here.
+#include <stddef.h>
+#include <stdint.h>
+
#include <vector>
#include "base/callback_helpers.h"
@@ -13,11 +16,13 @@
#include "base/files/file_util.h"
#include "base/files/scoped_temp_dir.h"
#include "base/format_macros.h"
+#include "base/macros.h"
#include "base/memory/ref_counted.h"
#include "base/strings/stringprintf.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 "content/browser/byte_stream.h"
#include "content/browser/download/download_file_factory.h"
#include "content/browser/download/download_file_impl.h"
@@ -617,7 +622,7 @@ class DownloadContentTest : public ContentBrowserTest {
// string.
bool VerifyFile(const base::FilePath& path,
const std::string& value,
- const int64 file_size) {
+ const int64_t file_size) {
std::string file_contents;
bool read = base::ReadFileToString(path, &file_contents);
diff --git a/content/browser/download/download_create_info.cc b/content/browser/download/download_create_info.cc
index 901d3d8..f263d75 100644
--- a/content/browser/download/download_create_info.cc
+++ b/content/browser/download/download_create_info.cc
@@ -12,7 +12,7 @@
namespace content {
DownloadCreateInfo::DownloadCreateInfo(const base::Time& start_time,
- int64 total_bytes,
+ int64_t total_bytes,
const net::BoundNetLog& bound_net_log,
scoped_ptr<DownloadSaveInfo> save_info)
: start_time(start_time),
diff --git a/content/browser/download/download_create_info.h b/content/browser/download/download_create_info.h
index 406f4a1..1767e45 100644
--- a/content/browser/download/download_create_info.h
+++ b/content/browser/download/download_create_info.h
@@ -5,11 +5,13 @@
#ifndef CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_CREATE_INFO_H_
#define CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_CREATE_INFO_H_
+#include <stdint.h>
+
#include <string>
#include <vector>
-#include "base/basictypes.h"
#include "base/files/file_path.h"
+#include "base/macros.h"
#include "base/time/time.h"
#include "content/browser/download/download_file.h"
#include "content/browser/download/download_request_handle.h"
@@ -25,7 +27,7 @@ namespace content {
// want to pass |DownloadItem|s between threads.
struct CONTENT_EXPORT DownloadCreateInfo {
DownloadCreateInfo(const base::Time& start_time,
- int64 total_bytes,
+ int64_t total_bytes,
const net::BoundNetLog& bound_net_log,
scoped_ptr<DownloadSaveInfo> save_info);
DownloadCreateInfo();
@@ -53,10 +55,10 @@ struct CONTENT_EXPORT DownloadCreateInfo {
base::Time start_time;
// The total download size.
- int64 total_bytes;
+ int64_t total_bytes;
// The ID of the download.
- uint32 download_id;
+ uint32_t download_id;
// True if the download was initiated by user action.
bool has_user_gesture;
diff --git a/content/browser/download/download_file.h b/content/browser/download/download_file.h
index 568e7ee..2514df1 100644
--- a/content/browser/download/download_file.h
+++ b/content/browser/download/download_file.h
@@ -5,9 +5,10 @@
#ifndef CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_FILE_H_
#define CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_FILE_H_
+#include <stdint.h>
+
#include <string>
-#include "base/basictypes.h"
#include "base/callback_forward.h"
#include "base/files/file_path.h"
#include "content/common/content_export.h"
@@ -64,7 +65,7 @@ class CONTENT_EXPORT DownloadFile {
virtual base::FilePath FullPath() const = 0;
virtual bool InProgress() const = 0;
- virtual int64 CurrentSpeed() const = 0;
+ virtual int64_t CurrentSpeed() const = 0;
// Set |hash| with sha256 digest for the file.
// Returns true if digest is successfully calculated.
diff --git a/content/browser/download/download_file_impl.cc b/content/browser/download/download_file_impl.cc
index c5bed54..bf60a9d 100644
--- a/content/browser/download/download_file_impl.cc
+++ b/content/browser/download/download_file_impl.cc
@@ -228,7 +228,7 @@ bool DownloadFileImpl::InProgress() const {
return file_.in_progress();
}
-int64 DownloadFileImpl::CurrentSpeed() const {
+int64_t DownloadFileImpl::CurrentSpeed() const {
return rate_estimator_.GetCountPerSecond();
}
diff --git a/content/browser/download/download_file_impl.h b/content/browser/download/download_file_impl.h
index 2a8edb3..9838112 100644
--- a/content/browser/download/download_file_impl.h
+++ b/content/browser/download/download_file_impl.h
@@ -7,6 +7,10 @@
#include "content/browser/download/download_file.h"
+#include <stddef.h>
+#include <stdint.h>
+
+#include "base/macros.h"
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
#include "base/memory/weak_ptr.h"
@@ -56,7 +60,7 @@ class CONTENT_EXPORT DownloadFileImpl : public DownloadFile {
void Cancel() override;
base::FilePath FullPath() const override;
bool InProgress() const override;
- int64 CurrentSpeed() const override;
+ int64_t CurrentSpeed() const override;
bool GetHash(std::string* hash) override;
std::string GetHashState() override;
void SetClientGuid(const std::string& guid) override;
diff --git a/content/browser/download/download_file_unittest.cc b/content/browser/download/download_file_unittest.cc
index 6b8cbdc..9bf2dd2 100644
--- a/content/browser/download/download_file_unittest.cc
+++ b/content/browser/download/download_file_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/files/file.h"
#include "base/files/file_util.h"
#include "base/location.h"
@@ -10,6 +13,7 @@
#include "base/strings/string_number_conversions.h"
#include "base/test/test_file_util.h"
#include "base/thread_task_runner_handle.h"
+#include "build/build_config.h"
#include "content/browser/browser_thread_impl.h"
#include "content/browser/byte_stream.h"
#include "content/browser/download/download_create_info.h"
@@ -50,15 +54,14 @@ class MockByteStreamReader : public ByteStreamReader {
class MockDownloadDestinationObserver : public DownloadDestinationObserver {
public:
- MOCK_METHOD3(DestinationUpdate, void(int64, int64, const std::string&));
+ MOCK_METHOD3(DestinationUpdate, void(int64_t, int64_t, const std::string&));
MOCK_METHOD1(DestinationError, void(DownloadInterruptReason));
MOCK_METHOD1(DestinationCompleted, void(const std::string&));
// Doesn't override any methods in the base class. Used to make sure
// that the last DestinationUpdate before a Destination{Completed,Error}
// had the right values.
- MOCK_METHOD3(CurrentUpdateStatus,
- void(int64, int64, const std::string&));
+ MOCK_METHOD3(CurrentUpdateStatus, void(int64_t, int64_t, const std::string&));
};
MATCHER(IsNullCallback, "") { return (arg.is_null()); }
@@ -112,7 +115,7 @@ class DownloadFileTest : public testing::Test {
static const char* kTestData2;
static const char* kTestData3;
static const char* kDataHash;
- static const uint32 kDummyDownloadId;
+ static const uint32_t kDummyDownloadId;
static const int kDummyChildId;
static const int kDummyRequestId;
@@ -129,7 +132,8 @@ class DownloadFileTest : public testing::Test {
~DownloadFileTest() override {}
- void SetUpdateDownloadInfo(int64 bytes, int64 bytes_per_sec,
+ void SetUpdateDownloadInfo(int64_t bytes,
+ int64_t bytes_per_sec,
const std::string& hash_state) {
bytes_ = bytes;
bytes_per_sec_ = bytes_per_sec;
@@ -234,7 +238,7 @@ class DownloadFileTest : public testing::Test {
void VerifyStreamAndSize() {
::testing::Mock::VerifyAndClearExpectations(input_stream_);
- int64 size;
+ int64_t size;
EXPECT_TRUE(base::GetFileSize(download_file_->FullPath(), &size));
EXPECT_EQ(expected_data_.size(), static_cast<size_t>(size));
}
@@ -335,8 +339,8 @@ class DownloadFileTest : public testing::Test {
base::Closure sink_callback_;
// Latest update sent to the observer.
- int64 bytes_;
- int64 bytes_per_sec_;
+ int64_t bytes_;
+ int64_t bytes_per_sec_;
std::string hash_state_;
base::MessageLoop loop_;
@@ -397,7 +401,7 @@ const char* DownloadFileTest::kTestData3 = "Final line.";
const char* DownloadFileTest::kDataHash =
"CBF68BF10F8003DB86B31343AFAC8C7175BD03FB5FC905650F8C80AF087443A8";
-const uint32 DownloadFileTest::kDummyDownloadId = 23;
+const uint32_t DownloadFileTest::kDummyDownloadId = 23;
const int DownloadFileTest::kDummyChildId = 3;
const int DownloadFileTest::kDummyRequestId = 67;
@@ -782,7 +786,7 @@ TEST_F(DownloadFileTest, ConfirmUpdate) {
base::TimeDelta::FromMilliseconds(750));
loop_.Run();
- EXPECT_EQ(static_cast<int64>(strlen(kTestData1) + strlen(kTestData2)),
+ EXPECT_EQ(static_cast<int64_t>(strlen(kTestData1) + strlen(kTestData2)),
bytes_);
EXPECT_EQ(download_file_->GetHashState(), hash_state_);
diff --git a/content/browser/download/download_item_factory.h b/content/browser/download/download_item_factory.h
index d4198cb..0069e43 100644
--- a/content/browser/download/download_item_factory.h
+++ b/content/browser/download/download_item_factory.h
@@ -9,6 +9,8 @@
#ifndef CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_ITEM_FACTORY_H_
#define CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_ITEM_FACTORY_H_
+#include <stdint.h>
+
#include <string>
#include <vector>
@@ -39,7 +41,7 @@ public:
virtual DownloadItemImpl* CreatePersistedItem(
DownloadItemImplDelegate* delegate,
- uint32 download_id,
+ uint32_t download_id,
const base::FilePath& current_path,
const base::FilePath& target_path,
const std::vector<GURL>& url_chain,
@@ -50,8 +52,8 @@ public:
const base::Time& end_time,
const std::string& etag,
const std::string& last_modified,
- int64 received_bytes,
- int64 total_bytes,
+ int64_t received_bytes,
+ int64_t total_bytes,
DownloadItem::DownloadState state,
DownloadDangerType danger_type,
DownloadInterruptReason interrupt_reason,
@@ -60,13 +62,13 @@ public:
virtual DownloadItemImpl* CreateActiveItem(
DownloadItemImplDelegate* delegate,
- uint32 download_id,
+ uint32_t download_id,
const DownloadCreateInfo& info,
const net::BoundNetLog& bound_net_log) = 0;
virtual DownloadItemImpl* CreateSavePageItem(
DownloadItemImplDelegate* delegate,
- uint32 download_id,
+ uint32_t download_id,
const base::FilePath& path,
const GURL& url,
const std::string& mime_type,
diff --git a/content/browser/download/download_item_impl.cc b/content/browser/download/download_item_impl.cc
index b5ccd95..26803f7 100644
--- a/content/browser/download/download_item_impl.cc
+++ b/content/browser/download/download_item_impl.cc
@@ -25,7 +25,6 @@
#include <vector>
-#include "base/basictypes.h"
#include "base/bind.h"
#include "base/files/file_util.h"
#include "base/format_macros.h"
@@ -97,7 +96,7 @@ bool IsDownloadResumptionEnabled() {
} // namespace
-const uint32 DownloadItem::kInvalidId = 0;
+const uint32_t DownloadItem::kInvalidId = 0;
const char DownloadItem::kEmptyFileHash[] = "";
@@ -106,7 +105,7 @@ const int DownloadItemImpl::kMaxAutoResumeAttempts = 5;
// Constructor for reading from the history service.
DownloadItemImpl::DownloadItemImpl(DownloadItemImplDelegate* delegate,
- uint32 download_id,
+ uint32_t download_id,
const base::FilePath& current_path,
const base::FilePath& target_path,
const std::vector<GURL>& url_chain,
@@ -117,8 +116,8 @@ DownloadItemImpl::DownloadItemImpl(DownloadItemImplDelegate* delegate,
const base::Time& end_time,
const std::string& etag,
const std::string& last_modified,
- int64 received_bytes,
- int64 total_bytes,
+ int64_t received_bytes,
+ int64_t total_bytes,
DownloadItem::DownloadState state,
DownloadDangerType danger_type,
DownloadInterruptReason interrupt_reason,
@@ -165,16 +164,15 @@ DownloadItemImpl::DownloadItemImpl(DownloadItemImplDelegate* delegate,
}
// Constructing for a regular download:
-DownloadItemImpl::DownloadItemImpl(
- DownloadItemImplDelegate* delegate,
- uint32 download_id,
- const DownloadCreateInfo& info,
- const net::BoundNetLog& bound_net_log)
+DownloadItemImpl::DownloadItemImpl(DownloadItemImplDelegate* delegate,
+ uint32_t download_id,
+ const DownloadCreateInfo& info,
+ const net::BoundNetLog& bound_net_log)
: is_save_package_download_(false),
download_id_(download_id),
- target_disposition_(
- (info.save_info->prompt_for_save_location) ?
- TARGET_DISPOSITION_PROMPT : TARGET_DISPOSITION_OVERWRITE),
+ target_disposition_((info.save_info->prompt_for_save_location)
+ ? TARGET_DISPOSITION_PROMPT
+ : TARGET_DISPOSITION_OVERWRITE),
url_chain_(info.url_chain),
referrer_url_(info.referrer_url),
tab_url_(info.tab_url),
@@ -226,7 +224,7 @@ DownloadItemImpl::DownloadItemImpl(
// Constructing for the "Save Page As..." feature:
DownloadItemImpl::DownloadItemImpl(
DownloadItemImplDelegate* delegate,
- uint32 download_id,
+ uint32_t download_id,
const base::FilePath& path,
const GURL& url,
const std::string& mime_type,
@@ -475,7 +473,7 @@ void DownloadItemImpl::ShowDownloadInShell() {
delegate_->ShowDownloadInShell(this);
}
-uint32 DownloadItemImpl::GetId() const {
+uint32_t DownloadItemImpl::GetId() const {
return download_id_;
}
@@ -679,7 +677,7 @@ bool DownloadItemImpl::TimeRemaining(base::TimeDelta* remaining) const {
if (total_bytes_ <= 0)
return false; // We never received the content_length for this download.
- int64 speed = CurrentSpeed();
+ int64_t speed = CurrentSpeed();
if (speed == 0)
return false;
@@ -688,7 +686,7 @@ bool DownloadItemImpl::TimeRemaining(base::TimeDelta* remaining) const {
return true;
}
-int64 DownloadItemImpl::CurrentSpeed() const {
+int64_t DownloadItemImpl::CurrentSpeed() const {
if (is_paused_)
return 0;
return bytes_per_sec_;
@@ -707,11 +705,11 @@ bool DownloadItemImpl::AllDataSaved() const {
return all_data_saved_;
}
-int64 DownloadItemImpl::GetTotalBytes() const {
+int64_t DownloadItemImpl::GetTotalBytes() const {
return total_bytes_;
}
-int64 DownloadItemImpl::GetReceivedBytes() const {
+int64_t DownloadItemImpl::GetReceivedBytes() const {
return received_bytes_;
}
@@ -989,7 +987,7 @@ const net::BoundNetLog& DownloadItemImpl::GetBoundNetLog() const {
return bound_net_log_;
}
-void DownloadItemImpl::SetTotalBytes(int64 total_bytes) {
+void DownloadItemImpl::SetTotalBytes(int64_t total_bytes) {
total_bytes_ = total_bytes;
}
@@ -1016,8 +1014,8 @@ void DownloadItemImpl::MarkAsComplete() {
TransitionTo(COMPLETE_INTERNAL, UPDATE_OBSERVERS);
}
-void DownloadItemImpl::DestinationUpdate(int64 bytes_so_far,
- int64 bytes_per_sec,
+void DownloadItemImpl::DestinationUpdate(int64_t bytes_so_far,
+ int64_t bytes_per_sec,
const std::string& hash_state) {
DCHECK_CURRENTLY_ON(BrowserThread::UI);
DVLOG(20) << __FUNCTION__ << " so_far=" << bytes_so_far
diff --git a/content/browser/download/download_item_impl.h b/content/browser/download/download_item_impl.h
index 37041ca..c527861 100644
--- a/content/browser/download/download_item_impl.h
+++ b/content/browser/download/download_item_impl.h
@@ -5,11 +5,13 @@
#ifndef CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_ITEM_IMPL_H_
#define CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_ITEM_IMPL_H_
+#include <stdint.h>
+
#include <string>
-#include "base/basictypes.h"
#include "base/callback_forward.h"
#include "base/files/file_path.h"
+#include "base/macros.h"
#include "base/memory/scoped_ptr.h"
#include "base/memory/weak_ptr.h"
#include "base/observer_list.h"
@@ -50,7 +52,7 @@ class CONTENT_EXPORT DownloadItemImpl
// Constructing from persistent store:
// |bound_net_log| is constructed externally for our use.
DownloadItemImpl(DownloadItemImplDelegate* delegate,
- uint32 id,
+ uint32_t id,
const base::FilePath& current_path,
const base::FilePath& target_path,
const std::vector<GURL>& url_chain,
@@ -61,8 +63,8 @@ class CONTENT_EXPORT DownloadItemImpl
const base::Time& end_time,
const std::string& etag,
const std::string& last_modified,
- int64 received_bytes,
- int64 total_bytes,
+ int64_t received_bytes,
+ int64_t total_bytes,
DownloadItem::DownloadState state,
DownloadDangerType danger_type,
DownloadInterruptReason interrupt_reason,
@@ -72,14 +74,14 @@ class CONTENT_EXPORT DownloadItemImpl
// Constructing for a regular download.
// |bound_net_log| is constructed externally for our use.
DownloadItemImpl(DownloadItemImplDelegate* delegate,
- uint32 id,
+ uint32_t id,
const DownloadCreateInfo& info,
const net::BoundNetLog& bound_net_log);
// Constructing for the "Save Page As..." feature:
// |bound_net_log| is constructed externally for our use.
DownloadItemImpl(DownloadItemImplDelegate* delegate,
- uint32 id,
+ uint32_t id,
const base::FilePath& path,
const GURL& url,
const std::string& mime_type,
@@ -100,7 +102,7 @@ class CONTENT_EXPORT DownloadItemImpl
void Remove() override;
void OpenDownload() override;
void ShowDownloadInShell() override;
- uint32 GetId() const override;
+ uint32_t GetId() const override;
DownloadState GetState() const override;
DownloadInterruptReason GetLastReason() const override;
bool IsPaused() const override;
@@ -135,11 +137,11 @@ class CONTENT_EXPORT DownloadItemImpl
bool IsDangerous() const override;
DownloadDangerType GetDangerType() const override;
bool TimeRemaining(base::TimeDelta* remaining) const override;
- int64 CurrentSpeed() const override;
+ int64_t CurrentSpeed() const override;
int PercentComplete() const override;
bool AllDataSaved() const override;
- int64 GetTotalBytes() const override;
- int64 GetReceivedBytes() const override;
+ int64_t GetTotalBytes() const override;
+ int64_t GetReceivedBytes() const override;
base::Time GetStartTime() const override;
base::Time GetEndTime() const override;
bool CanShowInFolder() override;
@@ -199,7 +201,7 @@ class CONTENT_EXPORT DownloadItemImpl
// DownloadItemImpl routines only needed by SavePackage ----------------------
// Called by SavePackage to set the total number of bytes on the item.
- virtual void SetTotalBytes(int64 total_bytes);
+ virtual void SetTotalBytes(int64_t total_bytes);
virtual void OnAllDataSaved(const std::string& final_hash);
@@ -208,8 +210,8 @@ class CONTENT_EXPORT DownloadItemImpl
virtual void MarkAsComplete();
// DownloadDestinationObserver
- void DestinationUpdate(int64 bytes_so_far,
- int64 bytes_per_sec,
+ void DestinationUpdate(int64_t bytes_so_far,
+ int64_t bytes_per_sec,
const std::string& hash_state) override;
void DestinationError(DownloadInterruptReason reason) override;
void DestinationCompleted(const std::string& final_hash) override;
@@ -393,7 +395,7 @@ class CONTENT_EXPORT DownloadItemImpl
// download system.
scoped_ptr<DownloadRequestHandleInterface> request_handle_;
- uint32 download_id_;
+ uint32_t download_id_;
// Display name for the download. If this is empty, then the display name is
// considered to be |target_path_.BaseName()|.
@@ -457,13 +459,13 @@ class CONTENT_EXPORT DownloadItemImpl
std::string remote_address_;
// Total bytes expected.
- int64 total_bytes_;
+ int64_t total_bytes_;
// Current received bytes.
- int64 received_bytes_;
+ int64_t received_bytes_;
// Current speed. Calculated by the DownloadFile.
- int64 bytes_per_sec_;
+ int64_t bytes_per_sec_;
// Sha256 hash of the content. This might be empty either because
// the download isn't done yet or because the hash isn't needed
diff --git a/content/browser/download/download_item_impl_delegate.cc b/content/browser/download/download_item_impl_delegate.cc
index a069fa8..c1ed48c 100644
--- a/content/browser/download/download_item_impl_delegate.cc
+++ b/content/browser/download/download_item_impl_delegate.cc
@@ -57,7 +57,8 @@ void DownloadItemImplDelegate::CheckForFileRemoval(
DownloadItemImpl* download_item) {}
void DownloadItemImplDelegate::ResumeInterruptedDownload(
- scoped_ptr<DownloadUrlParameters> params, uint32 id) {}
+ scoped_ptr<DownloadUrlParameters> params,
+ uint32_t id) {}
BrowserContext* DownloadItemImplDelegate::GetBrowserContext() const {
return NULL;
diff --git a/content/browser/download/download_item_impl_delegate.h b/content/browser/download/download_item_impl_delegate.h
index 72e079b..1925963 100644
--- a/content/browser/download/download_item_impl_delegate.h
+++ b/content/browser/download/download_item_impl_delegate.h
@@ -5,8 +5,11 @@
#ifndef CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_ITEM_IMPL_DELEGATE_H_
#define CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_ITEM_IMPL_DELEGATE_H_
+#include <stdint.h>
+
#include "base/callback.h"
#include "base/files/file_path.h"
+#include "base/macros.h"
#include "content/common/content_export.h"
#include "content/public/browser/download_danger_type.h"
#include "content/public/browser/download_item.h"
@@ -69,7 +72,7 @@ class CONTENT_EXPORT DownloadItemImplDelegate {
// Called when an interrupted download is resumed.
virtual void ResumeInterruptedDownload(
scoped_ptr<content::DownloadUrlParameters> params,
- uint32 id);
+ uint32_t id);
// For contextual issues like language and prefs.
virtual BrowserContext* GetBrowserContext() const;
diff --git a/content/browser/download/download_item_impl_unittest.cc b/content/browser/download/download_item_impl_unittest.cc
index 9ba2d17..742024c 100644
--- a/content/browser/download/download_item_impl_unittest.cc
+++ b/content/browser/download/download_item_impl_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/feature_list.h"
#include "base/message_loop/message_loop.h"
@@ -54,12 +56,12 @@ class MockDelegate : public DownloadItemImplDelegate {
MOCK_METHOD1(ShouldOpenFileBasedOnExtension, bool(const base::FilePath&));
MOCK_METHOD1(CheckForFileRemoval, void(DownloadItemImpl*));
- void ResumeInterruptedDownload(
- scoped_ptr<DownloadUrlParameters> params, uint32 id) override {
+ void ResumeInterruptedDownload(scoped_ptr<DownloadUrlParameters> params,
+ uint32_t id) override {
MockResumeInterruptedDownload(params.get(), id);
}
MOCK_METHOD2(MockResumeInterruptedDownload,
- void(DownloadUrlParameters* params, uint32 id));
+ void(DownloadUrlParameters* params, uint32_t id));
MOCK_CONST_METHOD0(GetBrowserContext, BrowserContext*());
MOCK_METHOD1(UpdatePersistence, void(DownloadItemImpl*));
diff --git a/content/browser/download/download_manager_impl.cc b/content/browser/download/download_manager_impl.cc
index dce9e4f..9099a3f 100644
--- a/content/browser/download/download_manager_impl.cc
+++ b/content/browser/download/download_manager_impl.cc
@@ -51,7 +51,7 @@ namespace {
scoped_ptr<UrlDownloader, BrowserThread::DeleteOnIOThread> BeginDownload(
scoped_ptr<DownloadUrlParameters> params,
- uint32 download_id,
+ uint32_t download_id,
base::WeakPtr<DownloadManagerImpl> download_manager) {
DCHECK_CURRENTLY_ON(BrowserThread::IO);
// ResourceDispatcherHost{Base} is-not-a URLRequest::Delegate, and
@@ -148,7 +148,7 @@ class DownloadItemFactoryImpl : public DownloadItemFactory {
DownloadItemImpl* CreatePersistedItem(
DownloadItemImplDelegate* delegate,
- uint32 download_id,
+ uint32_t download_id,
const base::FilePath& current_path,
const base::FilePath& target_path,
const std::vector<GURL>& url_chain,
@@ -159,8 +159,8 @@ class DownloadItemFactoryImpl : public DownloadItemFactory {
const base::Time& end_time,
const std::string& etag,
const std::string& last_modified,
- int64 received_bytes,
- int64 total_bytes,
+ int64_t received_bytes,
+ int64_t total_bytes,
DownloadItem::DownloadState state,
DownloadDangerType danger_type,
DownloadInterruptReason interrupt_reason,
@@ -190,7 +190,7 @@ class DownloadItemFactoryImpl : public DownloadItemFactory {
DownloadItemImpl* CreateActiveItem(
DownloadItemImplDelegate* delegate,
- uint32 download_id,
+ uint32_t download_id,
const DownloadCreateInfo& info,
const net::BoundNetLog& bound_net_log) override {
return new DownloadItemImpl(delegate, download_id, info, bound_net_log);
@@ -198,7 +198,7 @@ class DownloadItemFactoryImpl : public DownloadItemFactory {
DownloadItemImpl* CreateSavePageItem(
DownloadItemImplDelegate* delegate,
- uint32 download_id,
+ uint32_t download_id,
const base::FilePath& path,
const GURL& url,
const std::string& mime_type,
@@ -231,7 +231,8 @@ DownloadManagerImpl::~DownloadManagerImpl() {
}
DownloadItemImpl* DownloadManagerImpl::CreateActiveItem(
- uint32 id, const DownloadCreateInfo& info) {
+ uint32_t id,
+ const DownloadCreateInfo& info) {
DCHECK_CURRENTLY_ON(BrowserThread::UI);
DCHECK(!ContainsKey(downloads_, id));
net::BoundNetLog bound_net_log =
@@ -248,7 +249,7 @@ void DownloadManagerImpl::GetNextId(const DownloadIdCallback& callback) {
delegate_->GetNextId(callback);
return;
}
- static uint32 next_id = content::DownloadItem::kInvalidId + 1;
+ static uint32_t next_id = content::DownloadItem::kInvalidId + 1;
callback.Run(next_id++);
}
@@ -343,15 +344,11 @@ void DownloadManagerImpl::StartDownload(
const DownloadUrlParameters::OnStartedCallback& on_started) {
DCHECK_CURRENTLY_ON(BrowserThread::UI);
DCHECK(info);
- uint32 download_id = info->download_id;
+ uint32_t download_id = info->download_id;
const bool new_download = (download_id == content::DownloadItem::kInvalidId);
- base::Callback<void(uint32)> got_id(base::Bind(
- &DownloadManagerImpl::StartDownloadWithId,
- weak_factory_.GetWeakPtr(),
- base::Passed(&info),
- base::Passed(&stream),
- on_started,
- new_download));
+ base::Callback<void(uint32_t)> got_id(base::Bind(
+ &DownloadManagerImpl::StartDownloadWithId, weak_factory_.GetWeakPtr(),
+ base::Passed(&info), base::Passed(&stream), on_started, new_download));
if (new_download) {
GetNextId(got_id);
} else {
@@ -364,7 +361,7 @@ void DownloadManagerImpl::StartDownloadWithId(
scoped_ptr<ByteStreamReader> stream,
const DownloadUrlParameters::OnStartedCallback& on_started,
bool new_download,
- uint32 id) {
+ uint32_t id) {
DCHECK_CURRENTLY_ON(BrowserThread::UI);
DCHECK_NE(content::DownloadItem::kInvalidId, id);
DownloadItemImpl* download = NULL;
@@ -444,7 +441,7 @@ void DownloadManagerImpl::CheckForFileRemoval(DownloadItemImpl* download_item) {
}
}
-void DownloadManagerImpl::OnFileExistenceChecked(uint32 download_id,
+void DownloadManagerImpl::OnFileExistenceChecked(uint32_t download_id,
bool result) {
DCHECK_CURRENTLY_ON(BrowserThread::UI);
if (!result) { // File does not exist.
@@ -480,7 +477,7 @@ void DownloadManagerImpl::CreateSavePackageDownloadItemWithId(
const std::string& mime_type,
scoped_ptr<DownloadRequestHandleInterface> request_handle,
const DownloadItemImplCreated& item_created,
- uint32 id) {
+ uint32_t id) {
DCHECK_CURRENTLY_ON(BrowserThread::UI);
DCHECK_NE(content::DownloadItem::kInvalidId, id);
DCHECK(!ContainsKey(downloads_, id));
@@ -512,7 +509,7 @@ void DownloadManagerImpl::OnSavePackageSuccessfullyFinished(
// download.
void DownloadManagerImpl::ResumeInterruptedDownload(
scoped_ptr<content::DownloadUrlParameters> params,
- uint32 id) {
+ uint32_t id) {
RecordDownloadSource(INITIATED_BY_RESUMPTION);
BrowserThread::PostTaskAndReplyWithResult(
BrowserThread::IO, FROM_HERE,
@@ -540,7 +537,7 @@ void DownloadManagerImpl::DownloadRemoved(DownloadItemImpl* download) {
if (!download)
return;
- uint32 download_id = download->GetId();
+ uint32_t download_id = download->GetId();
if (downloads_.erase(download_id) == 0)
return;
delete download;
@@ -649,7 +646,7 @@ void DownloadManagerImpl::RemoveObserver(Observer* observer) {
}
DownloadItem* DownloadManagerImpl::CreateDownloadItem(
- uint32 id,
+ uint32_t id,
const base::FilePath& current_path,
const base::FilePath& target_path,
const std::vector<GURL>& url_chain,
@@ -660,8 +657,8 @@ DownloadItem* DownloadManagerImpl::CreateDownloadItem(
const base::Time& end_time,
const std::string& etag,
const std::string& last_modified,
- int64 received_bytes,
- int64 total_bytes,
+ int64_t received_bytes,
+ int64_t total_bytes,
DownloadItem::DownloadState state,
DownloadDangerType danger_type,
DownloadInterruptReason interrupt_reason,
@@ -722,7 +719,7 @@ int DownloadManagerImpl::NonMaliciousInProgressCount() const {
return count;
}
-DownloadItem* DownloadManagerImpl::GetDownload(uint32 download_id) {
+DownloadItem* DownloadManagerImpl::GetDownload(uint32_t download_id) {
return ContainsKey(downloads_, download_id) ? downloads_[download_id] : NULL;
}
diff --git a/content/browser/download/download_manager_impl.h b/content/browser/download/download_manager_impl.h
index df650fc..ebac07a 100644
--- a/content/browser/download/download_manager_impl.h
+++ b/content/browser/download/download_manager_impl.h
@@ -5,6 +5,8 @@
#ifndef CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_MANAGER_IMPL_H_
#define CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_MANAGER_IMPL_H_
+#include <stdint.h>
+
#include <map>
#include <set>
#include <string>
@@ -83,7 +85,7 @@ class CONTENT_EXPORT DownloadManagerImpl : public DownloadManager,
void AddObserver(Observer* observer) override;
void RemoveObserver(Observer* observer) override;
content::DownloadItem* CreateDownloadItem(
- uint32 id,
+ uint32_t id,
const base::FilePath& current_path,
const base::FilePath& target_path,
const std::vector<GURL>& url_chain,
@@ -94,8 +96,8 @@ class CONTENT_EXPORT DownloadManagerImpl : public DownloadManager,
const base::Time& end_time,
const std::string& etag,
const std::string& last_modified,
- int64 received_bytes,
- int64 total_bytes,
+ int64_t received_bytes,
+ int64_t total_bytes,
content::DownloadItem::DownloadState state,
DownloadDangerType danger_type,
DownloadInterruptReason interrupt_reason,
@@ -104,7 +106,7 @@ class CONTENT_EXPORT DownloadManagerImpl : public DownloadManager,
int NonMaliciousInProgressCount() const override;
BrowserContext* GetBrowserContext() const override;
void CheckForHistoryFilesRemoval() override;
- DownloadItem* GetDownload(uint32 id) override;
+ DownloadItem* GetDownload(uint32_t id) override;
// For testing; specifically, accessed from TestFileErrorInjector.
void SetDownloadItemFactoryForTesting(
@@ -117,7 +119,7 @@ class CONTENT_EXPORT DownloadManagerImpl : public DownloadManager,
private:
typedef std::set<DownloadItem*> DownloadSet;
- typedef base::hash_map<uint32, DownloadItemImpl*> DownloadMap;
+ typedef base::hash_map<uint32_t, DownloadItemImpl*> DownloadMap;
typedef std::vector<DownloadItemImpl*> DownloadItemImplVector;
typedef base::Callback<bool(const DownloadItemImpl*)> DownloadRemover;
@@ -130,7 +132,7 @@ class CONTENT_EXPORT DownloadManagerImpl : public DownloadManager,
scoped_ptr<ByteStreamReader> stream,
const DownloadUrlParameters::OnStartedCallback& on_started,
bool new_download,
- uint32 id);
+ uint32_t id);
void CreateSavePackageDownloadItemWithId(
const base::FilePath& main_file_path,
@@ -138,11 +140,11 @@ class CONTENT_EXPORT DownloadManagerImpl : public DownloadManager,
const std::string& mime_type,
scoped_ptr<DownloadRequestHandleInterface> request_handle,
const DownloadItemImplCreated& on_started,
- uint32 id);
+ uint32_t id);
// Create a new active item based on the info. Separate from
// StartDownload() for testing.
- DownloadItemImpl* CreateActiveItem(uint32 id,
+ DownloadItemImpl* CreateActiveItem(uint32_t id,
const DownloadCreateInfo& info);
// Get next download id. |callback| is called on the UI thread and may
@@ -152,7 +154,7 @@ class CONTENT_EXPORT DownloadManagerImpl : public DownloadManager,
// Called with the result of DownloadManagerDelegate::CheckForFileExistence.
// Updates the state of the file and then notifies this update to the file's
// observer.
- void OnFileExistenceChecked(uint32 download_id, bool result);
+ void OnFileExistenceChecked(uint32_t download_id, bool result);
// Remove all downloads for which |remover| returns true.
int RemoveDownloads(const DownloadRemover& remover);
@@ -169,7 +171,7 @@ class CONTENT_EXPORT DownloadManagerImpl : public DownloadManager,
void CheckForFileRemoval(DownloadItemImpl* download_item) override;
void ResumeInterruptedDownload(
scoped_ptr<content::DownloadUrlParameters> params,
- uint32 id) override;
+ uint32_t id) override;
void OpenDownload(DownloadItemImpl* download) override;
void ShowDownloadInShell(DownloadItemImpl* download) override;
void DownloadRemoved(DownloadItemImpl* download) override;
diff --git a/content/browser/download/download_manager_impl_unittest.cc b/content/browser/download/download_manager_impl_unittest.cc
index 2878cda..cf73cc1 100644
--- a/content/browser/download/download_manager_impl_unittest.cc
+++ b/content/browser/download/download_manager_impl_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 <stddef.h>
+#include <stdint.h>
+
#include <set>
#include <string>
#include "base/bind.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/message_loop/message_loop.h"
@@ -106,7 +110,7 @@ class MockDownloadItemImpl : public DownloadItemImpl {
MOCK_METHOD0(ShowDownloadInShell, void());
MOCK_METHOD0(ValidateDangerousDownload, void());
MOCK_METHOD1(StealDangerousDownload, void(const AcquireFileCallback&));
- MOCK_METHOD3(UpdateProgress, void(int64, int64, const std::string&));
+ MOCK_METHOD3(UpdateProgress, void(int64_t, int64_t, const std::string&));
MOCK_METHOD1(Cancel, void(bool));
MOCK_METHOD0(MarkAsComplete, void());
MOCK_METHOD1(OnAllDataSaved, void(const std::string&));
@@ -120,7 +124,7 @@ class MockDownloadItemImpl : public DownloadItemImpl {
MOCK_METHOD0(Remove, void());
MOCK_CONST_METHOD1(TimeRemaining, bool(base::TimeDelta*));
- MOCK_CONST_METHOD0(CurrentSpeed, int64());
+ MOCK_CONST_METHOD0(CurrentSpeed, int64_t());
MOCK_CONST_METHOD0(PercentComplete, int());
MOCK_CONST_METHOD0(AllDataSaved, bool());
MOCK_CONST_METHOD1(MatchesQuery, bool(const base::string16& query));
@@ -131,7 +135,7 @@ class MockDownloadItemImpl : public DownloadItemImpl {
MOCK_METHOD1(OnContentCheckCompleted, void(DownloadDangerType));
MOCK_CONST_METHOD0(GetState, DownloadState());
MOCK_CONST_METHOD0(GetUrlChain, const std::vector<GURL>&());
- MOCK_METHOD1(SetTotalBytes, void(int64));
+ MOCK_METHOD1(SetTotalBytes, void(int64_t));
MOCK_CONST_METHOD0(GetURL, const GURL&());
MOCK_CONST_METHOD0(GetOriginalUrl, const GURL&());
MOCK_CONST_METHOD0(GetReferrerUrl, const GURL&());
@@ -143,11 +147,11 @@ class MockDownloadItemImpl : public DownloadItemImpl {
MOCK_CONST_METHOD0(GetOriginalMimeType, std::string());
MOCK_CONST_METHOD0(GetReferrerCharset, std::string());
MOCK_CONST_METHOD0(GetRemoteAddress, std::string());
- MOCK_CONST_METHOD0(GetTotalBytes, int64());
- MOCK_CONST_METHOD0(GetReceivedBytes, int64());
+ MOCK_CONST_METHOD0(GetTotalBytes, int64_t());
+ MOCK_CONST_METHOD0(GetReceivedBytes, int64_t());
MOCK_CONST_METHOD0(GetHashState, const std::string&());
MOCK_CONST_METHOD0(GetHash, const std::string&());
- MOCK_CONST_METHOD0(GetId, uint32());
+ MOCK_CONST_METHOD0(GetId, uint32_t());
MOCK_CONST_METHOD0(GetStartTime, base::Time());
MOCK_CONST_METHOD0(GetEndTime, base::Time());
MOCK_METHOD0(GetDownloadManager, DownloadManager*());
@@ -232,7 +236,7 @@ class MockDownloadItemFactory
// Overridden methods from DownloadItemFactory.
DownloadItemImpl* CreatePersistedItem(
DownloadItemImplDelegate* delegate,
- uint32 download_id,
+ uint32_t download_id,
const base::FilePath& current_path,
const base::FilePath& target_path,
const std::vector<GURL>& url_chain,
@@ -243,8 +247,8 @@ class MockDownloadItemFactory
const base::Time& end_time,
const std::string& etag,
const std::string& last_modofied,
- int64 received_bytes,
- int64 total_bytes,
+ int64_t received_bytes,
+ int64_t total_bytes,
DownloadItem::DownloadState state,
DownloadDangerType danger_type,
DownloadInterruptReason interrupt_reason,
@@ -252,12 +256,12 @@ class MockDownloadItemFactory
const net::BoundNetLog& bound_net_log) override;
DownloadItemImpl* CreateActiveItem(
DownloadItemImplDelegate* delegate,
- uint32 download_id,
+ uint32_t download_id,
const DownloadCreateInfo& info,
const net::BoundNetLog& bound_net_log) override;
DownloadItemImpl* CreateSavePageItem(
DownloadItemImplDelegate* delegate,
- uint32 download_id,
+ uint32_t download_id,
const base::FilePath& path,
const GURL& url,
const std::string& mime_type,
@@ -265,7 +269,7 @@ class MockDownloadItemFactory
const net::BoundNetLog& bound_net_log) override;
private:
- std::map<uint32, MockDownloadItemImpl*> items_;
+ std::map<uint32_t, MockDownloadItemImpl*> items_;
DownloadItemImplDelegate item_delegate_;
DISALLOW_COPY_AND_ASSIGN(MockDownloadItemFactory);
@@ -285,8 +289,8 @@ MockDownloadItemImpl* MockDownloadItemFactory::PopItem() {
if (items_.empty())
return NULL;
- std::map<uint32, MockDownloadItemImpl*>::iterator first_item
- = items_.begin();
+ std::map<uint32_t, MockDownloadItemImpl*>::iterator first_item =
+ items_.begin();
MockDownloadItemImpl* result = first_item->second;
items_.erase(first_item);
return result;
@@ -299,7 +303,7 @@ void MockDownloadItemFactory::RemoveItem(int id) {
DownloadItemImpl* MockDownloadItemFactory::CreatePersistedItem(
DownloadItemImplDelegate* delegate,
- uint32 download_id,
+ uint32_t download_id,
const base::FilePath& current_path,
const base::FilePath& target_path,
const std::vector<GURL>& url_chain,
@@ -310,8 +314,8 @@ DownloadItemImpl* MockDownloadItemFactory::CreatePersistedItem(
const base::Time& end_time,
const std::string& etag,
const std::string& last_modified,
- int64 received_bytes,
- int64 total_bytes,
+ int64_t received_bytes,
+ int64_t total_bytes,
DownloadItem::DownloadState state,
DownloadDangerType danger_type,
DownloadInterruptReason interrupt_reason,
@@ -328,7 +332,7 @@ DownloadItemImpl* MockDownloadItemFactory::CreatePersistedItem(
DownloadItemImpl* MockDownloadItemFactory::CreateActiveItem(
DownloadItemImplDelegate* delegate,
- uint32 download_id,
+ uint32_t download_id,
const DownloadCreateInfo& info,
const net::BoundNetLog& bound_net_log) {
DCHECK(items_.find(download_id) == items_.end());
@@ -348,7 +352,7 @@ DownloadItemImpl* MockDownloadItemFactory::CreateActiveItem(
DownloadItemImpl* MockDownloadItemFactory::CreateSavePageItem(
DownloadItemImplDelegate* delegate,
- uint32 download_id,
+ uint32_t download_id,
const base::FilePath& path,
const GURL& url,
const std::string& mime_type,
@@ -437,8 +441,7 @@ class MockDownloadManagerObserver : public DownloadManager::Observer {
MOCK_METHOD2(OnDownloadCreated, void(
DownloadManager*, DownloadItem*));
MOCK_METHOD1(ManagerGoingDown, void(DownloadManager*));
- MOCK_METHOD2(SelectFileDialogDisplayed, void(
- DownloadManager*, int32));
+ MOCK_METHOD2(SelectFileDialogDisplayed, void(DownloadManager*, int32_t));
};
} // namespace
@@ -517,7 +520,7 @@ class DownloadManagerTest : public testing::Test {
// Args are ignored except for download id, so everything else can be
// null.
- uint32 id = next_download_id_;
+ uint32_t id = next_download_id_;
++next_download_id_;
info.request_handle.reset(new DownloadRequestHandle);
download_manager_->CreateActiveItem(id, info);
@@ -595,7 +598,7 @@ class DownloadManagerTest : public testing::Test {
scoped_ptr<MockDownloadManagerDelegate> mock_download_manager_delegate_;
scoped_ptr<MockBrowserContext> mock_browser_context_;
scoped_ptr<MockDownloadManagerObserver> observer_;
- uint32 next_download_id_;
+ uint32_t next_download_id_;
DISALLOW_COPY_AND_ASSIGN(DownloadManagerTest);
};
@@ -604,7 +607,7 @@ class DownloadManagerTest : public testing::Test {
TEST_F(DownloadManagerTest, StartDownload) {
scoped_ptr<DownloadCreateInfo> info(new DownloadCreateInfo);
scoped_ptr<ByteStreamReader> stream;
- uint32 local_id(5); // Random value
+ uint32_t local_id(5); // Random value
base::FilePath download_path(FILE_PATH_LITERAL("download/path"));
EXPECT_FALSE(download_manager_->GetDownload(local_id));
@@ -673,7 +676,7 @@ TEST_F(DownloadManagerTest, DetermineDownloadTarget_False) {
// Confirm the DownloadManagerImpl::RemoveAllDownloads() functionality
TEST_F(DownloadManagerTest, RemoveAllDownloads) {
base::Time now(base::Time::Now());
- for (uint32 i = 0; i < 4; ++i) {
+ for (uint32_t i = 0; i < 4; ++i) {
MockDownloadItemImpl& item(AddItemToManager());
EXPECT_EQ(i, item.GetId());
EXPECT_CALL(item, GetStartTime())
@@ -708,7 +711,7 @@ TEST_F(DownloadManagerTest, RemoveAllDownloads) {
// Confirm that only downloads with same origin are removed.
TEST_F(DownloadManagerTest, RemoveSameOriginDownloads) {
base::Time now(base::Time::Now());
- for (uint32 i = 0; i < 2; ++i) {
+ for (uint32_t i = 0; i < 2; ++i) {
MockDownloadItemImpl& item(AddItemToManager());
EXPECT_CALL(item, GetStartTime()).WillRepeatedly(Return(now));
EXPECT_CALL(item, GetState())
diff --git a/content/browser/download/download_net_log_parameters.cc b/content/browser/download/download_net_log_parameters.cc
index 6aefb82..ea920af 100644
--- a/content/browser/download/download_net_log_parameters.cc
+++ b/content/browser/download/download_net_log_parameters.cc
@@ -4,9 +4,9 @@
#include "content/browser/download/download_net_log_parameters.h"
-#include "base/basictypes.h"
#include "base/files/file_path.h"
#include "base/logging.h"
+#include "base/macros.h"
#include "base/strings/string_number_conversions.h"
#include "base/values.h"
#include "content/public/browser/download_interrupt_reasons.h"
@@ -86,7 +86,7 @@ scoped_ptr<base::Value> ItemRenamedNetLogCallback(
scoped_ptr<base::Value> ItemInterruptedNetLogCallback(
DownloadInterruptReason reason,
- int64 bytes_so_far,
+ int64_t bytes_so_far,
const std::string* hash_state,
net::NetLogCaptureMode capture_mode) {
scoped_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
@@ -102,7 +102,7 @@ scoped_ptr<base::Value> ItemInterruptedNetLogCallback(
scoped_ptr<base::Value> ItemResumingNetLogCallback(
bool user_initiated,
DownloadInterruptReason reason,
- int64 bytes_so_far,
+ int64_t bytes_so_far,
const std::string* hash_state,
net::NetLogCaptureMode capture_mode) {
scoped_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
@@ -117,7 +117,7 @@ scoped_ptr<base::Value> ItemResumingNetLogCallback(
}
scoped_ptr<base::Value> ItemCompletingNetLogCallback(
- int64 bytes_so_far,
+ int64_t bytes_so_far,
const std::string* final_hash,
net::NetLogCaptureMode capture_mode) {
scoped_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
@@ -140,7 +140,7 @@ scoped_ptr<base::Value> ItemFinishedNetLogCallback(
}
scoped_ptr<base::Value> ItemCanceledNetLogCallback(
- int64 bytes_so_far,
+ int64_t bytes_so_far,
const std::string* hash_state,
net::NetLogCaptureMode capture_mode) {
scoped_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
@@ -154,7 +154,7 @@ scoped_ptr<base::Value> ItemCanceledNetLogCallback(
scoped_ptr<base::Value> FileOpenedNetLogCallback(
const base::FilePath* file_name,
- int64 start_offset,
+ int64_t start_offset,
net::NetLogCaptureMode capture_mode) {
scoped_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
diff --git a/content/browser/download/download_net_log_parameters.h b/content/browser/download/download_net_log_parameters.h
index 6e103bd..2f4b6a0 100644
--- a/content/browser/download/download_net_log_parameters.h
+++ b/content/browser/download/download_net_log_parameters.h
@@ -5,6 +5,9 @@
#ifndef CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_NET_LOG_PARAMETERS_H_
#define CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_NET_LOG_PARAMETERS_H_
+#include <stddef.h>
+#include <stdint.h>
+
#include <string>
#include "content/public/browser/download_item.h"
@@ -46,7 +49,7 @@ scoped_ptr<base::Value> ItemRenamedNetLogCallback(
// Returns NetLog parameters when a DownloadItem is interrupted.
scoped_ptr<base::Value> ItemInterruptedNetLogCallback(
DownloadInterruptReason reason,
- int64 bytes_so_far,
+ int64_t bytes_so_far,
const std::string* hash_state,
net::NetLogCaptureMode capture_mode);
@@ -54,13 +57,13 @@ scoped_ptr<base::Value> ItemInterruptedNetLogCallback(
scoped_ptr<base::Value> ItemResumingNetLogCallback(
bool user_initiated,
DownloadInterruptReason reason,
- int64 bytes_so_far,
+ int64_t bytes_so_far,
const std::string* hash_state,
net::NetLogCaptureMode capture_mode);
// Returns NetLog parameters when a DownloadItem is completing.
scoped_ptr<base::Value> ItemCompletingNetLogCallback(
- int64 bytes_so_far,
+ int64_t bytes_so_far,
const std::string* final_hash,
net::NetLogCaptureMode capture_mode);
@@ -71,14 +74,14 @@ scoped_ptr<base::Value> ItemFinishedNetLogCallback(
// Returns NetLog parameters when a DownloadItem is canceled.
scoped_ptr<base::Value> ItemCanceledNetLogCallback(
- int64 bytes_so_far,
+ int64_t bytes_so_far,
const std::string* hash_state,
net::NetLogCaptureMode capture_mode);
// Returns NetLog parameters when a DownloadFile is opened.
scoped_ptr<base::Value> FileOpenedNetLogCallback(
const base::FilePath* file_name,
- int64 start_offset,
+ int64_t start_offset,
net::NetLogCaptureMode capture_mode);
// Returns NetLog parameters when a DownloadFile is opened.
diff --git a/content/browser/download/download_request_core.cc b/content/browser/download/download_request_core.cc
index 577d9f4..072ba7b 100644
--- a/content/browser/download/download_request_core.cc
+++ b/content/browser/download/download_request_core.cc
@@ -87,9 +87,9 @@ void DownloadRequestCore::OnResponseStarted(
// If the content-length header is not present (or contains something other
// than numbers), the incoming content_length is -1 (unknown size).
// Set the content length to 0 to indicate unknown size to DownloadManager.
- int64 content_length = request()->GetExpectedContentSize() > 0
- ? request()->GetExpectedContentSize()
- : 0;
+ int64_t content_length = request()->GetExpectedContentSize() > 0
+ ? request()->GetExpectedContentSize()
+ : 0;
// Deleted in DownloadManager.
scoped_ptr<DownloadCreateInfo> info(
diff --git a/content/browser/download/download_request_core.h b/content/browser/download/download_request_core.h
index 6982f04..22ca862 100644
--- a/content/browser/download/download_request_core.h
+++ b/content/browser/download/download_request_core.h
@@ -5,6 +5,9 @@
#ifndef CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_REQUEST_CORE_H_
#define CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_REQUEST_CORE_H_
+#include <stddef.h>
+#include <stdint.h>
+
#include <string>
#include "base/callback.h"
@@ -118,7 +121,7 @@ class CONTENT_EXPORT DownloadRequestCore
base::TimeTicks last_stream_pause_time_;
base::TimeDelta total_pause_time_;
size_t last_buffer_size_;
- int64 bytes_read_;
+ int64_t bytes_read_;
int pause_count_;
bool was_deferred_;
diff --git a/content/browser/download/download_resource_handler.cc b/content/browser/download/download_resource_handler.cc
index c3f69e2..e06b309 100644
--- a/content/browser/download/download_resource_handler.cc
+++ b/content/browser/download/download_resource_handler.cc
@@ -84,7 +84,7 @@ void DeleteOnUIThread(
} // namespace
DownloadResourceHandler::DownloadResourceHandler(
- uint32 id,
+ uint32_t id,
net::URLRequest* request,
const DownloadUrlParameters::OnStartedCallback& started_cb,
scoped_ptr<DownloadSaveInfo> save_info)
diff --git a/content/browser/download/download_resource_handler.h b/content/browser/download/download_resource_handler.h
index a628926..22a10a8 100644
--- a/content/browser/download/download_resource_handler.h
+++ b/content/browser/download/download_resource_handler.h
@@ -5,9 +5,12 @@
#ifndef CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_RESOURCE_HANDLER_H_
#define CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_RESOURCE_HANDLER_H_
+#include <stdint.h>
+
#include <string>
#include "base/callback.h"
+#include "base/macros.h"
#include "base/memory/scoped_ptr.h"
#include "content/browser/download/download_request_core.h"
#include "content/browser/loader/resource_handler.h"
@@ -37,7 +40,7 @@ class CONTENT_EXPORT DownloadResourceHandler
// started_cb will be called exactly once on the UI thread.
// |id| should be invalid if the id should be automatically assigned.
DownloadResourceHandler(
- uint32 id,
+ uint32_t id,
net::URLRequest* request,
const DownloadUrlParameters::OnStartedCallback& started_cb,
scoped_ptr<DownloadSaveInfo> save_info);
@@ -88,7 +91,7 @@ class CONTENT_EXPORT DownloadResourceHandler
void OnCoreReadyToRead();
- uint32 download_id_;
+ uint32_t download_id_;
// This is read only on the IO thread, but may only
// be called on the UI thread.
diff --git a/content/browser/download/download_stats.cc b/content/browser/download/download_stats.cc
index 3f7d692..6cd66f2 100644
--- a/content/browser/download/download_stats.cc
+++ b/content/browser/download/download_stats.cc
@@ -4,6 +4,7 @@
#include "content/browser/download/download_stats.h"
+#include "base/macros.h"
#include "base/metrics/histogram.h"
#include "base/metrics/sparse_histogram.h"
#include "base/strings/string_util.h"
@@ -342,10 +343,11 @@ void RecordDownloadSource(DownloadSource source) {
"Download.Sources", source, DOWNLOAD_SOURCE_LAST_ENTRY);
}
-void RecordDownloadCompleted(const base::TimeTicks& start, int64 download_len) {
+void RecordDownloadCompleted(const base::TimeTicks& start,
+ int64_t download_len) {
RecordDownloadCount(COMPLETED_COUNT);
UMA_HISTOGRAM_LONG_TIMES("Download.Time", (base::TimeTicks::Now() - start));
- int64 max = 1024 * 1024 * 1024; // One Terabyte.
+ int64_t max = 1024 * 1024 * 1024; // One Terabyte.
download_len /= 1024; // In Kilobytes
UMA_HISTOGRAM_CUSTOM_COUNTS("Download.DownloadSize",
download_len,
@@ -355,8 +357,8 @@ void RecordDownloadCompleted(const base::TimeTicks& start, int64 download_len) {
}
void RecordDownloadInterrupted(DownloadInterruptReason reason,
- int64 received,
- int64 total) {
+ int64_t received,
+ int64_t total) {
RecordDownloadCount(INTERRUPTED_COUNT);
UMA_HISTOGRAM_CUSTOM_ENUMERATION(
"Download.InterruptedReason",
@@ -367,11 +369,11 @@ void RecordDownloadInterrupted(DownloadInterruptReason reason,
// The maximum should be 2^kBuckets, to have the logarithmic bucket
// boundaries fall on powers of 2.
static const int kBuckets = 30;
- static const int64 kMaxKb = 1 << kBuckets; // One Terabyte, in Kilobytes.
- int64 delta_bytes = total - received;
+ static const int64_t kMaxKb = 1 << kBuckets; // One Terabyte, in Kilobytes.
+ int64_t delta_bytes = total - received;
bool unknown_size = total <= 0;
- int64 received_kb = received / 1024;
- int64 total_kb = total / 1024;
+ int64_t received_kb = received / 1024;
+ int64_t total_kb = total / 1024;
UMA_HISTOGRAM_CUSTOM_COUNTS("Download.InterruptedReceivedSizeK",
received_kb,
1,
@@ -462,9 +464,9 @@ void RecordDownloadWriteLoopCount(int count) {
}
void RecordAcceptsRanges(const std::string& accepts_ranges,
- int64 download_len,
+ int64_t download_len,
bool has_strong_validator) {
- int64 max = 1024 * 1024 * 1024; // One Terabyte.
+ int64_t max = 1024 * 1024 * 1024; // One Terabyte.
download_len /= 1024; // In Kilobytes
static const int kBuckets = 50;
diff --git a/content/browser/download/download_stats.h b/content/browser/download/download_stats.h
index 3ae2612..a029a0b 100644
--- a/content/browser/download/download_stats.h
+++ b/content/browser/download/download_stats.h
@@ -7,9 +7,11 @@
#ifndef CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_STATS_H_
#define CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_STATS_H_
+#include <stddef.h>
+#include <stdint.h>
+
#include <string>
-#include "base/basictypes.h"
#include "content/common/content_export.h"
#include "content/public/browser/download_danger_type.h"
#include "content/public/browser/download_interrupt_reasons.h"
@@ -127,12 +129,13 @@ void RecordDownloadCount(DownloadCountTypes type);
void RecordDownloadSource(DownloadSource source);
// Record COMPLETED_COUNT and how long the download took.
-void RecordDownloadCompleted(const base::TimeTicks& start, int64 download_len);
+void RecordDownloadCompleted(const base::TimeTicks& start,
+ int64_t download_len);
// Record INTERRUPTED_COUNT, |reason|, |received| and |total| bytes.
void RecordDownloadInterrupted(DownloadInterruptReason reason,
- int64 received,
- int64 total);
+ int64_t received,
+ int64_t total);
// Record that a download has been classified as malicious.
void RecordMaliciousDownloadClassified(DownloadDangerType danger_type);
@@ -177,7 +180,7 @@ void RecordOpen(const base::Time& end, bool first);
// support and ETag indicates downloads that are candidates for partial
// resumption.
void RecordAcceptsRanges(const std::string& accepts_ranges,
- int64 download_len,
+ int64_t download_len,
bool has_strong_validator);
// Record the number of downloads removed by ClearAll.
diff --git a/content/browser/download/drag_download_file.cc b/content/browser/download/drag_download_file.cc
index 2014270..3d8c0fc 100644
--- a/content/browser/download/drag_download_file.cc
+++ b/content/browser/download/drag_download_file.cc
@@ -7,7 +7,9 @@
#include "base/bind.h"
#include "base/files/file.h"
#include "base/location.h"
+#include "base/macros.h"
#include "base/single_thread_task_runner.h"
+#include "build/build_config.h"
#include "content/browser/download/download_stats.h"
#include "content/browser/web_contents/web_contents_impl.h"
#include "content/public/browser/browser_context.h"
diff --git a/content/browser/download/drag_download_file.h b/content/browser/download/drag_download_file.h
index 825f736..70502d3 100644
--- a/content/browser/download/drag_download_file.h
+++ b/content/browser/download/drag_download_file.h
@@ -8,6 +8,7 @@
#include "base/compiler_specific.h"
#include "base/files/file.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"
diff --git a/content/browser/download/drag_download_file_browsertest.cc b/content/browser/download/drag_download_file_browsertest.cc
index 1685e4b..8986c39 100644
--- a/content/browser/download/drag_download_file_browsertest.cc
+++ b/content/browser/download/drag_download_file_browsertest.cc
@@ -4,6 +4,7 @@
#include "base/files/file_path.h"
#include "base/files/scoped_temp_dir.h"
+#include "base/macros.h"
#include "base/memory/ref_counted.h"
#include "content/browser/download/download_file_factory.h"
#include "content/browser/download/download_file_impl.h"
diff --git a/content/browser/download/drag_download_util.cc b/content/browser/download/drag_download_util.cc
index f259af2..4172150 100644
--- a/content/browser/download/drag_download_util.cc
+++ b/content/browser/download/drag_download_util.cc
@@ -4,6 +4,8 @@
#include "content/browser/download/drag_download_util.h"
+#include <stddef.h>
+
#include <string>
#include "base/bind.h"
@@ -14,6 +16,7 @@
#include "base/strings/string_util.h"
#include "base/strings/utf_string_conversions.h"
#include "base/threading/thread_restrictions.h"
+#include "build/build_config.h"
#include "content/public/browser/browser_thread.h"
#include "url/gurl.h"
diff --git a/content/browser/download/drag_download_util.h b/content/browser/download/drag_download_util.h
index 38b516c..343ef79 100644
--- a/content/browser/download/drag_download_util.h
+++ b/content/browser/download/drag_download_util.h
@@ -5,8 +5,8 @@
#ifndef CONTENT_BROWSER_DOWNLOAD_DRAG_DOWNLOAD_UTIL_H_
#define CONTENT_BROWSER_DOWNLOAD_DRAG_DOWNLOAD_UTIL_H_
-#include "base/basictypes.h"
#include "base/files/file.h"
+#include "base/macros.h"
#include "base/memory/ref_counted.h"
#include "base/strings/string16.h"
#include "content/browser/download/drag_download_file.h"
diff --git a/content/browser/download/file_metadata_linux.cc b/content/browser/download/file_metadata_linux.cc
index 1864d29..b6b1779 100644
--- a/content/browser/download/file_metadata_linux.cc
+++ b/content/browser/download/file_metadata_linux.cc
@@ -4,6 +4,7 @@
#include "content/browser/download/file_metadata_linux.h"
+#include <stddef.h>
#include <sys/types.h>
#include <sys/xattr.h>
diff --git a/content/browser/download/file_metadata_unittest_linux.cc b/content/browser/download/file_metadata_unittest_linux.cc
index c20e573..84f31be 100644
--- a/content/browser/download/file_metadata_unittest_linux.cc
+++ b/content/browser/download/file_metadata_unittest_linux.cc
@@ -3,6 +3,7 @@
// found in the LICENSE file.
#include <errno.h>
+#include <stddef.h>
#include <sys/types.h>
#include <sys/xattr.h>
diff --git a/content/browser/download/mhtml_generation_browsertest.cc b/content/browser/download/mhtml_generation_browsertest.cc
index f2ebfd8..7a3b00f 100644
--- a/content/browser/download/mhtml_generation_browsertest.cc
+++ b/content/browser/download/mhtml_generation_browsertest.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 <stdint.h>
+
#include "base/bind.h"
#include "base/callback.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/run_loop.h"
#include "content/public/browser/web_contents.h"
#include "content/public/test/browser_test_utils.h"
@@ -50,19 +53,19 @@ class MHTMLGenerationTest : public ContentBrowserTest {
}
bool has_mhtml_callback_run() const { return has_mhtml_callback_run_; }
- int64 file_size() const { return file_size_; }
+ int64_t file_size() const { return file_size_; }
base::ScopedTempDir temp_dir_;
private:
- void MHTMLGenerated(base::Closure quit_closure, int64 size) {
+ void MHTMLGenerated(base::Closure quit_closure, int64_t size) {
has_mhtml_callback_run_ = true;
file_size_ = size;
quit_closure.Run();
}
bool has_mhtml_callback_run_;
- int64 file_size_;
+ int64_t file_size_;
};
// Tests that generating a MHTML does create contents.
@@ -78,7 +81,7 @@ IN_PROC_BROWSER_TEST_F(MHTMLGenerationTest, GenerateMHTML) {
// Make sure the actual generated file has some contents.
EXPECT_GT(file_size(), 0); // Verify the size reported by the callback.
- int64 file_size;
+ int64_t file_size;
ASSERT_TRUE(base::GetFileSize(path, &file_size));
EXPECT_GT(file_size, 100); // Verify the actual file size.
}
diff --git a/content/browser/download/mhtml_generation_manager.cc b/content/browser/download/mhtml_generation_manager.cc
index 26411f7..6c14c3b 100644
--- a/content/browser/download/mhtml_generation_manager.cc
+++ b/content/browser/download/mhtml_generation_manager.cc
@@ -10,6 +10,7 @@
#include "base/bind.h"
#include "base/files/file.h"
#include "base/guid.h"
+#include "base/macros.h"
#include "base/rand_util.h"
#include "base/scoped_observer.h"
#include "base/stl_util.h"
@@ -48,7 +49,7 @@ class MHTMLGenerationManager::Job : public RenderProcessHostObserver {
// Close the file on the file thread and respond back on the UI thread with
// file size.
- void CloseFile(base::Callback<void(int64 file_size)> callback);
+ void CloseFile(base::Callback<void(int64_t file_size)> callback);
// RenderProcessHostObserver:
void RenderProcessExited(RenderProcessHost* host,
@@ -58,7 +59,7 @@ class MHTMLGenerationManager::Job : public RenderProcessHostObserver {
private:
static std::string GenerateMHTMLBoundaryMarker();
- static int64 CloseFileOnFileThread(base::File file);
+ static int64_t CloseFileOnFileThread(base::File file);
void AddFrame(RenderFrameHost* render_frame_host);
// Creates a new map with values (content ids) the same as in
@@ -190,7 +191,7 @@ void MHTMLGenerationManager::Job::RenderProcessHostDestroyed(
}
void MHTMLGenerationManager::Job::CloseFile(
- base::Callback<void(int64)> callback) {
+ base::Callback<void(int64_t)> callback) {
DCHECK_CURRENTLY_ON(BrowserThread::UI);
if (!browser_file_.IsValid()) {
@@ -206,10 +207,10 @@ void MHTMLGenerationManager::Job::CloseFile(
}
// static
-int64 MHTMLGenerationManager::Job::CloseFileOnFileThread(base::File file) {
+int64_t MHTMLGenerationManager::Job::CloseFileOnFileThread(base::File file) {
DCHECK_CURRENTLY_ON(BrowserThread::FILE);
DCHECK(file.IsValid());
- int64 file_size = file.GetLength();
+ int64_t file_size = file.GetLength();
file.Close();
return file_size;
}
@@ -292,7 +293,7 @@ base::File MHTMLGenerationManager::CreateFile(const base::FilePath& file_path) {
// only allow writing to the file and forbid reading from the file (as this
// would allow reading content generated by other renderers / other web
// principals).
- uint32 file_flags = base::File::FLAG_CREATE_ALWAYS | base::File::FLAG_WRITE;
+ uint32_t file_flags = base::File::FLAG_CREATE_ALWAYS | base::File::FLAG_WRITE;
base::File browser_file(file_path, file_flags);
if (!browser_file.IsValid()) {
@@ -338,7 +339,7 @@ void MHTMLGenerationManager::JobFinished(int job_id, JobStatus job_status) {
void MHTMLGenerationManager::OnFileClosed(int job_id,
JobStatus job_status,
- int64 file_size) {
+ int64_t file_size) {
DCHECK_CURRENTLY_ON(BrowserThread::UI);
Job* job = FindJob(job_id);
diff --git a/content/browser/download/mhtml_generation_manager.h b/content/browser/download/mhtml_generation_manager.h
index 1c0a51e..e697e13 100644
--- a/content/browser/download/mhtml_generation_manager.h
+++ b/content/browser/download/mhtml_generation_manager.h
@@ -5,9 +5,12 @@
#ifndef CONTENT_BROWSER_DOWNLOAD_MHTML_GENERATION_MANAGER_H_
#define CONTENT_BROWSER_DOWNLOAD_MHTML_GENERATION_MANAGER_H_
+#include <stdint.h>
+
#include <map>
#include "base/files/file.h"
+#include "base/macros.h"
#include "base/memory/singleton.h"
#include "base/process/process.h"
#include "ipc/ipc_platform_file.h"
@@ -29,7 +32,7 @@ class MHTMLGenerationManager {
// GenerateMHTMLCallback is called to report completion and status of MHTML
// generation. On success |file_size| indicates the size of the
// generated file. On failure |file_size| is -1.
- typedef base::Callback<void(int64 file_size)> GenerateMHTMLCallback;
+ typedef base::Callback<void(int64_t file_size)> GenerateMHTMLCallback;
// Instructs the render view to generate a MHTML representation of the current
// page for |web_contents|.
@@ -61,7 +64,7 @@ class MHTMLGenerationManager {
void JobFinished(int job_id, JobStatus job_status);
// Called on the UI thread after the file got finalized and we have its size.
- void OnFileClosed(int job_id, JobStatus job_status, int64 file_size);
+ void OnFileClosed(int job_id, JobStatus job_status, int64_t file_size);
// Creates and registers a new job.
int NewJob(WebContents* web_contents, const GenerateMHTMLCallback& callback);
diff --git a/content/browser/download/mock_download_file.h b/content/browser/download/mock_download_file.h
index 8be2c93..a0020b6 100644
--- a/content/browser/download/mock_download_file.h
+++ b/content/browser/download/mock_download_file.h
@@ -5,6 +5,9 @@
#ifndef CONTENT_BROWSER_DOWNLOAD_MOCK_DOWNLOAD_FILE_H_
#define CONTENT_BROWSER_DOWNLOAD_MOCK_DOWNLOAD_FILE_H_
+#include <stddef.h>
+#include <stdint.h>
+
#include <map>
#include <string>
@@ -40,8 +43,8 @@ class MockDownloadFile : public DownloadFile {
MOCK_METHOD0(Finish, void());
MOCK_CONST_METHOD0(FullPath, base::FilePath());
MOCK_CONST_METHOD0(InProgress, bool());
- MOCK_CONST_METHOD0(BytesSoFar, int64());
- MOCK_CONST_METHOD0(CurrentSpeed, int64());
+ MOCK_CONST_METHOD0(BytesSoFar, int64_t());
+ MOCK_CONST_METHOD0(CurrentSpeed, int64_t());
MOCK_METHOD1(GetHash, bool(std::string* hash));
MOCK_METHOD0(GetHashState, std::string());
MOCK_METHOD0(SendUpdate, void());
diff --git a/content/browser/download/rate_estimator.cc b/content/browser/download/rate_estimator.cc
index dcdd71a..953e958 100644
--- a/content/browser/download/rate_estimator.cc
+++ b/content/browser/download/rate_estimator.cc
@@ -40,15 +40,15 @@ RateEstimator::RateEstimator(TimeDelta bucket_time,
RateEstimator::~RateEstimator() {
}
-void RateEstimator::Increment(uint32 count) {
+void RateEstimator::Increment(uint32_t count) {
Increment(count, TimeTicks::Now());
}
-void RateEstimator::Increment(uint32 count, TimeTicks now) {
+void RateEstimator::Increment(uint32_t count, TimeTicks now) {
ClearOldBuckets(now);
- int64 seconds_since_oldest = (now - oldest_time_).InSeconds();
+ int64_t seconds_since_oldest = (now - oldest_time_).InSeconds();
DCHECK(seconds_since_oldest >= 0);
- int64 delta_buckets = seconds_since_oldest / bucket_time_.InSeconds();
+ int64_t delta_buckets = seconds_since_oldest / bucket_time_.InSeconds();
DCHECK(delta_buckets >= 0);
size_t index_offset = static_cast<size_t>(delta_buckets);
DCHECK(index_offset <= history_.size());
@@ -56,17 +56,17 @@ void RateEstimator::Increment(uint32 count, TimeTicks now) {
history_[current_index] += count;
}
-uint64 RateEstimator::GetCountPerSecond() const {
+uint64_t RateEstimator::GetCountPerSecond() const {
return GetCountPerSecond(TimeTicks::Now());
}
-uint64 RateEstimator::GetCountPerSecond(TimeTicks now) const {
+uint64_t RateEstimator::GetCountPerSecond(TimeTicks now) const {
const_cast<RateEstimator*>(this)->ClearOldBuckets(now);
// TODO(cbentzel): Support fractional seconds for active bucket?
// We explicitly don't check for overflow here. If it happens, unsigned
// arithmetic at least guarantees behavior by wrapping around. The estimate
// will be off, but the code will still be valid.
- uint64 total_count = 0;
+ uint64_t total_count = 0;
for (size_t i = 0; i < bucket_count_; ++i) {
size_t index = (oldest_index_ + i) % history_.size();
total_count += history_[index];
@@ -75,9 +75,9 @@ uint64 RateEstimator::GetCountPerSecond(TimeTicks now) const {
}
void RateEstimator::ClearOldBuckets(TimeTicks now) {
- int64 seconds_since_oldest = (now - oldest_time_).InSeconds();
+ int64_t seconds_since_oldest = (now - oldest_time_).InSeconds();
- int64 delta_buckets = seconds_since_oldest / bucket_time_.InSeconds();
+ int64_t delta_buckets = seconds_since_oldest / bucket_time_.InSeconds();
// It's possible (although unlikely) for there to be rollover with TimeTicks.
// If that's the case, just reset the history.
diff --git a/content/browser/download/rate_estimator.h b/content/browser/download/rate_estimator.h
index 111e8eb..09e5558 100644
--- a/content/browser/download/rate_estimator.h
+++ b/content/browser/download/rate_estimator.h
@@ -5,10 +5,12 @@
#ifndef CONTENT_BROWSER_DOWNLOAD_RATE_ESTIMATOR_H_
#define CONTENT_BROWSER_DOWNLOAD_RATE_ESTIMATOR_H_
+#include <stddef.h>
+#include <stdint.h>
+
#include <string>
#include <vector>
-#include "base/basictypes.h"
#include "base/time/time.h"
#include "content/common/content_export.h"
@@ -28,19 +30,19 @@ class CONTENT_EXPORT RateEstimator {
// Increment the counter by |count|. The first variant uses the current time,
// the second variant provides the time that |count| is observed.
- void Increment(uint32 count);
- void Increment(uint32 count, base::TimeTicks now);
+ void Increment(uint32_t count);
+ void Increment(uint32_t count, base::TimeTicks now);
// Get a rate estimate, in terms of counts/second. The first variant uses the
// current time, the second variant provides the time.
- uint64 GetCountPerSecond() const;
- uint64 GetCountPerSecond(base::TimeTicks now) const;
+ uint64_t GetCountPerSecond() const;
+ uint64_t GetCountPerSecond(base::TimeTicks now) const;
private:
void ClearOldBuckets(base::TimeTicks now);
void ResetBuckets(base::TimeTicks now);
- std::vector<uint32> history_;
+ std::vector<uint32_t> history_;
base::TimeDelta bucket_time_;
size_t oldest_index_;
size_t bucket_count_;
diff --git a/content/browser/download/save_file.cc b/content/browser/download/save_file.cc
index a5c7488..5085e47 100644
--- a/content/browser/download/save_file.cc
+++ b/content/browser/download/save_file.cc
@@ -72,7 +72,7 @@ bool SaveFile::InProgress() const {
return file_.in_progress();
}
-int64 SaveFile::BytesSoFar() const {
+int64_t SaveFile::BytesSoFar() const {
return file_.bytes_so_far();
}
diff --git a/content/browser/download/save_file.h b/content/browser/download/save_file.h
index bfce4d9..84dd3cb 100644
--- a/content/browser/download/save_file.h
+++ b/content/browser/download/save_file.h
@@ -5,8 +5,11 @@
#ifndef CONTENT_BROWSER_DOWNLOAD_SAVE_FILE_H_
#define CONTENT_BROWSER_DOWNLOAD_SAVE_FILE_H_
-#include "base/basictypes.h"
+#include <stddef.h>
+#include <stdint.h>
+
#include "base/files/file_path.h"
+#include "base/macros.h"
#include "base/memory/scoped_ptr.h"
#include "content/browser/download/base_file.h"
#include "content/browser/download/save_types.h"
@@ -34,7 +37,7 @@ class SaveFile {
void AnnotateWithSourceInformation();
base::FilePath FullPath() const;
bool InProgress() const;
- int64 BytesSoFar() const;
+ int64_t BytesSoFar() const;
bool GetHash(std::string* hash);
std::string DebugString() const;
diff --git a/content/browser/download/save_file_manager.cc b/content/browser/download/save_file_manager.cc
index 2688429..92ff5dc 100644
--- a/content/browser/download/save_file_manager.cc
+++ b/content/browser/download/save_file_manager.cc
@@ -240,7 +240,7 @@ void SaveFileManager::OnStartSave(const SaveFileCreateInfo& info) {
}
void SaveFileManager::OnUpdateSaveProgress(int save_item_id,
- int64 bytes_so_far,
+ int64_t bytes_so_far,
bool write_success) {
DCHECK_CURRENTLY_ON(BrowserThread::UI);
SavePackage* package = LookupPackage(save_item_id);
@@ -251,7 +251,7 @@ void SaveFileManager::OnUpdateSaveProgress(int save_item_id,
}
void SaveFileManager::OnSaveFinished(int save_item_id,
- int64 bytes_so_far,
+ int64_t bytes_so_far,
bool is_success) {
DCHECK_CURRENTLY_ON(BrowserThread::UI);
SavePackage* package = LookupPackage(save_item_id);
diff --git a/content/browser/download/save_file_manager.h b/content/browser/download/save_file_manager.h
index 906acf4..54882e7 100644
--- a/content/browser/download/save_file_manager.h
+++ b/content/browser/download/save_file_manager.h
@@ -57,10 +57,12 @@
#ifndef CONTENT_BROWSER_DOWNLOAD_SAVE_FILE_MANAGER_H_
#define CONTENT_BROWSER_DOWNLOAD_SAVE_FILE_MANAGER_H_
+#include <stdint.h>
+
#include <string>
-#include "base/basictypes.h"
#include "base/containers/hash_tables.h"
+#include "base/macros.h"
#include "base/memory/ref_counted.h"
#include "content/browser/download/save_types.h"
#include "content/common/content_export.h"
@@ -165,11 +167,11 @@ class SaveFileManager : public base::RefCountedThreadSafe<SaveFileManager> {
// Update the SavePackage with the current state of a started saving job.
// If the SavePackage for this saving job is gone, cancel the request.
void OnUpdateSaveProgress(int save_item_id,
- int64 bytes_so_far,
+ int64_t bytes_so_far,
bool write_success);
// Update the SavePackage with the finish state, and remove the request
// tracking entries.
- void OnSaveFinished(int save_item_id, int64 bytes_so_far, bool is_success);
+ void OnSaveFinished(int save_item_id, int64_t bytes_so_far, bool is_success);
// Notifies SavePackage that the whole page saving job is finished.
void OnFinishSavePageJob(int render_process_id,
int render_frame_routing_id,
diff --git a/content/browser/download/save_file_resource_handler.h b/content/browser/download/save_file_resource_handler.h
index 6912ac4..2c7f4e6 100644
--- a/content/browser/download/save_file_resource_handler.h
+++ b/content/browser/download/save_file_resource_handler.h
@@ -5,8 +5,11 @@
#ifndef CONTENT_BROWSER_DOWNLOAD_SAVE_FILE_RESOURCE_HANDLER_H_
#define CONTENT_BROWSER_DOWNLOAD_SAVE_FILE_RESOURCE_HANDLER_H_
+#include <stdint.h>
+
#include <string>
+#include "base/macros.h"
#include "base/memory/ref_counted.h"
#include "content/browser/loader/resource_handler.h"
#include "url/gurl.h"
@@ -81,7 +84,7 @@ class SaveFileResourceHandler : public ResourceHandler {
std::string content_disposition_;
GURL url_;
GURL final_url_;
- int64 content_length_;
+ int64_t content_length_;
SaveFileManager* save_manager_;
static const int kReadBufSize = 32768; // bytes
diff --git a/content/browser/download/save_item.cc b/content/browser/download/save_item.cc
index a8aeefd..604d659 100644
--- a/content/browser/download/save_item.cc
+++ b/content/browser/download/save_item.cc
@@ -52,7 +52,7 @@ void SaveItem::Start() {
// If we've received more data than we were expecting (bad server info?),
// revert to 'unknown size mode'.
-void SaveItem::UpdateSize(int64 bytes_so_far) {
+void SaveItem::UpdateSize(int64_t bytes_so_far) {
received_bytes_ = bytes_so_far;
if (received_bytes_ >= total_bytes_)
total_bytes_ = 0;
@@ -61,7 +61,7 @@ void SaveItem::UpdateSize(int64 bytes_so_far) {
// Updates from the file thread may have been posted while this saving job
// was being canceled in the UI thread, so we'll accept them unless we're
// complete.
-void SaveItem::Update(int64 bytes_so_far) {
+void SaveItem::Update(int64_t bytes_so_far) {
if (state_ != IN_PROGRESS) {
NOTREACHED();
return;
@@ -86,7 +86,7 @@ void SaveItem::Cancel() {
}
// Set finish state for a save item
-void SaveItem::Finish(int64 size, bool is_success) {
+void SaveItem::Finish(int64_t size, bool is_success) {
DCHECK(has_final_name() || !is_success_);
state_ = COMPLETE;
is_success_ = is_success;
@@ -122,7 +122,7 @@ void SaveItem::Rename(const base::FilePath& full_path) {
has_final_name_ = true;
}
-void SaveItem::SetTotalBytes(int64 total_bytes) {
+void SaveItem::SetTotalBytes(int64_t total_bytes) {
DCHECK_EQ(0, total_bytes_);
total_bytes_ = total_bytes;
}
diff --git a/content/browser/download/save_item.h b/content/browser/download/save_item.h
index 468b1d2..842cd03 100644
--- a/content/browser/download/save_item.h
+++ b/content/browser/download/save_item.h
@@ -5,8 +5,10 @@
#ifndef CONTENT_BROWSER_DOWNLOAD_SAVE_ITEM_H_
#define CONTENT_BROWSER_DOWNLOAD_SAVE_ITEM_H_
-#include "base/basictypes.h"
+#include <stdint.h>
+
#include "base/files/file_path.h"
+#include "base/macros.h"
#include "content/browser/download/save_types.h"
#include "content/public/common/referrer.h"
#include "url/gurl.h"
@@ -35,13 +37,13 @@ class SaveItem {
void Start();
// Received a new chunk of data.
- void Update(int64 bytes_so_far);
+ void Update(int64_t bytes_so_far);
// Cancel saving item.
void Cancel();
// Saving operation completed.
- void Finish(int64 size, bool is_success);
+ void Finish(int64_t size, bool is_success);
// Rough percent complete, -1 means we don't know (since we didn't receive a
// total size).
@@ -50,7 +52,7 @@ class SaveItem {
// Update path for SaveItem, the actual file is renamed on the file thread.
void Rename(const base::FilePath& full_path);
- void SetTotalBytes(int64 total_bytes);
+ void SetTotalBytes(int64_t total_bytes);
// Accessors.
int id() const { return save_item_id_; }
@@ -59,8 +61,8 @@ class SaveItem {
const base::FilePath& file_name() const { return file_name_; }
const GURL& url() const { return url_; }
const Referrer& referrer() const { return referrer_; }
- int64 total_bytes() const { return total_bytes_; }
- int64 received_bytes() const { return received_bytes_; }
+ int64_t total_bytes() const { return total_bytes_; }
+ int64_t received_bytes() const { return received_bytes_; }
bool has_final_name() const { return has_final_name_; }
bool success() const { return is_success_; }
SaveFileCreateInfo::SaveFileSource save_source() const {
@@ -70,7 +72,7 @@ class SaveItem {
private:
// Internal helper for maintaining consistent received and total sizes.
- void UpdateSize(int64 size);
+ void UpdateSize(int64_t size);
// Unique identifier for this SaveItem instance.
const int save_item_id_;
@@ -86,10 +88,10 @@ class SaveItem {
Referrer referrer_;
// Total bytes expected.
- int64 total_bytes_;
+ int64_t total_bytes_;
// Current received bytes.
- int64 received_bytes_;
+ int64_t received_bytes_;
// The current state of this save item.
SaveState state_;
diff --git a/content/browser/download/save_package.cc b/content/browser/download/save_package.cc
index c87425a..b55220d 100644
--- a/content/browser/download/save_package.cc
+++ b/content/browser/download/save_package.cc
@@ -11,6 +11,7 @@
#include "base/files/file_util.h"
#include "base/i18n/file_util_icu.h"
#include "base/logging.h"
+#include "base/macros.h"
#include "base/message_loop/message_loop.h"
#include "base/stl_util.h"
#include "base/strings/string_piece.h"
@@ -18,6 +19,7 @@
#include "base/strings/sys_string_conversions.h"
#include "base/strings/utf_string_conversions.h"
#include "base/threading/thread.h"
+#include "build/build_config.h"
#include "components/url_formatter/url_formatter.h"
#include "content/browser/download/download_item_impl.h"
#include "content/browser/download/download_manager_impl.h"
@@ -64,21 +66,21 @@ const char kDefaultSaveName[] = "saved_resource";
// Maximum number of file ordinal number. I think it's big enough for resolving
// name-conflict files which has same base file name.
-const int32 kMaxFileOrdinalNumber = 9999;
+const int32_t kMaxFileOrdinalNumber = 9999;
// Maximum length for file path. Since Windows have MAX_PATH limitation for
// file path, we need to make sure length of file path of every saved file
// is less than MAX_PATH
#if defined(OS_WIN)
-const uint32 kMaxFilePathLength = MAX_PATH - 1;
+const uint32_t kMaxFilePathLength = MAX_PATH - 1;
#elif defined(OS_POSIX)
-const uint32 kMaxFilePathLength = PATH_MAX - 1;
+const uint32_t kMaxFilePathLength = PATH_MAX - 1;
#endif
// Maximum length for file ordinal number part. Since we only support the
// maximum 9999 for ordinal number, which means maximum file ordinal number part
// should be "(9998)", so the value is 6.
-const uint32 kMaxFileOrdinalNumberPartLength = 6;
+const uint32_t kMaxFileOrdinalNumberPartLength = 6;
// Strip current ordinal number, if any. Should only be used on pure
// file names, i.e. those stripped of their extensions.
@@ -361,7 +363,7 @@ void SavePackage::InitWithDownloadItem(
}
}
-void SavePackage::OnMHTMLGenerated(int64 size) {
+void SavePackage::OnMHTMLGenerated(int64_t size) {
if (size <= 0) {
Cancel(false);
return;
@@ -394,12 +396,12 @@ void SavePackage::OnMHTMLGenerated(int64 size) {
// On POSIX, the length of |pure_file_name| + |file_name_ext| is further
// restricted by NAME_MAX. The maximum allowed path looks like:
// '/path/to/save_dir' + '/' + NAME_MAX.
-uint32 SavePackage::GetMaxPathLengthForDirectory(
+uint32_t SavePackage::GetMaxPathLengthForDirectory(
const base::FilePath& base_dir) {
#if defined(OS_POSIX)
- return std::min(kMaxFilePathLength,
- static_cast<uint32>(base_dir.value().length()) +
- NAME_MAX + 1);
+ return std::min(
+ kMaxFilePathLength,
+ static_cast<uint32_t>(base_dir.value().length()) + NAME_MAX + 1);
#else
return kMaxFilePathLength;
#endif
@@ -425,7 +427,7 @@ uint32 SavePackage::GetMaxPathLengthForDirectory(
bool SavePackage::GetSafePureFileName(
const base::FilePath& dir_path,
const base::FilePath::StringType& file_name_ext,
- uint32 max_file_path_len,
+ uint32_t max_file_path_len,
base::FilePath::StringType* pure_file_name) {
DCHECK(!pure_file_name->empty());
int available_length = static_cast<int>(max_file_path_len -
@@ -476,7 +478,7 @@ bool SavePackage::GenerateFileName(const std::string& disposition,
}
// Need to make sure the suggested file name is not too long.
- uint32 max_path = GetMaxPathLengthForDirectory(saved_main_directory_path_);
+ uint32_t max_path = GetMaxPathLengthForDirectory(saved_main_directory_path_);
// Get safe pure file name.
if (!GetSafePureFileName(saved_main_directory_path_, file_name_ext,
@@ -503,7 +505,7 @@ bool SavePackage::GenerateFileName(const std::string& disposition,
return false;
// Prepare the new ordinal number.
- uint32 ordinal_number;
+ uint32_t ordinal_number;
FileNameCountMap::iterator it = file_name_count_map_.find(base_file_name);
if (it == file_name_count_map_.end()) {
// First base-name-conflict resolving, use 1 as initial ordinal number.
@@ -625,7 +627,7 @@ void SavePackage::StartSave(const SaveFileCreateInfo* info) {
}
}
-SaveItem* SavePackage::LookupSaveItemInProcess(int32 save_item_id) {
+SaveItem* SavePackage::LookupSaveItemInProcess(int32_t save_item_id) {
auto it = in_progress_items_.find(save_item_id);
if (it != in_progress_items_.end()) {
SaveItem* save_item = it->second;
@@ -655,8 +657,8 @@ void SavePackage::PutInProgressItemToSavedMap(SaveItem* save_item) {
}
// Called for updating saving state.
-bool SavePackage::UpdateSaveProgress(int32 save_item_id,
- int64 size,
+bool SavePackage::UpdateSaveProgress(int32_t save_item_id,
+ int64_t size,
bool write_success) {
// Because we might have canceled this saving job before,
// so we might not find corresponding SaveItem.
@@ -794,8 +796,8 @@ void SavePackage::Finish() {
}
// Called for updating end state.
-void SavePackage::SaveFinished(int32 save_item_id,
- int64 size,
+void SavePackage::SaveFinished(int32_t save_item_id,
+ int64_t size,
bool is_success) {
// Because we might have canceled this saving job before,
// so we might not find corresponding SaveItem. Just ignore it.
@@ -884,9 +886,9 @@ int SavePackage::PercentComplete() {
return completed_count() / all_save_items_count_;
}
-int64 SavePackage::CurrentSpeed() const {
+int64_t SavePackage::CurrentSpeed() const {
base::TimeDelta diff = base::TimeTicks::Now() - start_tick_;
- int64 diff_ms = diff.InMilliseconds();
+ int64_t diff_ms = diff.InMilliseconds();
return diff_ms == 0 ? 0 : completed_count() * 1000 / diff_ms;
}
@@ -1353,7 +1355,7 @@ const base::FilePath::CharType* SavePackage::ExtensionForMimeType(
#elif defined(OS_WIN)
base::FilePath::StringType mime_type(base::UTF8ToWide(contents_mime_type));
#endif // OS_WIN
- for (uint32 i = 0; i < arraysize(extensions); ++i) {
+ for (uint32_t i = 0; i < arraysize(extensions); ++i) {
if (mime_type == extensions[i].mime_type)
return extensions[i].suggested_extension;
}
@@ -1412,7 +1414,7 @@ void SavePackage::CreateDirectoryOnFileThread(
base::FilePath::StringType file_name_ext = suggested_filename.Extension();
// Need to make sure the suggested file name is not too long.
- uint32 max_path = GetMaxPathLengthForDirectory(save_dir);
+ uint32_t max_path = GetMaxPathLengthForDirectory(save_dir);
if (GetSafePureFileName(save_dir, file_name_ext, max_path, &pure_file_name)) {
save_dir = save_dir.Append(pure_file_name + file_name_ext);
diff --git a/content/browser/download/save_package.h b/content/browser/download/save_package.h
index 19ba225..7344af4 100644
--- a/content/browser/download/save_package.h
+++ b/content/browser/download/save_package.h
@@ -5,16 +5,19 @@
#ifndef CONTENT_BROWSER_DOWNLOAD_SAVE_PACKAGE_H_
#define CONTENT_BROWSER_DOWNLOAD_SAVE_PACKAGE_H_
+#include <stddef.h>
+#include <stdint.h>
+
#include <deque>
#include <map>
#include <set>
#include <string>
#include <vector>
-#include "base/basictypes.h"
#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/weak_ptr.h"
#include "base/time/time.h"
@@ -107,8 +110,10 @@ class CONTENT_EXPORT SavePackage
// Notifications sent from the file thread to the UI thread.
void StartSave(const SaveFileCreateInfo* info);
- bool UpdateSaveProgress(int32 save_item_id, int64 size, bool write_success);
- void SaveFinished(int32 save_item_id, int64 size, bool is_success);
+ bool UpdateSaveProgress(int32_t save_item_id,
+ int64_t size,
+ bool write_success);
+ void SaveFinished(int32_t save_item_id, int64_t size, bool is_success);
void SaveCanceled(SaveItem* save_item);
// Rough percent complete, -1 means we don't know (since we didn't receive a
@@ -130,7 +135,7 @@ class CONTENT_EXPORT SavePackage
DownloadItemImpl* item);
// Callback for WebContents::GenerateMHTML().
- void OnMHTMLGenerated(int64 size);
+ void OnMHTMLGenerated(int64_t size);
// For testing only.
SavePackage(WebContents* web_contents,
@@ -164,12 +169,12 @@ class CONTENT_EXPORT SavePackage
// This is needed on POSIX, which restrict the length of file names in
// addition to the restriction on the length of path names.
// |base_dir| is assumed to be a directory name with no trailing slash.
- static uint32 GetMaxPathLengthForDirectory(const base::FilePath& base_dir);
+ static uint32_t GetMaxPathLengthForDirectory(const base::FilePath& base_dir);
static bool GetSafePureFileName(
const base::FilePath& dir_path,
const base::FilePath::StringType& file_name_ext,
- uint32 max_file_path_len,
+ uint32_t max_file_path_len,
base::FilePath::StringType* pure_file_name);
// Create a file name based on the response from the server.
@@ -251,7 +256,7 @@ class CONTENT_EXPORT SavePackage
bool end_of_data);
// Look up SaveItem by save item id from in progress map.
- SaveItem* LookupSaveItemInProcess(int32 save_item_id);
+ SaveItem* LookupSaveItemInProcess(int32_t save_item_id);
// Remove SaveItem from in progress map and put it to saved map.
void PutInProgressItemToSavedMap(SaveItem* save_item);
@@ -295,7 +300,7 @@ class CONTENT_EXPORT SavePackage
// presented by the DownloadItem to the UI as bytes per second, which is
// not correct but matches the way the total and received number of files is
// presented as the total and received bytes.
- int64 CurrentSpeed() const;
+ int64_t CurrentSpeed() const;
// Helper function for preparing suggested name for the SaveAs Dialog. The
// suggested name is determined by the web document's title.
@@ -345,7 +350,7 @@ class CONTENT_EXPORT SavePackage
// Number of frames that we still need to get a response from.
int number_of_frames_pending_response_;
- typedef base::hash_map<int32, SaveItem*> SavedItemMap;
+ typedef base::hash_map<int32_t, SaveItem*> SavedItemMap;
// saved_success_items_ is map of all saving job which are successfully saved.
SavedItemMap saved_success_items_;
@@ -392,7 +397,7 @@ class CONTENT_EXPORT SavePackage
// This set is used to eliminate duplicated file names in saving directory.
FileNameSet file_name_set_;
- typedef base::hash_map<base::FilePath::StringType, uint32> FileNameCountMap;
+ typedef base::hash_map<base::FilePath::StringType, uint32_t> FileNameCountMap;
// This map is used to track serial number for specified filename.
FileNameCountMap file_name_count_map_;
diff --git a/content/browser/download/save_package_unittest.cc b/content/browser/download/save_package_unittest.cc
index 087c371..fc89b6d 100644
--- a/content/browser/download/save_package_unittest.cc
+++ b/content/browser/download/save_package_unittest.cc
@@ -2,12 +2,17 @@
// 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/files/file_path.h"
#include "base/files/scoped_temp_dir.h"
+#include "base/macros.h"
#include "base/strings/string_util.h"
#include "base/strings/utf_string_conversions.h"
+#include "build/build_config.h"
#include "content/browser/download/save_package.h"
#include "content/public/common/url_constants.h"
#include "content/test/test_render_view_host.h"
@@ -30,11 +35,11 @@ namespace {
// This constant copied from save_package.cc.
#if defined(OS_WIN)
-const uint32 kMaxFilePathLength = MAX_PATH - 1;
-const uint32 kMaxFileNameLength = MAX_PATH - 1;
+const uint32_t kMaxFilePathLength = MAX_PATH - 1;
+const uint32_t kMaxFileNameLength = MAX_PATH - 1;
#elif defined(OS_POSIX)
-const uint32 kMaxFilePathLength = PATH_MAX - 1;
-const uint32 kMaxFileNameLength = NAME_MAX;
+const uint32_t kMaxFilePathLength = PATH_MAX - 1;
+const uint32_t kMaxFileNameLength = NAME_MAX;
#endif
// Used to make long filenames.
@@ -248,7 +253,7 @@ TEST_F(SavePackageTest, MAYBE_TestLongSafePureFilename) {
#endif
// Test that the filename + extension doesn't exceed kMaxFileNameLength
- uint32 max_path = SavePackage::GetMaxPathLengthForDirectory(save_dir);
+ uint32_t max_path = SavePackage::GetMaxPathLengthForDirectory(save_dir);
ASSERT_TRUE(SavePackage::GetSafePureFileName(save_dir, ext, max_path,
&filename));
EXPECT_TRUE(filename.length() <= kMaxFileNameLength-ext.length());
@@ -325,7 +330,7 @@ TEST_F(SavePackageTest, MAYBE_TestEnsureMimeExtension) {
{ FPL("filename.abc"), FPL("filename.abc"), "unknown/unknown" },
{ FPL("filename"), FPL("filename"), "unknown/unknown" },
};
- for (uint32 i = 0; i < arraysize(kExtensionTests); ++i) {
+ for (uint32_t i = 0; i < arraysize(kExtensionTests); ++i) {
base::FilePath original = base::FilePath(kExtensionTests[i].page_title);
base::FilePath expected = base::FilePath(kExtensionTests[i].expected_name);
std::string mime_type(kExtensionTests[i].contents_mime_type);
diff --git a/content/browser/download/save_types.cc b/content/browser/download/save_types.cc
index d9cc0fc..a2029ba 100644
--- a/content/browser/download/save_types.cc
+++ b/content/browser/download/save_types.cc
@@ -33,7 +33,7 @@ SaveFileCreateInfo::SaveFileCreateInfo(const GURL& url,
int render_frame_routing_id,
int request_id,
const std::string& content_disposition,
- int64 total_bytes)
+ int64_t total_bytes)
: url(url),
final_url(final_url),
save_item_id(save_item_id),
diff --git a/content/browser/download/save_types.h b/content/browser/download/save_types.h
index c7da3bd..803196f 100644
--- a/content/browser/download/save_types.h
+++ b/content/browser/download/save_types.h
@@ -5,12 +5,13 @@
#ifndef CONTENT_BROWSER_DOWNLOAD_SAVE_TYPES_H_
#define CONTENT_BROWSER_DOWNLOAD_SAVE_TYPES_H_
+#include <stdint.h>
+
#include <map>
#include <string>
#include <utility>
#include <vector>
-#include "base/basictypes.h"
#include "base/files/file_path.h"
#include "url/gurl.h"
@@ -53,7 +54,7 @@ struct SaveFileCreateInfo {
int render_frame_routing_id,
int request_id,
const std::string& content_disposition,
- int64 total_bytes);
+ int64_t total_bytes);
~SaveFileCreateInfo();
@@ -76,7 +77,7 @@ struct SaveFileCreateInfo {
// Disposition info from HTTP response.
std::string content_disposition;
// Total bytes of saved file.
- int64 total_bytes;
+ int64_t total_bytes;
// Source type of saved file.
SaveFileSource save_source;
};
diff --git a/content/browser/download/url_downloader.cc b/content/browser/download/url_downloader.cc
index 1b05228..b178a1d 100644
--- a/content/browser/download/url_downloader.cc
+++ b/content/browser/download/url_downloader.cc
@@ -77,7 +77,7 @@ scoped_ptr<UrlDownloader> UrlDownloader::BeginDownload(
const Referrer& referrer,
bool prefer_cache,
scoped_ptr<DownloadSaveInfo> save_info,
- uint32 download_id,
+ uint32_t download_id,
const DownloadUrlParameters::OnStartedCallback& started_callback) {
if (!referrer.url.is_valid())
request->SetReferrer(std::string());
@@ -116,7 +116,7 @@ UrlDownloader::UrlDownloader(
scoped_ptr<net::URLRequest> request,
base::WeakPtr<DownloadManagerImpl> manager,
scoped_ptr<DownloadSaveInfo> save_info,
- uint32 download_id,
+ uint32_t download_id,
const DownloadUrlParameters::OnStartedCallback& on_started_callback)
: request_(std::move(request)),
manager_(manager),
diff --git a/content/browser/download/url_downloader.h b/content/browser/download/url_downloader.h
index d9bc773..787feb4 100644
--- a/content/browser/download/url_downloader.h
+++ b/content/browser/download/url_downloader.h
@@ -5,6 +5,8 @@
#ifndef CONTENT_BROWSER_DOWNLOAD_URL_DOWNLOADER_H_
#define CONTENT_BROWSER_DOWNLOAD_URL_DOWNLOADER_H_
+#include <stdint.h>
+
#include "base/memory/scoped_ptr.h"
#include "base/memory/weak_ptr.h"
#include "content/browser/download/download_request_core.h"
@@ -23,7 +25,7 @@ class UrlDownloader : public net::URLRequest::Delegate {
scoped_ptr<net::URLRequest> request,
base::WeakPtr<DownloadManagerImpl> manager,
scoped_ptr<DownloadSaveInfo> save_info,
- uint32 download_id,
+ uint32_t download_id,
const DownloadUrlParameters::OnStartedCallback& on_started_callback);
~UrlDownloader() override;
@@ -33,7 +35,7 @@ class UrlDownloader : public net::URLRequest::Delegate {
const Referrer& referrer,
bool prefer_cache,
scoped_ptr<DownloadSaveInfo> save_info,
- uint32 download_id,
+ uint32_t download_id,
const DownloadUrlParameters::OnStartedCallback& started_callback);
// URLRequest::Delegate:
@@ -60,7 +62,7 @@ class UrlDownloader : public net::URLRequest::Delegate {
scoped_ptr<net::URLRequest> request_;
base::WeakPtr<DownloadManagerImpl> manager_;
- uint32 download_id_;
+ uint32_t download_id_;
DownloadUrlParameters::OnStartedCallback on_started_callback_;
DownloadRequestCore handler_;
diff --git a/content/browser/file_descriptor_info_impl.h b/content/browser/file_descriptor_info_impl.h
index 0e25abf..2195eb9 100644
--- a/content/browser/file_descriptor_info_impl.h
+++ b/content/browser/file_descriptor_info_impl.h
@@ -5,6 +5,8 @@
#ifndef CONTENT_BROWSER_FILE_DESCRIPTOR_INFO_IMPL_H_
#define CONTENT_BROWSER_FILE_DESCRIPTOR_INFO_IMPL_H_
+#include <stddef.h>
+
#include <vector>
#include "base/memory/scoped_ptr.h"
diff --git a/content/browser/file_descriptor_info_impl_unittest.cc b/content/browser/file_descriptor_info_impl_unittest.cc
index ccc061a..c92200f 100644
--- a/content/browser/file_descriptor_info_impl_unittest.cc
+++ b/content/browser/file_descriptor_info_impl_unittest.cc
@@ -8,7 +8,6 @@
#include <unistd.h>
#include <utility>
-#include "base/basictypes.h"
#include "base/posix/eintr_wrapper.h"
#include "testing/gtest/include/gtest/gtest.h"
diff --git a/content/browser/fileapi/blob_reader_unittest.cc b/content/browser/fileapi/blob_reader_unittest.cc
index a7e095c..6a550ad 100644
--- a/content/browser/fileapi/blob_reader_unittest.cc
+++ b/content/browser/fileapi/blob_reader_unittest.cc
@@ -4,11 +4,15 @@
#include "storage/browser/blob/blob_reader.h"
+#include <stddef.h>
+#include <stdint.h>
+
#include "base/bind.h"
#include "base/bind_helpers.h"
#include "base/callback.h"
#include "base/files/file_path.h"
#include "base/location.h"
+#include "base/macros.h"
#include "base/memory/scoped_ptr.h"
#include "base/message_loop/message_loop.h"
#include "base/run_loop.h"
@@ -80,7 +84,7 @@ class DelayedReadEntry : public disk_cache::Entry {
return entry_->GetLastModified();
}
- int32 GetDataSize(int index) const override {
+ int32_t GetDataSize(int index) const override {
return entry_->GetDataSize(index);
}
@@ -106,23 +110,23 @@ class DelayedReadEntry : public disk_cache::Entry {
return entry_->WriteData(index, offset, buf, buf_len, callback, truncate);
}
- int ReadSparseData(int64 offset,
+ int ReadSparseData(int64_t offset,
IOBuffer* buf,
int buf_len,
const CompletionCallback& callback) override {
return entry_->ReadSparseData(offset, buf, buf_len, callback);
}
- int WriteSparseData(int64 offset,
+ int WriteSparseData(int64_t offset,
IOBuffer* buf,
int buf_len,
const CompletionCallback& callback) override {
return entry_->WriteSparseData(offset, buf, buf_len, callback);
}
- int GetAvailableRange(int64 offset,
+ int GetAvailableRange(int64_t offset,
int len,
- int64* start,
+ int64_t* start,
const CompletionCallback& callback) override {
return entry_->GetAvailableRange(offset, len, start, callback);
}
@@ -225,7 +229,8 @@ class FakeFileStreamReader : public FileStreamReader {
return net::ERR_IO_PENDING;
}
- int64 GetLength(const net::Int64CompletionCallback& size_callback) override {
+ int64_t GetLength(
+ const net::Int64CompletionCallback& size_callback) override {
// When async_task_runner_ is not set, return synchronously.
if (!async_task_runner_.get()) {
if (net_error_ == net::OK) {
@@ -828,7 +833,7 @@ TEST_F(BlobReaderTest, DiskCacheRange) {
TEST_F(BlobReaderTest, FileSomeAsyncSegmentedOffsetsUnknownSizes) {
// This tests includes:
- // * Unknown file sizes (item length of uint64::max) for every other item.
+ // * Unknown file sizes (item length of uint64_t::max) for every other item.
// * Offsets for every 3rd file item.
// * Non-async reader for every 4th file item.
BlobDataBuilder b("uuid");
diff --git a/content/browser/fileapi/blob_storage_context_unittest.cc b/content/browser/fileapi/blob_storage_context_unittest.cc
index 5ae280e..a2216ca 100644
--- a/content/browser/fileapi/blob_storage_context_unittest.cc
+++ b/content/browser/fileapi/blob_storage_context_unittest.cc
@@ -4,6 +4,8 @@
#include "storage/browser/blob/blob_storage_context.h"
+#include <stdint.h>
+
#include <limits>
#include <string>
diff --git a/content/browser/fileapi/blob_storage_host.h b/content/browser/fileapi/blob_storage_host.h
index dc277ae..ecfbc56 100644
--- a/content/browser/fileapi/blob_storage_host.h
+++ b/content/browser/fileapi/blob_storage_host.h
@@ -10,6 +10,7 @@
#include <string>
#include "base/compiler_specific.h"
+#include "base/macros.h"
#include "base/memory/weak_ptr.h"
#include "content/common/content_export.h"
#include "storage/common/data_element.h"
diff --git a/content/browser/fileapi/browser_file_system_helper.cc b/content/browser/fileapi/browser_file_system_helper.cc
index 4ab06e6..ee8ffb2 100644
--- a/content/browser/fileapi/browser_file_system_helper.cc
+++ b/content/browser/fileapi/browser_file_system_helper.cc
@@ -4,6 +4,8 @@
#include "content/browser/fileapi/browser_file_system_helper.h"
+#include <stddef.h>
+
#include <string>
#include <vector>
diff --git a/content/browser/fileapi/chrome_blob_storage_context.h b/content/browser/fileapi/chrome_blob_storage_context.h
index 0c56545..8dd1eec 100644
--- a/content/browser/fileapi/chrome_blob_storage_context.h
+++ b/content/browser/fileapi/chrome_blob_storage_context.h
@@ -5,6 +5,9 @@
#ifndef CONTENT_BROWSER_FILEAPI_CHROME_BLOB_STORAGE_CONTEXT_H_
#define CONTENT_BROWSER_FILEAPI_CHROME_BLOB_STORAGE_CONTEXT_H_
+#include <stddef.h>
+#include <stdint.h>
+
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
#include "base/sequenced_task_runner_helpers.h"
diff --git a/content/browser/fileapi/copy_or_move_file_validator_unittest.cc b/content/browser/fileapi/copy_or_move_file_validator_unittest.cc
index c07db9d..c099f29 100644
--- a/content/browser/fileapi/copy_or_move_file_validator_unittest.cc
+++ b/content/browser/fileapi/copy_or_move_file_validator_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 "base/basictypes.h"
+#include <stddef.h>
+#include <stdint.h>
+
#include "base/bind.h"
#include "base/files/file_path.h"
#include "base/files/scoped_temp_dir.h"
#include "base/location.h"
+#include "base/macros.h"
#include "base/run_loop.h"
#include "base/single_thread_task_runner.h"
#include "base/thread_task_runner_handle.h"
@@ -161,7 +164,7 @@ class CopyOrMoveFileValidatorTestHelper {
url);
}
- bool FileExists(const FileSystemURL& url, int64 expected_size) {
+ bool FileExists(const FileSystemURL& url, int64_t expected_size) {
return AsyncFileTestHelper::FileExists(
file_system_context_.get(), url, expected_size);
}
diff --git a/content/browser/fileapi/copy_or_move_operation_delegate_unittest.cc b/content/browser/fileapi/copy_or_move_operation_delegate_unittest.cc
index bbcae16..85f3c7e 100644
--- a/content/browser/fileapi/copy_or_move_operation_delegate_unittest.cc
+++ b/content/browser/fileapi/copy_or_move_operation_delegate_unittest.cc
@@ -2,14 +2,17 @@
// 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 <map>
#include <queue>
-#include "base/basictypes.h"
#include "base/bind.h"
#include "base/files/file_util.h"
#include "base/files/scoped_temp_dir.h"
#include "base/location.h"
+#include "base/macros.h"
#include "base/run_loop.h"
#include "base/single_thread_task_runner.h"
#include "base/stl_util.h"
@@ -112,14 +115,14 @@ struct ProgressRecord {
storage::FileSystemOperation::CopyProgressType type;
FileSystemURL source_url;
FileSystemURL dest_url;
- int64 size;
+ int64_t size;
};
void RecordProgressCallback(std::vector<ProgressRecord>* records,
storage::FileSystemOperation::CopyProgressType type,
const FileSystemURL& source_url,
const FileSystemURL& dest_url,
- int64 size) {
+ int64_t size) {
ProgressRecord record;
record.type = type;
record.source_url = source_url;
@@ -128,8 +131,8 @@ void RecordProgressCallback(std::vector<ProgressRecord>* records,
records->push_back(record);
}
-void RecordFileProgressCallback(std::vector<int64>* records,
- int64 progress) {
+void RecordFileProgressCallback(std::vector<int64_t>* records,
+ int64_t progress) {
records->push_back(progress);
}
@@ -237,14 +240,14 @@ class CopyOrMoveOperationTestHelper {
1024 * 1024);
}
- int64 GetSourceUsage() {
- int64 usage = 0;
+ int64_t GetSourceUsage() {
+ int64_t usage = 0;
GetUsageAndQuota(src_type_, &usage, NULL);
return usage;
}
- int64 GetDestUsage() {
- int64 usage = 0;
+ int64_t GetDestUsage() {
+ int64_t usage = 0;
GetUsageAndQuota(dest_type_, &usage, NULL);
return usage;
}
@@ -364,7 +367,7 @@ class CopyOrMoveOperationTestHelper {
file_system_context_.get(), url, size);
}
- bool FileExists(const FileSystemURL& url, int64 expected_size) {
+ bool FileExists(const FileSystemURL& url, int64_t expected_size) {
return AsyncFileTestHelper::FileExists(
file_system_context_.get(), url, expected_size);
}
@@ -376,8 +379,8 @@ class CopyOrMoveOperationTestHelper {
private:
void GetUsageAndQuota(storage::FileSystemType type,
- int64* usage,
- int64* quota) {
+ int64_t* usage,
+ int64_t* quota) {
storage::QuotaStatusCode status = AsyncFileTestHelper::GetUsageAndQuota(
quota_manager_.get(), origin_, type, usage, quota);
ASSERT_EQ(storage::kQuotaStatusOk, status);
@@ -406,12 +409,12 @@ TEST(LocalFileSystemCopyOrMoveOperationTest, CopySingleFile) {
FileSystemURL src = helper.SourceURL("a");
FileSystemURL dest = helper.DestURL("b");
- int64 src_initial_usage = helper.GetSourceUsage();
- int64 dest_initial_usage = helper.GetDestUsage();
+ int64_t src_initial_usage = helper.GetSourceUsage();
+ int64_t dest_initial_usage = helper.GetDestUsage();
// Set up a source file.
ASSERT_EQ(base::File::FILE_OK, helper.CreateFile(src, 10));
- int64 src_increase = helper.GetSourceUsage() - src_initial_usage;
+ int64_t src_increase = helper.GetSourceUsage() - src_initial_usage;
// Copy it.
ASSERT_EQ(base::File::FILE_OK, helper.Copy(src, dest));
@@ -420,10 +423,10 @@ TEST(LocalFileSystemCopyOrMoveOperationTest, CopySingleFile) {
ASSERT_TRUE(helper.FileExists(src, 10));
ASSERT_TRUE(helper.FileExists(dest, 10));
- int64 src_new_usage = helper.GetSourceUsage();
+ int64_t src_new_usage = helper.GetSourceUsage();
ASSERT_EQ(src_initial_usage + src_increase, src_new_usage);
- int64 dest_increase = helper.GetDestUsage() - dest_initial_usage;
+ int64_t dest_increase = helper.GetDestUsage() - dest_initial_usage;
ASSERT_EQ(src_increase, dest_increase);
}
@@ -435,12 +438,12 @@ TEST(LocalFileSystemCopyOrMoveOperationTest, MoveSingleFile) {
FileSystemURL src = helper.SourceURL("a");
FileSystemURL dest = helper.DestURL("b");
- int64 src_initial_usage = helper.GetSourceUsage();
- int64 dest_initial_usage = helper.GetDestUsage();
+ int64_t src_initial_usage = helper.GetSourceUsage();
+ int64_t dest_initial_usage = helper.GetDestUsage();
// Set up a source file.
ASSERT_EQ(base::File::FILE_OK, helper.CreateFile(src, 10));
- int64 src_increase = helper.GetSourceUsage() - src_initial_usage;
+ int64_t src_increase = helper.GetSourceUsage() - src_initial_usage;
// Move it.
ASSERT_EQ(base::File::FILE_OK, helper.Move(src, dest));
@@ -449,10 +452,10 @@ TEST(LocalFileSystemCopyOrMoveOperationTest, MoveSingleFile) {
ASSERT_FALSE(helper.FileExists(src, AsyncFileTestHelper::kDontCheckSize));
ASSERT_TRUE(helper.FileExists(dest, 10));
- int64 src_new_usage = helper.GetSourceUsage();
+ int64_t src_new_usage = helper.GetSourceUsage();
ASSERT_EQ(src_initial_usage, src_new_usage);
- int64 dest_increase = helper.GetDestUsage() - dest_initial_usage;
+ int64_t dest_increase = helper.GetDestUsage() - dest_initial_usage;
ASSERT_EQ(src_increase, dest_increase);
}
@@ -464,12 +467,12 @@ TEST(LocalFileSystemCopyOrMoveOperationTest, CopySingleDirectory) {
FileSystemURL src = helper.SourceURL("a");
FileSystemURL dest = helper.DestURL("b");
- int64 src_initial_usage = helper.GetSourceUsage();
- int64 dest_initial_usage = helper.GetDestUsage();
+ int64_t src_initial_usage = helper.GetSourceUsage();
+ int64_t dest_initial_usage = helper.GetDestUsage();
// Set up a source directory.
ASSERT_EQ(base::File::FILE_OK, helper.CreateDirectory(src));
- int64 src_increase = helper.GetSourceUsage() - src_initial_usage;
+ int64_t src_increase = helper.GetSourceUsage() - src_initial_usage;
// Copy it.
ASSERT_EQ(base::File::FILE_OK, helper.Copy(src, dest));
@@ -478,10 +481,10 @@ TEST(LocalFileSystemCopyOrMoveOperationTest, CopySingleDirectory) {
ASSERT_TRUE(helper.DirectoryExists(src));
ASSERT_TRUE(helper.DirectoryExists(dest));
- int64 src_new_usage = helper.GetSourceUsage();
+ int64_t src_new_usage = helper.GetSourceUsage();
ASSERT_EQ(src_initial_usage + src_increase, src_new_usage);
- int64 dest_increase = helper.GetDestUsage() - dest_initial_usage;
+ int64_t dest_increase = helper.GetDestUsage() - dest_initial_usage;
ASSERT_EQ(src_increase, dest_increase);
}
@@ -493,12 +496,12 @@ TEST(LocalFileSystemCopyOrMoveOperationTest, MoveSingleDirectory) {
FileSystemURL src = helper.SourceURL("a");
FileSystemURL dest = helper.DestURL("b");
- int64 src_initial_usage = helper.GetSourceUsage();
- int64 dest_initial_usage = helper.GetDestUsage();
+ int64_t src_initial_usage = helper.GetSourceUsage();
+ int64_t dest_initial_usage = helper.GetDestUsage();
// Set up a source directory.
ASSERT_EQ(base::File::FILE_OK, helper.CreateDirectory(src));
- int64 src_increase = helper.GetSourceUsage() - src_initial_usage;
+ int64_t src_increase = helper.GetSourceUsage() - src_initial_usage;
// Move it.
ASSERT_EQ(base::File::FILE_OK, helper.Move(src, dest));
@@ -507,10 +510,10 @@ TEST(LocalFileSystemCopyOrMoveOperationTest, MoveSingleDirectory) {
ASSERT_FALSE(helper.DirectoryExists(src));
ASSERT_TRUE(helper.DirectoryExists(dest));
- int64 src_new_usage = helper.GetSourceUsage();
+ int64_t src_new_usage = helper.GetSourceUsage();
ASSERT_EQ(src_initial_usage, src_new_usage);
- int64 dest_increase = helper.GetDestUsage() - dest_initial_usage;
+ int64_t dest_increase = helper.GetDestUsage() - dest_initial_usage;
ASSERT_EQ(src_increase, dest_increase);
}
@@ -522,8 +525,8 @@ TEST(LocalFileSystemCopyOrMoveOperationTest, CopyDirectory) {
FileSystemURL src = helper.SourceURL("a");
FileSystemURL dest = helper.DestURL("b");
- int64 src_initial_usage = helper.GetSourceUsage();
- int64 dest_initial_usage = helper.GetDestUsage();
+ int64_t src_initial_usage = helper.GetSourceUsage();
+ int64_t dest_initial_usage = helper.GetDestUsage();
// Set up a source directory.
ASSERT_EQ(base::File::FILE_OK, helper.CreateDirectory(src));
@@ -531,7 +534,7 @@ TEST(LocalFileSystemCopyOrMoveOperationTest, CopyDirectory) {
helper.SetUpTestCaseFiles(src,
kRegularFileSystemTestCases,
kRegularFileSystemTestCaseSize));
- int64 src_increase = helper.GetSourceUsage() - src_initial_usage;
+ int64_t src_increase = helper.GetSourceUsage() - src_initial_usage;
// Copy it.
ASSERT_EQ(base::File::FILE_OK,
@@ -547,10 +550,10 @@ TEST(LocalFileSystemCopyOrMoveOperationTest, CopyDirectory) {
kRegularFileSystemTestCases,
kRegularFileSystemTestCaseSize);
- int64 src_new_usage = helper.GetSourceUsage();
+ int64_t src_new_usage = helper.GetSourceUsage();
ASSERT_EQ(src_initial_usage + src_increase, src_new_usage);
- int64 dest_increase = helper.GetDestUsage() - dest_initial_usage;
+ int64_t dest_increase = helper.GetDestUsage() - dest_initial_usage;
ASSERT_EQ(src_increase, dest_increase);
}
@@ -562,8 +565,8 @@ TEST(LocalFileSystemCopyOrMoveOperationTest, MoveDirectory) {
FileSystemURL src = helper.SourceURL("a");
FileSystemURL dest = helper.DestURL("b");
- int64 src_initial_usage = helper.GetSourceUsage();
- int64 dest_initial_usage = helper.GetDestUsage();
+ int64_t src_initial_usage = helper.GetSourceUsage();
+ int64_t dest_initial_usage = helper.GetDestUsage();
// Set up a source directory.
ASSERT_EQ(base::File::FILE_OK, helper.CreateDirectory(src));
@@ -571,7 +574,7 @@ TEST(LocalFileSystemCopyOrMoveOperationTest, MoveDirectory) {
helper.SetUpTestCaseFiles(src,
kRegularFileSystemTestCases,
kRegularFileSystemTestCaseSize));
- int64 src_increase = helper.GetSourceUsage() - src_initial_usage;
+ int64_t src_increase = helper.GetSourceUsage() - src_initial_usage;
// Move it.
ASSERT_EQ(base::File::FILE_OK, helper.Move(src, dest));
@@ -584,10 +587,10 @@ TEST(LocalFileSystemCopyOrMoveOperationTest, MoveDirectory) {
kRegularFileSystemTestCases,
kRegularFileSystemTestCaseSize);
- int64 src_new_usage = helper.GetSourceUsage();
+ int64_t src_new_usage = helper.GetSourceUsage();
ASSERT_EQ(src_initial_usage, src_new_usage);
- int64 dest_increase = helper.GetDestUsage() - dest_initial_usage;
+ int64_t dest_increase = helper.GetDestUsage() - dest_initial_usage;
ASSERT_EQ(src_increase, dest_increase);
}
@@ -701,7 +704,7 @@ TEST(LocalFileSystemCopyOrMoveOperationTest, ProgressCallback) {
EXPECT_EQ(begin_index + 1, end_index);
} else {
// PROGRESS event's size should be assending order.
- int64 current_size = 0;
+ int64_t current_size = 0;
for (size_t j = begin_index + 1; j < end_index; ++j) {
if (records[j].source_url == src_url) {
EXPECT_EQ(FileSystemOperation::PROGRESS, records[j].type);
@@ -739,7 +742,7 @@ TEST(LocalFileSystemCopyOrMoveOperationTest, StreamCopyHelper) {
scoped_ptr<FileStreamWriter> writer(FileStreamWriter::CreateForLocalFile(
task_runner.get(), dest_path, 0, FileStreamWriter::CREATE_NEW_FILE));
- std::vector<int64> progress;
+ std::vector<int64_t> progress;
CopyOrMoveOperationDelegate::StreamCopyHelper helper(
reader.Pass(), writer.Pass(),
storage::FlushPolicy::NO_FLUSH_ON_COMPLETION,
@@ -795,7 +798,7 @@ TEST(LocalFileSystemCopyOrMoveOperationTest, StreamCopyHelperWithFlush) {
scoped_ptr<FileStreamWriter> writer(FileStreamWriter::CreateForLocalFile(
task_runner.get(), dest_path, 0, FileStreamWriter::CREATE_NEW_FILE));
- std::vector<int64> progress;
+ std::vector<int64_t> progress;
CopyOrMoveOperationDelegate::StreamCopyHelper helper(
reader.Pass(), writer.Pass(),
storage::FlushPolicy::NO_FLUSH_ON_COMPLETION,
@@ -846,7 +849,7 @@ TEST(LocalFileSystemCopyOrMoveOperationTest, StreamCopyHelper_Cancel) {
scoped_ptr<FileStreamWriter> writer(FileStreamWriter::CreateForLocalFile(
task_runner.get(), dest_path, 0, FileStreamWriter::CREATE_NEW_FILE));
- std::vector<int64> progress;
+ std::vector<int64_t> progress;
CopyOrMoveOperationDelegate::StreamCopyHelper helper(
reader.Pass(), writer.Pass(),
storage::FlushPolicy::NO_FLUSH_ON_COMPLETION,
diff --git a/content/browser/fileapi/dragged_file_util_unittest.cc b/content/browser/fileapi/dragged_file_util_unittest.cc
index 398ce6d..3ef9f8c 100644
--- a/content/browser/fileapi/dragged_file_util_unittest.cc
+++ b/content/browser/fileapi/dragged_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 <map>
#include <queue>
#include <set>
@@ -12,8 +14,10 @@
#include "base/files/file_util.h"
#include "base/files/scoped_temp_dir.h"
#include "base/logging.h"
+#include "base/macros.h"
#include "base/message_loop/message_loop.h"
#include "base/time/time.h"
+#include "build/build_config.h"
#include "content/public/test/async_file_test_helper.h"
#include "content/public/test/test_file_system_context.h"
#include "content/test/fileapi_test_file_set.h"
diff --git a/content/browser/fileapi/external_mount_points_unittest.cc b/content/browser/fileapi/external_mount_points_unittest.cc
index 02103da..59be862 100644
--- a/content/browser/fileapi/external_mount_points_unittest.cc
+++ b/content/browser/fileapi/external_mount_points_unittest.cc
@@ -4,9 +4,12 @@
#include "storage/browser/fileapi/external_mount_points.h"
+#include <stddef.h>
+
#include <string>
#include "base/files/file_path.h"
+#include "base/macros.h"
#include "storage/browser/fileapi/file_system_url.h"
#include "storage/common/fileapi/file_system_mount_option.h"
#include "testing/gtest/include/gtest/gtest.h"
diff --git a/content/browser/fileapi/file_system_browsertest.cc b/content/browser/fileapi/file_system_browsertest.cc
index 5ff9600..5c60c28 100644
--- a/content/browser/fileapi/file_system_browsertest.cc
+++ b/content/browser/fileapi/file_system_browsertest.cc
@@ -2,6 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include <stdint.h>
+
#include "base/bind.h"
#include "base/command_line.h"
#include "base/files/file_path.h"
@@ -63,7 +65,7 @@ class FileSystemBrowserTestWithLowQuota : public FileSystemBrowserTest {
shell()->web_contents()->GetBrowserContext())->GetQuotaManager());
}
- static void SetTempQuota(int64 bytes, scoped_refptr<QuotaManager> qm) {
+ static void SetTempQuota(int64_t bytes, scoped_refptr<QuotaManager> qm) {
if (!BrowserThread::CurrentlyOn(BrowserThread::IO)) {
BrowserThread::PostTask(
BrowserThread::IO, FROM_HERE,
diff --git a/content/browser/fileapi/file_system_context_unittest.cc b/content/browser/fileapi/file_system_context_unittest.cc
index b1ffb63..f5ed898 100644
--- a/content/browser/fileapi/file_system_context_unittest.cc
+++ b/content/browser/fileapi/file_system_context_unittest.cc
@@ -4,9 +4,13 @@
#include "storage/browser/fileapi/file_system_context.h"
+#include <stddef.h>
+
#include "base/files/scoped_temp_dir.h"
+#include "base/macros.h"
#include "base/strings/stringprintf.h"
#include "base/thread_task_runner_handle.h"
+#include "build/build_config.h"
#include "content/browser/quota/mock_quota_manager.h"
#include "content/public/test/mock_special_storage_policy.h"
#include "content/public/test/test_file_system_options.h"
diff --git a/content/browser/fileapi/file_system_dir_url_request_job_unittest.cc b/content/browser/fileapi/file_system_dir_url_request_job_unittest.cc
index 754f323..1cce5e7 100644
--- a/content/browser/fileapi/file_system_dir_url_request_job_unittest.cc
+++ b/content/browser/fileapi/file_system_dir_url_request_job_unittest.cc
@@ -4,6 +4,8 @@
#include "storage/browser/fileapi/file_system_dir_url_request_job.h"
+#include <stdint.h>
+
#include <string>
#include "base/files/file_path.h"
@@ -17,6 +19,7 @@
#include "base/strings/string_piece.h"
#include "base/strings/utf_string_conversions.h"
#include "base/thread_task_runner_handle.h"
+#include "build/build_config.h"
#include "content/public/test/mock_special_storage_policy.h"
#include "content/public/test/test_file_system_backend.h"
#include "content/public/test/test_file_system_context.h"
@@ -228,7 +231,7 @@ class FileSystemDirURLRequestJobTest : public testing::Test {
context.get(), CreateURL(path), NULL));
}
- void TruncateFile(const base::StringPiece file_name, int64 length) {
+ void TruncateFile(const base::StringPiece file_name, int64_t length) {
base::FilePath path = base::FilePath().AppendASCII(file_name);
scoped_ptr<FileSystemOperationContext> context(NewOperationContext());
ASSERT_EQ(base::File::FILE_OK, file_util()->Truncate(
@@ -249,7 +252,7 @@ class FileSystemDirURLRequestJobTest : public testing::Test {
const std::string& name,
const std::string& url,
bool is_directory,
- int64 size) {
+ int64_t size) {
#define STR "([^\"]*)"
icu::UnicodeString pattern("^<script>addRow\\(\"" STR "\",\"" STR
"\",(0|1),\"" STR "\",\"" STR "\"\\);</script>");
diff --git a/content/browser/fileapi/file_system_file_stream_reader_unittest.cc b/content/browser/fileapi/file_system_file_stream_reader_unittest.cc
index 5e13f15..acb3650 100644
--- a/content/browser/fileapi/file_system_file_stream_reader_unittest.cc
+++ b/content/browser/fileapi/file_system_file_stream_reader_unittest.cc
@@ -4,10 +4,14 @@
#include "storage/browser/fileapi/file_system_file_stream_reader.h"
+#include <stddef.h>
+#include <stdint.h>
+
#include <limits>
#include <string>
#include "base/files/scoped_temp_dir.h"
+#include "base/macros.h"
#include "base/memory/scoped_ptr.h"
#include "base/run_loop.h"
#include "content/public/test/async_file_test_helper.h"
@@ -89,7 +93,7 @@ class FileSystemFileStreamReaderTest : public testing::Test {
protected:
storage::FileSystemFileStreamReader* CreateFileReader(
const std::string& file_name,
- int64 initial_offset,
+ int64_t initial_offset,
const base::Time& expected_modification_time) {
return new FileSystemFileStreamReader(file_system_context_.get(),
GetFileSystemURL(file_name),
@@ -163,7 +167,7 @@ TEST_F(FileSystemFileStreamReaderTest, Empty) {
ASSERT_EQ(0U, data.size());
net::TestInt64CompletionCallback callback;
- int64 length_result = reader->GetLength(callback.callback());
+ int64_t length_result = reader->GetLength(callback.callback());
if (length_result == net::ERR_IO_PENDING)
length_result = callback.WaitForResult();
ASSERT_EQ(0, length_result);
@@ -173,7 +177,7 @@ TEST_F(FileSystemFileStreamReaderTest, GetLengthNormal) {
scoped_ptr<FileSystemFileStreamReader> reader(
CreateFileReader(kTestFileName, 0, test_file_modification_time()));
net::TestInt64CompletionCallback callback;
- int64 result = reader->GetLength(callback.callback());
+ int64_t result = reader->GetLength(callback.callback());
if (result == net::ERR_IO_PENDING)
result = callback.WaitForResult();
ASSERT_EQ(kTestDataSize, result);
@@ -187,7 +191,7 @@ TEST_F(FileSystemFileStreamReaderTest, GetLengthAfterModified) {
scoped_ptr<FileSystemFileStreamReader> reader(
CreateFileReader(kTestFileName, 0, fake_expected_modification_time));
net::TestInt64CompletionCallback callback;
- int64 result = reader->GetLength(callback.callback());
+ int64_t result = reader->GetLength(callback.callback());
if (result == net::ERR_IO_PENDING)
result = callback.WaitForResult();
ASSERT_EQ(net::ERR_UPLOAD_FILE_CHANGED, result);
@@ -204,7 +208,7 @@ TEST_F(FileSystemFileStreamReaderTest, GetLengthWithOffset) {
scoped_ptr<FileSystemFileStreamReader> reader(
CreateFileReader(kTestFileName, 3, base::Time()));
net::TestInt64CompletionCallback callback;
- int64 result = reader->GetLength(callback.callback());
+ int64_t result = reader->GetLength(callback.callback());
if (result == net::ERR_IO_PENDING)
result = callback.WaitForResult();
// Initial offset does not affect the result of GetLength.
diff --git a/content/browser/fileapi/file_system_operation_impl_unittest.cc b/content/browser/fileapi/file_system_operation_impl_unittest.cc
index bb39624..66891d1 100644
--- a/content/browser/fileapi/file_system_operation_impl_unittest.cc
+++ b/content/browser/fileapi/file_system_operation_impl_unittest.cc
@@ -4,10 +4,14 @@
#include "storage/browser/fileapi/file_system_operation_impl.h"
+#include <stddef.h>
+#include <stdint.h>
+
#include "base/bind.h"
#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/memory/weak_ptr.h"
#include "base/run_loop.h"
@@ -155,7 +159,7 @@ class FileSystemOperationImplTest
return url;
}
- int64 GetFileSize(const std::string& path) {
+ int64_t GetFileSize(const std::string& path) {
base::File::Info info;
EXPECT_TRUE(base::GetFileInfo(PlatformPath(path), &info));
return info.size;
@@ -238,12 +242,12 @@ class FileSystemOperationImplTest
closure.Run();
}
- int64 GetDataSizeOnDisk() {
+ int64_t GetDataSizeOnDisk() {
return sandbox_file_system_.ComputeCurrentOriginUsage() -
sandbox_file_system_.ComputeCurrentDirectoryDatabaseUsage();
}
- void GetUsageAndQuota(int64* usage, int64* quota) {
+ void GetUsageAndQuota(int64_t* usage, int64_t* quota) {
storage::QuotaStatusCode status =
AsyncFileTestHelper::GetUsageAndQuota(quota_manager_.get(),
sandbox_file_system_.origin(),
@@ -254,8 +258,8 @@ class FileSystemOperationImplTest
ASSERT_EQ(storage::kQuotaStatusOk, status);
}
- int64 ComputePathCost(const FileSystemURL& url) {
- int64 base_usage;
+ int64_t ComputePathCost(const FileSystemURL& url) {
+ int64_t base_usage;
GetUsageAndQuota(&base_usage, NULL);
AsyncFileTestHelper::CreateFile(
@@ -264,27 +268,27 @@ class FileSystemOperationImplTest
change_observer()->ResetCount();
- int64 total_usage;
+ int64_t total_usage;
GetUsageAndQuota(&total_usage, NULL);
return total_usage - base_usage;
}
void GrantQuotaForCurrentUsage() {
- int64 usage;
+ int64_t usage;
GetUsageAndQuota(&usage, NULL);
quota_manager()->SetQuota(sandbox_file_system_.origin(),
sandbox_file_system_.storage_type(),
usage);
}
- int64 GetUsage() {
- int64 usage = 0;
+ int64_t GetUsage() {
+ int64_t usage = 0;
GetUsageAndQuota(&usage, NULL);
return usage;
}
- void AddQuota(int64 quota_delta) {
- int64 quota;
+ void AddQuota(int64_t quota_delta) {
+ int64_t quota;
GetUsageAndQuota(NULL, &quota);
quota_manager()->SetQuota(sandbox_file_system_.origin(),
sandbox_file_system_.storage_type(),
@@ -707,7 +711,7 @@ TEST_F(FileSystemOperationImplTest, TestCopyFailureByQuota) {
EXPECT_EQ(6, GetFileSize("src/file"));
FileSystemURL dest_file(URLForPath("dest/file"));
- int64 dest_path_cost = ComputePathCost(dest_file);
+ int64_t dest_path_cost = ComputePathCost(dest_file);
GrantQuotaForCurrentUsage();
AddQuota(6 + dest_path_cost - 1);
@@ -823,7 +827,7 @@ TEST_F(FileSystemOperationImplTest, TestCopyInForeignFileSuccess) {
FileSystemURL dest_dir(CreateDirectory("dest"));
- int64 before_usage;
+ int64_t before_usage;
GetUsageAndQuota(&before_usage, NULL);
// Check that the file copied and corresponding usage increased.
@@ -833,7 +837,7 @@ TEST_F(FileSystemOperationImplTest, TestCopyInForeignFileSuccess) {
EXPECT_EQ(1, change_observer()->create_file_count());
EXPECT_TRUE(FileExists("dest/file"));
- int64 after_usage;
+ int64_t after_usage;
GetUsageAndQuota(&after_usage, NULL);
EXPECT_GT(after_usage, before_usage);
@@ -1219,7 +1223,7 @@ TEST_F(FileSystemOperationImplTest,
EXPECT_EQ(base::File::FILE_OK, Truncate(grandchild_file1, 30));
EXPECT_EQ(base::File::FILE_OK, Truncate(grandchild_file2, 2));
- const int64 all_file_size = 5000 + 400 + 30 + 2;
+ const int64_t all_file_size = 5000 + 400 + 30 + 2;
EXPECT_EQ(all_file_size, GetDataSizeOnDisk());
EXPECT_EQ(all_file_size + total_path_cost, GetUsage());
@@ -1242,17 +1246,17 @@ TEST_F(FileSystemOperationImplTest,
FileSystemURL dest1(CreateDirectory("dest1"));
FileSystemURL dest2(CreateDirectory("dest2"));
- int64 usage = GetUsage();
+ int64_t usage = GetUsage();
FileSystemURL child_file1(CreateFile("src/file1"));
FileSystemURL child_file2(CreateFile("src/file2"));
FileSystemURL child_dir(CreateDirectory("src/dir"));
- int64 child_path_cost = GetUsage() - usage;
+ int64_t child_path_cost = GetUsage() - usage;
usage += child_path_cost;
FileSystemURL grandchild_file1(CreateFile("src/dir/file1"));
FileSystemURL grandchild_file2(CreateFile("src/dir/file2"));
- int64 total_path_cost = GetUsage();
- int64 grandchild_path_cost = total_path_cost - usage;
+ int64_t total_path_cost = GetUsage();
+ int64_t grandchild_path_cost = total_path_cost - usage;
EXPECT_EQ(0, GetDataSizeOnDisk());
@@ -1261,10 +1265,10 @@ TEST_F(FileSystemOperationImplTest,
EXPECT_EQ(base::File::FILE_OK, Truncate(grandchild_file1, 60));
EXPECT_EQ(base::File::FILE_OK, Truncate(grandchild_file2, 5));
- const int64 child_file_size = 8000 + 700;
- const int64 grandchild_file_size = 60 + 5;
- const int64 all_file_size = child_file_size + grandchild_file_size;
- int64 expected_usage = all_file_size + total_path_cost;
+ const int64_t child_file_size = 8000 + 700;
+ const int64_t grandchild_file_size = 60 + 5;
+ const int64_t all_file_size = child_file_size + grandchild_file_size;
+ int64_t expected_usage = all_file_size + total_path_cost;
usage = GetUsage();
EXPECT_EQ(all_file_size, GetDataSizeOnDisk());
diff --git a/content/browser/fileapi/file_system_operation_impl_write_unittest.cc b/content/browser/fileapi/file_system_operation_impl_write_unittest.cc
index 76879f4..b6e07e8 100644
--- a/content/browser/fileapi/file_system_operation_impl_write_unittest.cc
+++ b/content/browser/fileapi/file_system_operation_impl_write_unittest.cc
@@ -2,9 +2,12 @@
// 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/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"
@@ -94,12 +97,12 @@ class FileSystemOperationImplWriteTest
base::File::Error status() const { return status_; }
base::File::Error cancel_status() const { return cancel_status_; }
- void add_bytes_written(int64 bytes, bool complete) {
+ void add_bytes_written(int64_t bytes, bool complete) {
bytes_written_ += bytes;
EXPECT_FALSE(complete_);
complete_ = complete;
}
- int64 bytes_written() const { return bytes_written_; }
+ int64_t bytes_written() const { return bytes_written_; }
bool complete() const { return complete_; }
protected:
@@ -127,7 +130,7 @@ class FileSystemOperationImplWriteTest
weak_factory_.GetWeakPtr());
}
- void DidWrite(base::File::Error status, int64 bytes, bool complete) {
+ void DidWrite(base::File::Error status, int64_t bytes, bool complete) {
if (status == base::File::FILE_OK) {
add_bytes_written(bytes, complete);
if (complete)
@@ -161,7 +164,7 @@ class FileSystemOperationImplWriteTest
// For post-operation status.
base::File::Error status_;
base::File::Error cancel_status_;
- int64 bytes_written_;
+ int64_t bytes_written_;
bool complete_;
scoped_ptr<MockBlobURLRequestContext> url_request_context_;
diff --git a/content/browser/fileapi/file_system_operation_runner_unittest.cc b/content/browser/fileapi/file_system_operation_runner_unittest.cc
index 495477b..6701805 100644
--- a/content/browser/fileapi/file_system_operation_runner_unittest.cc
+++ b/content/browser/fileapi/file_system_operation_runner_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/files/file_path.h"
#include "base/files/scoped_temp_dir.h"
+#include "base/macros.h"
#include "base/memory/scoped_vector.h"
#include "base/run_loop.h"
#include "base/thread_task_runner_handle.h"
diff --git a/content/browser/fileapi/file_system_quota_client_unittest.cc b/content/browser/fileapi/file_system_quota_client_unittest.cc
index b3333a0..e3a24c2 100644
--- a/content/browser/fileapi/file_system_quota_client_unittest.cc
+++ b/content/browser/fileapi/file_system_quota_client_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 "base/basictypes.h"
+#include <stdint.h>
+
#include "base/bind.h"
#include "base/files/file_util.h"
#include "base/files/scoped_temp_dir.h"
+#include "base/macros.h"
#include "base/run_loop.h"
#include "content/public/test/async_file_test_helper.h"
#include "content/public/test/test_file_system_context.h"
@@ -52,7 +54,7 @@ class FileSystemQuotaClientTest : public testing::Test {
struct TestFile {
bool isDirectory;
const char* name;
- int64 size;
+ int64_t size;
const char* origin_url;
storage::StorageType type;
};
@@ -71,9 +73,9 @@ class FileSystemQuotaClientTest : public testing::Test {
weak_factory_.GetWeakPtr()));
}
- int64 GetOriginUsage(FileSystemQuotaClient* quota_client,
- const std::string& origin_url,
- storage::StorageType type) {
+ int64_t GetOriginUsage(FileSystemQuotaClient* quota_client,
+ const std::string& origin_url,
+ storage::StorageType type) {
GetOriginUsageAsync(quota_client, origin_url, type);
base::RunLoop().RunUntilIdle();
return usage_;
@@ -125,7 +127,7 @@ class FileSystemQuotaClientTest : public testing::Test {
}
bool CreateFileSystemFile(const base::FilePath& file_path,
- int64 file_size,
+ int64_t file_size,
const std::string& origin_url,
storage::StorageType storage_type) {
if (file_path.empty())
@@ -174,11 +176,11 @@ class FileSystemQuotaClientTest : public testing::Test {
// directory before adding a file or directory to it, so that we can just
// count the basename of each addition. A recursive creation of a path, which
// created more than one directory in a single shot, would break this.
- int64 ComputeFilePathsCostForOriginAndType(const TestFile* files,
- int num_files,
- const std::string& origin_url,
- storage::StorageType type) {
- int64 file_paths_cost = 0;
+ int64_t ComputeFilePathsCostForOriginAndType(const TestFile* files,
+ int num_files,
+ const std::string& origin_url,
+ storage::StorageType type) {
+ int64_t file_paths_cost = 0;
for (int i = 0; i < num_files; i++) {
if (files[i].type == type &&
GURL(files[i].origin_url) == GURL(origin_url)) {
@@ -202,7 +204,7 @@ class FileSystemQuotaClientTest : public testing::Test {
weak_factory_.GetWeakPtr()));
}
- int64 usage() const { return usage_; }
+ int64_t usage() const { return usage_; }
storage::QuotaStatusCode status() { return deletion_status_; }
int additional_callback_count() const { return additional_callback_count_; }
void set_additional_callback_count(int count) {
@@ -210,15 +212,13 @@ class FileSystemQuotaClientTest : public testing::Test {
}
private:
- void OnGetUsage(int64 usage) {
- usage_ = usage;
- }
+ void OnGetUsage(int64_t usage) { usage_ = usage; }
void OnGetOrigins(const std::set<GURL>& origins) {
origins_ = origins;
}
- void OnGetAdditionalUsage(int64 usage_unused) {
+ void OnGetAdditionalUsage(int64_t usage_unused) {
++additional_callback_count_;
}
@@ -229,7 +229,7 @@ class FileSystemQuotaClientTest : public testing::Test {
base::ScopedTempDir data_dir_;
base::MessageLoop message_loop_;
scoped_refptr<storage::FileSystemContext> file_system_context_;
- int64 usage_;
+ int64_t usage_;
int additional_callback_count_;
std::set<GURL> origins_;
storage::QuotaStatusCode deletion_status_;
@@ -263,7 +263,7 @@ TEST_F(FileSystemQuotaClientTest, OneFileTest) {
{false, "foo", 4921, kDummyURL1, kTemporary},
};
InitializeOriginFiles(quota_client.get(), kFiles, arraysize(kFiles));
- const int64 file_paths_cost = ComputeFilePathsCostForOriginAndType(
+ const int64_t file_paths_cost = ComputeFilePathsCostForOriginAndType(
kFiles, arraysize(kFiles), kDummyURL1, kTemporary);
for (int i = 0; i < 2; i++) {
@@ -280,7 +280,7 @@ TEST_F(FileSystemQuotaClientTest, TwoFilesTest) {
{false, "bar", 41, kDummyURL1, kTemporary},
};
InitializeOriginFiles(quota_client.get(), kFiles, arraysize(kFiles));
- const int64 file_paths_cost = ComputeFilePathsCostForOriginAndType(
+ const int64_t file_paths_cost = ComputeFilePathsCostForOriginAndType(
kFiles, arraysize(kFiles), kDummyURL1, kTemporary);
for (int i = 0; i < 2; i++) {
@@ -298,7 +298,7 @@ TEST_F(FileSystemQuotaClientTest, EmptyFilesTest) {
{false, "baz", 0, kDummyURL1, kTemporary},
};
InitializeOriginFiles(quota_client.get(), kFiles, arraysize(kFiles));
- const int64 file_paths_cost = ComputeFilePathsCostForOriginAndType(
+ const int64_t file_paths_cost = ComputeFilePathsCostForOriginAndType(
kFiles, arraysize(kFiles), kDummyURL1, kTemporary);
for (int i = 0; i < 2; i++) {
@@ -316,7 +316,7 @@ TEST_F(FileSystemQuotaClientTest, SubDirectoryTest) {
{false, "bar", 4814, kDummyURL1, kTemporary},
};
InitializeOriginFiles(quota_client.get(), kFiles, arraysize(kFiles));
- const int64 file_paths_cost = ComputeFilePathsCostForOriginAndType(
+ const int64_t file_paths_cost = ComputeFilePathsCostForOriginAndType(
kFiles, arraysize(kFiles), kDummyURL1, kTemporary);
for (int i = 0; i < 2; i++) {
@@ -338,10 +338,12 @@ TEST_F(FileSystemQuotaClientTest, MultiTypeTest) {
{false, "bar", 9, kDummyURL1, kPersistent},
};
InitializeOriginFiles(quota_client.get(), kFiles, arraysize(kFiles));
- const int64 file_paths_cost_temporary = ComputeFilePathsCostForOriginAndType(
- kFiles, arraysize(kFiles), kDummyURL1, kTemporary);
- const int64 file_paths_cost_persistent = ComputeFilePathsCostForOriginAndType(
- kFiles, arraysize(kFiles), kDummyURL1, kTemporary);
+ const int64_t file_paths_cost_temporary =
+ ComputeFilePathsCostForOriginAndType(kFiles, arraysize(kFiles),
+ kDummyURL1, kTemporary);
+ const int64_t file_paths_cost_persistent =
+ ComputeFilePathsCostForOriginAndType(kFiles, arraysize(kFiles),
+ kDummyURL1, kTemporary);
for (int i = 0; i < 2; i++) {
EXPECT_EQ(133 + 14 + file_paths_cost_temporary,
@@ -372,16 +374,18 @@ TEST_F(FileSystemQuotaClientTest, MultiDomainTest) {
{false, "baz", 18, kDummyURL2, kPersistent},
};
InitializeOriginFiles(quota_client.get(), kFiles, arraysize(kFiles));
- const int64 file_paths_cost_temporary1 = ComputeFilePathsCostForOriginAndType(
- kFiles, arraysize(kFiles), kDummyURL1, kTemporary);
- const int64 file_paths_cost_persistent1 =
+ const int64_t file_paths_cost_temporary1 =
+ ComputeFilePathsCostForOriginAndType(kFiles, arraysize(kFiles),
+ kDummyURL1, kTemporary);
+ const int64_t file_paths_cost_persistent1 =
+ ComputeFilePathsCostForOriginAndType(kFiles, arraysize(kFiles),
+ kDummyURL1, kPersistent);
+ const int64_t file_paths_cost_temporary2 =
ComputeFilePathsCostForOriginAndType(kFiles, arraysize(kFiles),
- kDummyURL1, kPersistent);
- const int64 file_paths_cost_temporary2 = ComputeFilePathsCostForOriginAndType(
- kFiles, arraysize(kFiles), kDummyURL2, kTemporary);
- const int64 file_paths_cost_persistent2 =
+ kDummyURL2, kTemporary);
+ const int64_t file_paths_cost_persistent2 =
ComputeFilePathsCostForOriginAndType(kFiles, arraysize(kFiles),
- kDummyURL2, kPersistent);
+ kDummyURL2, kPersistent);
for (int i = 0; i < 2; i++) {
EXPECT_EQ(1331 + 134 + file_paths_cost_temporary1,
@@ -403,7 +407,7 @@ TEST_F(FileSystemQuotaClientTest, GetUsage_MultipleTasks) {
{false, "bar", 22, kDummyURL1, kTemporary},
};
InitializeOriginFiles(quota_client.get(), kFiles, arraysize(kFiles));
- const int64 file_paths_cost = ComputeFilePathsCostForOriginAndType(
+ const int64_t file_paths_cost = ComputeFilePathsCostForOriginAndType(
kFiles, arraysize(kFiles), kDummyURL1, kTemporary);
// Dispatching three GetUsage tasks.
@@ -505,21 +509,21 @@ TEST_F(FileSystemQuotaClientTest, DeleteOriginTest) {
{false, "g", 64, "https://bar.com/", kTemporary},
};
InitializeOriginFiles(quota_client.get(), kFiles, arraysize(kFiles));
- const int64 file_paths_cost_temporary_foo_https =
+ const int64_t file_paths_cost_temporary_foo_https =
ComputeFilePathsCostForOriginAndType(kFiles, arraysize(kFiles),
- "https://foo.com/", kTemporary);
- const int64 file_paths_cost_persistent_foo =
+ "https://foo.com/", kTemporary);
+ const int64_t file_paths_cost_persistent_foo =
ComputeFilePathsCostForOriginAndType(kFiles, arraysize(kFiles),
- "http://foo.com/", kPersistent);
- const int64 file_paths_cost_temporary_bar =
+ "http://foo.com/", kPersistent);
+ const int64_t file_paths_cost_temporary_bar =
ComputeFilePathsCostForOriginAndType(kFiles, arraysize(kFiles),
- "http://bar.com/", kTemporary);
- const int64 file_paths_cost_temporary_bar_https =
+ "http://bar.com/", kTemporary);
+ const int64_t file_paths_cost_temporary_bar_https =
ComputeFilePathsCostForOriginAndType(kFiles, arraysize(kFiles),
- "https://bar.com/", kTemporary);
- const int64 file_paths_cost_persistent_bar_https =
+ "https://bar.com/", kTemporary);
+ const int64_t file_paths_cost_persistent_bar_https =
ComputeFilePathsCostForOriginAndType(kFiles, arraysize(kFiles),
- "https://bar.com/", kPersistent);
+ "https://bar.com/", kPersistent);
DeleteOriginData(quota_client.get(), "http://foo.com/", kTemporary);
base::RunLoop().RunUntilIdle();
diff --git a/content/browser/fileapi/file_system_url_request_job_unittest.cc b/content/browser/fileapi/file_system_url_request_job_unittest.cc
index 8e47e4e..f9b72ed 100644
--- a/content/browser/fileapi/file_system_url_request_job_unittest.cc
+++ b/content/browser/fileapi/file_system_url_request_job_unittest.cc
@@ -4,6 +4,8 @@
#include "storage/browser/fileapi/file_system_url_request_job.h"
+#include <stddef.h>
+
#include <string>
#include "base/bind.h"
@@ -12,6 +14,7 @@
#include "base/files/scoped_temp_dir.h"
#include "base/format_macros.h"
#include "base/location.h"
+#include "base/macros.h"
#include "base/memory/scoped_vector.h"
#include "base/memory/weak_ptr.h"
#include "base/rand_util.h"
diff --git a/content/browser/fileapi/file_system_url_unittest.cc b/content/browser/fileapi/file_system_url_unittest.cc
index e4dd5e2..ef13cf1 100644
--- a/content/browser/fileapi/file_system_url_unittest.cc
+++ b/content/browser/fileapi/file_system_url_unittest.cc
@@ -4,7 +4,10 @@
#include "storage/browser/fileapi/file_system_url.h"
+#include <stddef.h>
+
#include "base/files/file_path.h"
+#include "base/macros.h"
#include "storage/common/fileapi/file_system_types.h"
#include "storage/common/fileapi/file_system_util.h"
#include "testing/gtest/include/gtest/gtest.h"
diff --git a/content/browser/fileapi/file_system_usage_cache_unittest.cc b/content/browser/fileapi/file_system_usage_cache_unittest.cc
index e6bbdc9..70557d2 100644
--- a/content/browser/fileapi/file_system_usage_cache_unittest.cc
+++ b/content/browser/fileapi/file_system_usage_cache_unittest.cc
@@ -10,6 +10,7 @@
#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/thread_task_runner_handle.h"
#include "testing/gtest/include/gtest/gtest.h"
diff --git a/content/browser/fileapi/file_writer_delegate_unittest.cc b/content/browser/fileapi/file_writer_delegate_unittest.cc
index cba7530..ad3cc76 100644
--- a/content/browser/fileapi/file_writer_delegate_unittest.cc
+++ b/content/browser/fileapi/file_writer_delegate_unittest.cc
@@ -12,6 +12,7 @@
#include "base/bind_helpers.h"
#include "base/files/scoped_temp_dir.h"
#include "base/location.h"
+#include "base/macros.h"
#include "base/memory/weak_ptr.h"
#include "base/run_loop.h"
#include "base/single_thread_task_runner.h"
diff --git a/content/browser/fileapi/fileapi_message_filter.cc b/content/browser/fileapi/fileapi_message_filter.cc
index 9ee9ede7..6ce1d4a 100644
--- a/content/browser/fileapi/fileapi_message_filter.cc
+++ b/content/browser/fileapi/fileapi_message_filter.cc
@@ -10,11 +10,13 @@
#include "base/bind.h"
#include "base/files/file_path.h"
#include "base/logging.h"
+#include "base/macros.h"
#include "base/memory/scoped_ptr.h"
#include "base/sequenced_task_runner.h"
#include "base/strings/string_util.h"
#include "base/threading/thread.h"
#include "base/time/time.h"
+#include "build/build_config.h"
#include "content/browser/bad_message.h"
#include "content/browser/child_process_security_policy_impl.h"
#include "content/browser/fileapi/blob_storage_host.h"
@@ -53,9 +55,8 @@ namespace content {
namespace {
-const uint32 kFilteredMessageClasses[] = {
- BlobMsgStart,
- FileSystemMsgStart,
+const uint32_t kFilteredMessageClasses[] = {
+ BlobMsgStart, FileSystemMsgStart,
};
void RevokeFilePermission(int child_id, const base::FilePath& path) {
@@ -106,7 +107,7 @@ FileAPIMessageFilter::FileAPIMessageFilter(
DCHECK(stream_context);
}
-void FileAPIMessageFilter::OnChannelConnected(int32 peer_pid) {
+void FileAPIMessageFilter::OnChannelConnected(int32_t peer_pid) {
DCHECK_CURRENTLY_ON(BrowserThread::IO);
if (request_context_getter_.get()) {
@@ -386,11 +387,10 @@ void FileAPIMessageFilter::OnReadDirectory(
this, request_id));
}
-void FileAPIMessageFilter::OnWrite(
- int request_id,
- const GURL& path,
- const std::string& blob_uuid,
- int64 offset) {
+void FileAPIMessageFilter::OnWrite(int request_id,
+ const GURL& path,
+ const std::string& blob_uuid,
+ int64_t offset) {
DCHECK_CURRENTLY_ON(BrowserThread::IO);
if (!request_context_) {
// We can't write w/o a request context, trying to do so will crash.
@@ -415,10 +415,9 @@ void FileAPIMessageFilter::OnWrite(
base::Bind(&FileAPIMessageFilter::DidWrite, this, request_id));
}
-void FileAPIMessageFilter::OnTruncate(
- int request_id,
- const GURL& path,
- int64 length) {
+void FileAPIMessageFilter::OnTruncate(int request_id,
+ const GURL& path,
+ int64_t length) {
FileSystemURL url(context_->CrackURL(path));
if (!ValidateFileSystemURL(request_id, url))
return;
@@ -758,7 +757,7 @@ void FileAPIMessageFilter::DidReadDirectory(
void FileAPIMessageFilter::DidWrite(int request_id,
base::File::Error result,
- int64 bytes,
+ int64_t bytes,
bool complete) {
if (result == base::File::FILE_OK) {
Send(new FileSystemMsg_DidWrite(request_id, bytes, complete));
diff --git a/content/browser/fileapi/fileapi_message_filter.h b/content/browser/fileapi/fileapi_message_filter.h
index 3ad767e..74d056f 100644
--- a/content/browser/fileapi/fileapi_message_filter.h
+++ b/content/browser/fileapi/fileapi_message_filter.h
@@ -5,6 +5,9 @@
#ifndef CONTENT_BROWSER_FILEAPI_FILEAPI_MESSAGE_FILTER_H_
#define CONTENT_BROWSER_FILEAPI_FILEAPI_MESSAGE_FILTER_H_
+#include <stddef.h>
+#include <stdint.h>
+
#include <map>
#include <set>
#include <string>
@@ -12,6 +15,7 @@
#include "base/callback.h"
#include "base/containers/hash_tables.h"
#include "base/files/file_util_proxy.h"
+#include "base/macros.h"
#include "base/memory/ref_counted.h"
#include "base/memory/shared_memory.h"
#include "content/browser/streams/stream.h"
@@ -73,7 +77,7 @@ class CONTENT_EXPORT FileAPIMessageFilter : public BrowserMessageFilter {
StreamContext* stream_context);
// BrowserMessageFilter implementation.
- void OnChannelConnected(int32 peer_pid) override;
+ void OnChannelConnected(int32_t peer_pid) override;
void OnChannelClosing() override;
base::TaskRunner* OverrideTaskRunnerForMessage(
const IPC::Message& message) override;
@@ -111,8 +115,8 @@ class CONTENT_EXPORT FileAPIMessageFilter : public BrowserMessageFilter {
void OnWrite(int request_id,
const GURL& path,
const std::string& blob_uuid,
- int64 offset);
- void OnTruncate(int request_id, const GURL& path, int64 length);
+ int64_t offset);
+ void OnTruncate(int request_id, const GURL& path, int64_t length);
void OnTouchFile(int request_id,
const GURL& path,
const base::Time& last_access_time,
@@ -172,7 +176,7 @@ class CONTENT_EXPORT FileAPIMessageFilter : public BrowserMessageFilter {
bool has_more);
void DidWrite(int request_id,
base::File::Error result,
- int64 bytes,
+ int64_t bytes,
bool complete);
void DidOpenFileSystem(int request_id,
const GURL& root,
diff --git a/content/browser/fileapi/fileapi_message_filter_unittest.cc b/content/browser/fileapi/fileapi_message_filter_unittest.cc
index 58f555e..1fe224e 100644
--- a/content/browser/fileapi/fileapi_message_filter_unittest.cc
+++ b/content/browser/fileapi/fileapi_message_filter_unittest.cc
@@ -4,6 +4,8 @@
#include "content/browser/fileapi/fileapi_message_filter.h"
+#include <stddef.h>
+
#include <string>
#include <vector>
diff --git a/content/browser/fileapi/isolated_context_unittest.cc b/content/browser/fileapi/isolated_context_unittest.cc
index 7296934..64f0c29 100644
--- a/content/browser/fileapi/isolated_context_unittest.cc
+++ b/content/browser/fileapi/isolated_context_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 <string>
-#include "base/basictypes.h"
#include "base/logging.h"
+#include "base/macros.h"
#include "storage/browser/fileapi/file_system_url.h"
#include "storage/browser/fileapi/isolated_context.h"
#include "testing/gtest/include/gtest/gtest.h"
diff --git a/content/browser/fileapi/local_file_stream_reader_unittest.cc b/content/browser/fileapi/local_file_stream_reader_unittest.cc
index 9e840cb..2404d655 100644
--- a/content/browser/fileapi/local_file_stream_reader_unittest.cc
+++ b/content/browser/fileapi/local_file_stream_reader_unittest.cc
@@ -4,6 +4,9 @@
#include "storage/browser/fileapi/local_file_stream_reader.h"
+#include <stddef.h>
+#include <stdint.h>
+
#include <string>
#include "base/files/file.h"
@@ -11,6 +14,7 @@
#include "base/files/file_util.h"
#include "base/files/scoped_temp_dir.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"
@@ -86,7 +90,7 @@ class LocalFileStreamReaderTest : public testing::Test {
protected:
LocalFileStreamReader* CreateFileReader(
const base::FilePath& path,
- int64 initial_offset,
+ int64_t initial_offset,
const base::Time& expected_modification_time) {
return new LocalFileStreamReader(
file_task_runner(),
@@ -151,7 +155,7 @@ TEST_F(LocalFileStreamReaderTest, Empty) {
ASSERT_EQ(0U, data.size());
net::TestInt64CompletionCallback callback;
- int64 length_result = reader->GetLength(callback.callback());
+ int64_t length_result = reader->GetLength(callback.callback());
if (length_result == net::ERR_IO_PENDING)
length_result = callback.WaitForResult();
ASSERT_EQ(0, result);
@@ -161,7 +165,7 @@ TEST_F(LocalFileStreamReaderTest, GetLengthNormal) {
scoped_ptr<LocalFileStreamReader> reader(
CreateFileReader(test_path(), 0, test_file_modification_time()));
net::TestInt64CompletionCallback callback;
- int64 result = reader->GetLength(callback.callback());
+ int64_t result = reader->GetLength(callback.callback());
if (result == net::ERR_IO_PENDING)
result = callback.WaitForResult();
ASSERT_EQ(kTestDataSize, result);
@@ -175,7 +179,7 @@ TEST_F(LocalFileStreamReaderTest, GetLengthAfterModified) {
scoped_ptr<LocalFileStreamReader> reader(
CreateFileReader(test_path(), 0, test_file_modification_time()));
net::TestInt64CompletionCallback callback;
- int64 result = reader->GetLength(callback.callback());
+ int64_t result = reader->GetLength(callback.callback());
if (result == net::ERR_IO_PENDING)
result = callback.WaitForResult();
ASSERT_EQ(net::ERR_UPLOAD_FILE_CHANGED, result);
@@ -192,7 +196,7 @@ TEST_F(LocalFileStreamReaderTest, GetLengthWithOffset) {
scoped_ptr<LocalFileStreamReader> reader(
CreateFileReader(test_path(), 3, base::Time()));
net::TestInt64CompletionCallback callback;
- int64 result = reader->GetLength(callback.callback());
+ int64_t result = reader->GetLength(callback.callback());
if (result == net::ERR_IO_PENDING)
result = callback.WaitForResult();
// Initial offset does not affect the result of GetLength.
@@ -222,7 +226,7 @@ TEST_F(LocalFileStreamReaderTest, ReadAfterModified) {
EXPECT_EQ(net::ERR_UPLOAD_FILE_CHANGED, result);
EXPECT_EQ(0U, data.size());
- // Due to precision loss converting int64->double->int64 (e.g. through
+ // Due to precision loss converting int64_t->double->int64_t (e.g. through
// Blink) the expected/actual time may vary by microseconds. With
// modification time delta < 10us this should work.
TouchTestFile(base::TimeDelta::FromMicroseconds(1));
diff --git a/content/browser/fileapi/local_file_stream_writer_unittest.cc b/content/browser/fileapi/local_file_stream_writer_unittest.cc
index 9e05310..a6d8b99 100644
--- a/content/browser/fileapi/local_file_stream_writer_unittest.cc
+++ b/content/browser/fileapi/local_file_stream_writer_unittest.cc
@@ -4,6 +4,8 @@
#include "storage/browser/fileapi/local_file_stream_writer.h"
+#include <stdint.h>
+
#include <string>
#include "base/callback.h"
@@ -82,7 +84,7 @@ class LocalFileStreamWriterTest : public testing::Test {
}
LocalFileStreamWriter* CreateWriter(const base::FilePath& path,
- int64 offset) {
+ int64_t offset) {
return new LocalFileStreamWriter(file_task_runner(), path, offset,
FileStreamWriter::OPEN_EXISTING_FILE);
}
diff --git a/content/browser/fileapi/local_file_util_unittest.cc b/content/browser/fileapi/local_file_util_unittest.cc
index a0c9615..28ff6b3 100644
--- a/content/browser/fileapi/local_file_util_unittest.cc
+++ b/content/browser/fileapi/local_file_util_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 <stdint.h>
+
#include <string>
#include "base/files/file.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/run_loop.h"
#include "base/strings/sys_string_conversions.h"
#include "base/strings/utf_string_conversions.h"
+#include "build/build_config.h"
#include "content/public/test/async_file_test_helper.h"
#include "content/public/test/test_file_system_context.h"
#include "storage/browser/fileapi/async_file_util_adapter.h"
@@ -89,7 +93,7 @@ class LocalFileUtilTest : public testing::Test {
return base::DirectoryExists(LocalPath(file_name));
}
- int64 GetSize(const char *file_name) {
+ int64_t GetSize(const char* file_name) {
base::File::Info info;
base::GetFileInfo(LocalPath(file_name), &info);
return info.size;
diff --git a/content/browser/fileapi/mock_file_change_observer.h b/content/browser/fileapi/mock_file_change_observer.h
index 92c24e1..cd39b24f 100644
--- a/content/browser/fileapi/mock_file_change_observer.h
+++ b/content/browser/fileapi/mock_file_change_observer.h
@@ -5,8 +5,8 @@
#ifndef CONTENT_BROWSER_FILEAPI_MOCK_FILE_CHANGE_OBSERVER_H_
#define CONTENT_BROWSER_FILEAPI_MOCK_FILE_CHANGE_OBSERVER_H_
-#include "base/basictypes.h"
#include "base/compiler_specific.h"
+#include "base/macros.h"
#include "storage/browser/fileapi/file_observers.h"
#include "storage/browser/fileapi/file_system_url.h"
#include "storage/browser/fileapi/task_runner_bound_observer_list.h"
diff --git a/content/browser/fileapi/mock_file_update_observer.cc b/content/browser/fileapi/mock_file_update_observer.cc
index 2951d3e..fb51a52 100644
--- a/content/browser/fileapi/mock_file_update_observer.cc
+++ b/content/browser/fileapi/mock_file_update_observer.cc
@@ -26,7 +26,7 @@ void MockFileUpdateObserver::OnStartUpdate(const FileSystemURL& url) {
++start_update_count_[url];
}
-void MockFileUpdateObserver::OnUpdate(const FileSystemURL& url, int64 delta) {
+void MockFileUpdateObserver::OnUpdate(const FileSystemURL& url, int64_t delta) {
if (!is_ready_)
return;
int start = start_update_count_[url];
diff --git a/content/browser/fileapi/mock_file_update_observer.h b/content/browser/fileapi/mock_file_update_observer.h
index 64bd85e..c4af5c0 100644
--- a/content/browser/fileapi/mock_file_update_observer.h
+++ b/content/browser/fileapi/mock_file_update_observer.h
@@ -5,10 +5,12 @@
#ifndef CONTENT_BROWSER_FILEAPI_MOCK_FILE_UPDATE_OBSERVER_H_
#define CONTENT_BROWSER_FILEAPI_MOCK_FILE_UPDATE_OBSERVER_H_
+#include <stdint.h>
+
#include <map>
-#include "base/basictypes.h"
#include "base/compiler_specific.h"
+#include "base/macros.h"
#include "storage/browser/fileapi/file_observers.h"
#include "storage/browser/fileapi/file_system_url.h"
#include "storage/browser/fileapi/task_runner_bound_observer_list.h"
@@ -26,7 +28,7 @@ class MockFileUpdateObserver : public FileUpdateObserver {
// FileUpdateObserver overrides.
void OnStartUpdate(const FileSystemURL& url) override;
- void OnUpdate(const FileSystemURL& url, int64 delta) override;
+ void OnUpdate(const FileSystemURL& url, int64_t delta) override;
void OnEndUpdate(const FileSystemURL& url) override;
void Enable() { is_ready_ = true; }
diff --git a/content/browser/fileapi/mock_url_request_delegate.cc b/content/browser/fileapi/mock_url_request_delegate.cc
index 0c1735c..79333b7 100644
--- a/content/browser/fileapi/mock_url_request_delegate.cc
+++ b/content/browser/fileapi/mock_url_request_delegate.cc
@@ -4,6 +4,8 @@
#include "content/browser/fileapi/mock_url_request_delegate.h"
+#include <stddef.h>
+
#include "base/run_loop.h"
#include "net/base/io_buffer.h"
#include "testing/gtest/include/gtest/gtest.h"
diff --git a/content/browser/fileapi/native_file_util_unittest.cc b/content/browser/fileapi/native_file_util_unittest.cc
index 85aadb6..210f8b9c 100644
--- a/content/browser/fileapi/native_file_util_unittest.cc
+++ b/content/browser/fileapi/native_file_util_unittest.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 <stdint.h>
+
#include <set>
#include "base/files/file.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 "storage/browser/fileapi/native_file_util.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -37,7 +40,7 @@ class NativeFileUtilTest : public testing::Test {
!base::DirectoryExists(path);
}
- int64 GetSize(const base::FilePath& path) {
+ int64_t GetSize(const base::FilePath& path) {
base::File::Info info;
base::GetFileInfo(path, &info);
return info.size;
diff --git a/content/browser/fileapi/obfuscated_file_util_unittest.cc b/content/browser/fileapi/obfuscated_file_util_unittest.cc
index d04e517..cda3c92 100644
--- a/content/browser/fileapi/obfuscated_file_util_unittest.cc
+++ b/content/browser/fileapi/obfuscated_file_util_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 <stdint.h>
#include <limits>
@@ -14,9 +15,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/thread_task_runner_handle.h"
+#include "build/build_config.h"
#include "content/browser/fileapi/mock_file_change_observer.h"
#include "content/public/test/async_file_test_helper.h"
#include "content/public/test/mock_special_storage_policy.h"
diff --git a/content/browser/fileapi/plugin_private_file_system_backend_unittest.cc b/content/browser/fileapi/plugin_private_file_system_backend_unittest.cc
index 8c5e45d..e875e87 100644
--- a/content/browser/fileapi/plugin_private_file_system_backend_unittest.cc
+++ b/content/browser/fileapi/plugin_private_file_system_backend_unittest.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/files/file_util.h"
#include "base/files/scoped_temp_dir.h"
#include "base/memory/scoped_ptr.h"
diff --git a/content/browser/fileapi/recursive_operation_delegate_unittest.cc b/content/browser/fileapi/recursive_operation_delegate_unittest.cc
index f41cff9..abcdf54 100644
--- a/content/browser/fileapi/recursive_operation_delegate_unittest.cc
+++ b/content/browser/fileapi/recursive_operation_delegate_unittest.cc
@@ -6,11 +6,11 @@
#include <vector>
-#include "base/basictypes.h"
#include "base/bind.h"
#include "base/callback.h"
#include "base/files/scoped_temp_dir.h"
#include "base/location.h"
+#include "base/macros.h"
#include "base/run_loop.h"
#include "base/single_thread_task_runner.h"
#include "base/thread_task_runner_handle.h"
diff --git a/content/browser/fileapi/sandbox_database_test_helper.h b/content/browser/fileapi/sandbox_database_test_helper.h
index 881bdff..05ac226 100644
--- a/content/browser/fileapi/sandbox_database_test_helper.h
+++ b/content/browser/fileapi/sandbox_database_test_helper.h
@@ -5,7 +5,7 @@
#ifndef CONTENT_BROWSER_FILEAPI_SANDBOX_DATABASE_TEST_HELPER_H_
#define CONTENT_BROWSER_FILEAPI_SANDBOX_DATABASE_TEST_HELPER_H_
-#include <cstddef>
+#include <stddef.h>
#include "third_party/leveldatabase/src/db/filename.h"
diff --git a/content/browser/fileapi/sandbox_directory_database_unittest.cc b/content/browser/fileapi/sandbox_directory_database_unittest.cc
index dcb74a2..7414856 100644
--- a/content/browser/fileapi/sandbox_directory_database_unittest.cc
+++ b/content/browser/fileapi/sandbox_directory_database_unittest.cc
@@ -5,11 +5,14 @@
#include "storage/browser/fileapi/sandbox_directory_database.h"
#include <math.h>
+#include <stddef.h>
+#include <stdint.h>
#include <limits>
#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_ptr.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/string_util.h"
@@ -496,7 +499,7 @@ TEST_F(SandboxDirectoryDatabaseTest, TestOverwritingMoveFileSuccess) {
}
TEST_F(SandboxDirectoryDatabaseTest, TestGetNextInteger) {
- int64 next = -1;
+ int64_t next = -1;
EXPECT_TRUE(db()->GetNextInteger(&next));
EXPECT_EQ(0, next);
EXPECT_TRUE(db()->GetNextInteger(&next));
@@ -514,7 +517,7 @@ TEST_F(SandboxDirectoryDatabaseTest, TestGetNextInteger) {
TEST_F(SandboxDirectoryDatabaseTest, TestConsistencyCheck_Empty) {
EXPECT_TRUE(db()->IsFileSystemConsistent());
- int64 next = -1;
+ int64_t next = -1;
EXPECT_TRUE(db()->GetNextInteger(&next));
EXPECT_EQ(0, next);
EXPECT_TRUE(db()->IsFileSystemConsistent());
diff --git a/content/browser/fileapi/sandbox_file_system_backend_delegate_unittest.cc b/content/browser/fileapi/sandbox_file_system_backend_delegate_unittest.cc
index fd25aa7f..d021229 100644
--- a/content/browser/fileapi/sandbox_file_system_backend_delegate_unittest.cc
+++ b/content/browser/fileapi/sandbox_file_system_backend_delegate_unittest.cc
@@ -4,7 +4,6 @@
#include "storage/browser/fileapi/sandbox_file_system_backend_delegate.h"
-#include "base/basictypes.h"
#include "base/files/file_util.h"
#include "base/files/scoped_temp_dir.h"
#include "base/memory/scoped_ptr.h"
diff --git a/content/browser/fileapi/sandbox_file_system_backend_unittest.cc b/content/browser/fileapi/sandbox_file_system_backend_unittest.cc
index 38630b8..2787be0 100644
--- a/content/browser/fileapi/sandbox_file_system_backend_unittest.cc
+++ b/content/browser/fileapi/sandbox_file_system_backend_unittest.cc
@@ -4,11 +4,13 @@
#include "storage/browser/fileapi/sandbox_file_system_backend.h"
+#include <stddef.h>
+
#include <set>
-#include "base/basictypes.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/thread_task_runner_handle.h"
diff --git a/content/browser/fileapi/sandbox_isolated_origin_database_unittest.cc b/content/browser/fileapi/sandbox_isolated_origin_database_unittest.cc
index 5f7f55f..f93fed7 100644
--- a/content/browser/fileapi/sandbox_isolated_origin_database_unittest.cc
+++ b/content/browser/fileapi/sandbox_isolated_origin_database_unittest.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/files/file_util.h"
#include "base/files/scoped_temp_dir.h"
#include "storage/browser/fileapi/sandbox_isolated_origin_database.h"
diff --git a/content/browser/fileapi/sandbox_origin_database_unittest.cc b/content/browser/fileapi/sandbox_origin_database_unittest.cc
index 44dad20..8338304 100644
--- a/content/browser/fileapi/sandbox_origin_database_unittest.cc
+++ b/content/browser/fileapi/sandbox_origin_database_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 <algorithm>
#include <functional>
#include <limits>
@@ -12,6 +14,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/stl_util.h"
#include "content/browser/fileapi/sandbox_database_test_helper.h"
#include "storage/browser/fileapi/sandbox_origin_database.h"
diff --git a/content/browser/fileapi/sandbox_prioritized_origin_database_unittest.cc b/content/browser/fileapi/sandbox_prioritized_origin_database_unittest.cc
index 0fb0115..5c748a3 100644
--- a/content/browser/fileapi/sandbox_prioritized_origin_database_unittest.cc
+++ b/content/browser/fileapi/sandbox_prioritized_origin_database_unittest.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/files/file_util.h"
#include "base/files/scoped_temp_dir.h"
#include "storage/browser/fileapi/sandbox_origin_database.h"
diff --git a/content/browser/fileapi/timed_task_helper_unittest.cc b/content/browser/fileapi/timed_task_helper_unittest.cc
index 1bdc25d..11bdc02 100644
--- a/content/browser/fileapi/timed_task_helper_unittest.cc
+++ b/content/browser/fileapi/timed_task_helper_unittest.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/location.h"
#include "base/memory/scoped_ptr.h"
diff --git a/content/browser/fileapi/transient_file_util_unittest.cc b/content/browser/fileapi/transient_file_util_unittest.cc
index 2ed8b74..07e13f7 100644
--- a/content/browser/fileapi/transient_file_util_unittest.cc
+++ b/content/browser/fileapi/transient_file_util_unittest.cc
@@ -2,10 +2,10 @@
// 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/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 "content/public/test/test_file_system_context.h"
diff --git a/content/browser/fileapi/upload_file_system_file_element_reader.h b/content/browser/fileapi/upload_file_system_file_element_reader.h
index 582e65c..5510ce5 100644
--- a/content/browser/fileapi/upload_file_system_file_element_reader.h
+++ b/content/browser/fileapi/upload_file_system_file_element_reader.h
@@ -7,6 +7,7 @@
#include <stdint.h>
+#include "base/macros.h"
#include "base/memory/weak_ptr.h"
#include "base/time/time.h"
#include "content/common/content_export.h"
diff --git a/content/browser/fileapi/upload_file_system_file_element_reader_unittest.cc b/content/browser/fileapi/upload_file_system_file_element_reader_unittest.cc
index e54923c..61ef550 100644
--- a/content/browser/fileapi/upload_file_system_file_element_reader_unittest.cc
+++ b/content/browser/fileapi/upload_file_system_file_element_reader_unittest.cc
@@ -4,9 +4,13 @@
#include "content/browser/fileapi/upload_file_system_file_element_reader.h"
+#include <stddef.h>
+#include <stdint.h>
+
#include <limits>
#include "base/files/scoped_temp_dir.h"
+#include "base/macros.h"
#include "base/message_loop/message_loop.h"
#include "base/run_loop.h"
#include "content/public/test/async_file_test_helper.h"
diff --git a/content/browser/frame_host/cross_process_frame_connector.cc b/content/browser/frame_host/cross_process_frame_connector.cc
index 859a910..9edbfab 100644
--- a/content/browser/frame_host/cross_process_frame_connector.cc
+++ b/content/browser/frame_host/cross_process_frame_connector.cc
@@ -75,7 +75,7 @@ void CrossProcessFrameConnector::RenderProcessGone() {
}
void CrossProcessFrameConnector::ChildFrameCompositorFrameSwapped(
- uint32 output_surface_id,
+ uint32_t output_surface_id,
int host_id,
int route_id,
scoped_ptr<cc::CompositorFrame> frame) {
diff --git a/content/browser/frame_host/cross_process_frame_connector.h b/content/browser/frame_host/cross_process_frame_connector.h
index c3054d0..c58bfa6 100644
--- a/content/browser/frame_host/cross_process_frame_connector.h
+++ b/content/browser/frame_host/cross_process_frame_connector.h
@@ -5,6 +5,8 @@
#ifndef CONTENT_BROWSER_FRAME_HOST_CROSS_PROCESS_FRAME_CONNECTOR_H_
#define CONTENT_BROWSER_FRAME_HOST_CROSS_PROCESS_FRAME_CONNECTOR_H_
+#include <stdint.h>
+
#include "cc/output/compositor_frame.h"
#include "content/common/content_export.h"
#include "ui/gfx/geometry/rect.h"
@@ -86,7 +88,7 @@ class CONTENT_EXPORT CrossProcessFrameConnector {
void RenderProcessGone();
virtual void ChildFrameCompositorFrameSwapped(
- uint32 output_surface_id,
+ uint32_t output_surface_id,
int host_id,
int route_id,
scoped_ptr<cc::CompositorFrame> frame);
diff --git a/content/browser/frame_host/cross_site_transferring_request.h b/content/browser/frame_host/cross_site_transferring_request.h
index 0d696a3..2d5d922 100644
--- a/content/browser/frame_host/cross_site_transferring_request.h
+++ b/content/browser/frame_host/cross_site_transferring_request.h
@@ -5,7 +5,7 @@
#ifndef CONTENT_BROWSER_FRAME_HOST_CROSS_SITE_TRANSFERRING_REQUEST_H_
#define CONTENT_BROWSER_FRAME_HOST_CROSS_SITE_TRANSFERRING_REQUEST_H_
-#include "base/basictypes.h"
+#include "base/macros.h"
#include "content/common/content_export.h"
#include "content/public/browser/global_request_id.h"
diff --git a/content/browser/frame_host/frame_mojo_shell.cc b/content/browser/frame_host/frame_mojo_shell.cc
index b0ebf49..28bbc2e 100644
--- a/content/browser/frame_host/frame_mojo_shell.cc
+++ b/content/browser/frame_host/frame_mojo_shell.cc
@@ -4,6 +4,7 @@
#include "content/browser/frame_host/frame_mojo_shell.h"
+#include "build/build_config.h"
#include "content/browser/mojo/mojo_shell_context.h"
#include "content/common/mojo/service_registry_impl.h"
#include "content/public/browser/content_browser_client.h"
diff --git a/content/browser/frame_host/frame_navigation_entry.cc b/content/browser/frame_host/frame_navigation_entry.cc
index 74d9a39..a7a414e 100644
--- a/content/browser/frame_host/frame_navigation_entry.cc
+++ b/content/browser/frame_host/frame_navigation_entry.cc
@@ -14,8 +14,8 @@ FrameNavigationEntry::FrameNavigationEntry(int frame_tree_node_id)
FrameNavigationEntry::FrameNavigationEntry(int frame_tree_node_id,
const std::string& frame_unique_name,
- int64 item_sequence_number,
- int64 document_sequence_number,
+ int64_t item_sequence_number,
+ int64_t document_sequence_number,
SiteInstanceImpl* site_instance,
const GURL& url,
const Referrer& referrer)
@@ -25,8 +25,7 @@ FrameNavigationEntry::FrameNavigationEntry(int frame_tree_node_id,
document_sequence_number_(document_sequence_number),
site_instance_(site_instance),
url_(url),
- referrer_(referrer) {
-}
+ referrer_(referrer) {}
FrameNavigationEntry::~FrameNavigationEntry() {
}
@@ -40,8 +39,8 @@ FrameNavigationEntry* FrameNavigationEntry::Clone() const {
}
void FrameNavigationEntry::UpdateEntry(const std::string& frame_unique_name,
- int64 item_sequence_number,
- int64 document_sequence_number,
+ int64_t item_sequence_number,
+ int64_t document_sequence_number,
SiteInstanceImpl* site_instance,
const GURL& url,
const Referrer& referrer,
@@ -56,7 +55,7 @@ void FrameNavigationEntry::UpdateEntry(const std::string& frame_unique_name,
}
void FrameNavigationEntry::set_item_sequence_number(
- int64 item_sequence_number) {
+ int64_t item_sequence_number) {
// Once assigned, the item sequence number shouldn't change.
DCHECK(item_sequence_number_ == -1 ||
item_sequence_number_ == item_sequence_number);
@@ -64,7 +63,7 @@ void FrameNavigationEntry::set_item_sequence_number(
}
void FrameNavigationEntry::set_document_sequence_number(
- int64 document_sequence_number) {
+ int64_t document_sequence_number) {
// Once assigned, the document sequence number shouldn't change.
DCHECK(document_sequence_number_ == -1 ||
document_sequence_number_ == document_sequence_number);
diff --git a/content/browser/frame_host/frame_navigation_entry.h b/content/browser/frame_host/frame_navigation_entry.h
index b9734cb..67a2706 100644
--- a/content/browser/frame_host/frame_navigation_entry.h
+++ b/content/browser/frame_host/frame_navigation_entry.h
@@ -5,7 +5,9 @@
#ifndef CONTENT_BROWSER_FRAME_HOST_FRAME_NAVIGATION_ENTRY_H_
#define CONTENT_BROWSER_FRAME_HOST_FRAME_NAVIGATION_ENTRY_H_
-#include "base/basictypes.h"
+#include <stdint.h>
+
+#include "base/macros.h"
#include "base/memory/ref_counted.h"
#include "content/browser/site_instance_impl.h"
#include "content/public/common/page_state.h"
@@ -29,8 +31,8 @@ class CONTENT_EXPORT FrameNavigationEntry
explicit FrameNavigationEntry(int frame_tree_node_id);
FrameNavigationEntry(int frame_tree_node_id,
const std::string& frame_unique_name,
- int64 item_sequence_number,
- int64 document_sequence_number,
+ int64_t item_sequence_number,
+ int64_t document_sequence_number,
SiteInstanceImpl* site_instance,
const GURL& url,
const Referrer& referrer);
@@ -41,8 +43,8 @@ class CONTENT_EXPORT FrameNavigationEntry
// Updates all the members of this entry.
void UpdateEntry(const std::string& frame_unique_name,
- int64 item_sequence_number,
- int64 document_sequence_number,
+ int64_t item_sequence_number,
+ int64_t document_sequence_number,
SiteInstanceImpl* site_instance,
const GURL& url,
const Referrer& referrer,
@@ -77,10 +79,10 @@ class CONTENT_EXPORT FrameNavigationEntry
// new document and is also globally unique. In-page navigations get a new
// item sequence number but the same document sequence number. These numbers
// should not change once assigned.
- void set_item_sequence_number(int64 item_sequence_number);
- int64 item_sequence_number() const { return item_sequence_number_; }
- void set_document_sequence_number(int64 document_sequence_number);
- int64 document_sequence_number() const { return document_sequence_number_; }
+ void set_item_sequence_number(int64_t item_sequence_number);
+ int64_t item_sequence_number() const { return item_sequence_number_; }
+ void set_document_sequence_number(int64_t document_sequence_number);
+ int64_t document_sequence_number() const { return document_sequence_number_; }
// The SiteInstance responsible for rendering this frame. All frames sharing
// a SiteInstance must live in the same process. This is a refcounted pointer
@@ -116,8 +118,8 @@ class CONTENT_EXPORT FrameNavigationEntry
// See the accessors above for descriptions.
int frame_tree_node_id_;
std::string frame_unique_name_;
- int64 item_sequence_number_;
- int64 document_sequence_number_;
+ int64_t item_sequence_number_;
+ int64_t document_sequence_number_;
scoped_refptr<SiteInstanceImpl> site_instance_;
GURL url_;
Referrer referrer_;
diff --git a/content/browser/frame_host/frame_tree.cc b/content/browser/frame_host/frame_tree.cc
index 36c1ffa..e92d28f 100644
--- a/content/browser/frame_host/frame_tree.cc
+++ b/content/browser/frame_host/frame_tree.cc
@@ -4,6 +4,8 @@
#include "content/browser/frame_host/frame_tree.h"
+#include <stddef.h>
+
#include <queue>
#include <utility>
@@ -316,11 +318,12 @@ void FrameTree::SetFrameRemoveListener(
on_frame_removed_ = on_frame_removed;
}
-RenderViewHostImpl* FrameTree::CreateRenderViewHost(SiteInstance* site_instance,
- int32 routing_id,
- int32 main_frame_routing_id,
- bool swapped_out,
- bool hidden) {
+RenderViewHostImpl* FrameTree::CreateRenderViewHost(
+ SiteInstance* site_instance,
+ int32_t routing_id,
+ int32_t main_frame_routing_id,
+ bool swapped_out,
+ bool hidden) {
RenderViewHostMap::iterator iter =
render_view_host_map_.find(site_instance->GetId());
if (iter != render_view_host_map_.end()) {
@@ -367,7 +370,7 @@ void FrameTree::AddRenderViewHostRef(RenderViewHostImpl* render_view_host) {
void FrameTree::ReleaseRenderViewHostRef(RenderViewHostImpl* render_view_host) {
SiteInstance* site_instance = render_view_host->GetSiteInstance();
- int32 site_instance_id = site_instance->GetId();
+ int32_t site_instance_id = site_instance->GetId();
RenderViewHostMap::iterator iter =
render_view_host_map_.find(site_instance_id);
if (iter != render_view_host_map_.end() && iter->second == render_view_host) {
diff --git a/content/browser/frame_host/frame_tree.h b/content/browser/frame_host/frame_tree.h
index ee101c9..6fc21f6 100644
--- a/content/browser/frame_host/frame_tree.h
+++ b/content/browser/frame_host/frame_tree.h
@@ -5,10 +5,13 @@
#ifndef CONTENT_BROWSER_FRAME_HOST_FRAME_TREE_H_
#define CONTENT_BROWSER_FRAME_HOST_FRAME_TREE_H_
+#include <stdint.h>
+
#include <string>
#include "base/callback.h"
#include "base/gtest_prod_util.h"
+#include "base/macros.h"
#include "base/memory/scoped_ptr.h"
#include "content/browser/frame_host/frame_tree_node.h"
#include "content/common/content_export.h"
@@ -121,8 +124,8 @@ class CONTENT_EXPORT FrameTree {
// |site_instance|. The RenderViewHost will have its Shutdown method called
// when all of the RenderFrameHosts using it are deleted.
RenderViewHostImpl* CreateRenderViewHost(SiteInstance* site_instance,
- int32 routing_id,
- int32 main_frame_routing_id,
+ int32_t routing_id,
+ int32_t main_frame_routing_id,
bool swapped_out,
bool hidden);
diff --git a/content/browser/frame_host/frame_tree_browsertest.cc b/content/browser/frame_host/frame_tree_browsertest.cc
index f68b6b4..0151fcb 100644
--- a/content/browser/frame_host/frame_tree_browsertest.cc
+++ b/content/browser/frame_host/frame_tree_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 "base/macros.h"
+#include "build/build_config.h"
#include "content/browser/frame_host/frame_tree.h"
#include "content/browser/frame_host/frame_tree_node.h"
#include "content/browser/renderer_host/render_view_host_impl.h"
diff --git a/content/browser/frame_host/frame_tree_node.cc b/content/browser/frame_host/frame_tree_node.cc
index a8621e2..c61e3fc 100644
--- a/content/browser/frame_host/frame_tree_node.cc
+++ b/content/browser/frame_host/frame_tree_node.cc
@@ -6,6 +6,7 @@
#include <queue>
+#include "base/macros.h"
#include "base/profiler/scoped_tracker.h"
#include "base/stl_util.h"
#include "content/browser/frame_host/frame_tree.h"
diff --git a/content/browser/frame_host/frame_tree_node.h b/content/browser/frame_host/frame_tree_node.h
index d68eaac..df18cf1 100644
--- a/content/browser/frame_host/frame_tree_node.h
+++ b/content/browser/frame_host/frame_tree_node.h
@@ -5,10 +5,12 @@
#ifndef CONTENT_BROWSER_FRAME_HOST_FRAME_TREE_NODE_H_
#define CONTENT_BROWSER_FRAME_HOST_FRAME_TREE_NODE_H_
+#include <stddef.h>
+
#include <string>
#include <vector>
-#include "base/basictypes.h"
+#include "base/macros.h"
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
#include "content/browser/frame_host/render_frame_host_impl.h"
diff --git a/content/browser/frame_host/frame_tree_unittest.cc b/content/browser/frame_host/frame_tree_unittest.cc
index 2a8bb67..93d4816 100644
--- a/content/browser/frame_host/frame_tree_unittest.cc
+++ b/content/browser/frame_host/frame_tree_unittest.cc
@@ -4,6 +4,9 @@
#include "content/browser/frame_host/frame_tree.h"
+#include <stddef.h>
+
+#include "base/macros.h"
#include "base/run_loop.h"
#include "base/strings/string_number_conversions.h"
#include "content/browser/frame_host/navigator_impl.h"
diff --git a/content/browser/frame_host/interstitial_page_impl.cc b/content/browser/frame_host/interstitial_page_impl.cc
index c45eb69..4fcdcfb 100644
--- a/content/browser/frame_host/interstitial_page_impl.cc
+++ b/content/browser/frame_host/interstitial_page_impl.cc
@@ -9,11 +9,13 @@
#include "base/bind.h"
#include "base/compiler_specific.h"
#include "base/location.h"
+#include "base/macros.h"
#include "base/single_thread_task_runner.h"
#include "base/strings/string_util.h"
#include "base/strings/utf_string_conversions.h"
#include "base/thread_task_runner_handle.h"
#include "base/threading/thread.h"
+#include "build/build_config.h"
#include "content/browser/dom_storage/dom_storage_context_wrapper.h"
#include "content/browser/dom_storage/session_storage_namespace_impl.h"
#include "content/browser/frame_host/interstitial_page_navigator_impl.h"
@@ -390,7 +392,7 @@ void InterstitialPageImpl::RenderFrameCreated(
void InterstitialPageImpl::UpdateTitle(
RenderFrameHost* render_frame_host,
- int32 page_id,
+ int32_t page_id,
const base::string16& title,
base::i18n::TextDirection title_direction) {
if (!enabled())
@@ -609,8 +611,8 @@ WebContentsView* InterstitialPageImpl::CreateWebContentsView() {
RenderWidgetHostImpl::From(render_view_host_->GetWidget())->SetView(view);
render_view_host_->AllowBindings(BINDINGS_POLICY_DOM_AUTOMATION);
- int32 max_page_id = web_contents()->
- GetMaxPageIDForSiteInstance(render_view_host_->GetSiteInstance());
+ int32_t max_page_id = web_contents()->GetMaxPageIDForSiteInstance(
+ render_view_host_->GetSiteInstance());
render_view_host_->CreateRenderView(MSG_ROUTING_NONE,
MSG_ROUTING_NONE,
max_page_id,
@@ -763,14 +765,14 @@ void InterstitialPageImpl::CreateNewWindow(
NOTREACHED() << "InterstitialPage does not support showing popups yet.";
}
-void InterstitialPageImpl::CreateNewWidget(int32 render_process_id,
- int32 route_id,
+void InterstitialPageImpl::CreateNewWidget(int32_t render_process_id,
+ int32_t route_id,
blink::WebPopupType popup_type) {
NOTREACHED() << "InterstitialPage does not support showing drop-downs yet.";
}
-void InterstitialPageImpl::CreateNewFullscreenWidget(int32 render_process_id,
- int32 route_id) {
+void InterstitialPageImpl::CreateNewFullscreenWidget(int32_t render_process_id,
+ int32_t route_id) {
NOTREACHED()
<< "InterstitialPage does not support showing full screen popups.";
}
diff --git a/content/browser/frame_host/interstitial_page_impl.h b/content/browser/frame_host/interstitial_page_impl.h
index e7d2e58..0bb90cf 100644
--- a/content/browser/frame_host/interstitial_page_impl.h
+++ b/content/browser/frame_host/interstitial_page_impl.h
@@ -5,9 +5,13 @@
#ifndef CONTENT_BROWSER_FRAME_HOST_INTERSTITIAL_PAGE_IMPL_H_
#define CONTENT_BROWSER_FRAME_HOST_INTERSTITIAL_PAGE_IMPL_H_
+#include <stdint.h>
+
#include "base/compiler_specific.h"
+#include "base/macros.h"
#include "base/memory/scoped_ptr.h"
#include "base/memory/weak_ptr.h"
+#include "build/build_config.h"
#include "content/browser/frame_host/frame_tree.h"
#include "content/browser/frame_host/navigator_delegate.h"
#include "content/browser/frame_host/render_frame_host_delegate.h"
@@ -100,7 +104,7 @@ class CONTENT_EXPORT InterstitialPageImpl
const IPC::Message& message) override;
void RenderFrameCreated(RenderFrameHost* render_frame_host) override;
void UpdateTitle(RenderFrameHost* render_frame_host,
- int32 page_id,
+ int32_t page_id,
const base::string16& title,
base::i18n::TextDirection title_direction) override;
AccessibilityMode GetAccessibilityMode() const override;
@@ -126,11 +130,11 @@ class CONTENT_EXPORT InterstitialPageImpl
int32_t main_frame_widget_route_id,
const ViewHostMsg_CreateWindow_Params& params,
SessionStorageNamespace* session_storage_namespace) override;
- void CreateNewWidget(int32 render_process_id,
- int32 route_id,
+ void CreateNewWidget(int32_t render_process_id,
+ int32_t route_id,
blink::WebPopupType popup_type) override;
- void CreateNewFullscreenWidget(int32 render_process_id,
- int32 route_id) override;
+ void CreateNewFullscreenWidget(int32_t render_process_id,
+ int32_t route_id) override;
void ShowCreatedWindow(int route_id,
WindowOpenDisposition disposition,
const gfx::Rect& initial_rect,
diff --git a/content/browser/frame_host/interstitial_page_impl_browsertest.cc b/content/browser/frame_host/interstitial_page_impl_browsertest.cc
index 73e7b94..05cf0fa 100644
--- a/content/browser/frame_host/interstitial_page_impl_browsertest.cc
+++ b/content/browser/frame_host/interstitial_page_impl_browsertest.cc
@@ -4,8 +4,10 @@
#include "content/browser/frame_host/interstitial_page_impl.h"
+#include "base/macros.h"
#include "base/strings/utf_string_conversions.h"
#include "base/synchronization/waitable_event.h"
+#include "build/build_config.h"
#include "content/browser/web_contents/web_contents_impl.h"
#include "content/common/clipboard_messages.h"
#include "content/common/frame_messages.h"
diff --git a/content/browser/frame_host/interstitial_page_navigator_impl.h b/content/browser/frame_host/interstitial_page_navigator_impl.h
index 8a86219..0ee1be0 100644
--- a/content/browser/frame_host/interstitial_page_navigator_impl.h
+++ b/content/browser/frame_host/interstitial_page_navigator_impl.h
@@ -5,6 +5,7 @@
#ifndef CONTENT_BROWSER_FRAME_HOST_INTERSTITIAL_PAGE_NAVIGATOR_IMPL_H_
#define CONTENT_BROWSER_FRAME_HOST_INTERSTITIAL_PAGE_NAVIGATOR_IMPL_H_
+#include "base/macros.h"
#include "base/memory/ref_counted.h"
#include "content/browser/frame_host/navigator.h"
#include "content/common/content_export.h"
diff --git a/content/browser/frame_host/navigation_controller_android.cc b/content/browser/frame_host/navigation_controller_android.cc
index 7a76f5d..8174517 100644
--- a/content/browser/frame_host/navigation_controller_android.cc
+++ b/content/browser/frame_host/navigation_controller_android.cc
@@ -4,6 +4,8 @@
#include "content/browser/frame_host/navigation_controller_android.h"
+#include <stdint.h>
+
#include "base/android/jni_android.h"
#include "base/android/jni_array.h"
#include "base/android/jni_string.h"
@@ -225,7 +227,7 @@ void NavigationControllerAndroid::LoadUrl(
params.extra_headers = ConvertJavaStringToUTF8(env, extra_headers);
if (post_data) {
- std::vector<uint8> http_body_vector;
+ std::vector<uint8_t> http_body_vector;
base::android::JavaByteArrayToByteVector(env, post_data, &http_body_vector);
params.browser_initiated_post_data =
base::RefCountedBytes::TakeVector(&http_body_vector);
diff --git a/content/browser/frame_host/navigation_controller_android.h b/content/browser/frame_host/navigation_controller_android.h
index fba0ec7..e22eb88 100644
--- a/content/browser/frame_host/navigation_controller_android.h
+++ b/content/browser/frame_host/navigation_controller_android.h
@@ -8,8 +8,8 @@
#include <jni.h>
#include "base/android/scoped_java_ref.h"
-#include "base/basictypes.h"
#include "base/compiler_specific.h"
+#include "base/macros.h"
#include "content/common/content_export.h"
namespace content {
diff --git a/content/browser/frame_host/navigation_controller_delegate.h b/content/browser/frame_host/navigation_controller_delegate.h
index e30cc1d..9922ac5 100644
--- a/content/browser/frame_host/navigation_controller_delegate.h
+++ b/content/browser/frame_host/navigation_controller_delegate.h
@@ -5,6 +5,8 @@
#ifndef CONTENT_BROWSER_FRAME_HOST_NAVIGATION_CONTROLLER_DELEGATE_H_
#define CONTENT_BROWSER_FRAME_HOST_NAVIGATION_CONTROLLER_DELEGATE_H_
+#include <stdint.h>
+
#include <string>
#include "content/public/browser/invalidate_type.h"
#include "content/public/browser/navigation_controller.h"
@@ -38,8 +40,8 @@ class NavigationControllerDelegate {
virtual const std::string& GetContentsMimeType() const = 0;
virtual void NotifyNavigationStateChanged(InvalidateTypes changed_flags) = 0;
virtual void Stop() = 0;
- virtual int32 GetMaxPageID() = 0;
- virtual int32 GetMaxPageIDForSiteInstance(SiteInstance* site_instance) = 0;
+ virtual int32_t GetMaxPageID() = 0;
+ virtual int32_t GetMaxPageIDForSiteInstance(SiteInstance* site_instance) = 0;
virtual bool IsLoading() const = 0;
virtual bool IsBeingDestroyed() const = 0;
virtual bool CanOverscrollContent() const = 0;
@@ -53,9 +55,9 @@ class NavigationControllerDelegate {
virtual void SetHistoryOffsetAndLength(int history_offset,
int history_length) = 0;
virtual void CopyMaxPageIDsFrom(WebContents* web_contents) = 0;
- virtual void UpdateMaxPageID(int32 page_id) = 0;
+ virtual void UpdateMaxPageID(int32_t page_id) = 0;
virtual void UpdateMaxPageIDForSiteInstance(SiteInstance* site_instance,
- int32 page_id) = 0;
+ int32_t page_id) = 0;
virtual void ActivateAndShowRepostFormWarningDialog() = 0;
virtual bool HasAccessedInitialDocument() = 0;
diff --git a/content/browser/frame_host/navigation_controller_impl.cc b/content/browser/frame_host/navigation_controller_impl.cc
index 3d0d934..4ae518f 100644
--- a/content/browser/frame_host/navigation_controller_impl.cc
+++ b/content/browser/frame_host/navigation_controller_impl.cc
@@ -430,7 +430,8 @@ bool NavigationControllerImpl::IsInitialBlankNavigation() const {
}
NavigationEntryImpl* NavigationControllerImpl::GetEntryWithPageID(
- SiteInstance* instance, int32 page_id) const {
+ SiteInstance* instance,
+ int32_t page_id) const {
int index = GetEntryIndexWithPageID(instance, page_id);
return (index != -1) ? entries_[index].get() : nullptr;
}
@@ -1491,7 +1492,7 @@ void NavigationControllerImpl::CopyStateFromAndPrune(
// new and existing navigations in the tab's current SiteInstances are
// identified properly.
NavigationEntryImpl* last_committed = GetLastCommittedEntry();
- int32 site_max_page_id =
+ int32_t site_max_page_id =
delegate_->GetMaxPageIDForSiteInstance(last_committed->site_instance());
delegate_->CopyMaxPageIDsFrom(source->delegate()->GetWebContents());
delegate_->UpdateMaxPageIDForSiteInstance(last_committed->site_instance(),
@@ -1563,11 +1564,11 @@ void NavigationControllerImpl::SetSessionStorageNamespace(
CHECK(successful_insert) << "Cannot replace existing SessionStorageNamespace";
}
-void NavigationControllerImpl::SetMaxRestoredPageID(int32 max_id) {
+void NavigationControllerImpl::SetMaxRestoredPageID(int32_t max_id) {
max_restored_page_id_ = max_id;
}
-int32 NavigationControllerImpl::GetMaxRestoredPageID() const {
+int32_t NavigationControllerImpl::GetMaxRestoredPageID() const {
return max_restored_page_id_;
}
@@ -1680,7 +1681,7 @@ void NavigationControllerImpl::InsertOrReplaceEntry(
// When replacing, don't prune the forward history.
if (replace && current_size > 0) {
- int32 page_id = entry->GetPageID();
+ int32_t page_id = entry->GetPageID();
entries_[last_committed_entry_index_] = entry.Pass();
@@ -1709,7 +1710,7 @@ void NavigationControllerImpl::InsertOrReplaceEntry(
PruneOldestEntryIfFull();
- int32 page_id = entry->GetPageID();
+ int32_t page_id = entry->GetPageID();
entries_.push_back(entry.Pass());
last_committed_entry_index_ = static_cast<int>(entries_.size()) - 1;
@@ -1950,7 +1951,7 @@ void NavigationControllerImpl::FinishRestore(int selected_index,
DCHECK(selected_index >= 0 && selected_index < GetEntryCount());
ConfigureEntriesForRestore(&entries_, type);
- SetMaxRestoredPageID(static_cast<int32>(GetEntryCount()));
+ SetMaxRestoredPageID(static_cast<int32_t>(GetEntryCount()));
last_committed_entry_index_ = selected_index;
}
@@ -1990,8 +1991,8 @@ void NavigationControllerImpl::DiscardTransientEntry() {
transient_entry_index_ = -1;
}
-int NavigationControllerImpl::GetEntryIndexWithPageID(
- SiteInstance* instance, int32 page_id) const {
+int NavigationControllerImpl::GetEntryIndexWithPageID(SiteInstance* instance,
+ int32_t page_id) const {
for (int i = static_cast<int>(entries_.size()) - 1; i >= 0; --i) {
if ((entries_[i]->site_instance() == instance) &&
(entries_[i]->GetPageID() == page_id))
diff --git a/content/browser/frame_host/navigation_controller_impl.h b/content/browser/frame_host/navigation_controller_impl.h
index 3a634a5..72b76d7 100644
--- a/content/browser/frame_host/navigation_controller_impl.h
+++ b/content/browser/frame_host/navigation_controller_impl.h
@@ -5,11 +5,15 @@
#ifndef CONTENT_BROWSER_FRAME_HOST_NAVIGATION_CONTROLLER_IMPL_H_
#define CONTENT_BROWSER_FRAME_HOST_NAVIGATION_CONTROLLER_IMPL_H_
+#include <stddef.h>
+#include <stdint.h>
+
#include <vector>
#include "base/callback.h"
#include "base/compiler_specific.h"
#include "base/gtest_prod_util.h"
+#include "base/macros.h"
#include "base/time/time.h"
#include "build/build_config.h"
#include "content/browser/frame_host/navigation_controller_delegate.h"
@@ -73,8 +77,8 @@ class CONTENT_EXPORT NavigationControllerImpl
const SessionStorageNamespaceMap& GetSessionStorageNamespaceMap()
const override;
SessionStorageNamespace* GetDefaultSessionStorageNamespace() override;
- void SetMaxRestoredPageID(int32 max_id) override;
- int32 GetMaxRestoredPageID() const override;
+ void SetMaxRestoredPageID(int32_t max_id) override;
+ int32_t GetMaxRestoredPageID() const override;
bool NeedsReload() const override;
void SetNeedsReload() override;
void CancelPendingReload() override;
@@ -109,17 +113,15 @@ class CONTENT_EXPORT NavigationControllerImpl
// Return the index of the entry with the corresponding instance and page_id,
// or -1 if not found.
- int GetEntryIndexWithPageID(SiteInstance* instance,
- int32 page_id) const;
+ int GetEntryIndexWithPageID(SiteInstance* instance, int32_t page_id) const;
// Return the index of the entry with the given unique id, or -1 if not found.
int GetEntryIndexWithUniqueID(int nav_entry_id) const;
// Return the entry with the corresponding instance and page_id, or null if
// not found.
- NavigationEntryImpl* GetEntryWithPageID(
- SiteInstance* instance,
- int32 page_id) const;
+ NavigationEntryImpl* GetEntryWithPageID(SiteInstance* instance,
+ int32_t page_id) const;
// Return the entry with the given unique id, or null if not found.
NavigationEntryImpl* GetEntryWithUniqueID(int nav_entry_id) const;
@@ -399,7 +401,7 @@ class CONTENT_EXPORT NavigationControllerImpl
// The max restored page ID in this controller, if it was restored. We must
// store this so that WebContentsImpl can tell any renderer in charge of one
// of the restored entries to update its max page ID.
- int32 max_restored_page_id_;
+ int32_t max_restored_page_id_;
// Manages the SSL security UI.
SSLManager ssl_manager_;
diff --git a/content/browser/frame_host/navigation_controller_impl_browsertest.cc b/content/browser/frame_host/navigation_controller_impl_browsertest.cc
index 58d1bd9..c19a4ea 100644
--- a/content/browser/frame_host/navigation_controller_impl_browsertest.cc
+++ b/content/browser/frame_host/navigation_controller_impl_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 <stdint.h>
+
#include "base/bind.h"
#include "base/command_line.h"
+#include "base/macros.h"
#include "base/strings/stringprintf.h"
#include "base/strings/utf_string_conversions.h"
#include "content/browser/frame_host/frame_navigation_entry.h"
@@ -2624,8 +2627,8 @@ IN_PROC_BROWSER_TEST_F(NavigationControllerBrowserTest,
FrameNavigationEntry* frame_entry =
controller.GetLastCommittedEntry()->GetFrameEntry(root);
- int64 isn_1 = frame_entry->item_sequence_number();
- int64 dsn_1 = frame_entry->document_sequence_number();
+ int64_t isn_1 = frame_entry->item_sequence_number();
+ int64_t dsn_1 = frame_entry->document_sequence_number();
EXPECT_NE(-1, isn_1);
EXPECT_NE(-1, dsn_1);
@@ -2635,8 +2638,8 @@ IN_PROC_BROWSER_TEST_F(NavigationControllerBrowserTest,
EXPECT_TRUE(WaitForLoadStop(shell()->web_contents()));
frame_entry = controller.GetLastCommittedEntry()->GetFrameEntry(root);
- int64 isn_2 = frame_entry->item_sequence_number();
- int64 dsn_2 = frame_entry->document_sequence_number();
+ int64_t isn_2 = frame_entry->item_sequence_number();
+ int64_t dsn_2 = frame_entry->document_sequence_number();
EXPECT_NE(-1, isn_2);
EXPECT_NE(isn_1, isn_2);
EXPECT_EQ(dsn_1, dsn_2);
@@ -2664,8 +2667,8 @@ IN_PROC_BROWSER_TEST_F(NavigationControllerBrowserTest,
FrameTreeNode* subframe = root->child_at(0);
FrameNavigationEntry* subframe_entry =
controller.GetLastCommittedEntry()->GetFrameEntry(subframe);
- int64 isn_3 = subframe_entry->item_sequence_number();
- int64 dsn_3 = subframe_entry->document_sequence_number();
+ int64_t isn_3 = subframe_entry->item_sequence_number();
+ int64_t dsn_3 = subframe_entry->document_sequence_number();
EXPECT_NE(-1, isn_2);
EXPECT_NE(isn_2, isn_3);
EXPECT_NE(dsn_2, dsn_3);
@@ -2675,8 +2678,8 @@ IN_PROC_BROWSER_TEST_F(NavigationControllerBrowserTest,
EXPECT_TRUE(WaitForLoadStop(shell()->web_contents()));
subframe_entry = controller.GetLastCommittedEntry()->GetFrameEntry(subframe);
- int64 isn_4 = subframe_entry->item_sequence_number();
- int64 dsn_4 = subframe_entry->document_sequence_number();
+ int64_t isn_4 = subframe_entry->item_sequence_number();
+ int64_t dsn_4 = subframe_entry->document_sequence_number();
EXPECT_NE(-1, isn_4);
EXPECT_NE(isn_3, isn_4);
EXPECT_EQ(dsn_3, dsn_4);
diff --git a/content/browser/frame_host/navigation_controller_impl_unittest.cc b/content/browser/frame_host/navigation_controller_impl_unittest.cc
index cb4f1d0..ac73cc5 100644
--- a/content/browser/frame_host/navigation_controller_impl_unittest.cc
+++ b/content/browser/frame_host/navigation_controller_impl_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 "base/basictypes.h"
+#include <stddef.h>
+#include <stdint.h>
+
#include "base/bind.h"
#include "base/files/file_util.h"
+#include "base/macros.h"
#include "base/memory/scoped_ptr.h"
#include "base/stl_util.h"
#include "base/strings/string_util.h"
#include "base/strings/utf_string_conversions.h"
#include "base/time/time.h"
+#include "build/build_config.h"
#include "content/browser/frame_host/cross_site_transferring_request.h"
#include "content/browser/frame_host/frame_navigation_entry.h"
#include "content/browser/frame_host/navigation_controller_impl.h"
@@ -133,7 +137,7 @@ namespace content {
// function.
TEST(TimeSmoother, Basic) {
NavigationControllerImpl::TimeSmoother smoother;
- for (int64 i = 1; i < 1000; ++i) {
+ for (int64_t i = 1; i < 1000; ++i) {
base::Time t = base::Time::FromInternalValue(i);
EXPECT_EQ(t, smoother.GetSmoothedTime(t));
}
@@ -145,7 +149,7 @@ TEST(TimeSmoother, SingleDuplicate) {
NavigationControllerImpl::TimeSmoother smoother;
base::Time t = base::Time::FromInternalValue(1);
EXPECT_EQ(t, smoother.GetSmoothedTime(t));
- for (int64 i = 1; i < 1000; ++i) {
+ for (int64_t i = 1; i < 1000; ++i) {
base::Time expected_t = base::Time::FromInternalValue(i + 1);
t = base::Time::FromInternalValue(i);
EXPECT_EQ(expected_t, smoother.GetSmoothedTime(t));
@@ -155,14 +159,14 @@ TEST(TimeSmoother, SingleDuplicate) {
// With k duplicates and timestamps thereafter increasing by one
// microsecond, the smoothed time should always be k behind.
TEST(TimeSmoother, ManyDuplicates) {
- const int64 kNumDuplicates = 100;
+ const int64_t kNumDuplicates = 100;
NavigationControllerImpl::TimeSmoother smoother;
base::Time t = base::Time::FromInternalValue(1);
- for (int64 i = 0; i < kNumDuplicates; ++i) {
+ for (int64_t i = 0; i < kNumDuplicates; ++i) {
base::Time expected_t = base::Time::FromInternalValue(i + 1);
EXPECT_EQ(expected_t, smoother.GetSmoothedTime(t));
}
- for (int64 i = 1; i < 1000; ++i) {
+ for (int64_t i = 1; i < 1000; ++i) {
base::Time expected_t =
base::Time::FromInternalValue(i + kNumDuplicates);
t = base::Time::FromInternalValue(i);
@@ -173,10 +177,10 @@ TEST(TimeSmoother, ManyDuplicates) {
// If the clock jumps far back enough after a run of duplicates, it
// should immediately jump to that value.
TEST(TimeSmoother, ClockBackwardsJump) {
- const int64 kNumDuplicates = 100;
+ const int64_t kNumDuplicates = 100;
NavigationControllerImpl::TimeSmoother smoother;
base::Time t = base::Time::FromInternalValue(1000);
- for (int64 i = 0; i < kNumDuplicates; ++i) {
+ for (int64_t i = 0; i < kNumDuplicates; ++i) {
base::Time expected_t = base::Time::FromInternalValue(i + 1000);
EXPECT_EQ(expected_t, smoother.GetSmoothedTime(t));
}
diff --git a/content/browser/frame_host/navigation_entry_impl.cc b/content/browser/frame_host/navigation_entry_impl.cc
index e72549e..bab6248 100644
--- a/content/browser/frame_host/navigation_entry_impl.cc
+++ b/content/browser/frame_host/navigation_entry_impl.cc
@@ -4,11 +4,14 @@
#include "content/browser/frame_host/navigation_entry_impl.h"
+#include <stddef.h>
+
#include <queue>
#include "base/metrics/histogram.h"
#include "base/strings/string_util.h"
#include "base/strings/utf_string_conversions.h"
+#include "build/build_config.h"
#include "components/url_formatter/url_formatter.h"
#include "content/common/content_constants_internal.h"
#include "content/common/navigation_params.h"
@@ -303,7 +306,7 @@ void NavigationEntryImpl::SetPageID(int page_id) {
page_id_ = page_id;
}
-int32 NavigationEntryImpl::GetPageID() const {
+int32_t NavigationEntryImpl::GetPageID() const {
return page_id_;
}
@@ -392,11 +395,11 @@ bool NavigationEntryImpl::GetHasPostData() const {
return has_post_data_;
}
-void NavigationEntryImpl::SetPostID(int64 post_id) {
+void NavigationEntryImpl::SetPostID(int64_t post_id) {
post_id_ = post_id;
}
-int64 NavigationEntryImpl::GetPostID() const {
+int64_t NavigationEntryImpl::GetPostID() const {
return post_id_;
}
@@ -671,8 +674,8 @@ void NavigationEntryImpl::ResetForCommit() {
void NavigationEntryImpl::AddOrUpdateFrameEntry(
FrameTreeNode* frame_tree_node,
const std::string& frame_unique_name,
- int64 item_sequence_number,
- int64 document_sequence_number,
+ int64_t item_sequence_number,
+ int64_t document_sequence_number,
SiteInstanceImpl* site_instance,
const GURL& url,
const Referrer& referrer,
diff --git a/content/browser/frame_host/navigation_entry_impl.h b/content/browser/frame_host/navigation_entry_impl.h
index 000504b..9fc75fc 100644
--- a/content/browser/frame_host/navigation_entry_impl.h
+++ b/content/browser/frame_host/navigation_entry_impl.h
@@ -5,10 +5,13 @@
#ifndef CONTENT_BROWSER_FRAME_HOST_NAVIGATION_ENTRY_IMPL_H_
#define CONTENT_BROWSER_FRAME_HOST_NAVIGATION_ENTRY_IMPL_H_
-#include "base/basictypes.h"
+#include <stdint.h>
+
+#include "base/macros.h"
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_vector.h"
#include "base/time/time.h"
+#include "build/build_config.h"
#include "content/browser/frame_host/frame_navigation_entry.h"
#include "content/browser/frame_host/frame_tree_node.h"
#include "content/browser/site_instance_impl.h"
@@ -97,7 +100,7 @@ class CONTENT_EXPORT NavigationEntryImpl
void SetPageState(const PageState& state) override;
PageState GetPageState() const override;
void SetPageID(int page_id) override;
- int32 GetPageID() const override;
+ int32_t GetPageID() const override;
const base::string16& GetTitleForDisplay(
const std::string& languages) const override;
bool IsViewSourceMode() const override;
@@ -106,8 +109,8 @@ class CONTENT_EXPORT NavigationEntryImpl
const GURL& GetUserTypedURL() const override;
void SetHasPostData(bool has_post_data) override;
bool GetHasPostData() const override;
- void SetPostID(int64 post_id) override;
- int64 GetPostID() const override;
+ void SetPostID(int64_t post_id) override;
+ int64_t GetPostID() const override;
void SetBrowserInitiatedPostData(const base::RefCountedMemory* data) override;
const base::RefCountedMemory* GetBrowserInitiatedPostData() const override;
const FaviconStatus& GetFavicon() const override;
@@ -187,8 +190,8 @@ class CONTENT_EXPORT NavigationEntryImpl
// that does not count as a real commit.
void AddOrUpdateFrameEntry(FrameTreeNode* frame_tree_node,
const std::string& frame_unique_name,
- int64 item_sequence_number,
- int64 document_sequence_number,
+ int64_t item_sequence_number,
+ int64_t document_sequence_number,
SiteInstanceImpl* site_instance,
const GURL& url,
const Referrer& referrer,
@@ -388,12 +391,12 @@ class CONTENT_EXPORT NavigationEntryImpl
bool update_virtual_url_with_url_;
base::string16 title_;
FaviconStatus favicon_;
- int32 page_id_;
+ int32_t page_id_;
SSLStatus ssl_;
ui::PageTransition transition_type_;
GURL user_typed_url_;
bool has_post_data_;
- int64 post_id_;
+ int64_t post_id_;
RestoreType restore_type_;
GURL original_request_url_;
bool is_overriding_user_agent_;
diff --git a/content/browser/frame_host/navigation_entry_impl_unittest.cc b/content/browser/frame_host/navigation_entry_impl_unittest.cc
index 4b5d138..7319b53 100644
--- a/content/browser/frame_host/navigation_entry_impl_unittest.cc
+++ b/content/browser/frame_host/navigation_entry_impl_unittest.cc
@@ -6,6 +6,7 @@
#include "base/strings/string_util.h"
#include "base/strings/utf_string_conversions.h"
#include "base/time/time.h"
+#include "build/build_config.h"
#include "content/browser/frame_host/navigation_entry_impl.h"
#include "content/browser/site_instance_impl.h"
#include "content/public/common/ssl_status.h"
diff --git a/content/browser/frame_host/navigation_entry_screenshot_manager.cc b/content/browser/frame_host/navigation_entry_screenshot_manager.cc
index dac7422..44bc2a0 100644
--- a/content/browser/frame_host/navigation_entry_screenshot_manager.cc
+++ b/content/browser/frame_host/navigation_entry_screenshot_manager.cc
@@ -5,6 +5,7 @@
#include "content/browser/frame_host/navigation_entry_screenshot_manager.h"
#include "base/command_line.h"
+#include "base/macros.h"
#include "base/threading/worker_pool.h"
#include "content/browser/frame_host/navigation_controller_impl.h"
#include "content/browser/frame_host/navigation_entry_impl.h"
diff --git a/content/browser/frame_host/navigation_entry_screenshot_manager.h b/content/browser/frame_host/navigation_entry_screenshot_manager.h
index df85f56..40600af 100644
--- a/content/browser/frame_host/navigation_entry_screenshot_manager.h
+++ b/content/browser/frame_host/navigation_entry_screenshot_manager.h
@@ -6,6 +6,7 @@
#define CONTENT_BROWSER_FRAME_HOST_NAVIGATION_ENTRY_SCREENSHOT_MANAGER_H_
#include "base/compiler_specific.h"
+#include "base/macros.h"
#include "base/memory/weak_ptr.h"
#include "base/time/time.h"
#include "content/common/content_export.h"
diff --git a/content/browser/frame_host/navigation_handle_impl.h b/content/browser/frame_host/navigation_handle_impl.h
index 7fcc018..192cdab 100644
--- a/content/browser/frame_host/navigation_handle_impl.h
+++ b/content/browser/frame_host/navigation_handle_impl.h
@@ -7,6 +7,8 @@
#include "content/public/browser/navigation_handle.h"
+#include <stddef.h>
+
#include "base/callback.h"
#include "base/macros.h"
#include "base/memory/scoped_ptr.h"
diff --git a/content/browser/frame_host/navigation_request.h b/content/browser/frame_host/navigation_request.h
index ccf9152..fb418c5 100644
--- a/content/browser/frame_host/navigation_request.h
+++ b/content/browser/frame_host/navigation_request.h
@@ -5,7 +5,7 @@
#ifndef CONTENT_BROWSER_FRAME_HOST_NAVIGATION_REQUEST_H_
#define CONTENT_BROWSER_FRAME_HOST_NAVIGATION_REQUEST_H_
-#include "base/basictypes.h"
+#include "base/macros.h"
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
#include "content/browser/frame_host/navigation_entry_impl.h"
diff --git a/content/browser/frame_host/navigation_request_info.h b/content/browser/frame_host/navigation_request_info.h
index f63db77..55ac9b0 100644
--- a/content/browser/frame_host/navigation_request_info.h
+++ b/content/browser/frame_host/navigation_request_info.h
@@ -7,7 +7,6 @@
#include <string>
-#include "base/basictypes.h"
#include "base/memory/ref_counted.h"
#include "content/common/content_export.h"
#include "content/common/navigation_params.h"
diff --git a/content/browser/frame_host/navigator_impl.h b/content/browser/frame_host/navigator_impl.h
index 9e82869..a890768 100644
--- a/content/browser/frame_host/navigator_impl.h
+++ b/content/browser/frame_host/navigator_impl.h
@@ -6,6 +6,7 @@
#define CONTENT_BROWSER_FRAME_HOST_NAVIGATOR_IMPL_H_
#include "base/containers/scoped_ptr_hash_map.h"
+#include "base/macros.h"
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
#include "base/time/time.h"
diff --git a/content/browser/frame_host/navigator_impl_unittest.cc b/content/browser/frame_host/navigator_impl_unittest.cc
index 59da751..24aa68e 100644
--- a/content/browser/frame_host/navigator_impl_unittest.cc
+++ b/content/browser/frame_host/navigator_impl_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 <stdint.h>
+
#include "base/macros.h"
#include "base/time/time.h"
+#include "build/build_config.h"
#include "content/browser/frame_host/navigation_controller_impl.h"
#include "content/browser/frame_host/navigation_entry_impl.h"
#include "content/browser/frame_host/navigation_request.h"
@@ -123,7 +126,7 @@ TEST_F(NavigatorTestWithBrowserSideNavigation,
EXPECT_FALSE(main_test_rfh()->IsRenderFrameLive());
// Start a browser-initiated navigation.
- int32 site_instance_id = main_test_rfh()->GetSiteInstance()->GetId();
+ int32_t site_instance_id = main_test_rfh()->GetSiteInstance()->GetId();
FrameTreeNode* node = main_test_rfh()->frame_tree_node();
int entry_id = RequestNavigation(node, kUrl);
NavigationRequest* request = node->navigation_request();
@@ -219,7 +222,7 @@ TEST_F(NavigatorTestWithBrowserSideNavigation,
contents()->NavigateAndCommit(kUrl1);
EXPECT_TRUE(main_test_rfh()->IsRenderFrameLive());
- int32 site_instance_id_1 = main_test_rfh()->GetSiteInstance()->GetId();
+ int32_t site_instance_id_1 = main_test_rfh()->GetSiteInstance()->GetId();
// Start a renderer-initiated non-user-initiated navigation.
process()->sink().ClearMessages();
@@ -539,7 +542,7 @@ TEST_F(NavigatorTestWithBrowserSideNavigation,
// Confirm a speculative RenderFrameHost was created.
TestRenderFrameHost* speculative_rfh = GetSpeculativeRenderFrameHost(node);
ASSERT_TRUE(speculative_rfh);
- int32 site_instance_id_1 = speculative_rfh->GetSiteInstance()->GetId();
+ int32_t site_instance_id_1 = speculative_rfh->GetSiteInstance()->GetId();
EXPECT_EQ(kUrl1_site, speculative_rfh->GetSiteInstance()->GetSiteURL());
// Request navigation to the 2nd URL; the NavigationRequest must have been
@@ -557,7 +560,7 @@ TEST_F(NavigatorTestWithBrowserSideNavigation,
// Confirm that a new speculative RenderFrameHost was created.
speculative_rfh = GetSpeculativeRenderFrameHost(node);
ASSERT_TRUE(speculative_rfh);
- int32 site_instance_id_2 = speculative_rfh->GetSiteInstance()->GetId();
+ int32_t site_instance_id_2 = speculative_rfh->GetSiteInstance()->GetId();
EXPECT_NE(site_instance_id_1, site_instance_id_2);
// Have the RenderFrameHost commit the navigation.
@@ -740,7 +743,7 @@ TEST_F(NavigatorTestWithBrowserSideNavigation,
// Initialization.
contents()->NavigateAndCommit(kUrl0);
FrameTreeNode* node = main_test_rfh()->frame_tree_node();
- int32 site_instance_id_0 = main_test_rfh()->GetSiteInstance()->GetId();
+ int32_t site_instance_id_0 = main_test_rfh()->GetSiteInstance()->GetId();
// Start a renderer-initiated non-user-initiated navigation to the 1st URL.
process()->sink().ClearMessages();
@@ -835,7 +838,7 @@ TEST_F(NavigatorTestWithBrowserSideNavigation,
EXPECT_EQ(SiteInstanceImpl::GetSiteForURL(browser_context(), kUrl),
speculative_rfh->GetSiteInstance()->GetSiteURL());
EXPECT_FALSE(node->render_manager()->pending_frame_host());
- int32 site_instance_id = speculative_rfh->GetSiteInstance()->GetId();
+ int32_t site_instance_id = speculative_rfh->GetSiteInstance()->GetId();
// Ask Navigator to commit the navigation by simulating a call to
// OnResponseStarted.
@@ -862,7 +865,7 @@ TEST_F(NavigatorTestWithBrowserSideNavigation,
const GURL kUrlInit("http://wikipedia.org/");
contents()->NavigateAndCommit(kUrlInit);
FrameTreeNode* node = main_test_rfh()->frame_tree_node();
- int32 init_site_instance_id = main_test_rfh()->GetSiteInstance()->GetId();
+ int32_t init_site_instance_id = main_test_rfh()->GetSiteInstance()->GetId();
// Begin navigating to another site.
const GURL kUrl("http://google.com/");
@@ -870,7 +873,7 @@ TEST_F(NavigatorTestWithBrowserSideNavigation,
int entry_id = RequestNavigation(node, kUrl);
TestRenderFrameHost* speculative_rfh = GetSpeculativeRenderFrameHost(node);
ASSERT_TRUE(speculative_rfh);
- int32 site_instance_id = speculative_rfh->GetSiteInstance()->GetId();
+ int32_t site_instance_id = speculative_rfh->GetSiteInstance()->GetId();
RenderFrameDeletedObserver rfh_deleted_observer(speculative_rfh);
EXPECT_NE(init_site_instance_id, site_instance_id);
EXPECT_EQ(init_site_instance_id, main_test_rfh()->GetSiteInstance()->GetId());
@@ -913,7 +916,8 @@ TEST_F(NavigatorTestWithBrowserSideNavigation,
// known final SiteInstance.
EXPECT_EQ(SiteInstanceImpl::GetSiteForURL(browser_context(), kUrlRedirect),
speculative_rfh->GetSiteInstance()->GetSiteURL());
- int32 redirect_site_instance_id = speculative_rfh->GetSiteInstance()->GetId();
+ int32_t redirect_site_instance_id =
+ speculative_rfh->GetSiteInstance()->GetId();
EXPECT_NE(init_site_instance_id, redirect_site_instance_id);
EXPECT_NE(site_instance_id, redirect_site_instance_id);
diff --git a/content/browser/frame_host/popup_menu_helper_mac.h b/content/browser/frame_host/popup_menu_helper_mac.h
index 5575d89..27d3f71 100644
--- a/content/browser/frame_host/popup_menu_helper_mac.h
+++ b/content/browser/frame_host/popup_menu_helper_mac.h
@@ -8,6 +8,7 @@
#include <vector>
#include "base/compiler_specific.h"
+#include "base/macros.h"
#include "content/common/content_export.h"
#include "content/public/browser/notification_observer.h"
#include "content/public/browser/notification_registrar.h"
diff --git a/content/browser/frame_host/render_frame_host_delegate.cc b/content/browser/frame_host/render_frame_host_delegate.cc
index f33dc2c..ec11905 100644
--- a/content/browser/frame_host/render_frame_host_delegate.cc
+++ b/content/browser/frame_host/render_frame_host_delegate.cc
@@ -6,6 +6,7 @@
#include "base/callback.h"
#include "base/strings/string16.h"
+#include "build/build_config.h"
#include "content/browser/frame_host/render_frame_host_delegate.h"
#include "ipc/ipc_message.h"
#include "ui/gfx/native_widget_types.h"
@@ -24,7 +25,9 @@ const GURL& RenderFrameHostDelegate::GetMainFrameLastCommittedURL() const {
}
bool RenderFrameHostDelegate::AddMessageToConsole(
- int32 level, const base::string16& message, int32 line_no,
+ int32_t level,
+ const base::string16& message,
+ int32_t line_no,
const base::string16& source_id) {
return false;
}
diff --git a/content/browser/frame_host/render_frame_host_delegate.h b/content/browser/frame_host/render_frame_host_delegate.h
index f3038fc..ee5aae5 100644
--- a/content/browser/frame_host/render_frame_host_delegate.h
+++ b/content/browser/frame_host/render_frame_host_delegate.h
@@ -5,10 +5,12 @@
#ifndef CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_DELEGATE_H_
#define CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_DELEGATE_H_
+#include <stdint.h>
+
#include <vector>
-#include "base/basictypes.h"
#include "base/i18n/rtl.h"
+#include "build/build_config.h"
#include "content/browser/webui/web_ui_impl.h"
#include "content/common/content_export.h"
#include "content/common/frame_message_enums.h"
@@ -50,9 +52,9 @@ class CONTENT_EXPORT RenderFrameHostDelegate {
virtual const GURL& GetMainFrameLastCommittedURL() const;
// A message was added to to the console.
- virtual bool AddMessageToConsole(int32 level,
+ virtual bool AddMessageToConsole(int32_t level,
const base::string16& message,
- int32 line_no,
+ int32_t line_no,
const base::string16& source_id);
// Informs the delegate whenever a RenderFrameHost is created.
@@ -101,7 +103,7 @@ class CONTENT_EXPORT RenderFrameHostDelegate {
// The page's title was changed and should be updated. Only called for the
// top-level frame.
virtual void UpdateTitle(RenderFrameHost* render_frame_host,
- int32 page_id,
+ int32_t page_id,
const base::string16& title,
base::i18n::TextDirection title_direction) {}
diff --git a/content/browser/frame_host/render_frame_host_factory.cc b/content/browser/frame_host/render_frame_host_factory.cc
index 6f896ce..d91354b 100644
--- a/content/browser/frame_host/render_frame_host_factory.cc
+++ b/content/browser/frame_host/render_frame_host_factory.cc
@@ -21,8 +21,8 @@ scoped_ptr<RenderFrameHostImpl> RenderFrameHostFactory::Create(
RenderWidgetHostDelegate* rwh_delegate,
FrameTree* frame_tree,
FrameTreeNode* frame_tree_node,
- int32 routing_id,
- int32 widget_routing_id,
+ int32_t routing_id,
+ int32_t widget_routing_id,
int flags) {
if (factory_) {
return factory_->CreateRenderFrameHost(
diff --git a/content/browser/frame_host/render_frame_host_factory.h b/content/browser/frame_host/render_frame_host_factory.h
index 9bd123b..1b2fdc3 100644
--- a/content/browser/frame_host/render_frame_host_factory.h
+++ b/content/browser/frame_host/render_frame_host_factory.h
@@ -5,7 +5,9 @@
#ifndef CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_FACTORY_H_
#define CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_FACTORY_H_
-#include "base/basictypes.h"
+#include <stdint.h>
+
+#include "base/macros.h"
#include "base/memory/scoped_ptr.h"
#include "content/common/content_export.h"
@@ -33,8 +35,8 @@ class CONTENT_EXPORT RenderFrameHostFactory {
RenderWidgetHostDelegate* rwh_delegate,
FrameTree* frame_tree,
FrameTreeNode* frame_tree_node,
- int32 routing_id,
- int32 widget_routing_id,
+ int32_t routing_id,
+ int32_t widget_routing_id,
int flags);
// Returns true if there is currently a globally-registered factory.
@@ -53,8 +55,8 @@ class CONTENT_EXPORT RenderFrameHostFactory {
RenderWidgetHostDelegate* rwh_delegate,
FrameTree* frame_tree,
FrameTreeNode* frame_tree_node,
- int32 routing_id,
- int32 widget_routing_id,
+ int32_t routing_id,
+ int32_t widget_routing_id,
int flags) = 0;
// Registers a factory to be called when new RenderFrameHostImpls are created.
diff --git a/content/browser/frame_host/render_frame_host_impl.cc b/content/browser/frame_host/render_frame_host_impl.cc
index 25f1e1d..5701ac6 100644
--- a/content/browser/frame_host/render_frame_host_impl.cc
+++ b/content/browser/frame_host/render_frame_host_impl.cc
@@ -10,6 +10,7 @@
#include "base/metrics/histogram.h"
#include "base/process/kill.h"
#include "base/time/time.h"
+#include "build/build_config.h"
#include "content/browser/accessibility/accessibility_mode_helper.h"
#include "content/browser/accessibility/ax_tree_id_registry.h"
#include "content/browser/accessibility/browser_accessibility_manager.h"
@@ -105,7 +106,7 @@ int g_next_javascript_callback_id = 1;
bool g_allow_injecting_javascript = false;
// The (process id, routing id) pair that identifies one RenderFrame.
-typedef std::pair<int32, int32> RenderFrameHostID;
+typedef std::pair<int32_t, int32_t> RenderFrameHostID;
typedef base::hash_map<RenderFrameHostID, RenderFrameHostImpl*>
RoutingIDFrameMap;
base::LazyInstance<RoutingIDFrameMap> g_routing_id_frame_map =
@@ -176,8 +177,8 @@ RenderFrameHostImpl::RenderFrameHostImpl(SiteInstance* site_instance,
RenderWidgetHostDelegate* rwh_delegate,
FrameTree* frame_tree,
FrameTreeNode* frame_tree_node,
- int32 routing_id,
- int32 widget_routing_id,
+ int32_t routing_id,
+ int32_t widget_routing_id,
int flags)
: render_view_host_(render_view_host),
delegate_(delegate),
@@ -768,9 +769,9 @@ void RenderFrameHostImpl::Init() {
}
void RenderFrameHostImpl::OnAddMessageToConsole(
- int32 level,
+ int32_t level,
const base::string16& message,
- int32 line_no,
+ int32_t line_no,
const base::string16& source_id) {
if (delegate_->AddMessageToConsole(level, message, line_no, source_id))
return;
@@ -778,7 +779,7 @@ void RenderFrameHostImpl::OnAddMessageToConsole(
// Pass through log level only on WebUI pages to limit console spew.
const bool is_web_ui =
HasWebUIScheme(delegate_->GetMainFrameLastCommittedURL());
- const int32 resolved_level = is_web_ui ? level : ::logging::LOG_INFO;
+ const int32_t resolved_level = is_web_ui ? level : ::logging::LOG_INFO;
// LogMessages can be persisted so this shouldn't be logged in incognito mode.
// This rule is not applied to WebUI pages, because source code of WebUI is a
@@ -1334,7 +1335,7 @@ void RenderFrameHostImpl::OnJavaScriptExecuteResponse(
}
}
-void RenderFrameHostImpl::OnVisualStateResponse(uint64 id) {
+void RenderFrameHostImpl::OnVisualStateResponse(uint64_t id) {
auto it = visual_state_callbacks_.find(id);
if (it != visual_state_callbacks_.end()) {
it->second.Run(true);
@@ -1382,7 +1383,7 @@ void RenderFrameHostImpl::OnDidAccessInitialDocument() {
delegate_->DidAccessInitialDocument();
}
-void RenderFrameHostImpl::OnDidChangeOpener(int32 opener_routing_id) {
+void RenderFrameHostImpl::OnDidChangeOpener(int32_t opener_routing_id) {
frame_tree_node_->render_manager()->DidChangeOpener(opener_routing_id,
GetSiteInstance());
}
@@ -1399,14 +1400,14 @@ void RenderFrameHostImpl::OnEnforceStrictMixedContentChecking() {
frame_tree_node()->SetEnforceStrictMixedContentChecking(true);
}
-void RenderFrameHostImpl::OnDidAssignPageId(int32 page_id) {
+void RenderFrameHostImpl::OnDidAssignPageId(int32_t page_id) {
// Update the RVH's current page ID so that future IPCs from the renderer
// correspond to the new page.
render_view_host_->page_id_ = page_id;
}
FrameTreeNode* RenderFrameHostImpl::FindAndVerifyChild(
- int32 child_frame_routing_id,
+ int32_t child_frame_routing_id,
bad_message::BadMessageReason reason) {
FrameTreeNode* child = frame_tree_node()->frame_tree()->FindByRoutingID(
GetProcess()->GetID(), child_frame_routing_id);
@@ -1420,7 +1421,7 @@ FrameTreeNode* RenderFrameHostImpl::FindAndVerifyChild(
}
void RenderFrameHostImpl::OnDidChangeSandboxFlags(
- int32 frame_routing_id,
+ int32_t frame_routing_id,
blink::WebSandboxFlags flags) {
// Ensure that a frame can only update sandbox flags for its immediate
// children. If this is not the case, the renderer is considered malicious
@@ -1445,7 +1446,7 @@ void RenderFrameHostImpl::OnDidChangeSandboxFlags(
}
void RenderFrameHostImpl::OnDidChangeFrameOwnerProperties(
- int32 frame_routing_id,
+ int32_t frame_routing_id,
const blink::WebFrameOwnerProperties& frame_owner_properties) {
FrameTreeNode* child = FindAndVerifyChild(
frame_routing_id, bad_message::RFH_OWNER_PROPERTY);
@@ -2284,8 +2285,8 @@ void RenderFrameHostImpl::ActivateFindInPageResultForAccessibility(
void RenderFrameHostImpl::InsertVisualStateCallback(
const VisualStateCallback& callback) {
- static uint64 next_id = 1;
- uint64 key = next_id++;
+ static uint64_t next_id = 1;
+ uint64_t key = next_id++;
Send(new FrameMsg_VisualStateRequest(routing_id_, key));
visual_state_callbacks_.insert(std::make_pair(key, callback));
}
@@ -2491,7 +2492,7 @@ void RenderFrameHostImpl::AXContentNodeDataToAXNodeData(
// instance IDs to generic attributes with global AXTreeIDs.
for (auto iter : src.content_int_attributes) {
AXContentIntAttribute attr = iter.first;
- int32 value = iter.second;
+ int32_t value = iter.second;
switch (attr) {
case AX_CONTENT_ATTR_CHILD_ROUTING_ID:
dst->int_attributes.push_back(std::make_pair(
diff --git a/content/browser/frame_host/render_frame_host_impl.h b/content/browser/frame_host/render_frame_host_impl.h
index d6bafa3..cc190ac 100644
--- a/content/browser/frame_host/render_frame_host_impl.h
+++ b/content/browser/frame_host/render_frame_host_impl.h
@@ -5,6 +5,9 @@
#ifndef CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_
#define CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_
+#include <stddef.h>
+#include <stdint.h>
+
#include <map>
#include <string>
#include <vector>
@@ -12,9 +15,11 @@
#include "base/callback.h"
#include "base/compiler_specific.h"
#include "base/gtest_prod_util.h"
+#include "base/macros.h"
#include "base/memory/weak_ptr.h"
#include "base/strings/string16.h"
#include "base/time/time.h"
+#include "build/build_config.h"
#include "content/browser/accessibility/browser_accessibility_manager.h"
#include "content/browser/bad_message.h"
#include "content/browser/site_instance_impl.h"
@@ -529,8 +534,8 @@ class CONTENT_EXPORT RenderFrameHostImpl
RenderWidgetHostDelegate* rwh_delegate,
FrameTree* frame_tree,
FrameTreeNode* frame_tree_node,
- int32 routing_id,
- int32 widget_routing_id,
+ int32_t routing_id,
+ int32_t widget_routing_id,
int flags);
private:
@@ -540,9 +545,9 @@ class CONTENT_EXPORT RenderFrameHostImpl
FRIEND_TEST_ALL_PREFIXES(SitePerProcessBrowserTest, CrashSubframe);
// IPC Message handlers.
- void OnAddMessageToConsole(int32 level,
+ void OnAddMessageToConsole(int32_t level,
const base::string16& message,
- int32 line_no,
+ int32_t line_no,
const base::string16& source_id);
void OnDetach();
void OnFrameFocused();
@@ -571,7 +576,7 @@ class CONTENT_EXPORT RenderFrameHostImpl
void OnRenderProcessGone(int status, int error_code);
void OnContextMenu(const ContextMenuParams& params);
void OnJavaScriptExecuteResponse(int id, const base::ListValue& result);
- void OnVisualStateResponse(uint64 id);
+ void OnVisualStateResponse(uint64_t id);
void OnRunJavaScriptMessage(const base::string16& message,
const base::string16& default_prompt,
const GURL& frame_url,
@@ -585,14 +590,14 @@ class CONTENT_EXPORT RenderFrameHostImpl
size_t start_offset,
size_t end_offset);
void OnDidAccessInitialDocument();
- void OnDidChangeOpener(int32 opener_routing_id);
+ void OnDidChangeOpener(int32_t opener_routing_id);
void OnDidChangeName(const std::string& name);
void OnEnforceStrictMixedContentChecking();
- void OnDidAssignPageId(int32 page_id);
- void OnDidChangeSandboxFlags(int32 frame_routing_id,
+ void OnDidAssignPageId(int32_t page_id);
+ void OnDidChangeSandboxFlags(int32_t frame_routing_id,
blink::WebSandboxFlags flags);
void OnDidChangeFrameOwnerProperties(
- int32 frame_routing_id,
+ int32_t frame_routing_id,
const blink::WebFrameOwnerProperties& frame_owner_properties);
void OnUpdateTitle(const base::string16& title,
blink::WebTextDirection title_direction);
@@ -684,8 +689,8 @@ class CONTENT_EXPORT RenderFrameHostImpl
// immediate child of this FrameTreeNode. |child_frame_routing_id| is
// considered untrusted, so the renderer process is killed if it refers to a
// FrameTreeNode that is not a child of this node.
- FrameTreeNode* FindAndVerifyChild(
- int32 child_frame_routing_id, bad_message::BadMessageReason reason);
+ FrameTreeNode* FindAndVerifyChild(int32_t child_frame_routing_id,
+ bad_message::BadMessageReason reason);
// For now, RenderFrameHosts indirectly keep RenderViewHosts alive via a
// refcount that calls Shutdown when it reaches zero. This allows each
@@ -737,7 +742,7 @@ class CONTENT_EXPORT RenderFrameHostImpl
// The mapping of pending JavaScript calls created by
// ExecuteJavaScript and their corresponding callbacks.
std::map<int, JavaScriptResultCallback> javascript_callbacks_;
- std::map<uint64, VisualStateCallback> visual_state_callbacks_;
+ std::map<uint64_t, VisualStateCallback> visual_state_callbacks_;
// RenderFrameHosts that need management of the rendering and input events
// for their frame subtrees require RenderWidgetHosts. This typically
diff --git a/content/browser/frame_host/render_frame_host_impl_browsertest.cc b/content/browser/frame_host/render_frame_host_impl_browsertest.cc
index 3560a80..6547788 100644
--- a/content/browser/frame_host/render_frame_host_impl_browsertest.cc
+++ b/content/browser/frame_host/render_frame_host_impl_browsertest.cc
@@ -4,6 +4,7 @@
#include "content/browser/frame_host/render_frame_host_impl.h"
+#include "base/macros.h"
#include "content/browser/web_contents/web_contents_impl.h"
#include "content/public/browser/render_frame_host.h"
#include "content/public/browser/web_contents.h"
diff --git a/content/browser/frame_host/render_frame_host_manager.cc b/content/browser/frame_host/render_frame_host_manager.cc
index 45d2215e..d67ba0e 100644
--- a/content/browser/frame_host/render_frame_host_manager.cc
+++ b/content/browser/frame_host/render_frame_host_manager.cc
@@ -4,6 +4,8 @@
#include "content/browser/frame_host/render_frame_host_manager.h"
+#include <stddef.h>
+
#include <algorithm>
#include <utility>
@@ -89,7 +91,7 @@ bool OpenerForFrameTreeNode(
class RenderFrameHostManager::RenderFrameProxyHostMap
: public RenderProcessHostObserver {
public:
- using MapType = base::hash_map<int32, RenderFrameProxyHost*>;
+ using MapType = base::hash_map<int32_t, RenderFrameProxyHost*>;
RenderFrameProxyHostMap(RenderFrameHostManager* manager);
~RenderFrameProxyHostMap() override;
@@ -102,14 +104,14 @@ class RenderFrameHostManager::RenderFrameProxyHostMap
// Returns the proxy with the specified ID, or nullptr if there is no such
// one.
- RenderFrameProxyHost* Get(int32 id);
+ RenderFrameProxyHost* Get(int32_t id);
// Adds the specified proxy with the specified ID. It is an error (and fatal)
// to add more than one proxy with the specified ID.
- void Add(int32 id, scoped_ptr<RenderFrameProxyHost> proxy);
+ void Add(int32_t id, scoped_ptr<RenderFrameProxyHost> proxy);
// Removes the proxy with the specified site instance ID.
- void Remove(int32 id);
+ void Remove(int32_t id);
// Removes all proxies.
void Clear();
@@ -134,7 +136,7 @@ RenderFrameHostManager::RenderFrameProxyHostMap::~RenderFrameProxyHostMap() {
}
RenderFrameProxyHost* RenderFrameHostManager::RenderFrameProxyHostMap::Get(
- int32 id) {
+ int32_t id) {
auto it = map_.find(id);
if (it != map_.end())
return it->second;
@@ -142,7 +144,7 @@ RenderFrameProxyHost* RenderFrameHostManager::RenderFrameProxyHostMap::Get(
}
void RenderFrameHostManager::RenderFrameProxyHostMap::Add(
- int32 id,
+ int32_t id,
scoped_ptr<RenderFrameProxyHost> proxy) {
CHECK_EQ(0u, map_.count(id)) << "Inserting a duplicate item.";
@@ -159,7 +161,7 @@ void RenderFrameHostManager::RenderFrameProxyHostMap::Add(
map_[id] = proxy.release();
}
-void RenderFrameHostManager::RenderFrameProxyHostMap::Remove(int32 id) {
+void RenderFrameHostManager::RenderFrameProxyHostMap::Remove(int32_t id) {
auto it = map_.find(id);
if (it == map_.end())
return;
@@ -259,9 +261,9 @@ RenderFrameHostManager::~RenderFrameHostManager() {
}
void RenderFrameHostManager::Init(SiteInstance* site_instance,
- int32 view_routing_id,
- int32 frame_routing_id,
- int32 widget_routing_id) {
+ int32_t view_routing_id,
+ int32_t frame_routing_id,
+ int32_t widget_routing_id) {
DCHECK(site_instance);
// TODO(avi): While RenderViewHostImpl is-a RenderWidgetHostImpl, this must
// hold true to avoid having two RenderWidgetHosts for the top-level frame.
@@ -837,7 +839,7 @@ void RenderFrameHostManager::SwapOutOldFrame(
// If the old RFH is not live, just return as there is no further work to do.
// It will be deleted and there will be no proxy created.
- int32 old_site_instance_id =
+ int32_t old_site_instance_id =
old_render_frame_host->GetSiteInstance()->GetId();
if (!old_render_frame_host->IsRenderFrameLive()) {
ShutdownProxiesIfLastActiveFrameInSiteInstance(old_render_frame_host.get());
@@ -1202,7 +1204,7 @@ RenderFrameHostManager::SiteInstanceDescriptor::SiteInstanceDescriptor(
// static
bool RenderFrameHostManager::ClearProxiesInSiteInstance(
- int32 site_instance_id,
+ int32_t site_instance_id,
FrameTreeNode* node) {
RenderFrameProxyHost* proxy =
node->render_manager()->proxy_hosts_->Get(site_instance_id);
@@ -1226,8 +1228,9 @@ bool RenderFrameHostManager::ClearProxiesInSiteInstance(
}
// static.
-bool RenderFrameHostManager::ResetProxiesInSiteInstance(int32 site_instance_id,
- FrameTreeNode* node) {
+bool RenderFrameHostManager::ResetProxiesInSiteInstance(
+ int32_t site_instance_id,
+ FrameTreeNode* node) {
RenderFrameProxyHost* proxy =
node->render_manager()->proxy_hosts_->Get(site_instance_id);
if (proxy)
@@ -1732,9 +1735,9 @@ void RenderFrameHostManager::CreateProxiesForNewNamedFrame() {
scoped_ptr<RenderFrameHostImpl> RenderFrameHostManager::CreateRenderFrameHost(
SiteInstance* site_instance,
- int32 view_routing_id,
- int32 frame_routing_id,
- int32 widget_routing_id,
+ int32_t view_routing_id,
+ int32_t frame_routing_id,
+ int32_t widget_routing_id,
int flags) {
if (frame_routing_id == MSG_ROUTING_NONE)
frame_routing_id = site_instance->GetProcess()->GetNextRoutingID();
@@ -1852,7 +1855,7 @@ scoped_ptr<RenderFrameHostImpl> RenderFrameHostManager::CreateRenderFrame(
} else {
// Create a new RenderFrameHost if we don't find an existing one.
- int32 widget_routing_id = MSG_ROUTING_NONE;
+ int32_t widget_routing_id = MSG_ROUTING_NONE;
// A RenderFrame in a different process from its parent RenderFrame
// requires a RenderWidget for input/layout/painting.
@@ -2279,7 +2282,7 @@ void RenderFrameHostManager::ShutdownProxiesIfLastActiveFrameInSiteInstance(
// After |render_frame_host| goes away, there will be no active frames left in
// its SiteInstance, so we can delete all proxies created in that SiteInstance
// on behalf of frames anywhere in the BrowsingInstance.
- int32 site_instance_id = render_frame_host->GetSiteInstance()->GetId();
+ int32_t site_instance_id = render_frame_host->GetSiteInstance()->GetId();
// First remove any proxies for this SiteInstance from our own list.
ClearProxiesInSiteInstance(site_instance_id, frame_tree_node_);
diff --git a/content/browser/frame_host/render_frame_host_manager.h b/content/browser/frame_host/render_frame_host_manager.h
index db0645e..642f002 100644
--- a/content/browser/frame_host/render_frame_host_manager.h
+++ b/content/browser/frame_host/render_frame_host_manager.h
@@ -5,11 +5,13 @@
#ifndef CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_MANAGER_H_
#define CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_MANAGER_H_
+#include <stdint.h>
+
#include <list>
#include <map>
-#include "base/basictypes.h"
#include "base/logging.h"
+#include "base/macros.h"
#include "base/memory/scoped_ptr.h"
#include "base/memory/weak_ptr.h"
#include "content/browser/frame_host/render_frame_host_impl.h"
@@ -199,9 +201,9 @@ class CONTENT_EXPORT RenderFrameHostManager {
// For arguments, see WebContentsImpl constructor.
void Init(SiteInstance* site_instance,
- int32 view_routing_id,
- int32 frame_routing_id,
- int32 widget_routing_id);
+ int32_t view_routing_id,
+ int32_t frame_routing_id,
+ int32_t widget_routing_id);
// Returns the currently active RenderFrameHost.
//
@@ -519,11 +521,11 @@ class CONTENT_EXPORT RenderFrameHostManager {
// Used with FrameTree::ForEach to erase RenderFrameProxyHosts from a
// FrameTreeNode's RenderFrameHostManager.
- static bool ClearProxiesInSiteInstance(int32 site_instance_id,
+ static bool ClearProxiesInSiteInstance(int32_t site_instance_id,
FrameTreeNode* node);
// Used with FrameTree::ForEach to reset initialized state of
// RenderFrameProxyHosts from a FrameTreeNode's RenderFrameHostManager.
- static bool ResetProxiesInSiteInstance(int32 site_instance_id,
+ static bool ResetProxiesInSiteInstance(int32_t site_instance_id,
FrameTreeNode* node);
// Returns whether this tab should transition to a new renderer for
@@ -630,11 +632,12 @@ class CONTENT_EXPORT RenderFrameHostManager {
FrameTreeNode* skip_this_node);
// Creates a RenderFrameHost and corresponding RenderViewHost if necessary.
- scoped_ptr<RenderFrameHostImpl> CreateRenderFrameHost(SiteInstance* instance,
- int32 view_routing_id,
- int32 frame_routing_id,
- int32 widget_routing_id,
- int flags);
+ scoped_ptr<RenderFrameHostImpl> CreateRenderFrameHost(
+ SiteInstance* instance,
+ int32_t view_routing_id,
+ int32_t frame_routing_id,
+ int32_t widget_routing_id,
+ int flags);
// PlzNavigate
// Create and initialize a speculative RenderFrameHost for an ongoing
diff --git a/content/browser/frame_host/render_frame_host_manager_browsertest.cc b/content/browser/frame_host/render_frame_host_manager_browsertest.cc
index f66fba6..afb1ca06 100644
--- a/content/browser/frame_host/render_frame_host_manager_browsertest.cc
+++ b/content/browser/frame_host/render_frame_host_manager_browsertest.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 "base/command_line.h"
@@ -14,6 +17,7 @@
#include "base/strings/utf_string_conversions.h"
#include "base/thread_task_runner_handle.h"
#include "base/values.h"
+#include "build/build_config.h"
#include "content/browser/child_process_security_policy_impl.h"
#include "content/browser/frame_host/render_frame_proxy_host.h"
#include "content/browser/renderer_host/render_view_host_impl.h"
@@ -2069,7 +2073,7 @@ IN_PROC_BROWSER_TEST_F(RenderFrameHostManagerTest,
FrameTreeNode* root = static_cast<WebContentsImpl*>(shell()->web_contents())
->GetFrameTree()
->root();
- int32 orig_site_instance_id =
+ int32_t orig_site_instance_id =
root->current_frame_host()->GetSiteInstance()->GetId();
int initial_process_id =
root->current_frame_host()->GetSiteInstance()->GetProcess()->GetID();
diff --git a/content/browser/frame_host/render_frame_host_manager_unittest.cc b/content/browser/frame_host/render_frame_host_manager_unittest.cc
index 3fa5c91..b6e72e9 100644
--- a/content/browser/frame_host/render_frame_host_manager_unittest.cc
+++ b/content/browser/frame_host/render_frame_host_manager_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 "base/command_line.h"
#include "base/files/file_path.h"
+#include "base/macros.h"
#include "base/strings/utf_string_conversions.h"
#include "base/test/histogram_tester.h"
#include "base/time/time.h"
+#include "build/build_config.h"
#include "content/browser/compositor/test/no_transport_image_transport_factory.h"
#include "content/browser/frame_host/cross_site_transferring_request.h"
#include "content/browser/frame_host/navigation_controller_impl.h"
@@ -344,8 +348,8 @@ class RenderFrameHostManagerTest : public RenderViewHostImplTestHarness {
EXPECT_EQ(RenderFrameHostImpl::STATE_DEFAULT, old_rfh->rfh_state());
// Commit the navigation with a new page ID.
- int32 max_page_id = contents()->GetMaxPageIDForSiteInstance(
- active_rfh->GetSiteInstance());
+ int32_t max_page_id =
+ contents()->GetMaxPageIDForSiteInstance(active_rfh->GetSiteInstance());
// Use an observer to avoid accessing a deleted renderer later on when the
// state is being checked.
@@ -1004,7 +1008,7 @@ TEST_F(RenderFrameHostManagerTest, AlwaysSendEnableViewSourceMode) {
ASSERT_TRUE(contents()->GetPendingMainFrame())
<< "Expected new pending RenderFrameHost to be created.";
RenderFrameHost* last_rfh = contents()->GetPendingMainFrame();
- int32 new_id =
+ int32_t new_id =
contents()->GetMaxPageIDForSiteInstance(last_rfh->GetSiteInstance()) + 1;
contents()->GetPendingMainFrame()->SendNavigate(new_id, entry_id, true, kUrl);
diff --git a/content/browser/frame_host/render_frame_message_filter.cc b/content/browser/frame_host/render_frame_message_filter.cc
index c03b548..21a811a 100644
--- a/content/browser/frame_host/render_frame_message_filter.cc
+++ b/content/browser/frame_host/render_frame_message_filter.cc
@@ -5,8 +5,10 @@
#include "content/browser/frame_host/render_frame_message_filter.h"
#include "base/command_line.h"
+#include "base/macros.h"
#include "base/metrics/field_trial.h"
#include "base/strings/string_util.h"
+#include "build/build_config.h"
#include "content/browser/bad_message.h"
#include "content/browser/child_process_security_policy_impl.h"
#include "content/browser/frame_host/render_frame_host_impl.h"
@@ -579,7 +581,7 @@ void RenderFrameMessageFilter::OnOpenChannelToPepperPlugin(
void RenderFrameMessageFilter::OnDidCreateOutOfProcessPepperInstance(
int plugin_child_id,
- int32 pp_instance,
+ int32_t pp_instance,
PepperRendererInstanceData instance_data,
bool is_external) {
// It's important that we supply the render process ID ourselves based on the
@@ -605,7 +607,7 @@ void RenderFrameMessageFilter::OnDidCreateOutOfProcessPepperInstance(
void RenderFrameMessageFilter::OnDidDeleteOutOfProcessPepperInstance(
int plugin_child_id,
- int32 pp_instance,
+ int32_t pp_instance,
bool is_external) {
if (is_external) {
// We provide the BrowserPpapiHost to the embedder, so it's safe to cast.
@@ -631,7 +633,7 @@ void RenderFrameMessageFilter::OnOpenChannelToPpapiBroker(
void RenderFrameMessageFilter::OnPluginInstanceThrottleStateChange(
int plugin_child_id,
- int32 pp_instance,
+ int32_t pp_instance,
bool is_throttled) {
// Feature is only implemented for non-external Plugins.
PpapiPluginProcessHost::OnPluginInstanceThrottleStateChange(
diff --git a/content/browser/frame_host/render_frame_message_filter.h b/content/browser/frame_host/render_frame_message_filter.h
index 3642128..194e207 100644
--- a/content/browser/frame_host/render_frame_message_filter.h
+++ b/content/browser/frame_host/render_frame_message_filter.h
@@ -5,6 +5,8 @@
#ifndef CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_MESSAGE_FILTER_H_
#define CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_MESSAGE_FILTER_H_
+#include <stdint.h>
+
#include <set>
#include "content/common/frame_replication_state.h"
@@ -123,16 +125,16 @@ class RenderFrameMessageFilter : public BrowserMessageFilter {
IPC::Message* reply_msg);
void OnDidCreateOutOfProcessPepperInstance(
int plugin_child_id,
- int32 pp_instance,
+ int32_t pp_instance,
PepperRendererInstanceData instance_data,
bool is_external);
void OnDidDeleteOutOfProcessPepperInstance(int plugin_child_id,
- int32 pp_instance,
+ int32_t pp_instance,
bool is_external);
void OnOpenChannelToPpapiBroker(int routing_id,
const base::FilePath& path);
void OnPluginInstanceThrottleStateChange(int plugin_child_id,
- int32 pp_instance,
+ int32_t pp_instance,
bool is_throttled);
#endif // ENABLE_PLUGINS
diff --git a/content/browser/frame_host/render_frame_message_filter_browsertest.cc b/content/browser/frame_host/render_frame_message_filter_browsertest.cc
index 96eb9c1..3362e96 100644
--- a/content/browser/frame_host/render_frame_message_filter_browsertest.cc
+++ b/content/browser/frame_host/render_frame_message_filter_browsertest.cc
@@ -4,7 +4,6 @@
#include <string>
-#include "base/basictypes.h"
#include "base/command_line.h"
#include "base/files/file_path.h"
#include "base/test/histogram_tester.h"
diff --git a/content/browser/frame_host/render_frame_proxy_host.cc b/content/browser/frame_host/render_frame_proxy_host.cc
index 6acc62c..ac53e5a 100644
--- a/content/browser/frame_host/render_frame_proxy_host.cc
+++ b/content/browser/frame_host/render_frame_proxy_host.cc
@@ -25,7 +25,7 @@ namespace content {
namespace {
// The (process id, routing id) pair that identifies one RenderFrameProxy.
-typedef std::pair<int32, int32> RenderFrameProxyHostID;
+typedef std::pair<int32_t, int32_t> RenderFrameProxyHostID;
typedef base::hash_map<RenderFrameProxyHostID, RenderFrameProxyHost*>
RoutingIDFrameProxyMap;
base::LazyInstance<RoutingIDFrameProxyMap> g_routing_id_frame_proxy_map =
@@ -322,7 +322,7 @@ void RenderFrameProxyHost::OnRouteMessageEvent(
}
}
-void RenderFrameProxyHost::OnDidChangeOpener(int32 opener_routing_id) {
+void RenderFrameProxyHost::OnDidChangeOpener(int32_t opener_routing_id) {
frame_tree_node_->render_manager()->DidChangeOpener(opener_routing_id,
GetSiteInstance());
}
diff --git a/content/browser/frame_host/render_frame_proxy_host.h b/content/browser/frame_host/render_frame_proxy_host.h
index d6d5f8e..390de28 100644
--- a/content/browser/frame_host/render_frame_proxy_host.h
+++ b/content/browser/frame_host/render_frame_proxy_host.h
@@ -5,6 +5,9 @@
#ifndef CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_PROXY_HOST_H_
#define CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_PROXY_HOST_H_
+#include <stdint.h>
+
+#include "base/macros.h"
#include "base/memory/scoped_ptr.h"
#include "content/browser/frame_host/render_frame_host_impl.h"
#include "content/browser/site_instance_impl.h"
@@ -129,7 +132,7 @@ class RenderFrameProxyHost
void OnDetach();
void OnOpenURL(const FrameHostMsg_OpenURL_Params& params);
void OnRouteMessageEvent(const FrameMsg_PostMessage_Params& params);
- void OnDidChangeOpener(int32 opener_routing_id);
+ void OnDidChangeOpener(int32_t opener_routing_id);
void OnAdvanceFocus(blink::WebFocusType type, int32_t source_routing_id);
void OnFrameFocused();
diff --git a/content/browser/frame_host/render_widget_host_view_child_frame.cc b/content/browser/frame_host/render_widget_host_view_child_frame.cc
index a6494e5..f5760a6 100644
--- a/content/browser/frame_host/render_widget_host_view_child_frame.cc
+++ b/content/browser/frame_host/render_widget_host_view_child_frame.cc
@@ -7,6 +7,7 @@
#include <algorithm>
#include <vector>
+#include "build/build_config.h"
#include "cc/surfaces/surface.h"
#include "cc/surfaces/surface_factory.h"
#include "cc/surfaces/surface_manager.h"
@@ -241,7 +242,7 @@ void RenderWidgetHostViewChildFrame::UnlockCompositingSurface() {
NOTIMPLEMENTED();
}
-void RenderWidgetHostViewChildFrame::SurfaceDrawn(uint32 output_surface_id,
+void RenderWidgetHostViewChildFrame::SurfaceDrawn(uint32_t output_surface_id,
cc::SurfaceDrawStatus drawn) {
cc::CompositorFrameAck ack;
DCHECK_GT(ack_pending_count_, 0U);
@@ -255,8 +256,8 @@ void RenderWidgetHostViewChildFrame::SurfaceDrawn(uint32 output_surface_id,
}
void RenderWidgetHostViewChildFrame::OnSwapCompositorFrame(
- uint32 output_surface_id,
- scoped_ptr<cc::CompositorFrame> frame) {
+ uint32_t output_surface_id,
+ scoped_ptr<cc::CompositorFrame> frame) {
last_scroll_offset_ = frame->metadata.root_scroll_offset;
if (!frame_connector_)
diff --git a/content/browser/frame_host/render_widget_host_view_child_frame.h b/content/browser/frame_host/render_widget_host_view_child_frame.h
index 527c164..4bacd21 100644
--- a/content/browser/frame_host/render_widget_host_view_child_frame.h
+++ b/content/browser/frame_host/render_widget_host_view_child_frame.h
@@ -5,9 +5,14 @@
#ifndef CONTENT_BROWSER_FRAME_HOST_RENDER_WIDGET_HOST_VIEW_CHILD_FRAME_H_
#define CONTENT_BROWSER_FRAME_HOST_RENDER_WIDGET_HOST_VIEW_CHILD_FRAME_H_
+#include <stddef.h>
+#include <stdint.h>
+
#include <vector>
+#include "base/macros.h"
#include "base/memory/scoped_ptr.h"
+#include "build/build_config.h"
#include "cc/resources/returned_resource.h"
#include "cc/surfaces/surface_factory_client.h"
#include "cc/surfaces/surface_id_allocator.h"
@@ -105,7 +110,7 @@ class CONTENT_EXPORT RenderWidgetHostViewChildFrame
const base::Callback<void(const gfx::Rect&, bool)>& callback) override;
bool CanCopyToVideoFrame() const override;
bool HasAcceleratedSurface(const gfx::Size& desired_size) override;
- void OnSwapCompositorFrame(uint32 output_surface_id,
+ void OnSwapCompositorFrame(uint32_t output_surface_id,
scoped_ptr<cc::CompositorFrame> frame) override;
// Since the URL of content rendered by this class is not displayed in
// the URL bar, this method does not need an implementation.
@@ -161,7 +166,7 @@ class CONTENT_EXPORT RenderWidgetHostViewChildFrame
// Declared 'public' instead of 'protected' here to allow derived classes
// to Bind() to it.
- void SurfaceDrawn(uint32 output_surface_id, cc::SurfaceDrawStatus drawn);
+ void SurfaceDrawn(uint32_t output_surface_id, cc::SurfaceDrawStatus drawn);
protected:
friend class RenderWidgetHostView;
@@ -185,11 +190,11 @@ class CONTENT_EXPORT RenderWidgetHostViewChildFrame
scoped_ptr<cc::SurfaceIdAllocator> id_allocator_;
scoped_ptr<cc::SurfaceFactory> surface_factory_;
cc::SurfaceId surface_id_;
- uint32 next_surface_sequence_;
- uint32 last_output_surface_id_;
+ uint32_t next_surface_sequence_;
+ uint32_t last_output_surface_id_;
gfx::Size current_surface_size_;
float current_surface_scale_factor_;
- uint32 ack_pending_count_;
+ uint32_t ack_pending_count_;
cc::ReturnedResourceArray surface_returned_resources_;
// frame_connector_ provides a platform abstraction. Messages
diff --git a/content/browser/frame_host/render_widget_host_view_child_frame_browsertest.cc b/content/browser/frame_host/render_widget_host_view_child_frame_browsertest.cc
index 0f40c90..835af3b 100644
--- a/content/browser/frame_host/render_widget_host_view_child_frame_browsertest.cc
+++ b/content/browser/frame_host/render_widget_host_view_child_frame_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 "base/macros.h"
#include "content/browser/web_contents/web_contents_impl.h"
#include "content/public/browser/render_frame_host.h"
#include "content/public/browser/web_contents.h"
diff --git a/content/browser/frame_host/render_widget_host_view_child_frame_unittest.cc b/content/browser/frame_host/render_widget_host_view_child_frame_unittest.cc
index 495c589..c1f23da 100644
--- a/content/browser/frame_host/render_widget_host_view_child_frame_unittest.cc
+++ b/content/browser/frame_host/render_widget_host_view_child_frame_unittest.cc
@@ -4,8 +4,11 @@
#include "content/browser/frame_host/render_widget_host_view_child_frame.h"
-#include "base/basictypes.h"
+#include <stdint.h>
+
+#include "base/macros.h"
#include "base/message_loop/message_loop.h"
+#include "build/build_config.h"
#include "cc/surfaces/surface.h"
#include "cc/surfaces/surface_factory.h"
#include "cc/surfaces/surface_manager.h"
@@ -44,7 +47,7 @@ class MockCrossProcessFrameConnector : public CrossProcessFrameConnector {
~MockCrossProcessFrameConnector() override {}
void ChildFrameCompositorFrameSwapped(
- uint32 output_surface_id,
+ uint32_t output_surface_id,
int host_id,
int route_id,
scoped_ptr<cc::CompositorFrame> frame) override {
@@ -88,7 +91,7 @@ class RenderWidgetHostViewChildFrameTest : public testing::Test {
MockRenderProcessHost* process_host =
new MockRenderProcessHost(browser_context_.get());
- int32 routing_id = process_host->GetNextRoutingID();
+ int32_t routing_id = process_host->GetNextRoutingID();
widget_host_ =
new RenderWidgetHostImpl(&delegate_, process_host, routing_id, false);
view_ = new RenderWidgetHostViewChildFrame(widget_host_);
diff --git a/content/browser/frame_host/render_widget_host_view_guest.cc b/content/browser/frame_host/render_widget_host_view_guest.cc
index f3ba93d..48a6284 100644
--- a/content/browser/frame_host/render_widget_host_view_guest.cc
+++ b/content/browser/frame_host/render_widget_host_view_guest.cc
@@ -6,6 +6,7 @@
#include "base/command_line.h"
#include "base/logging.h"
#include "base/message_loop/message_loop.h"
+#include "build/build_config.h"
#include "cc/surfaces/surface.h"
#include "cc/surfaces/surface_factory.h"
#include "cc/surfaces/surface_manager.h"
@@ -228,7 +229,7 @@ void RenderWidgetHostViewGuest::SetTooltipText(
}
void RenderWidgetHostViewGuest::OnSwapCompositorFrame(
- uint32 output_surface_id,
+ uint32_t output_surface_id,
scoped_ptr<cc::CompositorFrame> frame) {
if (!guest_ || !guest_->attached()) {
// We shouldn't hang on to a surface while we are detached.
diff --git a/content/browser/frame_host/render_widget_host_view_guest.h b/content/browser/frame_host/render_widget_host_view_guest.h
index d345ac9..f9d4b16 100644
--- a/content/browser/frame_host/render_widget_host_view_guest.h
+++ b/content/browser/frame_host/render_widget_host_view_guest.h
@@ -5,9 +5,14 @@
#ifndef CONTENT_BROWSER_FRAME_HOST_RENDER_WIDGET_HOST_VIEW_GUEST_H_
#define CONTENT_BROWSER_FRAME_HOST_RENDER_WIDGET_HOST_VIEW_GUEST_H_
+#include <stddef.h>
+#include <stdint.h>
+
#include <vector>
+#include "base/macros.h"
#include "base/memory/scoped_ptr.h"
+#include "build/build_config.h"
#include "content/browser/frame_host/render_widget_host_view_child_frame.h"
#include "content/common/content_export.h"
#include "content/common/cursors/webcursor.h"
@@ -90,7 +95,7 @@ class CONTENT_EXPORT RenderWidgetHostViewGuest
const gfx::Range& range) override;
void SelectionBoundsChanged(
const ViewHostMsg_SelectionBounds_Params& params) override;
- void OnSwapCompositorFrame(uint32 output_surface_id,
+ void OnSwapCompositorFrame(uint32_t output_surface_id,
scoped_ptr<cc::CompositorFrame> frame) override;
#if defined(USE_AURA)
void ProcessAckedTouchEvent(const TouchEventWithLatencyInfo& touch,
diff --git a/content/browser/frame_host/render_widget_host_view_guest_unittest.cc b/content/browser/frame_host/render_widget_host_view_guest_unittest.cc
index d5267f2..52288b3 100644
--- a/content/browser/frame_host/render_widget_host_view_guest_unittest.cc
+++ b/content/browser/frame_host/render_widget_host_view_guest_unittest.cc
@@ -4,9 +4,12 @@
#include "content/browser/frame_host/render_widget_host_view_guest.h"
-#include "base/basictypes.h"
+#include <stdint.h>
+
+#include "base/macros.h"
#include "base/message_loop/message_loop.h"
#include "base/run_loop.h"
+#include "build/build_config.h"
#include "cc/surfaces/surface.h"
#include "cc/surfaces/surface_factory.h"
#include "cc/surfaces/surface_manager.h"
@@ -53,7 +56,7 @@ class RenderWidgetHostViewGuestTest : public testing::Test {
browser_context_.reset(new TestBrowserContext);
MockRenderProcessHost* process_host =
new MockRenderProcessHost(browser_context_.get());
- int32 routing_id = process_host->GetNextRoutingID();
+ int32_t routing_id = process_host->GetNextRoutingID();
widget_host_ =
new RenderWidgetHostImpl(&delegate_, process_host, routing_id, false);
view_ = new RenderWidgetHostViewGuest(
@@ -181,7 +184,7 @@ class RenderWidgetHostViewGuestSurfaceTest
browser_plugin_guest_ = new TestBrowserPluginGuest(
web_contents_.get(), &browser_plugin_guest_delegate_);
- int32 routing_id = process_host->GetNextRoutingID();
+ int32_t routing_id = process_host->GetNextRoutingID();
widget_host_ =
new RenderWidgetHostImpl(&delegate_, process_host, routing_id, false);
view_ = new RenderWidgetHostViewGuest(
diff --git a/content/browser/gamepad/gamepad_consumer.h b/content/browser/gamepad/gamepad_consumer.h
index 1ef5c48..a733d4a 100644
--- a/content/browser/gamepad/gamepad_consumer.h
+++ b/content/browser/gamepad/gamepad_consumer.h
@@ -5,7 +5,6 @@
#ifndef CONTENT_BROWSER_GAMEPAD_GAMEPAD_CONSUMER_H_
#define CONTENT_BROWSER_GAMEPAD_GAMEPAD_CONSUMER_H_
-#include "base/basictypes.h"
#include "content/common/content_export.h"
#include "third_party/WebKit/public/platform/WebGamepad.h"
diff --git a/content/browser/gamepad/gamepad_data_fetcher.cc b/content/browser/gamepad/gamepad_data_fetcher.cc
index 2a654a8..f23c5d0 100644
--- a/content/browser/gamepad/gamepad_data_fetcher.cc
+++ b/content/browser/gamepad/gamepad_data_fetcher.cc
@@ -4,7 +4,10 @@
#include "content/browser/gamepad/gamepad_data_fetcher.h"
+#include <stddef.h>
+
#include "base/logging.h"
+#include "build/build_config.h"
namespace {
diff --git a/content/browser/gamepad/gamepad_platform_data_fetcher.h b/content/browser/gamepad/gamepad_platform_data_fetcher.h
index 04aab03..d2dc8b73 100644
--- a/content/browser/gamepad/gamepad_platform_data_fetcher.h
+++ b/content/browser/gamepad/gamepad_platform_data_fetcher.h
@@ -8,8 +8,9 @@
#ifndef CONTENT_BROWSER_GAMEPAD_GAMEPAD_PLATFORM_DATA_FETCHER_H_
#define CONTENT_BROWSER_GAMEPAD_GAMEPAD_PLATFORM_DATA_FETCHER_H_
-#include "base/basictypes.h"
#include "base/compiler_specific.h"
+#include "base/macros.h"
+#include "build/build_config.h"
#include "content/browser/gamepad/gamepad_data_fetcher.h"
#if defined(OS_ANDROID)
diff --git a/content/browser/gamepad/gamepad_platform_data_fetcher_android.cc b/content/browser/gamepad/gamepad_platform_data_fetcher_android.cc
index 471a041..1e38cc7 100644
--- a/content/browser/gamepad/gamepad_platform_data_fetcher_android.cc
+++ b/content/browser/gamepad/gamepad_platform_data_fetcher_android.cc
@@ -4,6 +4,8 @@
#include "content/browser/gamepad/gamepad_platform_data_fetcher_android.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/content/browser/gamepad/gamepad_platform_data_fetcher_android.h b/content/browser/gamepad/gamepad_platform_data_fetcher_android.h
index 4acdfb3..c6ea2e3 100644
--- a/content/browser/gamepad/gamepad_platform_data_fetcher_android.h
+++ b/content/browser/gamepad/gamepad_platform_data_fetcher_android.h
@@ -11,6 +11,7 @@
#include <jni.h>
#include "base/android/jni_android.h"
+#include "base/macros.h"
#include "content/browser/gamepad/gamepad_data_fetcher.h"
#include "content/browser/gamepad/gamepad_provider.h"
#include "content/browser/gamepad/gamepad_standard_mappings.h"
diff --git a/content/browser/gamepad/gamepad_platform_data_fetcher_linux.cc b/content/browser/gamepad/gamepad_platform_data_fetcher_linux.cc
index 7b74c05..f6fd2d4 100644
--- a/content/browser/gamepad/gamepad_platform_data_fetcher_linux.cc
+++ b/content/browser/gamepad/gamepad_platform_data_fetcher_linux.cc
@@ -11,6 +11,7 @@
#include <sys/types.h>
#include <unistd.h>
+#include "base/macros.h"
#include "base/message_loop/message_loop.h"
#include "base/posix/eintr_wrapper.h"
#include "base/strings/string_number_conversions.h"
diff --git a/content/browser/gamepad/gamepad_platform_data_fetcher_linux.h b/content/browser/gamepad/gamepad_platform_data_fetcher_linux.h
index 0878546..b98646a 100644
--- a/content/browser/gamepad/gamepad_platform_data_fetcher_linux.h
+++ b/content/browser/gamepad/gamepad_platform_data_fetcher_linux.h
@@ -5,10 +5,12 @@
#ifndef CONTENT_BROWSER_GAMEPAD_GAMEPAD_PLATFORM_DATA_FETCHER_LINUX_H_
#define CONTENT_BROWSER_GAMEPAD_GAMEPAD_PLATFORM_DATA_FETCHER_LINUX_H_
+#include <stddef.h>
+
#include <string>
-#include "base/basictypes.h"
#include "base/compiler_specific.h"
+#include "base/macros.h"
#include "base/memory/scoped_ptr.h"
#include "content/browser/gamepad/gamepad_data_fetcher.h"
diff --git a/content/browser/gamepad/gamepad_platform_data_fetcher_mac.h b/content/browser/gamepad/gamepad_platform_data_fetcher_mac.h
index af2ad0d..ebfe57e 100644
--- a/content/browser/gamepad/gamepad_platform_data_fetcher_mac.h
+++ b/content/browser/gamepad/gamepad_platform_data_fetcher_mac.h
@@ -5,9 +5,11 @@
#ifndef CONTENT_BROWSER_GAMEPAD_GAMEPAD_PLATFORM_DATA_FETCHER_MAC_H_
#define CONTENT_BROWSER_GAMEPAD_GAMEPAD_PLATFORM_DATA_FETCHER_MAC_H_
-#include "base/basictypes.h"
+#include <stddef.h>
+
#include "base/compiler_specific.h"
#include "base/mac/scoped_cftyperef.h"
+#include "base/macros.h"
#include "base/memory/scoped_ptr.h"
#include "build/build_config.h"
#include "content/browser/gamepad/gamepad_data_fetcher.h"
diff --git a/content/browser/gamepad/gamepad_platform_data_fetcher_mac.mm b/content/browser/gamepad/gamepad_platform_data_fetcher_mac.mm
index e18caf5..b9ec5da 100644
--- a/content/browser/gamepad/gamepad_platform_data_fetcher_mac.mm
+++ b/content/browser/gamepad/gamepad_platform_data_fetcher_mac.mm
@@ -4,8 +4,11 @@
#include "content/browser/gamepad/gamepad_platform_data_fetcher_mac.h"
+#include <stdint.h>
+
#include "base/mac/foundation_util.h"
#include "base/mac/scoped_nsobject.h"
+#include "base/macros.h"
#include "base/strings/string16.h"
#include "base/strings/string_util.h"
#include "base/strings/utf_string_conversions.h"
diff --git a/content/browser/gamepad/gamepad_platform_data_fetcher_win.cc b/content/browser/gamepad/gamepad_platform_data_fetcher_win.cc
index f944ead..e02fe05 100644
--- a/content/browser/gamepad/gamepad_platform_data_fetcher_win.cc
+++ b/content/browser/gamepad/gamepad_platform_data_fetcher_win.cc
@@ -4,6 +4,8 @@
#include "content/browser/gamepad/gamepad_platform_data_fetcher_win.h"
+#include <stddef.h>
+
#include "base/strings/stringprintf.h"
#include "base/trace_event/trace_event.h"
#include "base/win/windows_version.h"
diff --git a/content/browser/gamepad/gamepad_platform_data_fetcher_win.h b/content/browser/gamepad/gamepad_platform_data_fetcher_win.h
index 6680f99..f1efab3 100644
--- a/content/browser/gamepad/gamepad_platform_data_fetcher_win.h
+++ b/content/browser/gamepad/gamepad_platform_data_fetcher_win.h
@@ -16,8 +16,8 @@
#include <windows.h>
#include <XInput.h>
-#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/message_loop/message_loop.h"
diff --git a/content/browser/gamepad/gamepad_provider.cc b/content/browser/gamepad/gamepad_provider.cc
index eef9001..a2b6884 100644
--- a/content/browser/gamepad/gamepad_provider.cc
+++ b/content/browser/gamepad/gamepad_provider.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 <cmath>
#include <set>
#include <vector>
@@ -14,6 +16,7 @@
#include "base/thread_task_runner_handle.h"
#include "base/threading/thread.h"
#include "base/threading/thread_restrictions.h"
+#include "build/build_config.h"
#include "content/browser/gamepad/gamepad_data_fetcher.h"
#include "content/browser/gamepad/gamepad_platform_data_fetcher.h"
#include "content/browser/gamepad/gamepad_provider.h"
diff --git a/content/browser/gamepad/gamepad_provider.h b/content/browser/gamepad/gamepad_provider.h
index ce9c11a..f2dcad2 100644
--- a/content/browser/gamepad/gamepad_provider.h
+++ b/content/browser/gamepad/gamepad_provider.h
@@ -9,6 +9,7 @@
#include <vector>
#include "base/callback_forward.h"
+#include "base/macros.h"
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
#include "base/memory/shared_memory.h"
diff --git a/content/browser/gamepad/gamepad_provider_unittest.cc b/content/browser/gamepad/gamepad_provider_unittest.cc
index b75be3e..7e3a29c 100644
--- a/content/browser/gamepad/gamepad_provider_unittest.cc
+++ b/content/browser/gamepad/gamepad_provider_unittest.cc
@@ -2,8 +2,10 @@
// 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/memory/weak_ptr.h"
+#include "build/build_config.h"
#include "content/browser/gamepad/gamepad_data_fetcher.h"
#include "content/browser/gamepad/gamepad_provider.h"
#include "content/browser/gamepad/gamepad_test_helpers.h"
diff --git a/content/browser/gamepad/gamepad_service.h b/content/browser/gamepad/gamepad_service.h
index c94d320..22bea8c 100644
--- a/content/browser/gamepad/gamepad_service.h
+++ b/content/browser/gamepad/gamepad_service.h
@@ -7,8 +7,8 @@
#include <set>
-#include "base/basictypes.h"
#include "base/callback_forward.h"
+#include "base/macros.h"
#include "base/memory/scoped_ptr.h"
#include "base/memory/shared_memory.h"
#include "base/memory/singleton.h"
diff --git a/content/browser/gamepad/gamepad_service_unittest.cc b/content/browser/gamepad/gamepad_service_unittest.cc
index acfa6a3..ded1a44 100644
--- a/content/browser/gamepad/gamepad_service_unittest.cc
+++ b/content/browser/gamepad/gamepad_service_unittest.cc
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include "base/macros.h"
#include "base/memory/scoped_ptr.h"
#include "base/run_loop.h"
#include "content/browser/gamepad/gamepad_consumer.h"
diff --git a/content/browser/gamepad/gamepad_standard_mappings_linux.cc b/content/browser/gamepad/gamepad_standard_mappings_linux.cc
index 01f9b09..3cd7747 100644
--- a/content/browser/gamepad/gamepad_standard_mappings_linux.cc
+++ b/content/browser/gamepad/gamepad_standard_mappings_linux.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 "content/browser/gamepad/gamepad_standard_mappings.h"
namespace content {
diff --git a/content/browser/gamepad/gamepad_standard_mappings_mac.mm b/content/browser/gamepad/gamepad_standard_mappings_mac.mm
index 5e01560..2d3be550 100644
--- a/content/browser/gamepad/gamepad_standard_mappings_mac.mm
+++ b/content/browser/gamepad/gamepad_standard_mappings_mac.mm
@@ -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 "content/browser/gamepad/gamepad_standard_mappings.h"
namespace content {
diff --git a/content/browser/gamepad/gamepad_standard_mappings_win.cc b/content/browser/gamepad/gamepad_standard_mappings_win.cc
index c03fe4f..3772377 100644
--- a/content/browser/gamepad/gamepad_standard_mappings_win.cc
+++ b/content/browser/gamepad/gamepad_standard_mappings_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 "content/browser/gamepad/gamepad_standard_mappings.h"
namespace content {
diff --git a/content/browser/gamepad/gamepad_test_helpers.h b/content/browser/gamepad/gamepad_test_helpers.h
index dbaa966..5e30f99 100644
--- a/content/browser/gamepad/gamepad_test_helpers.h
+++ b/content/browser/gamepad/gamepad_test_helpers.h
@@ -5,6 +5,7 @@
#ifndef CONTENT_BROWSER_GAMEPAD_GAMEPAD_TEST_HELPERS_H_
#define CONTENT_BROWSER_GAMEPAD_GAMEPAD_TEST_HELPERS_H_
+#include "base/macros.h"
#include "base/memory/scoped_ptr.h"
#include "base/message_loop/message_loop.h"
#include "base/synchronization/lock.h"
diff --git a/content/browser/gamepad/raw_input_data_fetcher_win.cc b/content/browser/gamepad/raw_input_data_fetcher_win.cc
index 670a022..0693eef9 100644
--- a/content/browser/gamepad/raw_input_data_fetcher_win.cc
+++ b/content/browser/gamepad/raw_input_data_fetcher_win.cc
@@ -4,6 +4,9 @@
#include "content/browser/gamepad/raw_input_data_fetcher_win.h"
+#include <stddef.h>
+
+#include "base/macros.h"
#include "base/trace_event/trace_event.h"
#include "content/common/gamepad_hardware_buffer.h"
#include "content/common/gamepad_messages.h"
@@ -187,7 +190,7 @@ RawGamepadInfo* RawInputDataFetcher::ParseGamepadInfo(HANDLE hDevice) {
}
DCHECK_EQ(0u, result);
- scoped_ptr<uint8[]> di_buffer(new uint8[size]);
+ scoped_ptr<uint8_t[]> di_buffer(new uint8_t[size]);
RID_DEVICE_INFO* device_info =
reinterpret_cast<RID_DEVICE_INFO*>(di_buffer.get());
result = GetRawInputDeviceInfo(hDevice, RIDI_DEVICEINFO,
@@ -266,7 +269,7 @@ RawGamepadInfo* RawInputDataFetcher::ParseGamepadInfo(HANDLE hDevice) {
}
DCHECK_EQ(0u, result);
- gamepad_info->ppd_buffer.reset(new uint8[size]);
+ gamepad_info->ppd_buffer.reset(new uint8_t[size]);
gamepad_info->preparsed_data =
reinterpret_cast<PHIDP_PREPARSED_DATA>(gamepad_info->ppd_buffer.get());
result = GetRawInputDeviceInfo(hDevice, RIDI_PREPARSEDDATA,
@@ -442,7 +445,7 @@ LRESULT RawInputDataFetcher::OnInput(HRAWINPUT input_handle) {
DCHECK_EQ(0u, result);
// Retrieve the input record.
- scoped_ptr<uint8[]> buffer(new uint8[size]);
+ scoped_ptr<uint8_t[]> buffer(new uint8_t[size]);
RAWINPUT* input = reinterpret_cast<RAWINPUT*>(buffer.get());
result = GetRawInputData(
input_handle, RID_INPUT, buffer.get(), &size, sizeof(RAWINPUTHEADER));
diff --git a/content/browser/gamepad/raw_input_data_fetcher_win.h b/content/browser/gamepad/raw_input_data_fetcher_win.h
index 3de85df..69b780d 100644
--- a/content/browser/gamepad/raw_input_data_fetcher_win.h
+++ b/content/browser/gamepad/raw_input_data_fetcher_win.h
@@ -7,6 +7,7 @@
#include "build/build_config.h"
+#include <stdint.h>
#include <stdlib.h>
#include <Unknwn.h>
#include <WinDef.h>
@@ -16,6 +17,7 @@
#include <map>
#include <vector>
+#include "base/macros.h"
#include "base/memory/scoped_ptr.h"
#include "base/memory/weak_ptr.h"
#include "base/message_loop/message_loop.h"
@@ -39,7 +41,7 @@ struct RawGamepadInfo {
~RawGamepadInfo();
HANDLE handle;
- scoped_ptr<uint8[]> ppd_buffer;
+ scoped_ptr<uint8_t[]> ppd_buffer;
PHIDP_PREPARSED_DATA preparsed_data;
uint32_t report_id;
diff --git a/content/browser/gamepad/xbox_data_fetcher_mac.cc b/content/browser/gamepad/xbox_data_fetcher_mac.cc
index 163f96c..7ef3531 100644
--- a/content/browser/gamepad/xbox_data_fetcher_mac.cc
+++ b/content/browser/gamepad/xbox_data_fetcher_mac.cc
@@ -69,17 +69,17 @@ struct Xbox360ButtonData {
bool x : 1;
bool y : 1;
- uint8 trigger_left;
- uint8 trigger_right;
+ uint8_t trigger_left;
+ uint8_t trigger_right;
- int16 stick_left_x;
- int16 stick_left_y;
- int16 stick_right_x;
- int16 stick_right_y;
+ int16_t stick_left_x;
+ int16_t stick_left_y;
+ int16_t stick_right_x;
+ int16_t stick_right_y;
// Always 0.
- uint32 dummy2;
- uint16 dummy3;
+ uint32_t dummy2;
+ uint16_t dummy3;
};
struct XboxOneButtonData {
@@ -103,13 +103,13 @@ struct XboxOneButtonData {
bool stick_left_click : 1;
bool stick_right_click : 1;
- uint16 trigger_left;
- uint16 trigger_right;
+ uint16_t trigger_left;
+ uint16_t trigger_right;
- int16 stick_left_x;
- int16 stick_left_y;
- int16 stick_right_x;
- int16 stick_right_y;
+ int16_t stick_left_x;
+ int16_t stick_left_y;
+ int16_t stick_right_x;
+ int16_t stick_right_y;
};
#pragma pack(pop)
@@ -118,17 +118,17 @@ static_assert(sizeof(XboxOneButtonData) == 14, "xbox button data wrong size");
// From MSDN:
// http://msdn.microsoft.com/en-us/library/windows/desktop/ee417001(v=vs.85).aspx#dead_zone
-const int16 kLeftThumbDeadzone = 7849;
-const int16 kRightThumbDeadzone = 8689;
-const uint8 kXbox360TriggerDeadzone = 30;
-const uint16 kXboxOneTriggerMax = 1023;
-const uint16 kXboxOneTriggerDeadzone = 120;
-
-void NormalizeAxis(int16 x,
- int16 y,
- int16 deadzone,
- float* x_out,
- float* y_out) {
+const int16_t kLeftThumbDeadzone = 7849;
+const int16_t kRightThumbDeadzone = 8689;
+const uint8_t kXbox360TriggerDeadzone = 30;
+const uint16_t kXboxOneTriggerMax = 1023;
+const uint16_t kXboxOneTriggerDeadzone = 120;
+
+void NormalizeAxis(int16_t x,
+ int16_t y,
+ int16_t deadzone,
+ float* x_out,
+ float* y_out) {
float x_val = x;
float y_val = y;
@@ -157,13 +157,15 @@ void NormalizeAxis(int16 x,
}
}
-float NormalizeTrigger(uint8 value) {
- return value < kXbox360TriggerDeadzone ? 0 :
- static_cast<float>(value - kXbox360TriggerDeadzone) /
- (std::numeric_limits<uint8>::max() - kXbox360TriggerDeadzone);
+float NormalizeTrigger(uint8_t value) {
+ return value < kXbox360TriggerDeadzone
+ ? 0
+ : static_cast<float>(value - kXbox360TriggerDeadzone) /
+ (std::numeric_limits<uint8_t>::max() -
+ kXbox360TriggerDeadzone);
}
-float NormalizeXboxOneTrigger(uint16 value) {
+float NormalizeXboxOneTrigger(uint16_t value) {
return value < kXboxOneTriggerDeadzone ? 0 :
static_cast<float>(value - kXboxOneTriggerDeadzone) /
(kXboxOneTriggerMax - kXboxOneTriggerDeadzone);
@@ -398,17 +400,17 @@ bool XboxController::OpenDevice(io_service_t service) {
// The interface should have two pipes. Pipe 1 with direction kUSBIn and pipe
// 2 with direction kUSBOut. Both pipes should have type kUSBInterrupt.
- uint8 num_endpoints;
+ uint8_t num_endpoints;
kr = (*interface_)->GetNumEndpoints(interface_, &num_endpoints);
if (kr != KERN_SUCCESS || num_endpoints < 2)
return false;
for (int i = 1; i <= 2; i++) {
- uint8 direction;
- uint8 number;
- uint8 transfer_type;
- uint16 max_packet_size;
- uint8 interval;
+ uint8_t direction;
+ uint8_t number;
+ uint8_t transfer_type;
+ uint16_t max_packet_size;
+ uint8_t interval;
kr = (*interface_)->GetPipeProperties(interface_,
i,
@@ -423,7 +425,7 @@ bool XboxController::OpenDevice(io_service_t service) {
if (i == read_endpoint_) {
if (direction != kUSBIn)
return false;
- read_buffer_.reset(new uint8[max_packet_size]);
+ read_buffer_.reset(new uint8_t[max_packet_size]);
read_buffer_size_ = max_packet_size;
QueueRead();
} else if (i == control_endpoint_) {
@@ -521,13 +523,13 @@ void XboxController::ProcessXbox360Packet(size_t length) {
IOError();
return;
}
- uint8* buffer = read_buffer_.get();
+ uint8_t* buffer = read_buffer_.get();
if (buffer[1] != length)
// Length in packet doesn't match length reported by USB.
return;
- uint8 type = buffer[0];
+ uint8_t type = buffer[0];
buffer += 2;
length -= 2;
switch (type) {
@@ -562,9 +564,9 @@ void XboxController::ProcessXboxOnePacket(size_t length) {
IOError();
return;
}
- uint8* buffer = read_buffer_.get();
+ uint8_t* buffer = read_buffer_.get();
- uint8 type = buffer[0];
+ uint8_t type = buffer[0];
buffer += 4;
length -= 4;
switch (type) {
@@ -783,7 +785,7 @@ void XboxDataFetcher::RemoveController(XboxController* controller) {
delete controller;
}
-void XboxDataFetcher::RemoveControllerByLocationID(uint32 location_id) {
+void XboxDataFetcher::RemoveControllerByLocationID(uint32_t location_id) {
XboxController* controller = NULL;
for (std::set<XboxController*>::iterator i = controllers_.begin();
i != controllers_.end();
diff --git a/content/browser/gamepad/xbox_data_fetcher_mac.h b/content/browser/gamepad/xbox_data_fetcher_mac.h
index d88ad96..599a63c 100644
--- a/content/browser/gamepad/xbox_data_fetcher_mac.h
+++ b/content/browser/gamepad/xbox_data_fetcher_mac.h
@@ -7,13 +7,15 @@
#include <CoreFoundation/CoreFoundation.h>
#include <IOKit/IOKitLib.h>
+#include <stddef.h>
+#include <stdint.h>
#include <set>
-#include "base/basictypes.h"
#include "base/mac/scoped_cftyperef.h"
#include "base/mac/scoped_ioobject.h"
#include "base/mac/scoped_ioplugininterface.h"
+#include "base/macros.h"
#include "base/memory/scoped_ptr.h"
class XboxController {
@@ -116,8 +118,8 @@ class XboxController {
// aren't correctly framed. The 360 controller frames its packets with a 2
// byte header (type, total length) so we can reframe the packet data
// ourselves.
- uint16 read_buffer_size_;
- scoped_ptr<uint8[]> read_buffer_;
+ uint16_t read_buffer_size_;
+ scoped_ptr<uint8_t[]> read_buffer_;
// The pattern that the LEDs on the device are currently displaying, or
// LED_NUM_PATTERNS if unknown.
@@ -162,7 +164,7 @@ class XboxDataFetcher : public XboxController::Delegate {
static void DeviceRemoved(void* context, io_iterator_t iterator);
void AddController(XboxController* controller);
void RemoveController(XboxController* controller);
- void RemoveControllerByLocationID(uint32 id);
+ void RemoveControllerByLocationID(uint32_t id);
void XboxControllerGotData(XboxController* controller,
const XboxController::Data& data) override;
void XboxControllerError(XboxController* controller) override;
diff --git a/content/browser/geofencing/geofencing_dispatcher_host.cc b/content/browser/geofencing/geofencing_dispatcher_host.cc
index 4b8c865..191ddcf 100644
--- a/content/browser/geofencing/geofencing_dispatcher_host.cc
+++ b/content/browser/geofencing/geofencing_dispatcher_host.cc
@@ -46,7 +46,7 @@ void GeofencingDispatcherHost::OnRegisterRegion(
int request_id,
const std::string& region_id,
const blink::WebCircularGeofencingRegion& region,
- int64 service_worker_registration_id) {
+ int64_t service_worker_registration_id) {
// Sanity check on region_id
if (region_id.length() > kMaxRegionIdLength) {
Send(new GeofencingMsg_RegisterRegionComplete(
@@ -68,7 +68,7 @@ void GeofencingDispatcherHost::OnUnregisterRegion(
int thread_id,
int request_id,
const std::string& region_id,
- int64 service_worker_registration_id) {
+ int64_t service_worker_registration_id) {
// Sanity check on region_id
if (region_id.length() > kMaxRegionIdLength) {
Send(new GeofencingMsg_UnregisterRegionComplete(
@@ -88,7 +88,7 @@ void GeofencingDispatcherHost::OnUnregisterRegion(
void GeofencingDispatcherHost::OnGetRegisteredRegions(
int thread_id,
int request_id,
- int64 service_worker_registration_id) {
+ int64_t service_worker_registration_id) {
GeofencingRegistrations result;
GeofencingStatus status =
diff --git a/content/browser/geofencing/geofencing_dispatcher_host.h b/content/browser/geofencing/geofencing_dispatcher_host.h
index ea4b6a1..53a3b20 100644
--- a/content/browser/geofencing/geofencing_dispatcher_host.h
+++ b/content/browser/geofencing/geofencing_dispatcher_host.h
@@ -5,6 +5,9 @@
#ifndef CONTENT_BROWSER_GEOFENCING_GEOFENCING_DISPATCHER_HOST_H_
#define CONTENT_BROWSER_GEOFENCING_GEOFENCING_DISPATCHER_HOST_H_
+#include <stdint.h>
+
+#include "base/macros.h"
#include "content/common/geofencing_types.h"
#include "content/public/browser/browser_message_filter.h"
@@ -31,14 +34,14 @@ class GeofencingDispatcherHost : public BrowserMessageFilter {
int request_id,
const std::string& region_id,
const blink::WebCircularGeofencingRegion& region,
- int64 service_worker_registration_id);
+ int64_t service_worker_registration_id);
void OnUnregisterRegion(int thread_id,
int request_id,
const std::string& region_id,
- int64 service_worker_registration_id);
+ int64_t service_worker_registration_id);
void OnGetRegisteredRegions(int thread_id,
int request_id,
- int64 service_worker_registration_id);
+ int64_t service_worker_registration_id);
void RegisterRegionCompleted(int thread_id,
int request_id,
diff --git a/content/browser/geofencing/geofencing_manager.cc b/content/browser/geofencing/geofencing_manager.cc
index 421e112..54f33a3 100644
--- a/content/browser/geofencing/geofencing_manager.cc
+++ b/content/browser/geofencing/geofencing_manager.cc
@@ -20,19 +20,19 @@
namespace content {
struct GeofencingManager::Registration {
- Registration(int64 service_worker_registration_id,
+ Registration(int64_t service_worker_registration_id,
const GURL& service_worker_origin,
const std::string& region_id,
const blink::WebCircularGeofencingRegion& region,
const StatusCallback& callback,
- int64 geofencing_registration_id);
- int64 service_worker_registration_id;
+ int64_t geofencing_registration_id);
+ int64_t service_worker_registration_id;
GURL service_worker_origin;
std::string region_id;
blink::WebCircularGeofencingRegion region;
// Registration ID as returned by the |GeofencingService|.
- int64 geofencing_registration_id;
+ int64_t geofencing_registration_id;
// Callback to call when registration is completed. This field is reset when
// registration is complete.
@@ -44,19 +44,18 @@ struct GeofencingManager::Registration {
};
GeofencingManager::Registration::Registration(
- int64 service_worker_registration_id,
+ int64_t service_worker_registration_id,
const GURL& service_worker_origin,
const std::string& region_id,
const blink::WebCircularGeofencingRegion& region,
const GeofencingManager::StatusCallback& callback,
- int64 geofencing_registration_id)
+ int64_t geofencing_registration_id)
: service_worker_registration_id(service_worker_registration_id),
service_worker_origin(service_worker_origin),
region_id(region_id),
region(region),
geofencing_registration_id(geofencing_registration_id),
- registration_callback(callback) {
-}
+ registration_callback(callback) {}
GeofencingManager::GeofencingManager(
const scoped_refptr<ServiceWorkerContextWrapper>& service_worker_context)
@@ -100,7 +99,7 @@ void GeofencingManager::ShutdownOnIO() {
}
void GeofencingManager::RegisterRegion(
- int64 service_worker_registration_id,
+ int64_t service_worker_registration_id,
const std::string& region_id,
const blink::WebCircularGeofencingRegion& region,
const StatusCallback& callback) {
@@ -137,7 +136,7 @@ void GeofencingManager::RegisterRegion(
service_->RegisterRegion(region, this));
}
-void GeofencingManager::UnregisterRegion(int64 service_worker_registration_id,
+void GeofencingManager::UnregisterRegion(int64_t service_worker_registration_id,
const std::string& region_id,
const StatusCallback& callback) {
DCHECK_CURRENTLY_ON(BrowserThread::IO);
@@ -178,7 +177,7 @@ void GeofencingManager::UnregisterRegion(int64 service_worker_registration_id,
}
GeofencingStatus GeofencingManager::GetRegisteredRegions(
- int64 service_worker_registration_id,
+ int64_t service_worker_registration_id,
std::map<std::string, blink::WebCircularGeofencingRegion>* result) {
DCHECK_CURRENTLY_ON(BrowserThread::IO);
CHECK(result);
@@ -240,13 +239,13 @@ void GeofencingManager::SetMockPosition(double latitude, double longitude) {
}
void GeofencingManager::OnRegistrationDeleted(
- int64 service_worker_registration_id,
+ int64_t service_worker_registration_id,
const GURL& pattern) {
DCHECK_CURRENTLY_ON(BrowserThread::IO);
CleanUpForServiceWorker(service_worker_registration_id);
}
-void GeofencingManager::RegistrationFinished(int64 geofencing_registration_id,
+void GeofencingManager::RegistrationFinished(int64_t geofencing_registration_id,
GeofencingStatus status) {
DCHECK_CURRENTLY_ON(BrowserThread::IO);
Registration* registration = FindRegistrationById(geofencing_registration_id);
@@ -260,18 +259,18 @@ void GeofencingManager::RegistrationFinished(int64 geofencing_registration_id,
ClearRegistration(registration);
}
-void GeofencingManager::RegionEntered(int64 geofencing_registration_id) {
+void GeofencingManager::RegionEntered(int64_t geofencing_registration_id) {
DispatchGeofencingEvent(blink::WebGeofencingEventTypeEnter,
geofencing_registration_id);
}
-void GeofencingManager::RegionExited(int64 geofencing_registration_id) {
+void GeofencingManager::RegionExited(int64_t geofencing_registration_id) {
DispatchGeofencingEvent(blink::WebGeofencingEventTypeLeave,
geofencing_registration_id);
}
GeofencingManager::Registration* GeofencingManager::FindRegistration(
- int64 service_worker_registration_id,
+ int64_t service_worker_registration_id,
const std::string& region_id) {
DCHECK_CURRENTLY_ON(BrowserThread::IO);
ServiceWorkerRegistrationsMap::iterator registrations_iterator =
@@ -286,7 +285,7 @@ GeofencingManager::Registration* GeofencingManager::FindRegistration(
}
GeofencingManager::Registration* GeofencingManager::FindRegistrationById(
- int64 geofencing_registration_id) {
+ int64_t geofencing_registration_id) {
DCHECK_CURRENTLY_ON(BrowserThread::IO);
RegistrationIdRegistrationMap::iterator registration_iterator =
registrations_by_id_.find(geofencing_registration_id);
@@ -296,12 +295,12 @@ GeofencingManager::Registration* GeofencingManager::FindRegistrationById(
}
GeofencingManager::Registration& GeofencingManager::AddRegistration(
- int64 service_worker_registration_id,
+ int64_t service_worker_registration_id,
const GURL& service_worker_origin,
const std::string& region_id,
const blink::WebCircularGeofencingRegion& region,
const StatusCallback& callback,
- int64 geofencing_registration_id) {
+ int64_t geofencing_registration_id) {
DCHECK_CURRENTLY_ON(BrowserThread::IO);
DCHECK(!FindRegistration(service_worker_registration_id, region_id));
RegionIdRegistrationMap::iterator registration =
@@ -330,7 +329,7 @@ void GeofencingManager::ClearRegistration(Registration* registration) {
}
void GeofencingManager::CleanUpForServiceWorker(
- int64 service_worker_registration_id) {
+ int64_t service_worker_registration_id) {
DCHECK_CURRENTLY_ON(BrowserThread::IO);
ServiceWorkerRegistrationsMap::iterator registrations_iterator =
registrations_.find(service_worker_registration_id);
@@ -348,7 +347,7 @@ void GeofencingManager::CleanUpForServiceWorker(
void GeofencingManager::DispatchGeofencingEvent(
blink::WebGeofencingEventType event_type,
- int64 geofencing_registration_id) {
+ int64_t geofencing_registration_id) {
DCHECK_CURRENTLY_ON(BrowserThread::IO);
Registration* registration = FindRegistrationById(geofencing_registration_id);
if (!registration ||
@@ -369,7 +368,7 @@ void GeofencingManager::DispatchGeofencingEvent(
void GeofencingManager::DeliverGeofencingEvent(
blink::WebGeofencingEventType event_type,
- int64 geofencing_registration_id,
+ int64_t geofencing_registration_id,
ServiceWorkerStatusCode service_worker_status,
const scoped_refptr<ServiceWorkerRegistration>&
service_worker_registration) {
diff --git a/content/browser/geofencing/geofencing_manager.h b/content/browser/geofencing/geofencing_manager.h
index 62b85f9..99cdfc9 100644
--- a/content/browser/geofencing/geofencing_manager.h
+++ b/content/browser/geofencing/geofencing_manager.h
@@ -5,6 +5,8 @@
#ifndef CONTENT_BROWSER_GEOFENCING_GEOFENCING_MANAGER_H_
#define CONTENT_BROWSER_GEOFENCING_GEOFENCING_MANAGER_H_
+#include <stdint.h>
+
#include <map>
#include <string>
#include <vector>
@@ -68,7 +70,7 @@ class CONTENT_EXPORT GeofencingManager
// (or in progress of being registered) region will fail.
// TODO(mek): Behavior when using an already used ID might need to be revised
// depending on what the actual spec ends up saying about this.
- void RegisterRegion(int64 service_worker_registration_id,
+ void RegisterRegion(int64_t service_worker_registration_id,
const std::string& region_id,
const blink::WebCircularGeofencingRegion& region,
const StatusCallback& callback);
@@ -79,7 +81,7 @@ class CONTENT_EXPORT GeofencingManager
// (RegisterRegion hasn't called its callback yet) will fail.
// TODO(mek): Maybe better behavior would be to allow unregistering still
// in-progress registrations.
- void UnregisterRegion(int64 service_worker_registration_id,
+ void UnregisterRegion(int64_t service_worker_registration_id,
const std::string& region_id,
const StatusCallback& callback);
@@ -90,7 +92,7 @@ class CONTENT_EXPORT GeofencingManager
// has been called already (so it doesn't include still in progress
// registrations).
GeofencingStatus GetRegisteredRegions(
- int64 service_worker_registration_id,
+ int64_t service_worker_registration_id,
std::map<std::string, blink::WebCircularGeofencingRegion>* result);
// Enables or disables mock geofencing service.
@@ -117,54 +119,54 @@ class CONTENT_EXPORT GeofencingManager
void ShutdownOnIO();
// ServiceWorkerContextObserver implementation.
- void OnRegistrationDeleted(int64 service_worker_registration_id,
+ void OnRegistrationDeleted(int64_t service_worker_registration_id,
const GURL& pattern) override;
// GeofencingRegistrationDelegate implementation.
- void RegistrationFinished(int64 geofencing_registration_id,
+ void RegistrationFinished(int64_t geofencing_registration_id,
GeofencingStatus status) override;
- void RegionEntered(int64 geofencing_registration_id) override;
- void RegionExited(int64 geofencing_registration_id) override;
+ void RegionEntered(int64_t geofencing_registration_id) override;
+ void RegionExited(int64_t geofencing_registration_id) override;
// Looks up a particular geofence registration. Returns nullptr if no
// registration with the given IDs exists.
- Registration* FindRegistration(int64 service_worker_registration_id,
+ Registration* FindRegistration(int64_t service_worker_registration_id,
const std::string& region_id);
// Looks up a particular geofence registration. Returns nullptr if no
// registration with the given ID exists.
- Registration* FindRegistrationById(int64 geofencing_registration_id);
+ Registration* FindRegistrationById(int64_t geofencing_registration_id);
// Registers a new registration, returning a reference to the newly inserted
// object. Assumes no registration with the same IDs currently exists.
Registration& AddRegistration(
- int64 service_worker_registration_id,
+ int64_t service_worker_registration_id,
const GURL& service_worker_origin,
const std::string& region_id,
const blink::WebCircularGeofencingRegion& region,
const StatusCallback& callback,
- int64 geofencing_registration_id);
+ int64_t geofencing_registration_id);
// Clears a registration.
void ClearRegistration(Registration* registration);
// Unregisters and clears all registrations associated with a specific
// service worker.
- void CleanUpForServiceWorker(int64 service_worker_registration_id);
+ void CleanUpForServiceWorker(int64_t service_worker_registration_id);
// Starts dispatching a particular geofencing |event_type| for the geofence
// registration with the given ID. This first looks up the Service Worker
// Registration the geofence is associated with, and then attempts to deliver
// the event to that service worker.
void DispatchGeofencingEvent(blink::WebGeofencingEventType event_type,
- int64 geofencing_registration_id);
+ int64_t geofencing_registration_id);
// Delivers an event to the specified service worker for the given geofence.
// If the geofence registration id is no longer valid, this method does
// nothing. This assumes the |service_worker_registration| is the service
// worker the geofence registration is associated with.
void DeliverGeofencingEvent(blink::WebGeofencingEventType event_type,
- int64 geofencing_registration_id,
+ int64_t geofencing_registration_id,
ServiceWorkerStatusCode service_worker_status,
const scoped_refptr<ServiceWorkerRegistration>&
service_worker_registration);
@@ -179,12 +181,12 @@ class CONTENT_EXPORT GeofencingManager
typedef std::map<std::string, Registration> RegionIdRegistrationMap;
// Map of service worker registration id to the regions registered by that
// service worker.
- typedef std::map<int64, RegionIdRegistrationMap>
+ typedef std::map<int64_t, RegionIdRegistrationMap>
ServiceWorkerRegistrationsMap;
ServiceWorkerRegistrationsMap registrations_;
// Map of all registered regions by geofencing_registration_id.
- typedef std::map<int64, RegionIdRegistrationMap::iterator>
+ typedef std::map<int64_t, RegionIdRegistrationMap::iterator>
RegistrationIdRegistrationMap;
RegistrationIdRegistrationMap registrations_by_id_;
diff --git a/content/browser/geofencing/geofencing_manager_unittest.cc b/content/browser/geofencing/geofencing_manager_unittest.cc
index cf32e1d..bd905d1 100644
--- a/content/browser/geofencing/geofencing_manager_unittest.cc
+++ b/content/browser/geofencing/geofencing_manager_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 "content/browser/geofencing/geofencing_manager.h"
@@ -20,8 +22,8 @@ typedef std::map<std::string, WebCircularGeofencingRegion> RegionMap;
namespace {
static const char* kTestRegionId = "region-id";
-static const int64 kTestGeofencingRegistrationId = 42;
-static const int64 kTestGeofencingRegistrationId2 = 43;
+static const int64_t kTestGeofencingRegistrationId = 42;
+static const int64_t kTestGeofencingRegistrationId2 = 43;
bool RegionsMatch(const WebCircularGeofencingRegion& expected,
const WebCircularGeofencingRegion& arg) {
@@ -44,9 +46,9 @@ class TestGeofencingService : public GeofencingService {
}
MOCK_METHOD2(RegisterRegion,
- int64(const WebCircularGeofencingRegion& region,
- GeofencingRegistrationDelegate* delegate));
- MOCK_METHOD1(UnregisterRegion, void(int64 geofencing_registration_id));
+ int64_t(const WebCircularGeofencingRegion& region,
+ GeofencingRegistrationDelegate* delegate));
+ MOCK_METHOD1(UnregisterRegion, void(int64_t geofencing_registration_id));
private:
bool is_available_;
@@ -88,10 +90,10 @@ class StatusCatcher {
};
void SaveResponseCallback(bool* called,
- int64* store_registration_id,
+ int64_t* store_registration_id,
ServiceWorkerStatusCode status,
const std::string& status_message,
- int64 registration_id) {
+ int64_t registration_id) {
EXPECT_EQ(SERVICE_WORKER_OK, status) << ServiceWorkerStatusToString(status);
*called = true;
*store_registration_id = registration_id;
@@ -99,7 +101,7 @@ void SaveResponseCallback(bool* called,
ServiceWorkerContextCore::RegistrationCallback MakeRegisteredCallback(
bool* called,
- int64* store_registration_id) {
+ int64_t* store_registration_id) {
return base::Bind(&SaveResponseCallback, called, store_registration_id);
}
@@ -147,7 +149,7 @@ class GeofencingManagerTest : public testing::Test {
const std::string& name) {
GURL pattern("http://www.example.com/" + name);
GURL script_url("http://www.example.com/service_worker.js");
- int64 registration_id = kInvalidServiceWorkerRegistrationId;
+ int64_t registration_id = kInvalidServiceWorkerRegistrationId;
bool called = false;
helper_->context()->RegisterServiceWorker(
pattern, script_url, nullptr,
@@ -176,7 +178,7 @@ class GeofencingManagerTest : public testing::Test {
}
GeofencingStatus RegisterRegionSync(
- int64 service_worker_registration_id,
+ int64_t service_worker_registration_id,
const std::string& id,
const WebCircularGeofencingRegion& region) {
StatusCatcher result;
@@ -189,11 +191,11 @@ class GeofencingManagerTest : public testing::Test {
}
GeofencingStatus RegisterRegionSyncWithServiceResult(
- int64 service_worker_registration_id,
+ int64_t service_worker_registration_id,
const std::string& id,
const WebCircularGeofencingRegion& region,
GeofencingStatus service_status,
- int64 geofencing_registration_id) {
+ int64_t geofencing_registration_id) {
StatusCatcher result;
GeofencingRegistrationDelegate* delegate = 0;
EXPECT_CALL(
@@ -211,10 +213,11 @@ class GeofencingManagerTest : public testing::Test {
return result.Wait();
}
- GeofencingStatus UnregisterRegionSync(int64 service_worker_registration_id,
- const std::string& id,
- bool should_call_service,
- int64 geofencing_registration_id = 0) {
+ GeofencingStatus UnregisterRegionSync(
+ int64_t service_worker_registration_id,
+ const std::string& id,
+ bool should_call_service,
+ int64_t geofencing_registration_id = 0) {
StatusCatcher result;
if (should_call_service) {
EXPECT_CALL(*service_, UnregisterRegion(geofencing_registration_id));
@@ -226,7 +229,7 @@ class GeofencingManagerTest : public testing::Test {
return result.Wait();
}
- void VerifyRegions(int64 service_worker_registration_id,
+ void VerifyRegions(int64_t service_worker_registration_id,
const RegionMap& expected_regions) {
RegionMap regions;
EXPECT_EQ(GEOFENCING_STATUS_OK,
diff --git a/content/browser/geofencing/geofencing_provider.h b/content/browser/geofencing/geofencing_provider.h
index ea2c207..a2052a4 100644
--- a/content/browser/geofencing/geofencing_provider.h
+++ b/content/browser/geofencing/geofencing_provider.h
@@ -5,7 +5,8 @@
#ifndef CONTENT_BROWSER_GEOFENCING_GEOFENCING_PROVIDER_H_
#define CONTENT_BROWSER_GEOFENCING_GEOFENCING_PROVIDER_H_
-#include "base/basictypes.h"
+#include <stdint.h>
+
#include "base/callback_forward.h"
#include "content/common/geofencing_types.h"
@@ -30,13 +31,13 @@ class GeofencingProvider {
// implemented yet.
// Implementations of RegisterRegion must asynchronously call the |callback|
// to indicate success or failure.
- virtual void RegisterRegion(int64 geofencing_registration_id,
+ virtual void RegisterRegion(int64_t geofencing_registration_id,
const blink::WebCircularGeofencingRegion& region,
const StatusCallback& callback) = 0;
// Called by |GeofencingService| to unregister an existing registration. Will
// only be called once for each registration.
- virtual void UnregisterRegion(int64 geofencing_registration_id) = 0;
+ virtual void UnregisterRegion(int64_t geofencing_registration_id) = 0;
};
} // namespace content
diff --git a/content/browser/geofencing/geofencing_registration_delegate.h b/content/browser/geofencing/geofencing_registration_delegate.h
index 10d6cea..3c5814d 100644
--- a/content/browser/geofencing/geofencing_registration_delegate.h
+++ b/content/browser/geofencing/geofencing_registration_delegate.h
@@ -5,7 +5,8 @@
#ifndef CONTENT_BROWSER_GEOFENCING_GEOFENCING_REGISTRATION_DELEGATE_H_
#define CONTENT_BROWSER_GEOFENCING_GEOFENCING_REGISTRATION_DELEGATE_H_
-#include "base/basictypes.h"
+#include <stdint.h>
+
#include "content/common/geofencing_types.h"
namespace content {
@@ -17,10 +18,10 @@ namespace content {
// TODO(mek): Add methods for geofence enter/leave events.
class GeofencingRegistrationDelegate {
public:
- virtual void RegistrationFinished(int64 geofencing_registration_id,
+ virtual void RegistrationFinished(int64_t geofencing_registration_id,
GeofencingStatus status) = 0;
- virtual void RegionEntered(int64 geofencing_registration_id) = 0;
- virtual void RegionExited(int64 geofencing_registration_id) = 0;
+ virtual void RegionEntered(int64_t geofencing_registration_id) = 0;
+ virtual void RegionExited(int64_t geofencing_registration_id) = 0;
protected:
virtual ~GeofencingRegistrationDelegate() {}
diff --git a/content/browser/geofencing/geofencing_service.cc b/content/browser/geofencing/geofencing_service.cc
index d3dc259..1edb605 100644
--- a/content/browser/geofencing/geofencing_service.cc
+++ b/content/browser/geofencing/geofencing_service.cc
@@ -27,11 +27,11 @@ void RunSoon(const base::Closure& callback) {
struct GeofencingServiceImpl::Registration {
Registration();
Registration(const blink::WebCircularGeofencingRegion& region,
- int64 geofencing_registration_id,
+ int64_t geofencing_registration_id,
GeofencingRegistrationDelegate* delegate);
blink::WebCircularGeofencingRegion region;
- int64 geofencing_registration_id;
+ int64_t geofencing_registration_id;
GeofencingRegistrationDelegate* delegate;
enum RegistrationState {
@@ -56,13 +56,12 @@ GeofencingServiceImpl::Registration::Registration()
GeofencingServiceImpl::Registration::Registration(
const blink::WebCircularGeofencingRegion& region,
- int64 geofencing_registration_id,
+ int64_t geofencing_registration_id,
GeofencingRegistrationDelegate* delegate)
: region(region),
geofencing_registration_id(geofencing_registration_id),
delegate(delegate),
- state(STATE_REGISTERING) {
-}
+ state(STATE_REGISTERING) {}
GeofencingServiceImpl::GeofencingServiceImpl() : next_registration_id_(0) {
}
@@ -80,12 +79,12 @@ bool GeofencingServiceImpl::IsServiceAvailable() {
return EnsureProvider();
}
-int64 GeofencingServiceImpl::RegisterRegion(
+int64_t GeofencingServiceImpl::RegisterRegion(
const blink::WebCircularGeofencingRegion& region,
GeofencingRegistrationDelegate* delegate) {
DCHECK_CURRENTLY_ON(BrowserThread::IO);
- int64 geofencing_registration_id = GetNextId();
+ int64_t geofencing_registration_id = GetNextId();
registrations_[geofencing_registration_id] =
Registration(region, geofencing_registration_id, delegate);
@@ -107,7 +106,8 @@ int64 GeofencingServiceImpl::RegisterRegion(
return geofencing_registration_id;
}
-void GeofencingServiceImpl::UnregisterRegion(int64 geofencing_registration_id) {
+void GeofencingServiceImpl::UnregisterRegion(
+ int64_t geofencing_registration_id) {
DCHECK_CURRENTLY_ON(BrowserThread::IO);
RegistrationsMap::iterator registration_iterator =
@@ -157,14 +157,14 @@ bool GeofencingServiceImpl::EnsureProvider() {
return true;
}
-int64 GeofencingServiceImpl::GetNextId() {
+int64_t GeofencingServiceImpl::GetNextId() {
DCHECK_CURRENTLY_ON(BrowserThread::IO);
return next_registration_id_++;
}
void GeofencingServiceImpl::NotifyRegistrationFinished(
- int64 geofencing_registration_id,
+ int64_t geofencing_registration_id,
GeofencingStatus status) {
DCHECK_CURRENTLY_ON(BrowserThread::IO);
diff --git a/content/browser/geofencing/geofencing_service.h b/content/browser/geofencing/geofencing_service.h
index 998dc49..8c91193 100644
--- a/content/browser/geofencing/geofencing_service.h
+++ b/content/browser/geofencing/geofencing_service.h
@@ -5,9 +5,11 @@
#ifndef CONTENT_BROWSER_GEOFENCING_GEOFENCING_SERVICE_H_
#define CONTENT_BROWSER_GEOFENCING_GEOFENCING_SERVICE_H_
+#include <stdint.h>
+
#include <map>
-#include "base/basictypes.h"
+#include "base/macros.h"
#include "base/memory/scoped_ptr.h"
#include "content/common/content_export.h"
#include "content/common/geofencing_types.h"
@@ -41,12 +43,13 @@ class GeofencingService {
// inform the delegate of the result of the attempt to register the region.
// This does not transfer ownership of the |delegate|. Callers have to ensure
// that the delegate remains valid as long as the region is registered.
- virtual int64 RegisterRegion(const blink::WebCircularGeofencingRegion& region,
- GeofencingRegistrationDelegate* delegate) = 0;
+ virtual int64_t RegisterRegion(
+ const blink::WebCircularGeofencingRegion& region,
+ GeofencingRegistrationDelegate* delegate) = 0;
// Unregister a region. This is assumed to always succeed. It is safe to call
// this even if a registration is still in progress.
- virtual void UnregisterRegion(int64 geofencing_registration_id) = 0;
+ virtual void UnregisterRegion(int64_t geofencing_registration_id) = 0;
};
// This class combines all the geofence registrations from the various per
@@ -64,10 +67,9 @@ class CONTENT_EXPORT GeofencingServiceImpl
// GeofencingServiceInterface implementation.
bool IsServiceAvailable() override;
- int64 RegisterRegion(
- const blink::WebCircularGeofencingRegion& region,
- GeofencingRegistrationDelegate* delegate) override;
- void UnregisterRegion(int64 geofencing_registration_id) override;
+ int64_t RegisterRegion(const blink::WebCircularGeofencingRegion& region,
+ GeofencingRegistrationDelegate* delegate) override;
+ void UnregisterRegion(int64_t geofencing_registration_id) override;
protected:
friend class GeofencingServiceTest;
@@ -80,7 +82,7 @@ class CONTENT_EXPORT GeofencingServiceImpl
private:
struct Registration;
- typedef std::map<int64, Registration> RegistrationsMap;
+ typedef std::map<int64_t, Registration> RegistrationsMap;
// This method checks if a |GeofencingProvider| exists, creates a new one if
// not, and finally returns false if it can't create a provider for the
@@ -88,14 +90,14 @@ class CONTENT_EXPORT GeofencingServiceImpl
bool EnsureProvider();
// Returns a new unique ID to use for the next geofence registration.
- int64 GetNextId();
+ int64_t GetNextId();
// Notifies the correct delegate that registration has completed for a
// specific geofence registration.
- void NotifyRegistrationFinished(int64 geofencing_registration_id,
+ void NotifyRegistrationFinished(int64_t geofencing_registration_id,
GeofencingStatus status);
- int64 next_registration_id_;
+ int64_t next_registration_id_;
RegistrationsMap registrations_;
scoped_ptr<GeofencingProvider> provider_;
diff --git a/content/browser/geofencing/geofencing_service_unittest.cc b/content/browser/geofencing/geofencing_service_unittest.cc
index 7fbe035..8d512ac 100644
--- a/content/browser/geofencing/geofencing_service_unittest.cc
+++ b/content/browser/geofencing/geofencing_service_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 "content/browser/geofencing/geofencing_provider.h"
#include "content/browser/geofencing/geofencing_registration_delegate.h"
#include "content/browser/geofencing/geofencing_service.h"
@@ -30,18 +32,19 @@ class MockGeofencingRegistrationDelegate
: public GeofencingRegistrationDelegate {
public:
MOCK_METHOD2(RegistrationFinished,
- void(int64 geofencing_registration_id, GeofencingStatus status));
- MOCK_METHOD1(RegionEntered, void(int64 geofencing_registration_id));
- MOCK_METHOD1(RegionExited, void(int64 geofencing_registration_id));
+ void(int64_t geofencing_registration_id,
+ GeofencingStatus status));
+ MOCK_METHOD1(RegionEntered, void(int64_t geofencing_registration_id));
+ MOCK_METHOD1(RegionExited, void(int64_t geofencing_registration_id));
};
class MockGeofencingProvider : public GeofencingProvider {
public:
MOCK_METHOD3(RegisterRegion,
- void(int64 geofencing_registration_id,
+ void(int64_t geofencing_registration_id,
const blink::WebCircularGeofencingRegion& region,
const StatusCallback& callback));
- MOCK_METHOD1(UnregisterRegion, void(int64 geofencing_registration_id));
+ MOCK_METHOD1(UnregisterRegion, void(int64_t geofencing_registration_id));
};
ACTION_P(QuitRunner, runner) {
@@ -79,12 +82,12 @@ class GeofencingServiceTest : public testing::Test {
int RegistrationCount() { return service_->RegistrationCountForTesting(); }
- int64 RegisterRegionSync(const WebCircularGeofencingRegion& region,
- GeofencingStatus provider_status) {
+ int64_t RegisterRegionSync(const WebCircularGeofencingRegion& region,
+ GeofencingStatus provider_status) {
scoped_refptr<MessageLoopRunner> runner(new MessageLoopRunner());
// The registration ID that is passed to the provider.
- int64 provider_registration_id = -1;
+ int64_t provider_registration_id = -1;
// The callback that is passed to the provider.
GeofencingProvider::StatusCallback callback;
@@ -95,7 +98,7 @@ class GeofencingServiceTest : public testing::Test {
.WillOnce(testing::DoAll(SaveRegistrationId(&provider_registration_id),
SaveStatusCallback(&callback)));
- int64 geofencing_registration_id =
+ int64_t geofencing_registration_id =
service_->RegisterRegion(region, &delegate_);
// Service should have synchronously called the provider.
@@ -124,7 +127,7 @@ class GeofencingServiceTest : public testing::Test {
TEST_F(GeofencingServiceTest, RegisterRegion_NoProvider) {
scoped_refptr<MessageLoopRunner> runner(new MessageLoopRunner());
- int64 geofencing_registration_id =
+ int64_t geofencing_registration_id =
service_->RegisterRegion(test_region_, &delegate_);
EXPECT_CALL(delegate_,
RegistrationFinished(
@@ -171,7 +174,7 @@ TEST_F(GeofencingServiceTest, UnregisterRegion_DuringSuccesfullRegistration) {
testing::_, WebCircularGeofencingRegionEq(test_region_), testing::_))
.WillOnce(SaveStatusCallback(&callback));
- int64 geofencing_registration_id =
+ int64_t geofencing_registration_id =
service_->RegisterRegion(test_region_, &delegate_);
// Service should have synchronously called the provider.
diff --git a/content/browser/geofencing/mock_geofencing_service.cc b/content/browser/geofencing/mock_geofencing_service.cc
index c3a1f27..edf5a92 100644
--- a/content/browser/geofencing/mock_geofencing_service.cc
+++ b/content/browser/geofencing/mock_geofencing_service.cc
@@ -21,7 +21,7 @@ namespace content {
namespace {
void RegisterRegionResult(GeofencingRegistrationDelegate* delegate,
- int64 geofencing_registration_id,
+ int64_t geofencing_registration_id,
GeofencingStatus status) {
base::ThreadTaskRunnerHandle::Get()->PostTask(
FROM_HERE,
@@ -99,10 +99,10 @@ bool MockGeofencingService::IsServiceAvailable() {
return available_;
}
-int64 MockGeofencingService::RegisterRegion(
+int64_t MockGeofencingService::RegisterRegion(
const blink::WebCircularGeofencingRegion& region,
GeofencingRegistrationDelegate* delegate) {
- int64 id = next_id_++;
+ int64_t id = next_id_++;
Registration& registration = registrations_[id];
registration.region = region;
registration.delegate = delegate;
@@ -118,7 +118,8 @@ int64 MockGeofencingService::RegisterRegion(
return id;
}
-void MockGeofencingService::UnregisterRegion(int64 geofencing_registration_id) {
+void MockGeofencingService::UnregisterRegion(
+ int64_t geofencing_registration_id) {
registrations_.erase(geofencing_registration_id);
}
diff --git a/content/browser/geofencing/mock_geofencing_service.h b/content/browser/geofencing/mock_geofencing_service.h
index 6ba9f0d..e69b07b 100644
--- a/content/browser/geofencing/mock_geofencing_service.h
+++ b/content/browser/geofencing/mock_geofencing_service.h
@@ -5,6 +5,8 @@
#ifndef CONTENT_BROWSER_GEOFENCING_MOCK_GEOFENCING_SERVICE_H_
#define CONTENT_BROWSER_GEOFENCING_MOCK_GEOFENCING_SERVICE_H_
+#include <stdint.h>
+
#include <map>
#include "content/browser/geofencing/geofencing_service.h"
@@ -27,16 +29,16 @@ class MockGeofencingService : public GeofencingService {
// GeofencingService implementation.
bool IsServiceAvailable() override;
- int64 RegisterRegion(const blink::WebCircularGeofencingRegion& region,
- GeofencingRegistrationDelegate* delegate) override;
- void UnregisterRegion(int64 geofencing_registration_id) override;
+ int64_t RegisterRegion(const blink::WebCircularGeofencingRegion& region,
+ GeofencingRegistrationDelegate* delegate) override;
+ void UnregisterRegion(int64_t geofencing_registration_id) override;
private:
struct Registration;
bool available_;
- std::map<int64, Registration> registrations_;
- int64 next_id_;
+ std::map<int64_t, Registration> registrations_;
+ int64_t next_id_;
bool has_position_;
double last_latitude_;
double last_longitude_;
diff --git a/content/browser/geolocation/empty_wifi_data_provider.h b/content/browser/geolocation/empty_wifi_data_provider.h
index 4ab1384..e591b9b 100644
--- a/content/browser/geolocation/empty_wifi_data_provider.h
+++ b/content/browser/geolocation/empty_wifi_data_provider.h
@@ -5,6 +5,7 @@
#ifndef CONTENT_BROWSER_GEOLOCATION_EMPTY_WIFI_DATA_PROVIDER_H_
#define CONTENT_BROWSER_GEOLOCATION_EMPTY_WIFI_DATA_PROVIDER_H_
+#include "base/macros.h"
#include "content/browser/geolocation/wifi_data_provider.h"
namespace content {
diff --git a/content/browser/geolocation/fake_access_token_store.h b/content/browser/geolocation/fake_access_token_store.h
index 423b317..b6b674d 100644
--- a/content/browser/geolocation/fake_access_token_store.h
+++ b/content/browser/geolocation/fake_access_token_store.h
@@ -5,6 +5,7 @@
#ifndef CONTENT_BROWSER_GEOLOCATION_FAKE_ACCESS_TOKEN_STORE_H_
#define CONTENT_BROWSER_GEOLOCATION_FAKE_ACCESS_TOKEN_STORE_H_
+#include "base/macros.h"
#include "base/single_thread_task_runner.h"
#include "content/public/browser/access_token_store.h"
#include "testing/gmock/include/gmock/gmock.h"
diff --git a/content/browser/geolocation/geolocation_provider_impl.h b/content/browser/geolocation/geolocation_provider_impl.h
index 72dc9e8a..fe07da7 100644
--- a/content/browser/geolocation/geolocation_provider_impl.h
+++ b/content/browser/geolocation/geolocation_provider_impl.h
@@ -8,9 +8,9 @@
#include <list>
#include <vector>
-#include "base/basictypes.h"
#include "base/callback_forward.h"
#include "base/compiler_specific.h"
+#include "base/macros.h"
#include "base/threading/thread.h"
#include "content/common/content_export.h"
#include "content/public/browser/geolocation_provider.h"
diff --git a/content/browser/geolocation/geolocation_provider_impl_unittest.cc b/content/browser/geolocation/geolocation_provider_impl_unittest.cc
index 491856b..0b354fd 100644
--- a/content/browser/geolocation/geolocation_provider_impl_unittest.cc
+++ b/content/browser/geolocation/geolocation_provider_impl_unittest.cc
@@ -5,6 +5,7 @@
#include "base/bind.h"
#include "base/bind_helpers.h"
#include "base/location.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/content/browser/geolocation/geolocation_service_context.h b/content/browser/geolocation/geolocation_service_context.h
index 453c8b0..843fd38 100644
--- a/content/browser/geolocation/geolocation_service_context.h
+++ b/content/browser/geolocation/geolocation_service_context.h
@@ -5,6 +5,7 @@
#ifndef CONTENT_BROWSER_GEOLOCATION_GEOLOCATION_SERVICE_CONTEXT_H_
#define CONTENT_BROWSER_GEOLOCATION_GEOLOCATION_SERVICE_CONTEXT_H_
+#include "base/macros.h"
#include "base/memory/scoped_vector.h"
#include "content/browser/geolocation/geolocation_service_impl.h"
diff --git a/content/browser/geolocation/geolocation_service_impl.h b/content/browser/geolocation/geolocation_service_impl.h
index 354547e..d72706e 100644
--- a/content/browser/geolocation/geolocation_service_impl.h
+++ b/content/browser/geolocation/geolocation_service_impl.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 "base/memory/scoped_ptr.h"
#include "content/browser/geolocation/geolocation_provider_impl.h"
#include "content/common/geolocation_service.mojom.h"
diff --git a/content/browser/geolocation/location_arbitrator_impl.cc b/content/browser/geolocation/location_arbitrator_impl.cc
index 20d9a51..03e3676 100644
--- a/content/browser/geolocation/location_arbitrator_impl.cc
+++ b/content/browser/geolocation/location_arbitrator_impl.cc
@@ -8,6 +8,7 @@
#include "base/bind.h"
#include "base/bind_helpers.h"
+#include "build/build_config.h"
#include "content/browser/geolocation/network_location_provider.h"
#include "content/public/browser/access_token_store.h"
#include "content/public/browser/content_browser_client.h"
@@ -23,7 +24,7 @@ const char* kDefaultNetworkProviderUrl =
// To avoid oscillations, set this to twice the expected update interval of a
// a GPS-type location provider (in case it misses a beat) plus a little.
-const int64 LocationArbitratorImpl::kFixStaleTimeoutMilliseconds =
+const int64_t LocationArbitratorImpl::kFixStaleTimeoutMilliseconds =
11 * base::Time::kMillisecondsPerSecond;
LocationArbitratorImpl::LocationArbitratorImpl(
diff --git a/content/browser/geolocation/location_arbitrator_impl.h b/content/browser/geolocation/location_arbitrator_impl.h
index 3ef7d5d..65a5532 100644
--- a/content/browser/geolocation/location_arbitrator_impl.h
+++ b/content/browser/geolocation/location_arbitrator_impl.h
@@ -5,7 +5,10 @@
#ifndef CONTENT_BROWSER_GEOLOCATION_LOCATION_ARBITRATOR_IMPL_H_
#define CONTENT_BROWSER_GEOLOCATION_LOCATION_ARBITRATOR_IMPL_H_
+#include <stdint.h>
+
#include "base/callback_forward.h"
+#include "base/macros.h"
#include "base/memory/scoped_vector.h"
#include "base/strings/string16.h"
#include "base/time/time.h"
@@ -32,7 +35,7 @@ class CONTENT_EXPORT LocationArbitratorImpl : public LocationArbitrator {
// Number of milliseconds newer a location provider has to be that it's worth
// switching to this location provider on the basis of it being fresher
// (regardles of relative accuracy). Public for tests.
- static const int64 kFixStaleTimeoutMilliseconds;
+ static const int64_t kFixStaleTimeoutMilliseconds;
typedef base::Callback<void(const Geoposition&)> LocationUpdateCallback;
diff --git a/content/browser/geolocation/location_provider_base.h b/content/browser/geolocation/location_provider_base.h
index b0ca80e..a95efa1 100644
--- a/content/browser/geolocation/location_provider_base.h
+++ b/content/browser/geolocation/location_provider_base.h
@@ -5,6 +5,7 @@
#ifndef CONTENT_BROWSER_GEOLOCATION_LOCATION_PROVIDER_BASE_H_
#define CONTENT_BROWSER_GEOLOCATION_LOCATION_PROVIDER_BASE_H_
+#include "base/macros.h"
#include "content/common/content_export.h"
#include "content/public/browser/location_provider.h"
diff --git a/content/browser/geolocation/mock_location_arbitrator.h b/content/browser/geolocation/mock_location_arbitrator.h
index efdb8b1..31e6601 100644
--- a/content/browser/geolocation/mock_location_arbitrator.h
+++ b/content/browser/geolocation/mock_location_arbitrator.h
@@ -5,8 +5,8 @@
#ifndef CONTENT_BROWSER_GEOLOCATION_MOCK_LOCATION_ARBITRATOR_H_
#define CONTENT_BROWSER_GEOLOCATION_MOCK_LOCATION_ARBITRATOR_H_
-#include "base/basictypes.h"
#include "base/compiler_specific.h"
+#include "base/macros.h"
#include "content/browser/geolocation/location_arbitrator.h"
namespace content {
diff --git a/content/browser/geolocation/mock_location_provider.h b/content/browser/geolocation/mock_location_provider.h
index bedd2a4..ec1a977 100644
--- a/content/browser/geolocation/mock_location_provider.h
+++ b/content/browser/geolocation/mock_location_provider.h
@@ -7,6 +7,7 @@
#include "base/compiler_specific.h"
+#include "base/macros.h"
#include "base/memory/ref_counted.h"
#include "base/single_thread_task_runner.h"
#include "base/threading/thread.h"
diff --git a/content/browser/geolocation/network_location_provider.h b/content/browser/geolocation/network_location_provider.h
index e3588c6..69d891f 100644
--- a/content/browser/geolocation/network_location_provider.h
+++ b/content/browser/geolocation/network_location_provider.h
@@ -5,10 +5,12 @@
#ifndef CONTENT_BROWSER_GEOLOCATION_NETWORK_LOCATION_PROVIDER_H_
#define CONTENT_BROWSER_GEOLOCATION_NETWORK_LOCATION_PROVIDER_H_
+#include <stddef.h>
+
#include <list>
#include <map>
-#include "base/basictypes.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/content/browser/geolocation/network_location_provider_unittest.cc b/content/browser/geolocation/network_location_provider_unittest.cc
index 1566fe7..724eb35 100644
--- a/content/browser/geolocation/network_location_provider_unittest.cc
+++ b/content/browser/geolocation/network_location_provider_unittest.cc
@@ -2,8 +2,11 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include <stddef.h>
+
#include "base/json/json_reader.h"
#include "base/json/json_writer.h"
+#include "base/macros.h"
#include "base/memory/scoped_ptr.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/string_util.h"
diff --git a/content/browser/geolocation/network_location_request.h b/content/browser/geolocation/network_location_request.h
index 3b265e5..fe15b72 100644
--- a/content/browser/geolocation/network_location_request.h
+++ b/content/browser/geolocation/network_location_request.h
@@ -5,6 +5,7 @@
#ifndef CONTENT_BROWSER_GEOLOCATION_NETWORK_LOCATION_REQUEST_H_
#define CONTENT_BROWSER_GEOLOCATION_NETWORK_LOCATION_REQUEST_H_
+#include "base/macros.h"
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
#include "content/browser/geolocation/wifi_data_provider.h"
diff --git a/content/browser/geolocation/wifi_data.cc b/content/browser/geolocation/wifi_data.cc
index fd5a99b..2f41c33 100644
--- a/content/browser/geolocation/wifi_data.cc
+++ b/content/browser/geolocation/wifi_data.cc
@@ -4,6 +4,7 @@
#include "content/browser/geolocation/wifi_data.h"
+#include <stddef.h>
#include <stdint.h>
#include <algorithm>
diff --git a/content/browser/geolocation/wifi_data_provider.h b/content/browser/geolocation/wifi_data_provider.h
index 98d2296..96ab881 100644
--- a/content/browser/geolocation/wifi_data_provider.h
+++ b/content/browser/geolocation/wifi_data_provider.h
@@ -7,9 +7,9 @@
#include <set>
-#include "base/basictypes.h"
#include "base/bind.h"
#include "base/callback.h"
+#include "base/macros.h"
#include "base/memory/ref_counted.h"
#include "base/message_loop/message_loop.h"
#include "base/strings/string16.h"
diff --git a/content/browser/geolocation/wifi_data_provider_chromeos.cc b/content/browser/geolocation/wifi_data_provider_chromeos.cc
index 18d84ba..6060ec1 100644
--- a/content/browser/geolocation/wifi_data_provider_chromeos.cc
+++ b/content/browser/geolocation/wifi_data_provider_chromeos.cc
@@ -6,6 +6,8 @@
#include "content/browser/geolocation/wifi_data_provider_chromeos.h"
+#include <stdint.h>
+
#include "base/bind.h"
#include "base/strings/utf_string_conversions.h"
#include "chromeos/network/geolocation_handler.h"
@@ -144,7 +146,7 @@ bool WifiDataProviderChromeOs::GetAccessPointData(
return true;
chromeos::WifiAccessPointVector access_points;
- int64 age_ms = 0;
+ int64_t age_ms = 0;
if (!chromeos::NetworkHandler::Get()->geolocation_handler()->
GetWifiAccessPoints(&access_points, &age_ms)) {
return false;
diff --git a/content/browser/geolocation/wifi_data_provider_chromeos.h b/content/browser/geolocation/wifi_data_provider_chromeos.h
index 0e8bc93..e901f01 100644
--- a/content/browser/geolocation/wifi_data_provider_chromeos.h
+++ b/content/browser/geolocation/wifi_data_provider_chromeos.h
@@ -6,6 +6,7 @@
#define CONTENT_BROWSER_GEOLOCATION_WIFI_DATA_PROVIDER_CHROMEOS_H_
#include "base/compiler_specific.h"
+#include "base/macros.h"
#include "content/browser/geolocation/wifi_data_provider.h"
#include "content/browser/geolocation/wifi_polling_policy.h"
diff --git a/content/browser/geolocation/wifi_data_provider_common.cc b/content/browser/geolocation/wifi_data_provider_common.cc
index 7bac7ab..4406680 100644
--- a/content/browser/geolocation/wifi_data_provider_common.cc
+++ b/content/browser/geolocation/wifi_data_provider_common.cc
@@ -12,7 +12,7 @@
namespace content {
-base::string16 MacAddressAsString16(const uint8 mac_as_int[6]) {
+base::string16 MacAddressAsString16(const uint8_t mac_as_int[6]) {
// mac_as_int is big-endian. Write in byte chunks.
// Format is XX-XX-XX-XX-XX-XX.
static const char* const kMacFormatString =
diff --git a/content/browser/geolocation/wifi_data_provider_common.h b/content/browser/geolocation/wifi_data_provider_common.h
index 771dd41..d7cf195 100644
--- a/content/browser/geolocation/wifi_data_provider_common.h
+++ b/content/browser/geolocation/wifi_data_provider_common.h
@@ -6,8 +6,10 @@
#define CONTENT_BROWSER_GEOLOCATION_WIFI_DATA_PROVIDER_COMMON_H_
#include <assert.h>
+#include <stdint.h>
#include "base/logging.h"
+#include "base/macros.h"
#include "base/memory/scoped_ptr.h"
#include "base/memory/weak_ptr.h"
#include "base/strings/string16.h"
@@ -17,8 +19,8 @@
namespace content {
-// Converts a MAC address stored as an array of uint8 to a string.
-base::string16 MacAddressAsString16(const uint8 mac_as_int[6]);
+// Converts a MAC address stored as an array of uint8_t to a string.
+base::string16 MacAddressAsString16(const uint8_t mac_as_int[6]);
// Base class to promote code sharing between platform specific wifi data
// providers. It's optional for specific platforms to derive this, but if they
diff --git a/content/browser/geolocation/wifi_data_provider_common_unittest.cc b/content/browser/geolocation/wifi_data_provider_common_unittest.cc
index 53d44bc..b652170 100644
--- a/content/browser/geolocation/wifi_data_provider_common_unittest.cc
+++ b/content/browser/geolocation/wifi_data_provider_common_unittest.cc
@@ -4,10 +4,12 @@
#include <vector>
+#include "base/macros.h"
#include "base/memory/scoped_ptr.h"
#include "base/strings/string_util.h"
#include "base/strings/utf_string_conversions.h"
#include "base/third_party/dynamic_annotations/dynamic_annotations.h"
+#include "build/build_config.h"
#include "content/browser/geolocation/wifi_data_provider_common.h"
#include "content/browser/geolocation/wifi_data_provider_manager.h"
#include "testing/gmock/include/gmock/gmock.h"
diff --git a/content/browser/geolocation/wifi_data_provider_common_win.cc b/content/browser/geolocation/wifi_data_provider_common_win.cc
index aac728d..77ff286 100644
--- a/content/browser/geolocation/wifi_data_provider_common_win.cc
+++ b/content/browser/geolocation/wifi_data_provider_common_win.cc
@@ -5,6 +5,7 @@
#include "content/browser/geolocation/wifi_data_provider_common_win.h"
#include <assert.h>
+#include <stdint.h>
#include "base/strings/utf_string_conversions.h"
#include "content/browser/geolocation/wifi_data_provider_common.h"
@@ -30,9 +31,10 @@ int GetDataFromBssIdList(const NDIS_802_11_BSSID_LIST& bss_id_list,
WifiData::AccessPointDataSet* data) {
// Walk through the BSS IDs.
int found = 0;
- const uint8 *iterator = reinterpret_cast<const uint8*>(&bss_id_list.Bssid[0]);
- const uint8 *end_of_buffer =
- reinterpret_cast<const uint8*>(&bss_id_list) + list_size;
+ const uint8_t* iterator =
+ reinterpret_cast<const uint8_t*>(&bss_id_list.Bssid[0]);
+ const uint8_t* end_of_buffer =
+ reinterpret_cast<const uint8_t*>(&bss_id_list) + list_size;
for (int i = 0; i < static_cast<int>(bss_id_list.NumberOfItems); ++i) {
const NDIS_WLAN_BSSID *bss_id =
reinterpret_cast<const NDIS_WLAN_BSSID*>(iterator);
diff --git a/content/browser/geolocation/wifi_data_provider_corewlan_mac.mm b/content/browser/geolocation/wifi_data_provider_corewlan_mac.mm
index 7e783f4..011b414 100644
--- a/content/browser/geolocation/wifi_data_provider_corewlan_mac.mm
+++ b/content/browser/geolocation/wifi_data_provider_corewlan_mac.mm
@@ -8,9 +8,11 @@
#include <dlfcn.h>
#import <Foundation/Foundation.h>
+#include <stdint.h>
#include "base/mac/scoped_nsautorelease_pool.h"
#include "base/mac/scoped_nsobject.h"
+#include "base/macros.h"
#include "base/metrics/histogram.h"
#include "base/strings/sys_string_conversions.h"
@@ -152,8 +154,8 @@ bool CoreWlanApi::GetAccessPointData(WifiData::AccessPointDataSet* data) {
AccessPointData access_point_data;
NSData* mac = [network bssidData];
DCHECK([mac length] == 6);
- access_point_data.mac_address = MacAddressAsString16(
- static_cast<const uint8*>([mac bytes]));
+ access_point_data.mac_address =
+ MacAddressAsString16(static_cast<const uint8_t*>([mac bytes]));
access_point_data.radio_signal_strength = [[network rssi] intValue];
access_point_data.channel = [[network channel] intValue];
access_point_data.signal_to_noise =
diff --git a/content/browser/geolocation/wifi_data_provider_linux.cc b/content/browser/geolocation/wifi_data_provider_linux.cc
index 29c9995..a8fad4a 100644
--- a/content/browser/geolocation/wifi_data_provider_linux.cc
+++ b/content/browser/geolocation/wifi_data_provider_linux.cc
@@ -8,6 +8,10 @@
#include "content/browser/geolocation/wifi_data_provider_linux.h"
+#include <stddef.h>
+#include <stdint.h>
+
+#include "base/macros.h"
#include "base/memory/scoped_ptr.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/utf_string_conversions.h"
@@ -155,7 +159,7 @@ bool NetworkManagerWlanApi::GetAccessPointData(
continue; // Check the next device.
}
dbus::MessageReader reader(response.get());
- uint32 device_type = 0;
+ uint32_t device_type = 0;
if (!reader.PopVariantOfUint32(&device_type)) {
LOG(WARNING) << "Unexpected response for " << device_type << ": "
<< response->ToString();
@@ -247,7 +251,7 @@ bool NetworkManagerWlanApi::GetAccessPointsForAdapter(
<< ": " << response->ToString();
continue;
}
- const uint8* ssid_bytes = NULL;
+ const uint8_t* ssid_bytes = NULL;
size_t ssid_length = 0;
if (!variant_reader.PopArrayOfBytes(&ssid_bytes, &ssid_length)) {
LOG(WARNING) << "Unexpected response for " << access_point_path.value()
@@ -272,7 +276,7 @@ bool NetworkManagerWlanApi::GetAccessPointsForAdapter(
}
base::ReplaceSubstringsAfterOffset(&mac, 0U, ":", base::StringPiece());
- std::vector<uint8> mac_bytes;
+ std::vector<uint8_t> mac_bytes;
if (!base::HexStringToBytes(mac, &mac_bytes) || mac_bytes.size() != 6) {
LOG(WARNING) << "Can't parse mac address (found " << mac_bytes.size()
<< " bytes) so using raw string: " << mac;
@@ -288,7 +292,7 @@ bool NetworkManagerWlanApi::GetAccessPointsForAdapter(
if (!response)
continue;
dbus::MessageReader reader(response.get());
- uint8 strength = 0;
+ uint8_t strength = 0;
if (!reader.PopVariantOfByte(&strength)) {
LOG(WARNING) << "Unexpected response for " << access_point_path.value()
<< ": " << response->ToString();
@@ -304,7 +308,7 @@ bool NetworkManagerWlanApi::GetAccessPointsForAdapter(
if (!response)
continue;
dbus::MessageReader reader(response.get());
- uint32 frequency = 0;
+ uint32_t frequency = 0;
if (!reader.PopVariantOfUint32(&frequency)) {
LOG(WARNING) << "Unexpected response for " << access_point_path.value()
<< ": " << response->ToString();
diff --git a/content/browser/geolocation/wifi_data_provider_linux.h b/content/browser/geolocation/wifi_data_provider_linux.h
index 4858425..238c95a 100644
--- a/content/browser/geolocation/wifi_data_provider_linux.h
+++ b/content/browser/geolocation/wifi_data_provider_linux.h
@@ -6,6 +6,7 @@
#define CONTENT_BROWSER_GEOLOCATION_WIFI_DATA_PROVIDER_LINUX_H_
#include "base/compiler_specific.h"
+#include "base/macros.h"
#include "content/browser/geolocation/wifi_data_provider_common.h"
#include "content/common/content_export.h"
diff --git a/content/browser/geolocation/wifi_data_provider_linux_unittest.cc b/content/browser/geolocation/wifi_data_provider_linux_unittest.cc
index 5a4b546..3ca35d1 100644
--- a/content/browser/geolocation/wifi_data_provider_linux_unittest.cc
+++ b/content/browser/geolocation/wifi_data_provider_linux_unittest.cc
@@ -4,6 +4,9 @@
#include "content/browser/geolocation/wifi_data_provider_linux.h"
+#include <stdint.h>
+
+#include "base/macros.h"
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
#include "base/message_loop/message_loop.h"
@@ -186,7 +189,7 @@ class GeolocationWifiDataProviderLinuxTest : public testing::Test {
dbus::MessageWriter writer(response.get());
if (property_name == "Ssid") {
- const uint8 kSsid[] = {0x74, 0x65, 0x73, 0x74}; // "test"
+ const uint8_t kSsid[] = {0x74, 0x65, 0x73, 0x74}; // "test"
dbus::MessageWriter variant_writer(response.get());
writer.OpenVariant("ay", &variant_writer);
variant_writer.AppendArrayOfBytes(kSsid, arraysize(kSsid));
@@ -197,11 +200,11 @@ class GeolocationWifiDataProviderLinuxTest : public testing::Test {
writer.AppendVariantOfString(kMacAddress);
} else if (property_name == "Strength") {
// This will be converted to -50.
- const uint8 kStrength = 100;
+ const uint8_t kStrength = 100;
writer.AppendVariantOfByte(kStrength);
} else if (property_name == "Frequency") {
// This will be converted to channel 4.
- const uint32 kFrequency = 2427;
+ const uint32_t kFrequency = 2427;
writer.AppendVariantOfUint32(kFrequency);
}
return response.release();
diff --git a/content/browser/geolocation/wifi_data_provider_mac.h b/content/browser/geolocation/wifi_data_provider_mac.h
index c1bd798..920c139 100644
--- a/content/browser/geolocation/wifi_data_provider_mac.h
+++ b/content/browser/geolocation/wifi_data_provider_mac.h
@@ -5,6 +5,7 @@
#ifndef CONTENT_BROWSER_GEOLOCATION_WIFI_DATA_PROVIDER_MAC_H_
#define CONTENT_BROWSER_GEOLOCATION_WIFI_DATA_PROVIDER_MAC_H_
+#include "base/macros.h"
#include "content/browser/geolocation/wifi_data_provider_common.h"
namespace content {
diff --git a/content/browser/geolocation/wifi_data_provider_manager.h b/content/browser/geolocation/wifi_data_provider_manager.h
index 966c03a..bb2af81 100644
--- a/content/browser/geolocation/wifi_data_provider_manager.h
+++ b/content/browser/geolocation/wifi_data_provider_manager.h
@@ -17,9 +17,9 @@
#include <set>
-#include "base/basictypes.h"
#include "base/bind.h"
#include "base/callback.h"
+#include "base/macros.h"
#include "base/memory/ref_counted.h"
#include "base/message_loop/message_loop.h"
#include "base/strings/string16.h"
diff --git a/content/browser/geolocation/wifi_data_provider_win.h b/content/browser/geolocation/wifi_data_provider_win.h
index 49ed704..a69d7cb 100644
--- a/content/browser/geolocation/wifi_data_provider_win.h
+++ b/content/browser/geolocation/wifi_data_provider_win.h
@@ -5,6 +5,7 @@
#ifndef CONTENT_BROWSER_GEOLOCATION_WIFI_DATA_PROVIDER_WIN_H_
#define CONTENT_BROWSER_GEOLOCATION_WIFI_DATA_PROVIDER_WIN_H_
+#include "base/macros.h"
#include "content/browser/geolocation/wifi_data_provider_common.h"
#include "content/common/content_export.h"
diff --git a/content/browser/geolocation/wifi_polling_policy.h b/content/browser/geolocation/wifi_polling_policy.h
index f597e83..5798e5d 100644
--- a/content/browser/geolocation/wifi_polling_policy.h
+++ b/content/browser/geolocation/wifi_polling_policy.h
@@ -5,6 +5,8 @@
#ifndef CONTENT_BROWSER_GEOLOCATION_WIFI_POLLING_POLICY_H_
#define CONTENT_BROWSER_GEOLOCATION_WIFI_POLLING_POLICY_H_
+#include "base/macros.h"
+
namespace content {
// Allows sharing and mocking of the update polling policy function.
diff --git a/content/browser/gpu/browser_gpu_channel_host_factory.cc b/content/browser/gpu/browser_gpu_channel_host_factory.cc
index 3a385ca..e8b084a 100644
--- a/content/browser/gpu/browser_gpu_channel_host_factory.cc
+++ b/content/browser/gpu/browser_gpu_channel_host_factory.cc
@@ -14,6 +14,7 @@
#include "base/threading/thread_restrictions.h"
#include "base/trace_event/memory_dump_manager.h"
#include "base/trace_event/trace_event.h"
+#include "build/build_config.h"
#include "content/browser/gpu/browser_gpu_memory_buffer_manager.h"
#include "content/browser/gpu/gpu_data_manager_impl.h"
#include "content/browser/gpu/gpu_process_host.h"
@@ -34,7 +35,7 @@ namespace content {
BrowserGpuChannelHostFactory* BrowserGpuChannelHostFactory::instance_ = NULL;
struct BrowserGpuChannelHostFactory::CreateRequest {
- CreateRequest(int32 route_id)
+ CreateRequest(int32_t route_id)
: event(true, false),
gpu_host_id(0),
route_id(route_id),
@@ -42,7 +43,7 @@ struct BrowserGpuChannelHostFactory::CreateRequest {
~CreateRequest() {}
base::WaitableEvent event;
int gpu_host_id;
- int32 route_id;
+ int32_t route_id;
CreateCommandBufferResult result;
};
@@ -292,7 +293,7 @@ BrowserGpuChannelHostFactory::AllocateSharedMemory(size_t size) {
void BrowserGpuChannelHostFactory::CreateViewCommandBufferOnIO(
CreateRequest* request,
- int32 surface_id,
+ int32_t surface_id,
const GPUCreateCommandBufferConfig& init_params) {
GpuProcessHost* host = GpuProcessHost::FromID(gpu_host_id_);
if (!host) {
@@ -320,9 +321,9 @@ void BrowserGpuChannelHostFactory::CommandBufferCreatedOnIO(
}
CreateCommandBufferResult BrowserGpuChannelHostFactory::CreateViewCommandBuffer(
- int32 surface_id,
- const GPUCreateCommandBufferConfig& init_params,
- int32 route_id) {
+ int32_t surface_id,
+ const GPUCreateCommandBufferConfig& init_params,
+ int32_t route_id) {
CreateRequest request(route_id);
GetIOThreadTaskRunner()->PostTask(
FROM_HERE,
diff --git a/content/browser/gpu/browser_gpu_channel_host_factory.h b/content/browser/gpu/browser_gpu_channel_host_factory.h
index c0bcedc..530768c 100644
--- a/content/browser/gpu/browser_gpu_channel_host_factory.h
+++ b/content/browser/gpu/browser_gpu_channel_host_factory.h
@@ -5,11 +5,16 @@
#ifndef CONTENT_BROWSER_GPU_BROWSER_GPU_CHANNEL_HOST_FACTORY_H_
#define CONTENT_BROWSER_GPU_BROWSER_GPU_CHANNEL_HOST_FACTORY_H_
+#include <stddef.h>
+#include <stdint.h>
+
#include <map>
#include <vector>
+#include "base/macros.h"
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
+#include "build/build_config.h"
#include "content/common/gpu/client/gpu_channel_host.h"
#include "ipc/message_filter.h"
@@ -28,9 +33,9 @@ class CONTENT_EXPORT BrowserGpuChannelHostFactory
scoped_refptr<base::SingleThreadTaskRunner> GetIOThreadTaskRunner() override;
scoped_ptr<base::SharedMemory> AllocateSharedMemory(size_t size) override;
CreateCommandBufferResult CreateViewCommandBuffer(
- int32 surface_id,
+ int32_t surface_id,
const GPUCreateCommandBufferConfig& init_params,
- int32 route_id) override;
+ int32_t route_id) override;
int GpuProcessHostId() { return gpu_host_id_; }
#if !defined(OS_ANDROID)
@@ -55,7 +60,7 @@ class CONTENT_EXPORT BrowserGpuChannelHostFactory
void GpuChannelEstablished();
void CreateViewCommandBufferOnIO(
CreateRequest* request,
- int32 surface_id,
+ int32_t surface_id,
const GPUCreateCommandBufferConfig& init_params);
static void CommandBufferCreatedOnIO(CreateRequest* request,
CreateCommandBufferResult result);
diff --git a/content/browser/gpu/browser_gpu_memory_buffer_manager.cc b/content/browser/gpu/browser_gpu_memory_buffer_manager.cc
index b4b474e..fe62549 100644
--- a/content/browser/gpu/browser_gpu_memory_buffer_manager.cc
+++ b/content/browser/gpu/browser_gpu_memory_buffer_manager.cc
@@ -11,6 +11,7 @@
#include "base/threading/thread_restrictions.h"
#include "base/trace_event/process_memory_dump.h"
#include "base/trace_event/trace_event.h"
+#include "build/build_config.h"
#include "content/browser/gpu/gpu_process_host.h"
#include "content/common/child_process_host_impl.h"
#include "content/common/generic_shared_memory_id_generator.h"
@@ -226,7 +227,7 @@ bool BrowserGpuMemoryBufferManager::IsNativeGpuMemoryBuffersEnabled() {
}
// static
-uint32 BrowserGpuMemoryBufferManager::GetImageTextureTarget(
+uint32_t BrowserGpuMemoryBufferManager::GetImageTextureTarget(
gfx::BufferFormat format,
gfx::BufferUsage usage) {
GpuMemoryBufferConfigurationSet native_configurations =
@@ -292,7 +293,7 @@ scoped_ptr<gfx::GpuMemoryBuffer>
BrowserGpuMemoryBufferManager::AllocateGpuMemoryBufferForScanout(
const gfx::Size& size,
gfx::BufferFormat format,
- int32 surface_id) {
+ int32_t surface_id) {
DCHECK_GT(surface_id, 0);
return AllocateGpuMemoryBufferForSurface(
size, format, gfx::BufferUsage::SCANOUT, surface_id);
@@ -381,7 +382,8 @@ bool BrowserGpuMemoryBufferManager::OnMemoryDump(
// corresponding dump for the same buffer, this will avoid to
// double-count them in tracing. If, instead, no other process will emit a
// dump with the same guid, the segment will be accounted to the browser.
- uint64 client_tracing_process_id = ClientIdToTracingProcessId(client_id);
+ uint64_t client_tracing_process_id =
+ ClientIdToTracingProcessId(client_id);
base::trace_event::MemoryAllocatorDumpGuid shared_buffer_guid =
gfx::GetGpuMemoryBufferGUIDForTracing(client_tracing_process_id,
@@ -440,7 +442,7 @@ BrowserGpuMemoryBufferManager::AllocateGpuMemoryBufferForSurface(
const gfx::Size& size,
gfx::BufferFormat format,
gfx::BufferUsage usage,
- int32 surface_id) {
+ int32_t surface_id) {
DCHECK(!BrowserThread::CurrentlyOn(BrowserThread::IO));
CreateGpuMemoryBufferRequest request(size, format, usage, gpu_client_id_,
diff --git a/content/browser/gpu/browser_gpu_memory_buffer_manager.h b/content/browser/gpu/browser_gpu_memory_buffer_manager.h
index c54be22..0057192 100644
--- a/content/browser/gpu/browser_gpu_memory_buffer_manager.h
+++ b/content/browser/gpu/browser_gpu_memory_buffer_manager.h
@@ -5,10 +5,14 @@
#ifndef CONTENT_BROWSER_GPU_BROWSER_GPU_MEMORY_BUFFER_MANAGER_H_
#define CONTENT_BROWSER_GPU_BROWSER_GPU_MEMORY_BUFFER_MANAGER_H_
+#include <stddef.h>
+#include <stdint.h>
+
#include <utility>
#include "base/callback.h"
#include "base/containers/hash_tables.h"
+#include "base/macros.h"
#include "base/trace_event/memory_dump_provider.h"
#include "content/common/content_export.h"
#include "gpu/command_buffer/client/gpu_memory_buffer_manager.h"
@@ -53,8 +57,8 @@ class CONTENT_EXPORT BrowserGpuMemoryBufferManager
static bool IsNativeGpuMemoryBuffersEnabled();
- static uint32 GetImageTextureTarget(gfx::BufferFormat format,
- gfx::BufferUsage usage);
+ static uint32_t GetImageTextureTarget(gfx::BufferFormat format,
+ gfx::BufferUsage usage);
// Overridden from gpu::GpuMemoryBufferManager:
scoped_ptr<gfx::GpuMemoryBuffer> AllocateGpuMemoryBuffer(
@@ -78,7 +82,7 @@ class CONTENT_EXPORT BrowserGpuMemoryBufferManager
virtual scoped_ptr<gfx::GpuMemoryBuffer> AllocateGpuMemoryBufferForScanout(
const gfx::Size& size,
gfx::BufferFormat format,
- int32 surface_id);
+ int32_t surface_id);
void AllocateGpuMemoryBufferForChildProcess(
gfx::GpuMemoryBufferId id,
@@ -138,7 +142,7 @@ class CONTENT_EXPORT BrowserGpuMemoryBufferManager
const gfx::Size& size,
gfx::BufferFormat format,
gfx::BufferUsage usage,
- int32 surface_id);
+ int32_t surface_id);
// Functions that handle synchronous buffer creation requests.
void HandleCreateGpuMemoryBufferOnIO(CreateGpuMemoryBufferRequest* request);
diff --git a/content/browser/gpu/compositor_util.cc b/content/browser/gpu/compositor_util.cc
index 10f507b..d7b3e40 100644
--- a/content/browser/gpu/compositor_util.cc
+++ b/content/browser/gpu/compositor_util.cc
@@ -4,8 +4,11 @@
#include "content/browser/gpu/compositor_util.h"
+#include <stddef.h>
+
#include "base/command_line.h"
#include "base/logging.h"
+#include "base/macros.h"
#include "base/metrics/field_trial.h"
#include "base/strings/string_number_conversions.h"
#include "base/sys_info.h"
diff --git a/content/browser/gpu/gpu_data_manager_impl.cc b/content/browser/gpu/gpu_data_manager_impl.cc
index 8281362..2fe3cae 100644
--- a/content/browser/gpu/gpu_data_manager_impl.cc
+++ b/content/browser/gpu/gpu_data_manager_impl.cc
@@ -256,7 +256,8 @@ unsigned int GpuDataManagerImpl::GetDisplayCount() const {
return private_->GetDisplayCount();
}
-bool GpuDataManagerImpl::UpdateActiveGpu(uint32 vendor_id, uint32 device_id) {
+bool GpuDataManagerImpl::UpdateActiveGpu(uint32_t vendor_id,
+ uint32_t device_id) {
base::AutoLock auto_lock(lock_);
return private_->UpdateActiveGpu(vendor_id, device_id);
}
diff --git a/content/browser/gpu/gpu_data_manager_impl.h b/content/browser/gpu/gpu_data_manager_impl.h
index 3fddc38..c509e3a 100644
--- a/content/browser/gpu/gpu_data_manager_impl.h
+++ b/content/browser/gpu/gpu_data_manager_impl.h
@@ -5,11 +5,15 @@
#ifndef CONTENT_BROWSER_GPU_GPU_DATA_MANAGER_IMPL_H_
#define CONTENT_BROWSER_GPU_GPU_DATA_MANAGER_IMPL_H_
+#include <stddef.h>
+#include <stdint.h>
+
#include <string>
#include "base/compiler_specific.h"
#include "base/files/file_path.h"
#include "base/logging.h"
+#include "base/macros.h"
#include "base/memory/scoped_ptr.h"
#include "base/memory/singleton.h"
#include "base/process/kill.h"
@@ -174,7 +178,7 @@ class CONTENT_EXPORT GpuDataManagerImpl
// Set the active gpu.
// Return true if it's a different GPU from the previous active one.
- bool UpdateActiveGpu(uint32 vendor_id, uint32 device_id);
+ bool UpdateActiveGpu(uint32_t vendor_id, uint32_t device_id);
// Called when GPU process initialization failed.
void OnGpuProcessInitFailure();
diff --git a/content/browser/gpu/gpu_data_manager_impl_private.cc b/content/browser/gpu/gpu_data_manager_impl_private.cc
index de22507..926886d 100644
--- a/content/browser/gpu/gpu_data_manager_impl_private.cc
+++ b/content/browser/gpu/gpu_data_manager_impl_private.cc
@@ -15,6 +15,7 @@
#include "base/sys_info.h"
#include "base/trace_event/trace_event.h"
#include "base/version.h"
+#include "build/build_config.h"
#include "cc/base/switches.h"
#include "content/browser/gpu/gpu_process_host.h"
#include "content/common/gpu/gpu_messages.h"
@@ -111,7 +112,7 @@ int GetGpuBlacklistHistogramValueWin(GpuFeatureStatus status) {
void UpdateStats(const gpu::GPUInfo& gpu_info,
const gpu::GpuBlacklist* blacklist,
const std::set<int>& blacklisted_features) {
- uint32 max_entry_id = blacklist->max_entry_id();
+ uint32_t max_entry_id = blacklist->max_entry_id();
if (max_entry_id == 0) {
// GPU Blacklist was not loaded. No need to go further.
return;
@@ -129,7 +130,7 @@ void UpdateStats(const gpu::GPUInfo& gpu_info,
0, max_entry_id + 1);
if (blacklisted_features.size() != 0) {
- std::vector<uint32> flag_entries;
+ std::vector<uint32_t> flag_entries;
blacklist->GetDecisionEntries(&flag_entries, disabled);
DCHECK_GT(flag_entries.size(), 0u);
for (size_t i = 0; i < flag_entries.size(); ++i) {
@@ -140,10 +141,10 @@ void UpdateStats(const gpu::GPUInfo& gpu_info,
// This counts how many users are affected by a disabled entry - this allows
// us to understand the impact of an entry before enable it.
- std::vector<uint32> flag_disabled_entries;
+ std::vector<uint32_t> flag_disabled_entries;
disabled = true;
blacklist->GetDecisionEntries(&flag_disabled_entries, disabled);
- for (uint32 disabled_entry : flag_disabled_entries) {
+ for (uint32_t disabled_entry : flag_disabled_entries) {
UMA_HISTOGRAM_ENUMERATION("GPU.BlacklistTestResultsPerDisabledEntry",
disabled_entry, max_entry_id + 1);
}
@@ -234,7 +235,7 @@ void DisplayReconfigCallback(CGDirectDisplayID display,
// Gpu change.
bool gpu_changed = false;
if (flags & kCGDisplayAddFlag) {
- uint32 vendor_id, device_id;
+ uint32_t vendor_id, device_id;
if (gpu::CollectGpuID(&vendor_id, &device_id) == gpu::kCollectInfoSuccess) {
gpu_changed = manager->UpdateActiveGpu(vendor_id, device_id);
}
@@ -247,7 +248,7 @@ void DisplayReconfigCallback(CGDirectDisplayID display,
// Block all domains' use of 3D APIs for this many milliseconds if
// approaching a threshold where system stability might be compromised.
-const int64 kBlockAllDomainsMs = 10000;
+const int64_t kBlockAllDomainsMs = 10000;
const int kNumResetsWithinDuration = 1;
// Enums for UMA histograms.
@@ -874,8 +875,8 @@ void GpuDataManagerImplPrivate::HandleGpuSwitch() {
new GpuMsg_GpuSwitched);
}
-bool GpuDataManagerImplPrivate::UpdateActiveGpu(
- uint32 vendor_id, uint32 device_id) {
+bool GpuDataManagerImplPrivate::UpdateActiveGpu(uint32_t vendor_id,
+ uint32_t device_id) {
if (gpu_info_.gpu.vendor_id == vendor_id &&
gpu_info_.gpu.device_id == device_id) {
// The primary GPU is active.
@@ -1066,7 +1067,7 @@ void GpuDataManagerImplPrivate::UpdateGpuSwitchingManager(
const gpu::GPUInfo& gpu_info) {
// The vendor IDs might be 0 on non-PCI devices (like Android), but
// the length of the vector is all we care about in most cases.
- std::vector<uint32> vendor_ids;
+ std::vector<uint32_t> vendor_ids;
vendor_ids.push_back(gpu_info.gpu.vendor_id);
for (const auto& device : gpu_info.secondary_gpus) {
vendor_ids.push_back(device.vendor_id);
@@ -1206,7 +1207,7 @@ GpuDataManagerImplPrivate::Are3DAPIsBlockedAtTime(
return GpuDataManagerImpl::DOMAIN_BLOCK_STATUS_NOT_BLOCKED;
}
-int64 GpuDataManagerImplPrivate::GetBlockAllDomainsDurationInMs() const {
+int64_t GpuDataManagerImplPrivate::GetBlockAllDomainsDurationInMs() const {
return kBlockAllDomainsMs;
}
diff --git a/content/browser/gpu/gpu_data_manager_impl_private.h b/content/browser/gpu/gpu_data_manager_impl_private.h
index ab6aaf9..b083b60 100644
--- a/content/browser/gpu/gpu_data_manager_impl_private.h
+++ b/content/browser/gpu/gpu_data_manager_impl_private.h
@@ -5,6 +5,9 @@
#ifndef CONTENT_BROWSER_GPU_GPU_DATA_MANAGER_IMPL_PRIVATE_H_
#define CONTENT_BROWSER_GPU_GPU_DATA_MANAGER_IMPL_PRIVATE_H_
+#include <stddef.h>
+#include <stdint.h>
+
#include <list>
#include <map>
#include <set>
@@ -12,9 +15,11 @@
#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/observer_list_threadsafe.h"
+#include "build/build_config.h"
#include "content/browser/gpu/gpu_data_manager_impl.h"
#include "gpu/config/gpu_blacklist.h"
#include "gpu/config/gpu_driver_bug_list.h"
@@ -114,7 +119,7 @@ class CONTENT_EXPORT GpuDataManagerImplPrivate {
void SetDisplayCount(unsigned int display_count);
unsigned int GetDisplayCount() const;
- bool UpdateActiveGpu(uint32 vendor_id, uint32 device_id);
+ bool UpdateActiveGpu(uint32_t vendor_id, uint32_t device_id);
void OnGpuProcessInitFailure();
@@ -227,7 +232,7 @@ class CONTENT_EXPORT GpuDataManagerImplPrivate {
base::Time at_time);
GpuDataManagerImpl::DomainBlockStatus Are3DAPIsBlockedAtTime(
const GURL& url, base::Time at_time) const;
- int64 GetBlockAllDomainsDurationInMs() const;
+ int64_t GetBlockAllDomainsDurationInMs() const;
bool complete_gpu_info_already_requested_;
diff --git a/content/browser/gpu/gpu_data_manager_impl_private_unittest.cc b/content/browser/gpu/gpu_data_manager_impl_private_unittest.cc
index 1179a9a..f186559 100644
--- a/content/browser/gpu/gpu_data_manager_impl_private_unittest.cc
+++ b/content/browser/gpu/gpu_data_manager_impl_private_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 "base/command_line.h"
+#include "base/macros.h"
#include "base/message_loop/message_loop.h"
#include "base/run_loop.h"
#include "base/time/time.h"
+#include "build/build_config.h"
#include "content/browser/gpu/gpu_data_manager_impl_private.h"
#include "content/public/browser/gpu_data_manager_observer.h"
#include "gpu/config/gpu_feature_type.h"
diff --git a/content/browser/gpu/gpu_internals_ui.cc b/content/browser/gpu/gpu_internals_ui.cc
index eb85106..e93c901 100644
--- a/content/browser/gpu/gpu_internals_ui.cc
+++ b/content/browser/gpu/gpu_internals_ui.cc
@@ -4,9 +4,7 @@
#include "content/browser/gpu/gpu_internals_ui.h"
-#if defined(OS_LINUX) && defined(USE_X11)
-#include <X11/Xlib.h>
-#endif
+#include <stddef.h>
#include <string>
@@ -15,10 +13,12 @@
#include "base/command_line.h"
#include "base/environment.h"
#include "base/i18n/time_formatting.h"
+#include "base/macros.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/stringprintf.h"
#include "base/sys_info.h"
#include "base/values.h"
+#include "build/build_config.h"
#include "content/browser/gpu/browser_gpu_memory_buffer_manager.h"
#include "content/browser/gpu/compositor_util.h"
#include "content/browser/gpu/gpu_data_manager_impl.h"
@@ -37,6 +37,9 @@
#include "third_party/angle/src/common/version.h"
#include "ui/gl/gpu_switching_manager.h"
+#if defined(OS_LINUX) && defined(USE_X11)
+#include <X11/Xlib.h>
+#endif
#if defined(OS_WIN)
#include "ui/base/win/shell.h"
#endif
diff --git a/content/browser/gpu/gpu_ipc_browsertests.cc b/content/browser/gpu/gpu_ipc_browsertests.cc
index 1a09b24..1dcb154 100644
--- a/content/browser/gpu/gpu_ipc_browsertests.cc
+++ b/content/browser/gpu/gpu_ipc_browsertests.cc
@@ -4,6 +4,7 @@
#include "base/command_line.h"
#include "base/run_loop.h"
+#include "build/build_config.h"
#include "content/browser/gpu/browser_gpu_channel_host_factory.h"
#include "content/browser/gpu/gpu_process_host_ui_shim.h"
#include "content/common/gpu/client/context_provider_command_buffer.h"
diff --git a/content/browser/gpu/gpu_process_host.cc b/content/browser/gpu/gpu_process_host.cc
index dfe06a8..05e8005 100644
--- a/content/browser/gpu/gpu_process_host.cc
+++ b/content/browser/gpu/gpu_process_host.cc
@@ -4,20 +4,23 @@
#include "content/browser/gpu/gpu_process_host.h"
+#include <stddef.h>
+
#include <utility>
#include "base/base64.h"
#include "base/base_switches.h"
-#include "base/basictypes.h"
#include "base/bind.h"
#include "base/callback_helpers.h"
#include "base/command_line.h"
#include "base/logging.h"
+#include "base/macros.h"
#include "base/memory/ref_counted.h"
#include "base/metrics/histogram.h"
#include "base/sha1.h"
#include "base/threading/thread.h"
#include "base/trace_event/trace_event.h"
+#include "build/build_config.h"
#include "components/tracing/tracing_switches.h"
#include "content/browser/browser_child_process_host_impl.h"
#include "content/browser/gpu/compositor_util.h"
@@ -641,7 +644,7 @@ bool GpuProcessHost::OnMessageReceived(const IPC::Message& message) {
return true;
}
-void GpuProcessHost::OnChannelConnected(int32 peer_pid) {
+void GpuProcessHost::OnChannelConnected(int32_t peer_pid) {
TRACE_EVENT0("gpu", "GpuProcessHost::OnChannelConnected");
while (!queued_messages_.empty()) {
@@ -715,7 +718,7 @@ void GpuProcessHost::CreateGpuMemoryBuffer(
gfx::BufferFormat format,
gfx::BufferUsage usage,
int client_id,
- int32 surface_id,
+ int32_t surface_id,
const CreateGpuMemoryBufferCallback& callback) {
TRACE_EVENT0("gpu", "GpuProcessHost::CreateGpuMemoryBuffer");
@@ -1145,7 +1148,7 @@ void GpuProcessHost::LoadedShader(const std::string& key,
Send(new GpuMsg_LoadedShader(data));
}
-void GpuProcessHost::CreateChannelCache(int32 client_id) {
+void GpuProcessHost::CreateChannelCache(int32_t client_id) {
TRACE_EVENT0("gpu", "GpuProcessHost::CreateChannelCache");
scoped_refptr<ShaderDiskCache> cache =
@@ -1158,12 +1161,12 @@ void GpuProcessHost::CreateChannelCache(int32 client_id) {
client_id_to_shader_cache_[client_id] = cache;
}
-void GpuProcessHost::OnDestroyChannel(int32 client_id) {
+void GpuProcessHost::OnDestroyChannel(int32_t client_id) {
TRACE_EVENT0("gpu", "GpuProcessHost::OnDestroyChannel");
client_id_to_shader_cache_.erase(client_id);
}
-void GpuProcessHost::OnCacheShader(int32 client_id,
+void GpuProcessHost::OnCacheShader(int32_t client_id,
const std::string& key,
const std::string& shader) {
TRACE_EVENT0("gpu", "GpuProcessHost::OnCacheShader");
diff --git a/content/browser/gpu/gpu_process_host.h b/content/browser/gpu/gpu_process_host.h
index 245e330..74d9927 100644
--- a/content/browser/gpu/gpu_process_host.h
+++ b/content/browser/gpu/gpu_process_host.h
@@ -5,6 +5,8 @@
#ifndef CONTENT_BROWSER_GPU_GPU_PROCESS_HOST_H_
#define CONTENT_BROWSER_GPU_GPU_PROCESS_HOST_H_
+#include <stdint.h>
+
#include <map>
#include <queue>
#include <set>
@@ -12,9 +14,11 @@
#include "base/callback.h"
#include "base/containers/hash_tables.h"
+#include "base/macros.h"
#include "base/memory/weak_ptr.h"
#include "base/threading/non_thread_safe.h"
#include "base/time/time.h"
+#include "build/build_config.h"
#include "content/common/content_export.h"
#include "content/common/gpu/gpu_memory_uma_stats.h"
#include "content/common/gpu/gpu_process_launch_causes.h"
@@ -136,7 +140,7 @@ class GpuProcessHost : public BrowserChildProcessHostDelegate,
gfx::BufferFormat format,
gfx::BufferUsage usage,
int client_id,
- int32 surface_id,
+ int32_t surface_id,
const CreateGpuMemoryBufferCallback& callback);
// Tells the GPU process to create a new GPU memory buffer from an existing
@@ -185,7 +189,7 @@ class GpuProcessHost : public BrowserChildProcessHostDelegate,
// BrowserChildProcessHostDelegate implementation.
bool OnMessageReceived(const IPC::Message& message) override;
- void OnChannelConnected(int32 peer_pid) override;
+ void OnChannelConnected(int32_t peer_pid) override;
void OnProcessLaunched() override;
void OnProcessLaunchFailed() override;
void OnProcessCrashed(int exit_code) override;
@@ -206,9 +210,10 @@ class GpuProcessHost : public BrowserChildProcessHostDelegate,
void OnAcceleratedSurfaceBuffersSwapped(const IPC::Message& message);
#endif
- void CreateChannelCache(int32 client_id);
- void OnDestroyChannel(int32 client_id);
- void OnCacheShader(int32 client_id, const std::string& key,
+ void CreateChannelCache(int32_t client_id);
+ void OnDestroyChannel(int32_t client_id);
+ void OnCacheShader(int32_t client_id,
+ const std::string& key,
const std::string& shader);
bool LaunchGpuProcess(const std::string& channel_id);
@@ -284,7 +289,7 @@ class GpuProcessHost : public BrowserChildProcessHostDelegate,
bool uma_memory_stats_received_;
GPUMemoryUmaStats uma_memory_stats_;
- typedef std::map<int32, scoped_refptr<ShaderDiskCache> >
+ typedef std::map<int32_t, scoped_refptr<ShaderDiskCache>>
ClientIdToShaderCacheMap;
ClientIdToShaderCacheMap client_id_to_shader_cache_;
diff --git a/content/browser/gpu/gpu_process_host_ui_shim.cc b/content/browser/gpu/gpu_process_host_ui_shim.cc
index fde1526..4b84d6d 100644
--- a/content/browser/gpu/gpu_process_host_ui_shim.cc
+++ b/content/browser/gpu/gpu_process_host_ui_shim.cc
@@ -12,6 +12,7 @@
#include "base/lazy_instance.h"
#include "base/strings/string_number_conversions.h"
#include "base/trace_event/trace_event.h"
+#include "build/build_config.h"
#include "content/browser/compositor/gpu_process_transport_factory.h"
#include "content/browser/gpu/compositor_util.h"
#include "content/browser/gpu/gpu_data_manager_impl.h"
@@ -284,16 +285,16 @@ void GpuProcessHostUIShim::OnVideoMemoryUsageStatsReceived(
video_memory_usage_stats);
}
-void GpuProcessHostUIShim::OnAddSubscription(
- int32 process_id, unsigned int target) {
+void GpuProcessHostUIShim::OnAddSubscription(int32_t process_id,
+ unsigned int target) {
RenderProcessHost* rph = RenderProcessHost::FromID(process_id);
if (rph) {
rph->OnAddSubscription(target);
}
}
-void GpuProcessHostUIShim::OnRemoveSubscription(
- int32 process_id, unsigned int target) {
+void GpuProcessHostUIShim::OnRemoveSubscription(int32_t process_id,
+ unsigned int target) {
RenderProcessHost* rph = RenderProcessHost::FromID(process_id);
if (rph) {
rph->OnRemoveSubscription(target);
diff --git a/content/browser/gpu/gpu_process_host_ui_shim.h b/content/browser/gpu/gpu_process_host_ui_shim.h
index 1260209..251ca2e 100644
--- a/content/browser/gpu/gpu_process_host_ui_shim.h
+++ b/content/browser/gpu/gpu_process_host_ui_shim.h
@@ -10,6 +10,8 @@
// portion of this class, the GpuProcessHost, is responsible for
// shuttling messages between the browser and GPU processes.
+#include <stdint.h>
+
#include <string>
#include "base/callback.h"
@@ -17,6 +19,7 @@
#include "base/memory/linked_ptr.h"
#include "base/memory/ref_counted.h"
#include "base/threading/non_thread_safe.h"
+#include "build/build_config.h"
#include "content/common/content_export.h"
#include "content/common/message_router.h"
#include "content/public/common/gpu_memory_stats.h"
@@ -99,8 +102,8 @@ class GpuProcessHostUIShim : public IPC::Listener,
#endif
void OnVideoMemoryUsageStatsReceived(
const GPUVideoMemoryUsageStats& video_memory_usage_stats);
- void OnAddSubscription(int32 process_id, unsigned int target);
- void OnRemoveSubscription(int32 process_id, unsigned int target);
+ void OnAddSubscription(int32_t process_id, unsigned int target);
+ void OnRemoveSubscription(int32_t process_id, unsigned int target);
// The serial number of the GpuProcessHost / GpuProcessHostUIShim pair.
int host_id_;
diff --git a/content/browser/gpu/gpu_surface_tracker.cc b/content/browser/gpu/gpu_surface_tracker.cc
index 721b4d5..bd4e91d 100644
--- a/content/browser/gpu/gpu_surface_tracker.cc
+++ b/content/browser/gpu/gpu_surface_tracker.cc
@@ -4,12 +4,13 @@
#include "content/browser/gpu/gpu_surface_tracker.h"
+#include "base/logging.h"
+#include "build/build_config.h"
+
#if defined(OS_ANDROID)
#include <android/native_window_jni.h>
#endif // defined(OS_ANDROID)
-#include "base/logging.h"
-
namespace content {
GpuSurfaceTracker::GpuSurfaceTracker()
diff --git a/content/browser/gpu/gpu_surface_tracker.h b/content/browser/gpu/gpu_surface_tracker.h
index 01f16d6..386eeea 100644
--- a/content/browser/gpu/gpu_surface_tracker.h
+++ b/content/browser/gpu/gpu_surface_tracker.h
@@ -5,9 +5,11 @@
#ifndef CONTENT_BROWSER_GPU_GPU_SURFACE_TRACKER_H_
#define CONTENT_BROWSER_GPU_GPU_SURFACE_TRACKER_H_
+#include <stddef.h>
+
#include <map>
-#include "base/basictypes.h"
+#include "base/macros.h"
#include "base/memory/ref_counted.h"
#include "base/memory/singleton.h"
#include "base/synchronization/lock.h"
diff --git a/content/browser/gpu/shader_disk_cache.cc b/content/browser/gpu/shader_disk_cache.cc
index 28af403..c582829 100644
--- a/content/browser/gpu/shader_disk_cache.cc
+++ b/content/browser/gpu/shader_disk_cache.cc
@@ -4,6 +4,7 @@
#include "content/browser/gpu/shader_disk_cache.h"
+#include "base/macros.h"
#include "base/threading/thread_checker.h"
#include "content/browser/gpu/gpu_process_host.h"
#include "content/public/browser/browser_thread.h"
@@ -426,16 +427,16 @@ ShaderCacheFactory::ShaderCacheFactory() {
ShaderCacheFactory::~ShaderCacheFactory() {
}
-void ShaderCacheFactory::SetCacheInfo(int32 client_id,
+void ShaderCacheFactory::SetCacheInfo(int32_t client_id,
const base::FilePath& path) {
client_id_to_path_map_[client_id] = path;
}
-void ShaderCacheFactory::RemoveCacheInfo(int32 client_id) {
+void ShaderCacheFactory::RemoveCacheInfo(int32_t client_id) {
client_id_to_path_map_.erase(client_id);
}
-scoped_refptr<ShaderDiskCache> ShaderCacheFactory::Get(int32 client_id) {
+scoped_refptr<ShaderDiskCache> ShaderCacheFactory::Get(int32_t client_id) {
ClientIdToPathMap::iterator iter =
client_id_to_path_map_.find(client_id);
if (iter == client_id_to_path_map_.end())
@@ -569,7 +570,7 @@ int ShaderDiskCache::Clear(
return rv;
}
-int32 ShaderDiskCache::Size() {
+int32_t ShaderDiskCache::Size() {
if (!cache_available_)
return -1;
return backend_->GetEntryCount();
diff --git a/content/browser/gpu/shader_disk_cache.h b/content/browser/gpu/shader_disk_cache.h
index 9b16dd3..e53cb50 100644
--- a/content/browser/gpu/shader_disk_cache.h
+++ b/content/browser/gpu/shader_disk_cache.h
@@ -5,11 +5,14 @@
#ifndef CONTENT_BROWSER_GPU_SHADER_DISK_CACHE_H_
#define CONTENT_BROWSER_GPU_SHADER_DISK_CACHE_H_
+#include <stdint.h>
+
#include <map>
#include <queue>
#include <string>
#include "base/files/file_path.h"
+#include "base/macros.h"
#include "base/memory/ref_counted.h"
#include "base/memory/singleton.h"
#include "content/common/content_export.h"
@@ -55,7 +58,7 @@ class CONTENT_EXPORT ShaderDiskCache
int SetAvailableCallback(const net::CompletionCallback& callback);
// Returns the number of elements currently in the cache.
- int32 Size();
+ int32_t Size();
// Set a callback notification for when all current entries have been
// written to the cache.
@@ -111,13 +114,13 @@ class CONTENT_EXPORT ShaderCacheFactory {
const base::Closure& callback);
// Retrieve the shader disk cache for the provided |client_id|.
- scoped_refptr<ShaderDiskCache> Get(int32 client_id);
+ scoped_refptr<ShaderDiskCache> Get(int32_t client_id);
// Set the |path| to be used for the disk cache for |client_id|.
- void SetCacheInfo(int32 client_id, const base::FilePath& path);
+ void SetCacheInfo(int32_t client_id, const base::FilePath& path);
// Remove the path mapping for |client_id|.
- void RemoveCacheInfo(int32 client_id);
+ void RemoveCacheInfo(int32_t client_id);
// Set the provided |cache| into the cache map for the given |path|.
void AddToCache(const base::FilePath& path, ShaderDiskCache* cache);
@@ -138,7 +141,7 @@ class CONTENT_EXPORT ShaderCacheFactory {
typedef std::map<base::FilePath, ShaderDiskCache*> ShaderCacheMap;
ShaderCacheMap shader_cache_map_;
- typedef std::map<int32, base::FilePath> ClientIdToPathMap;
+ typedef std::map<int32_t, base::FilePath> ClientIdToPathMap;
ClientIdToPathMap client_id_to_path_map_;
typedef std::queue<scoped_refptr<ShaderClearHelper> > ShaderClearQueue;
diff --git a/content/browser/gpu/shader_disk_cache_unittest.cc b/content/browser/gpu/shader_disk_cache_unittest.cc
index 15894ef..826cf50 100644
--- a/content/browser/gpu/shader_disk_cache_unittest.cc
+++ b/content/browser/gpu/shader_disk_cache_unittest.cc
@@ -3,6 +3,7 @@
// found in the LICENSE file.
#include "base/files/scoped_temp_dir.h"
+#include "base/macros.h"
#include "base/threading/thread.h"
#include "content/browser/browser_thread_impl.h"
#include "content/browser/gpu/shader_disk_cache.h"
diff --git a/content/browser/histogram_controller.h b/content/browser/histogram_controller.h
index 884df8a..1fa319e 100644
--- a/content/browser/histogram_controller.h
+++ b/content/browser/histogram_controller.h
@@ -8,6 +8,7 @@
#include <string>
#include <vector>
+#include "base/macros.h"
#include "base/memory/singleton.h"
namespace content {
diff --git a/content/browser/histogram_internals_request_job.h b/content/browser/histogram_internals_request_job.h
index 6304198..63ce622 100644
--- a/content/browser/histogram_internals_request_job.h
+++ b/content/browser/histogram_internals_request_job.h
@@ -7,7 +7,7 @@
#include <string>
-#include "base/basictypes.h"
+#include "base/macros.h"
#include "net/url_request/url_request_simple_job.h"
namespace content {
diff --git a/content/browser/histogram_message_filter.h b/content/browser/histogram_message_filter.h
index 25fa676..2829859 100644
--- a/content/browser/histogram_message_filter.h
+++ b/content/browser/histogram_message_filter.h
@@ -8,6 +8,7 @@
#include <string>
#include <vector>
+#include "base/macros.h"
#include "content/public/browser/browser_message_filter.h"
#include "content/public/common/process_type.h"
diff --git a/content/browser/histogram_synchronizer.h b/content/browser/histogram_synchronizer.h
index d4d6f36..4180c24 100644
--- a/content/browser/histogram_synchronizer.h
+++ b/content/browser/histogram_synchronizer.h
@@ -8,8 +8,8 @@
#include <string>
#include <vector>
-#include "base/basictypes.h"
#include "base/callback.h"
+#include "base/macros.h"
#include "base/memory/singleton.h"
#include "base/synchronization/lock.h"
#include "base/time/time.h"
diff --git a/content/browser/host_zoom_map_impl.h b/content/browser/host_zoom_map_impl.h
index dbf166a..e27402d 100644
--- a/content/browser/host_zoom_map_impl.h
+++ b/content/browser/host_zoom_map_impl.h
@@ -11,6 +11,7 @@
#include <vector>
#include "base/compiler_specific.h"
+#include "base/macros.h"
#include "base/sequenced_task_runner_helpers.h"
#include "base/synchronization/lock.h"
#include "content/public/browser/host_zoom_map.h"
diff --git a/content/browser/host_zoom_map_impl_unittest.cc b/content/browser/host_zoom_map_impl_unittest.cc
index a96f15e..2901e16 100644
--- a/content/browser/host_zoom_map_impl_unittest.cc
+++ b/content/browser/host_zoom_map_impl_unittest.cc
@@ -4,6 +4,9 @@
#include "content/browser/host_zoom_map_impl.h"
+#include <stddef.h>
+
+#include "base/macros.h"
#include "base/memory/ref_counted.h"
#include "base/message_loop/message_loop.h"
#include "content/public/browser/browser_thread.h"
diff --git a/content/browser/indexed_db/indexed_db_active_blob_registry.cc b/content/browser/indexed_db/indexed_db_active_blob_registry.cc
index 7bda0bb..2a1131f 100644
--- a/content/browser/indexed_db/indexed_db_active_blob_registry.cc
+++ b/content/browser/indexed_db/indexed_db_active_blob_registry.cc
@@ -20,8 +20,8 @@ IndexedDBActiveBlobRegistry::IndexedDBActiveBlobRegistry(
IndexedDBActiveBlobRegistry::~IndexedDBActiveBlobRegistry() {
}
-void IndexedDBActiveBlobRegistry::AddBlobRef(int64 database_id,
- int64 blob_key) {
+void IndexedDBActiveBlobRegistry::AddBlobRef(int64_t database_id,
+ int64_t blob_key) {
DCHECK(backing_store_);
DCHECK(backing_store_->task_runner()->RunsTasksOnCurrentThread());
DCHECK(KeyPrefix::IsValidDatabaseId(database_id));
@@ -42,8 +42,8 @@ void IndexedDBActiveBlobRegistry::AddBlobRef(int64 database_id,
}
}
-void IndexedDBActiveBlobRegistry::ReleaseBlobRef(int64 database_id,
- int64 blob_key) {
+void IndexedDBActiveBlobRegistry::ReleaseBlobRef(int64_t database_id,
+ int64_t blob_key) {
DCHECK(backing_store_);
DCHECK(backing_store_->task_runner()->RunsTasksOnCurrentThread());
DCHECK(KeyPrefix::IsValidDatabaseId(database_id));
@@ -82,8 +82,8 @@ void IndexedDBActiveBlobRegistry::ReleaseBlobRef(int64 database_id,
}
}
-bool IndexedDBActiveBlobRegistry::MarkDeletedCheckIfUsed(int64 database_id,
- int64 blob_key) {
+bool IndexedDBActiveBlobRegistry::MarkDeletedCheckIfUsed(int64_t database_id,
+ int64_t blob_key) {
DCHECK(backing_store_);
DCHECK(backing_store_->task_runner()->RunsTasksOnCurrentThread());
DCHECK(KeyPrefix::IsValidDatabaseId(database_id));
@@ -108,8 +108,8 @@ bool IndexedDBActiveBlobRegistry::MarkDeletedCheckIfUsed(int64 database_id,
void IndexedDBActiveBlobRegistry::ReleaseBlobRefThreadSafe(
scoped_refptr<base::TaskRunner> task_runner,
base::WeakPtr<IndexedDBActiveBlobRegistry> weak_ptr,
- int64 database_id,
- int64 blob_key,
+ int64_t database_id,
+ int64_t blob_key,
const base::FilePath& unused) {
task_runner->PostTask(FROM_HERE,
base::Bind(&IndexedDBActiveBlobRegistry::ReleaseBlobRef,
@@ -119,8 +119,8 @@ void IndexedDBActiveBlobRegistry::ReleaseBlobRefThreadSafe(
}
storage::ShareableFileReference::FinalReleaseCallback
-IndexedDBActiveBlobRegistry::GetFinalReleaseCallback(int64 database_id,
- int64 blob_key) {
+IndexedDBActiveBlobRegistry::GetFinalReleaseCallback(int64_t database_id,
+ int64_t blob_key) {
return base::Bind(
&IndexedDBActiveBlobRegistry::ReleaseBlobRefThreadSafe,
scoped_refptr<base::TaskRunner>(backing_store_->task_runner()),
@@ -130,8 +130,8 @@ IndexedDBActiveBlobRegistry::GetFinalReleaseCallback(int64 database_id,
}
base::Closure IndexedDBActiveBlobRegistry::GetAddBlobRefCallback(
- int64 database_id,
- int64 blob_key) {
+ int64_t database_id,
+ int64_t blob_key) {
return base::Bind(&IndexedDBActiveBlobRegistry::AddBlobRef,
weak_factory_.GetWeakPtr(),
database_id,
diff --git a/content/browser/indexed_db/indexed_db_active_blob_registry.h b/content/browser/indexed_db/indexed_db_active_blob_registry.h
index 8f78f19..e94fef6 100644
--- a/content/browser/indexed_db/indexed_db_active_blob_registry.h
+++ b/content/browser/indexed_db/indexed_db_active_blob_registry.h
@@ -5,11 +5,13 @@
#ifndef CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_ACTIVE_BLOB_REGISTRY_H_
#define CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_ACTIVE_BLOB_REGISTRY_H_
+#include <stdint.h>
+
#include <map>
#include <set>
#include <utility>
-#include "base/basictypes.h"
#include "base/files/file_path.h"
+#include "base/macros.h"
#include "base/memory/weak_ptr.h"
#include "content/common/content_export.h"
#include "storage/browser/blob/shareable_file_reference.h"
@@ -29,14 +31,14 @@ class CONTENT_EXPORT IndexedDBActiveBlobRegistry {
// which just calls ReleaseBlobRefThreadSafe.
// Use DatabaseMetaDataKey::AllBlobsKey for "the whole database".
- bool MarkDeletedCheckIfUsed(int64 database_id, int64 blob_key);
+ bool MarkDeletedCheckIfUsed(int64_t database_id, int64_t blob_key);
storage::ShareableFileReference::FinalReleaseCallback GetFinalReleaseCallback(
- int64 database_id,
- int64 blob_key);
+ int64_t database_id,
+ int64_t blob_key);
// This closure holds a raw pointer to the IndexedDBActiveBlobRegistry,
// and may not be called after it is deleted.
- base::Closure GetAddBlobRefCallback(int64 database_id, int64 blob_key);
+ base::Closure GetAddBlobRefCallback(int64_t database_id, int64_t blob_key);
// Call this to force the registry to drop its use counts, permitting the
// factory to drop any blob-related refcount for the backing store.
// This will also turn any outstanding callbacks into no-ops.
@@ -45,18 +47,18 @@ class CONTENT_EXPORT IndexedDBActiveBlobRegistry {
private:
// Maps blob_key -> IsDeleted; if the record's absent, it's not in active use
// and we don't care if it's deleted.
- typedef std::map<int64, bool> SingleDBMap;
+ typedef std::map<int64_t, bool> SingleDBMap;
// Maps DB ID -> SingleDBMap
- typedef std::map<int64, SingleDBMap> AllDBsMap;
- typedef std::set<int64> DeletedDBSet;
+ typedef std::map<int64_t, SingleDBMap> AllDBsMap;
+ typedef std::set<int64_t> DeletedDBSet;
- void AddBlobRef(int64 database_id, int64 blob_key);
- void ReleaseBlobRef(int64 database_id, int64 blob_key);
+ void AddBlobRef(int64_t database_id, int64_t blob_key);
+ void ReleaseBlobRef(int64_t database_id, int64_t blob_key);
static void ReleaseBlobRefThreadSafe(
scoped_refptr<base::TaskRunner> task_runner,
base::WeakPtr<IndexedDBActiveBlobRegistry> weak_ptr,
- int64 database_id,
- int64 blob_key,
+ int64_t database_id,
+ int64_t blob_key,
const base::FilePath& unused);
AllDBsMap use_tracker_;
diff --git a/content/browser/indexed_db/indexed_db_active_blob_registry_unittest.cc b/content/browser/indexed_db/indexed_db_active_blob_registry_unittest.cc
index aa412cf..3d6023f 100644
--- a/content/browser/indexed_db/indexed_db_active_blob_registry_unittest.cc
+++ b/content/browser/indexed_db/indexed_db_active_blob_registry_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 <stdint.h>
+
#include <set>
+#include "base/macros.h"
#include "base/test/test_simple_task_runner.h"
#include "content/browser/indexed_db/indexed_db_active_blob_registry.h"
#include "content/browser/indexed_db/indexed_db_backing_store.h"
@@ -55,7 +58,7 @@ class RegistryTestMockFactory : public MockIndexedDBFactory {
class MockIDBBackingStore : public IndexedDBFakeBackingStore {
public:
- typedef std::pair<int64, int64> KeyPair;
+ typedef std::pair<int64_t, int64_t> KeyPair;
typedef std::set<KeyPair> KeyPairSet;
MockIDBBackingStore(IndexedDBFactory* factory,
@@ -63,14 +66,14 @@ class MockIDBBackingStore : public IndexedDBFakeBackingStore {
: IndexedDBFakeBackingStore(factory, task_runner),
duplicate_calls_(false) {}
- void ReportBlobUnused(int64 database_id, int64 blob_key) override {
+ void ReportBlobUnused(int64_t database_id, int64_t blob_key) override {
unused_blobs_.insert(std::make_pair(database_id, blob_key));
}
bool CheckUnusedBlobsEmpty() const {
return !duplicate_calls_ && !unused_blobs_.size();
}
- bool CheckSingleUnusedBlob(int64 database_id, int64 blob_key) const {
+ bool CheckSingleUnusedBlob(int64_t database_id, int64_t blob_key) const {
return !duplicate_calls_ && unused_blobs_.size() == 1 &&
unused_blobs_.count(std::make_pair(database_id, blob_key));
}
@@ -93,10 +96,10 @@ class IndexedDBActiveBlobRegistryTest : public testing::Test {
typedef storage::ShareableFileReference::FinalReleaseCallback
ReleaseCallback;
- static const int64 kDatabaseId0 = 7;
- static const int64 kDatabaseId1 = 12;
- static const int64 kBlobKey0 = 77;
- static const int64 kBlobKey1 = 14;
+ static const int64_t kDatabaseId0 = 7;
+ static const int64_t kDatabaseId1 = 12;
+ static const int64_t kBlobKey0 = 77;
+ static const int64_t kBlobKey1 = 14;
IndexedDBActiveBlobRegistryTest()
: task_runner_(new base::TestSimpleTaskRunner),
diff --git a/content/browser/indexed_db/indexed_db_backing_store.cc b/content/browser/indexed_db/indexed_db_backing_store.cc
index 92075fd..5897025 100644
--- a/content/browser/indexed_db/indexed_db_backing_store.cc
+++ b/content/browser/indexed_db/indexed_db_backing_store.cc
@@ -12,10 +12,12 @@
#include "base/json/json_reader.h"
#include "base/json/json_writer.h"
#include "base/logging.h"
+#include "base/macros.h"
#include "base/metrics/histogram.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 "content/browser/child_process_security_policy_impl.h"
#include "content/browser/indexed_db/indexed_db_blob_info.h"
#include "content/browser/indexed_db/indexed_db_class_factory.h"
@@ -53,13 +55,13 @@ namespace content {
namespace {
-FilePath GetBlobDirectoryName(const FilePath& path_base, int64 database_id) {
+FilePath GetBlobDirectoryName(const FilePath& path_base, int64_t database_id) {
return path_base.AppendASCII(base::StringPrintf("%" PRIx64, database_id));
}
FilePath GetBlobDirectoryNameForKey(const FilePath& path_base,
- int64 database_id,
- int64 key) {
+ int64_t database_id,
+ int64_t key) {
FilePath path = GetBlobDirectoryName(path_base, database_id);
path = path.AppendASCII(base::StringPrintf(
"%02x", static_cast<int>(key & 0x000000000000ff00) >> 8));
@@ -67,16 +69,16 @@ FilePath GetBlobDirectoryNameForKey(const FilePath& path_base,
}
FilePath GetBlobFileNameForKey(const FilePath& path_base,
- int64 database_id,
- int64 key) {
+ int64_t database_id,
+ int64_t key) {
FilePath path = GetBlobDirectoryNameForKey(path_base, database_id, key);
path = path.AppendASCII(base::StringPrintf("%" PRIx64, key));
return path;
}
bool MakeIDBBlobDirectory(const FilePath& path_base,
- int64 database_id,
- int64 key) {
+ int64_t database_id,
+ int64_t key) {
FilePath path = GetBlobDirectoryNameForKey(path_base, database_id, key);
return base::CreateDirectory(path);
}
@@ -104,7 +106,7 @@ static base::FilePath ComputeCorruptionFileName(const GURL& origin_url) {
} // namespace
-static const int64 kKeyGeneratorInitialNumber =
+static const int64_t kKeyGeneratorInitialNumber =
1; // From the IndexedDB specification.
enum IndexedDBBackingStoreErrorSource {
@@ -209,7 +211,7 @@ static leveldb::Status IOErrorStatus() {
template <typename DBOrTransaction>
static leveldb::Status GetInt(DBOrTransaction* db,
const StringPiece& key,
- int64* found_int,
+ int64_t* found_int,
bool* found) {
std::string result;
leveldb::Status s = db->Get(key, &result, found);
@@ -225,7 +227,7 @@ static leveldb::Status GetInt(DBOrTransaction* db,
static void PutInt(LevelDBTransaction* transaction,
const StringPiece& key,
- int64 value) {
+ int64_t value) {
DCHECK_GE(value, 0);
std::string buffer;
EncodeInt(value, &buffer);
@@ -235,7 +237,7 @@ static void PutInt(LevelDBTransaction* transaction,
template <typename DBOrTransaction>
WARN_UNUSED_RESULT static leveldb::Status GetVarInt(DBOrTransaction* db,
const StringPiece& key,
- int64* found_int,
+ int64_t* found_int,
bool* found) {
std::string result;
leveldb::Status s = db->Get(key, &result, found);
@@ -251,7 +253,7 @@ WARN_UNUSED_RESULT static leveldb::Status GetVarInt(DBOrTransaction* db,
static void PutVarInt(LevelDBTransaction* transaction,
const StringPiece& key,
- int64 value) {
+ int64_t value) {
std::string buffer;
EncodeVarInt(value, &buffer);
transaction->Put(key, &buffer);
@@ -313,9 +315,9 @@ const char* IndexedDBBackingStore::Comparator::Name() const {
// 1 - Adds UserIntVersion to DatabaseMetaData.
// 2 - Adds DataVersion to to global metadata.
// 3 - Adds metadata needed for blob support.
-static const int64 kLatestKnownSchemaVersion = 3;
+static const int64_t kLatestKnownSchemaVersion = 3;
WARN_UNUSED_RESULT static bool IsSchemaKnown(LevelDBDatabase* db, bool* known) {
- int64 db_schema_version = 0;
+ int64_t db_schema_version = 0;
bool found = false;
leveldb::Status s =
GetInt(db, SchemaVersionKey::Encode(), &db_schema_version, &found);
@@ -332,9 +334,9 @@ WARN_UNUSED_RESULT static bool IsSchemaKnown(LevelDBDatabase* db, bool* known) {
return true;
}
- const uint32 latest_known_data_version =
+ const uint32_t latest_known_data_version =
blink::kSerializedScriptValueVersion;
- int64 db_data_version = 0;
+ int64_t db_data_version = 0;
s = GetInt(db, DataVersionKey::Encode(), &db_data_version, &found);
if (!s.ok())
return false;
@@ -356,7 +358,7 @@ WARN_UNUSED_RESULT static bool IsSchemaKnown(LevelDBDatabase* db, bool* known) {
// TODO(ericu): Move this down into the member section of this file. I'm
// leaving it here for this CL as it's easier to see the diffs in place.
WARN_UNUSED_RESULT leveldb::Status IndexedDBBackingStore::SetUpMetadata() {
- const uint32 latest_known_data_version =
+ const uint32_t latest_known_data_version =
blink::kSerializedScriptValueVersion;
const std::string schema_version_key = SchemaVersionKey::Encode();
const std::string data_version_key = DataVersionKey::Encode();
@@ -364,8 +366,8 @@ WARN_UNUSED_RESULT leveldb::Status IndexedDBBackingStore::SetUpMetadata() {
scoped_refptr<LevelDBTransaction> transaction =
IndexedDBClassFactory::Get()->CreateLevelDBTransaction(db_.get());
- int64 db_schema_version = 0;
- int64 db_data_version = 0;
+ int64_t db_schema_version = 0;
+ int64_t db_data_version = 0;
bool found = false;
leveldb::Status s =
GetInt(transaction.get(), schema_version_key, &db_schema_version, &found);
@@ -399,7 +401,7 @@ WARN_UNUSED_RESULT leveldb::Status IndexedDBBackingStore::SetUpMetadata() {
for (s = it->Seek(start_key);
s.ok() && it->IsValid() && CompareKeys(it->Key(), stop_key) < 0;
s = it->Next()) {
- int64 database_id = 0;
+ int64_t database_id = 0;
found = false;
s = GetInt(transaction.get(), it->Key(), &database_id, &found);
if (!s.ok()) {
@@ -465,8 +467,8 @@ WARN_UNUSED_RESULT leveldb::Status IndexedDBBackingStore::SetUpMetadata() {
template <typename DBOrTransaction>
WARN_UNUSED_RESULT static leveldb::Status GetMaxObjectStoreId(
DBOrTransaction* db,
- int64 database_id,
- int64* max_object_store_id) {
+ int64_t database_id,
+ int64_t* max_object_store_id) {
const std::string max_object_store_id_key = DatabaseMetaDataKey::Encode(
database_id, DatabaseMetaDataKey::MAX_OBJECT_STORE_ID);
return GetMaxObjectStoreId(db, max_object_store_id_key, max_object_store_id);
@@ -476,7 +478,7 @@ template <typename DBOrTransaction>
WARN_UNUSED_RESULT static leveldb::Status GetMaxObjectStoreId(
DBOrTransaction* db,
const std::string& max_object_store_id_key,
- int64* max_object_store_id) {
+ int64_t* max_object_store_id) {
*max_object_store_id = -1;
bool found = false;
leveldb::Status s =
@@ -509,13 +511,13 @@ class DefaultLevelDBFactory : public LevelDBFactory {
static bool GetBlobKeyGeneratorCurrentNumber(
LevelDBTransaction* leveldb_transaction,
- int64 database_id,
- int64* blob_key_generator_current_number) {
+ int64_t database_id,
+ int64_t* blob_key_generator_current_number) {
const std::string key_gen_key = DatabaseMetaDataKey::Encode(
database_id, DatabaseMetaDataKey::BLOB_KEY_GENERATOR_CURRENT_NUMBER);
// Default to initial number if not found.
- int64 cur_number = DatabaseMetaDataKey::kBlobKeyGeneratorInitialNumber;
+ int64_t cur_number = DatabaseMetaDataKey::kBlobKeyGeneratorInitialNumber;
std::string data;
bool found = false;
@@ -538,10 +540,10 @@ static bool GetBlobKeyGeneratorCurrentNumber(
static bool UpdateBlobKeyGeneratorCurrentNumber(
LevelDBTransaction* leveldb_transaction,
- int64 database_id,
- int64 blob_key_generator_current_number) {
+ int64_t database_id,
+ int64_t blob_key_generator_current_number) {
#ifndef NDEBUG
- int64 old_number;
+ int64_t old_number;
if (!GetBlobKeyGeneratorCurrentNumber(
leveldb_transaction, database_id, &old_number))
return false;
@@ -669,7 +671,7 @@ static leveldb::Status AppendBlobsToLiveBlobJournal(
static leveldb::Status MergeDatabaseIntoBlobJournal(
LevelDBDirectTransaction* transaction,
const std::string& key,
- int64 database_id) {
+ int64_t database_id) {
IDB_TRACE("IndexedDBBackingStore::MergeDatabaseIntoBlobJournal");
BlobJournalType journal;
leveldb::Status s = GetBlobJournal(key, transaction, &journal);
@@ -683,22 +685,22 @@ static leveldb::Status MergeDatabaseIntoBlobJournal(
static leveldb::Status MergeDatabaseIntoPrimaryBlobJournal(
LevelDBDirectTransaction* leveldb_transaction,
- int64 database_id) {
+ int64_t database_id) {
return MergeDatabaseIntoBlobJournal(leveldb_transaction,
BlobJournalKey::Encode(), database_id);
}
static leveldb::Status MergeDatabaseIntoLiveBlobJournal(
LevelDBDirectTransaction* leveldb_transaction,
- int64 database_id) {
+ int64_t database_id) {
return MergeDatabaseIntoBlobJournal(
leveldb_transaction, LiveBlobJournalKey::Encode(), database_id);
}
// Blob Data is encoded as a series of:
-// { is_file [bool], key [int64 as varInt],
+// { is_file [bool], key [int64_t as varInt],
// type [string-with-length, may be empty],
-// (for Blobs only) size [int64 as varInt]
+// (for Blobs only) size [int64_t as varInt]
// (for Files only) fileName [string-with-length]
// }
// There is no length field; just read until you run out of data.
@@ -724,9 +726,9 @@ static bool DecodeBlobData(const std::string& data,
StringPiece slice(data);
while (!slice.empty()) {
bool is_file;
- int64 key;
+ int64_t key;
base::string16 type;
- int64 size;
+ int64_t size;
base::string16 file_name;
if (!DecodeBool(&slice, &is_file))
@@ -743,7 +745,7 @@ static bool DecodeBlobData(const std::string& data,
} else {
if (!DecodeVarInt(&slice, &size) || size < 0)
return false;
- ret.push_back(IndexedDBBlobInfo(type, static_cast<uint64>(size), key));
+ ret.push_back(IndexedDBBlobInfo(type, static_cast<uint64_t>(size), key));
}
}
output->swap(ret);
@@ -787,7 +789,7 @@ IndexedDBBackingStore::~IndexedDBBackingStore() {
IndexedDBBackingStore::RecordIdentifier::RecordIdentifier(
const std::string& primary_key,
- int64 version)
+ int64_t version)
: primary_key_(primary_key), version_(version) {
DCHECK(!primary_key.empty());
}
@@ -920,8 +922,8 @@ bool IndexedDBBackingStore::ReadCorruptionInfo(const base::FilePath& path_base,
if (IsPathTooLong(info_path))
return false;
- const int64 max_json_len = 4096;
- int64 file_size(0);
+ const int64_t max_json_len = 4096;
+ int64_t file_size(0);
if (!GetFileSize(info_path, &file_size) || file_size > max_json_len)
return false;
if (!file_size) {
@@ -1223,7 +1225,7 @@ std::vector<base::string16> IndexedDBBackingStore::GetDatabaseNames(
}
// Decode database id (in iterator value).
- int64 database_id = 0;
+ int64_t database_id = 0;
StringPiece value_slice(it->Value());
if (!DecodeInt(&value_slice, &database_id) || !value_slice.empty()) {
INTERNAL_CONSISTENCY_ERROR_UNTESTED(GET_DATABASE_NAMES);
@@ -1232,7 +1234,7 @@ std::vector<base::string16> IndexedDBBackingStore::GetDatabaseNames(
// Look up version by id.
bool found = false;
- int64 database_version = IndexedDBDatabaseMetadata::DEFAULT_INT_VERSION;
+ int64_t database_version = IndexedDBDatabaseMetadata::DEFAULT_INT_VERSION;
*s = GetVarInt(db_.get(),
DatabaseMetaDataKey::Encode(
database_id, DatabaseMetaDataKey::USER_INT_VERSION),
@@ -1307,7 +1309,7 @@ leveldb::Status IndexedDBBackingStore::GetIDBDatabaseMetaData(
}
// We don't cache this, we just check it if it's there.
- int64 blob_key_generator_current_number =
+ int64_t blob_key_generator_current_number =
DatabaseMetaDataKey::kInvalidBlobKey;
s = GetVarInt(
@@ -1334,9 +1336,9 @@ leveldb::Status IndexedDBBackingStore::GetIDBDatabaseMetaData(
WARN_UNUSED_RESULT static leveldb::Status GetNewDatabaseId(
LevelDBTransaction* transaction,
- int64* new_id) {
+ int64_t* new_id) {
*new_id = -1;
- int64 max_database_id = -1;
+ int64_t max_database_id = -1;
bool found = false;
leveldb::Status s =
GetInt(transaction, MaxDatabaseIdKey::Encode(), &max_database_id, &found);
@@ -1349,7 +1351,7 @@ WARN_UNUSED_RESULT static leveldb::Status GetNewDatabaseId(
DCHECK_GE(max_database_id, 0);
- int64 database_id = max_database_id + 1;
+ int64_t database_id = max_database_id + 1;
PutInt(transaction, MaxDatabaseIdKey::Encode(), database_id);
*new_id = database_id;
return leveldb::Status::OK();
@@ -1358,8 +1360,8 @@ WARN_UNUSED_RESULT static leveldb::Status GetNewDatabaseId(
leveldb::Status IndexedDBBackingStore::CreateIDBDatabaseMetaData(
const base::string16& name,
const base::string16& version,
- int64 int_version,
- int64* row_id) {
+ int64_t int_version,
+ int64_t* row_id) {
// TODO(jsbell): Don't persist metadata if open fails. http://crbug.com/395472
scoped_refptr<LevelDBTransaction> transaction =
IndexedDBClassFactory::Get()->CreateLevelDBTransaction(db_.get());
@@ -1397,8 +1399,8 @@ leveldb::Status IndexedDBBackingStore::CreateIDBDatabaseMetaData(
bool IndexedDBBackingStore::UpdateIDBDatabaseIntVersion(
IndexedDBBackingStore::Transaction* transaction,
- int64 row_id,
- int64 int_version) {
+ int64_t row_id,
+ int64_t int_version) {
if (int_version == IndexedDBDatabaseMetadata::NO_INT_VERSION)
int_version = IndexedDBDatabaseMetadata::DEFAULT_INT_VERSION;
DCHECK_GE(int_version, 0) << "int_version was " << int_version;
@@ -1427,8 +1429,8 @@ static leveldb::Status DeleteRangeBasic(LevelDBTransaction* transaction,
static leveldb::Status DeleteBlobsInRange(
IndexedDBBackingStore::Transaction* transaction,
- int64 database_id,
- int64 object_store_id,
+ int64_t database_id,
+ int64_t object_store_id,
const std::string& start_key,
const std::string& end_key,
bool upper_open) {
@@ -1453,8 +1455,8 @@ static leveldb::Status DeleteBlobsInRange(
static leveldb::Status DeleteBlobsInObjectStore(
IndexedDBBackingStore::Transaction* transaction,
- int64 database_id,
- int64 object_store_id) {
+ int64_t database_id,
+ int64_t object_store_id) {
std::string start_key, stop_key;
start_key =
BlobEntryKey::EncodeMinKeyForObjectStore(database_id, object_store_id);
@@ -1530,8 +1532,8 @@ leveldb::Status IndexedDBBackingStore::DeleteDatabase(
static bool CheckObjectStoreAndMetaDataType(const LevelDBIterator* it,
const std::string& stop_key,
- int64 object_store_id,
- int64 meta_data_type) {
+ int64_t object_store_id,
+ int64_t meta_data_type) {
if (!it->IsValid() || CompareKeys(it->Key(), stop_key) >= 0)
return false;
@@ -1550,7 +1552,7 @@ static bool CheckObjectStoreAndMetaDataType(const LevelDBIterator* it,
// TODO(jsbell): This should do some error handling rather than
// plowing ahead when bad data is encountered.
leveldb::Status IndexedDBBackingStore::GetObjectStores(
- int64 database_id,
+ int64_t database_id,
IndexedDBDatabaseMetadata::ObjectStoreMap* object_stores) {
IDB_TRACE("IndexedDBBackingStore::GetObjectStores");
if (!KeyPrefix::IsValidDatabaseId(database_id))
@@ -1579,7 +1581,7 @@ leveldb::Status IndexedDBBackingStore::GetObjectStores(
continue;
}
- int64 object_store_id = meta_data_key.ObjectStoreId();
+ int64_t object_store_id = meta_data_key.ObjectStoreId();
// TODO(jsbell): Do this by direct key lookup rather than iteration, to
// simplify.
@@ -1659,7 +1661,7 @@ leveldb::Status IndexedDBBackingStore::GetObjectStores(
INTERNAL_CONSISTENCY_ERROR_UNTESTED(GET_OBJECT_STORES);
break;
}
- int64 max_index_id;
+ int64_t max_index_id;
{
StringPiece slice(it->Value());
if (!DecodeInt(&slice, &max_index_id) || !slice.empty())
@@ -1696,7 +1698,7 @@ leveldb::Status IndexedDBBackingStore::GetObjectStores(
break;
}
- int64 key_generator_current_number = -1;
+ int64_t key_generator_current_number = -1;
if (CheckObjectStoreAndMetaDataType(
it.get(),
stop_key,
@@ -1734,11 +1736,11 @@ leveldb::Status IndexedDBBackingStore::GetObjectStores(
WARN_UNUSED_RESULT static leveldb::Status SetMaxObjectStoreId(
LevelDBTransaction* transaction,
- int64 database_id,
- int64 object_store_id) {
+ int64_t database_id,
+ int64_t object_store_id) {
const std::string max_object_store_id_key = DatabaseMetaDataKey::Encode(
database_id, DatabaseMetaDataKey::MAX_OBJECT_STORE_ID);
- int64 max_object_store_id = -1;
+ int64_t max_object_store_id = -1;
leveldb::Status s = GetMaxObjectStoreId(
transaction, max_object_store_id_key, &max_object_store_id);
if (!s.ok()) {
@@ -1758,8 +1760,8 @@ void IndexedDBBackingStore::Compact() { db_->CompactAll(); }
leveldb::Status IndexedDBBackingStore::CreateObjectStore(
IndexedDBBackingStore::Transaction* transaction,
- int64 database_id,
- int64 object_store_id,
+ int64_t database_id,
+ int64_t object_store_id,
const base::string16& name,
const IndexedDBKeyPath& key_path,
bool auto_increment) {
@@ -1809,8 +1811,8 @@ leveldb::Status IndexedDBBackingStore::CreateObjectStore(
leveldb::Status IndexedDBBackingStore::DeleteObjectStore(
IndexedDBBackingStore::Transaction* transaction,
- int64 database_id,
- int64 object_store_id) {
+ int64_t database_id,
+ int64_t object_store_id) {
IDB_TRACE("IndexedDBBackingStore::DeleteObjectStore");
if (!KeyPrefix::ValidIds(database_id, object_store_id))
return InvalidDBKeyStatus();
@@ -1874,8 +1876,8 @@ leveldb::Status IndexedDBBackingStore::DeleteObjectStore(
leveldb::Status IndexedDBBackingStore::GetRecord(
IndexedDBBackingStore::Transaction* transaction,
- int64 database_id,
- int64 object_store_id,
+ int64_t database_id,
+ int64_t object_store_id,
const IndexedDBKey& key,
IndexedDBValue* record) {
IDB_TRACE("IndexedDBBackingStore::GetRecord");
@@ -1902,7 +1904,7 @@ leveldb::Status IndexedDBBackingStore::GetRecord(
return leveldb::Status::NotFound("Record contained no data");
}
- int64 version;
+ int64_t version;
StringPiece slice(data);
if (!DecodeVarInt(&slice, &version)) {
INTERNAL_READ_ERROR_UNTESTED(GET_RECORD);
@@ -1915,14 +1917,14 @@ leveldb::Status IndexedDBBackingStore::GetRecord(
WARN_UNUSED_RESULT static leveldb::Status GetNewVersionNumber(
LevelDBTransaction* transaction,
- int64 database_id,
- int64 object_store_id,
- int64* new_version_number) {
+ int64_t database_id,
+ int64_t object_store_id,
+ int64_t* new_version_number) {
const std::string last_version_key = ObjectStoreMetaDataKey::Encode(
database_id, object_store_id, ObjectStoreMetaDataKey::LAST_VERSION);
*new_version_number = -1;
- int64 last_version = -1;
+ int64_t last_version = -1;
bool found = false;
leveldb::Status s =
GetInt(transaction, last_version_key, &last_version, &found);
@@ -1935,7 +1937,7 @@ WARN_UNUSED_RESULT static leveldb::Status GetNewVersionNumber(
DCHECK_GE(last_version, 0);
- int64 version = last_version + 1;
+ int64_t version = last_version + 1;
PutInt(transaction, last_version_key, version);
// TODO(jsbell): Think about how we want to handle the overflow scenario.
@@ -1947,8 +1949,8 @@ WARN_UNUSED_RESULT static leveldb::Status GetNewVersionNumber(
leveldb::Status IndexedDBBackingStore::PutRecord(
IndexedDBBackingStore::Transaction* transaction,
- int64 database_id,
- int64 object_store_id,
+ int64_t database_id,
+ int64_t object_store_id,
const IndexedDBKey& key,
IndexedDBValue* value,
ScopedVector<storage::BlobDataHandle>* handles,
@@ -1959,7 +1961,7 @@ leveldb::Status IndexedDBBackingStore::PutRecord(
DCHECK(key.IsValid());
LevelDBTransaction* leveldb_transaction = transaction->transaction();
- int64 version = -1;
+ int64_t version = -1;
leveldb::Status s = GetNewVersionNumber(
leveldb_transaction, database_id, object_store_id, &version);
if (!s.ok())
@@ -1996,8 +1998,8 @@ leveldb::Status IndexedDBBackingStore::PutRecord(
leveldb::Status IndexedDBBackingStore::ClearObjectStore(
IndexedDBBackingStore::Transaction* transaction,
- int64 database_id,
- int64 object_store_id) {
+ int64_t database_id,
+ int64_t object_store_id) {
IDB_TRACE("IndexedDBBackingStore::ClearObjectStore");
if (!KeyPrefix::ValidIds(database_id, object_store_id))
return InvalidDBKeyStatus();
@@ -2017,8 +2019,8 @@ leveldb::Status IndexedDBBackingStore::ClearObjectStore(
leveldb::Status IndexedDBBackingStore::DeleteRecord(
IndexedDBBackingStore::Transaction* transaction,
- int64 database_id,
- int64 object_store_id,
+ int64_t database_id,
+ int64_t object_store_id,
const RecordIdentifier& record_identifier) {
IDB_TRACE("IndexedDBBackingStore::DeleteRecord");
if (!KeyPrefix::ValidIds(database_id, object_store_id))
@@ -2041,8 +2043,8 @@ leveldb::Status IndexedDBBackingStore::DeleteRecord(
leveldb::Status IndexedDBBackingStore::DeleteRange(
IndexedDBBackingStore::Transaction* transaction,
- int64 database_id,
- int64 object_store_id,
+ int64_t database_id,
+ int64_t object_store_id,
const IndexedDBKeyRange& key_range) {
leveldb::Status s;
scoped_ptr<IndexedDBBackingStore::Cursor> start_cursor =
@@ -2104,9 +2106,9 @@ leveldb::Status IndexedDBBackingStore::DeleteRange(
leveldb::Status IndexedDBBackingStore::GetKeyGeneratorCurrentNumber(
IndexedDBBackingStore::Transaction* transaction,
- int64 database_id,
- int64 object_store_id,
- int64* key_generator_current_number) {
+ int64_t database_id,
+ int64_t object_store_id,
+ int64_t* key_generator_current_number) {
if (!KeyPrefix::ValidIds(database_id, object_store_id))
return InvalidDBKeyStatus();
LevelDBTransaction* leveldb_transaction = transaction->transaction();
@@ -2147,7 +2149,7 @@ leveldb::Status IndexedDBBackingStore::GetKeyGeneratorCurrentNumber(
ObjectStoreDataKey::Encode(database_id, object_store_id, MaxIDBKey());
scoped_ptr<LevelDBIterator> it = leveldb_transaction->CreateIterator();
- int64 max_numeric_key = 0;
+ int64_t max_numeric_key = 0;
for (s = it->Seek(start_key);
s.ok() && it->IsValid() && CompareKeys(it->Key(), stop_key) < 0;
@@ -2160,7 +2162,7 @@ leveldb::Status IndexedDBBackingStore::GetKeyGeneratorCurrentNumber(
}
scoped_ptr<IndexedDBKey> user_key = data_key.user_key();
if (user_key->type() == blink::WebIDBKeyTypeNumber) {
- int64 n = static_cast<int64>(user_key->number());
+ int64_t n = static_cast<int64_t>(user_key->number());
if (n > max_numeric_key)
max_numeric_key = n;
}
@@ -2176,15 +2178,15 @@ leveldb::Status IndexedDBBackingStore::GetKeyGeneratorCurrentNumber(
leveldb::Status IndexedDBBackingStore::MaybeUpdateKeyGeneratorCurrentNumber(
IndexedDBBackingStore::Transaction* transaction,
- int64 database_id,
- int64 object_store_id,
- int64 new_number,
+ int64_t database_id,
+ int64_t object_store_id,
+ int64_t new_number,
bool check_current) {
if (!KeyPrefix::ValidIds(database_id, object_store_id))
return InvalidDBKeyStatus();
if (check_current) {
- int64 current_number;
+ int64_t current_number;
leveldb::Status s = GetKeyGeneratorCurrentNumber(
transaction, database_id, object_store_id, &current_number);
if (!s.ok())
@@ -2205,8 +2207,8 @@ leveldb::Status IndexedDBBackingStore::MaybeUpdateKeyGeneratorCurrentNumber(
leveldb::Status IndexedDBBackingStore::KeyExistsInObjectStore(
IndexedDBBackingStore::Transaction* transaction,
- int64 database_id,
- int64 object_store_id,
+ int64_t database_id,
+ int64_t object_store_id,
const IndexedDBKey& key,
RecordIdentifier* found_record_identifier,
bool* found) {
@@ -2231,7 +2233,7 @@ leveldb::Status IndexedDBBackingStore::KeyExistsInObjectStore(
return InternalInconsistencyStatus();
}
- int64 version;
+ int64_t version;
StringPiece slice(data);
if (!DecodeVarInt(&slice, &version))
return InternalInconsistencyStatus();
@@ -2248,7 +2250,7 @@ class IndexedDBBackingStore::Transaction::ChainedBlobWriterImpl
typedef IndexedDBBackingStore::Transaction::WriteDescriptorVec
WriteDescriptorVec;
ChainedBlobWriterImpl(
- int64 database_id,
+ int64_t database_id,
IndexedDBBackingStore* backing_store,
WriteDescriptorVec* blobs,
scoped_refptr<IndexedDBBackingStore::BlobWriteCallback> callback)
@@ -2267,7 +2269,7 @@ class IndexedDBBackingStore::Transaction::ChainedBlobWriterImpl
delegate_.reset(delegate.release());
}
- void ReportWriteCompletion(bool succeeded, int64 bytes_written) override {
+ void ReportWriteCompletion(bool succeeded, int64_t bytes_written) override {
DCHECK(waiting_for_callback_);
DCHECK(!succeeded || bytes_written >= 0);
waiting_for_callback_ = false;
@@ -2321,7 +2323,7 @@ class IndexedDBBackingStore::Transaction::ChainedBlobWriterImpl
scoped_refptr<ChainedBlobWriterImpl> self_ref_;
WriteDescriptorVec blobs_;
WriteDescriptorVec::const_iterator iter_;
- int64 database_id_;
+ int64_t database_id_;
IndexedDBBackingStore* backing_store_;
scoped_refptr<IndexedDBBackingStore::BlobWriteCallback> callback_;
scoped_ptr<FileWriterDelegate> delegate_;
@@ -2341,7 +2343,7 @@ class LocalWriteClosure : public FileWriterDelegate::DelegateWriteCallback,
bytes_written_(0) {}
void Run(base::File::Error rv,
- int64 bytes,
+ int64_t bytes,
FileWriterDelegate::WriteProgressStatus write_status) {
DCHECK_GE(bytes, 0);
bytes_written_ += bytes;
@@ -2440,7 +2442,7 @@ class LocalWriteClosure : public FileWriterDelegate::DelegateWriteCallback,
scoped_refptr<IndexedDBBackingStore::Transaction::ChainedBlobWriter>
chained_blob_writer_;
scoped_refptr<base::SequencedTaskRunner> task_runner_;
- int64 bytes_written_;
+ int64_t bytes_written_;
base::FilePath file_path_;
base::Time last_modified_;
@@ -2449,10 +2451,9 @@ class LocalWriteClosure : public FileWriterDelegate::DelegateWriteCallback,
};
bool IndexedDBBackingStore::WriteBlobFile(
- int64 database_id,
+ int64_t database_id,
const Transaction::WriteDescriptor& descriptor,
Transaction::ChainedBlobWriter* chained_blob_writer) {
-
if (!MakeIDBBlobDirectory(blob_path_, database_id, descriptor.key()))
return false;
@@ -2468,8 +2469,8 @@ bool IndexedDBBackingStore::WriteBlobFile(
if (descriptor.size() != info.size)
return false;
// The round-trip can be lossy; round to nearest millisecond.
- int64 delta = (descriptor.last_modified() -
- info.last_modified).InMilliseconds();
+ int64_t delta =
+ (descriptor.last_modified() - info.last_modified).InMilliseconds();
if (std::abs(delta) > 1)
return false;
}
@@ -2503,8 +2504,8 @@ bool IndexedDBBackingStore::WriteBlobFile(
return true;
}
-void IndexedDBBackingStore::ReportBlobUnused(int64 database_id,
- int64 blob_key) {
+void IndexedDBBackingStore::ReportBlobUnused(int64_t database_id,
+ int64_t blob_key) {
DCHECK(KeyPrefix::IsValidDatabaseId(database_id));
bool all_blobs = blob_key == DatabaseMetaDataKey::kAllBlobsKey;
DCHECK(all_blobs || DatabaseMetaDataKey::IsValidBlobKey(blob_key));
@@ -2530,8 +2531,8 @@ void IndexedDBBackingStore::ReportBlobUnused(int64 database_id,
for (BlobJournalType::iterator journal_iter = live_blob_journal.begin();
journal_iter != live_blob_journal.end();
++journal_iter) {
- int64 current_database_id = journal_iter->first;
- int64 current_blob_key = journal_iter->second;
+ int64_t current_database_id = journal_iter->first;
+ int64_t current_blob_key = journal_iter->second;
bool current_all_blobs =
current_blob_key == DatabaseMetaDataKey::kAllBlobsKey;
DCHECK(KeyPrefix::IsValidDatabaseId(current_database_id) ||
@@ -2578,14 +2579,14 @@ void IndexedDBBackingStore::StartJournalCleaningTimer() {
}
// This assumes a file path of dbId/second-to-LSB-of-counter/counter.
-FilePath IndexedDBBackingStore::GetBlobFileName(int64 database_id,
- int64 key) const {
+FilePath IndexedDBBackingStore::GetBlobFileName(int64_t database_id,
+ int64_t key) const {
return GetBlobFileNameForKey(blob_path_, database_id, key);
}
static bool CheckIndexAndMetaDataKey(const LevelDBIterator* it,
const std::string& stop_key,
- int64 index_id,
+ int64_t index_id,
unsigned char meta_data_type) {
if (!it->IsValid() || CompareKeys(it->Key(), stop_key) >= 0)
return false;
@@ -2604,8 +2605,8 @@ static bool CheckIndexAndMetaDataKey(const LevelDBIterator* it,
// TODO(jsbell): This should do some error handling rather than plowing ahead
// when bad data is encountered.
leveldb::Status IndexedDBBackingStore::GetIndexes(
- int64 database_id,
- int64 object_store_id,
+ int64_t database_id,
+ int64_t object_store_id,
IndexedDBObjectStoreMetadata::IndexMap* indexes) {
IDB_TRACE("IndexedDBBackingStore::GetIndexes");
if (!KeyPrefix::ValidIds(database_id, object_store_id))
@@ -2636,7 +2637,7 @@ leveldb::Status IndexedDBBackingStore::GetIndexes(
// TODO(jsbell): Do this by direct key lookup rather than iteration, to
// simplify.
- int64 index_id = meta_data_key.IndexId();
+ int64_t index_id = meta_data_key.IndexId();
base::string16 index_name;
{
StringPiece slice(it->Value());
@@ -2699,12 +2700,13 @@ leveldb::Status IndexedDBBackingStore::GetIndexes(
return s;
}
-bool IndexedDBBackingStore::RemoveBlobFile(int64 database_id, int64 key) const {
+bool IndexedDBBackingStore::RemoveBlobFile(int64_t database_id,
+ int64_t key) const {
FilePath path = GetBlobFileName(database_id, key);
return base::DeleteFile(path, false);
}
-bool IndexedDBBackingStore::RemoveBlobDirectory(int64 database_id) const {
+bool IndexedDBBackingStore::RemoveBlobDirectory(int64_t database_id) const {
FilePath path = GetBlobDirectoryName(blob_path_, database_id);
return base::DeleteFile(path, true);
}
@@ -2715,8 +2717,8 @@ leveldb::Status IndexedDBBackingStore::CleanUpBlobJournalEntries(
if (journal.empty())
return leveldb::Status::OK();
for (const auto& entry : journal) {
- int64 database_id = entry.first;
- int64 blob_key = entry.second;
+ int64_t database_id = entry.first;
+ int64_t blob_key = entry.second;
DCHECK(KeyPrefix::IsValidDatabaseId(database_id));
if (blob_key == DatabaseMetaDataKey::kAllBlobsKey) {
if (!RemoveBlobDirectory(database_id))
@@ -2752,7 +2754,7 @@ leveldb::Status IndexedDBBackingStore::CleanUpBlobJournal(
}
leveldb::Status IndexedDBBackingStore::Transaction::GetBlobInfoForRecord(
- int64 database_id,
+ int64_t database_id,
const std::string& object_store_data_key,
IndexedDBValue* value) {
BlobChangeRecord* change_record = NULL;
@@ -2824,10 +2826,10 @@ void IndexedDBBackingStore::CleanPrimaryJournalIgnoreReturn() {
WARN_UNUSED_RESULT static leveldb::Status SetMaxIndexId(
LevelDBTransaction* transaction,
- int64 database_id,
- int64 object_store_id,
- int64 index_id) {
- int64 max_index_id = -1;
+ int64_t database_id,
+ int64_t object_store_id,
+ int64_t index_id) {
+ int64_t max_index_id = -1;
const std::string max_index_id_key = ObjectStoreMetaDataKey::Encode(
database_id, object_store_id, ObjectStoreMetaDataKey::MAX_INDEX_ID);
bool found = false;
@@ -2851,9 +2853,9 @@ WARN_UNUSED_RESULT static leveldb::Status SetMaxIndexId(
leveldb::Status IndexedDBBackingStore::CreateIndex(
IndexedDBBackingStore::Transaction* transaction,
- int64 database_id,
- int64 object_store_id,
- int64 index_id,
+ int64_t database_id,
+ int64_t object_store_id,
+ int64_t index_id,
const base::string16& name,
const IndexedDBKeyPath& key_path,
bool is_unique,
@@ -2886,9 +2888,9 @@ leveldb::Status IndexedDBBackingStore::CreateIndex(
leveldb::Status IndexedDBBackingStore::DeleteIndex(
IndexedDBBackingStore::Transaction* transaction,
- int64 database_id,
- int64 object_store_id,
- int64 index_id) {
+ int64_t database_id,
+ int64_t object_store_id,
+ int64_t index_id) {
IDB_TRACE("IndexedDBBackingStore::DeleteIndex");
if (!KeyPrefix::ValidIds(database_id, object_store_id, index_id))
return InvalidDBKeyStatus();
@@ -2918,9 +2920,9 @@ leveldb::Status IndexedDBBackingStore::DeleteIndex(
leveldb::Status IndexedDBBackingStore::PutIndexDataForRecord(
IndexedDBBackingStore::Transaction* transaction,
- int64 database_id,
- int64 object_store_id,
- int64 index_id,
+ int64_t database_id,
+ int64_t object_store_id,
+ int64_t index_id,
const IndexedDBKey& key,
const RecordIdentifier& record_identifier) {
IDB_TRACE("IndexedDBBackingStore::PutIndexDataForRecord");
@@ -2979,9 +2981,9 @@ static bool FindGreatestKeyLessThanOrEqual(LevelDBTransaction* transaction,
}
static leveldb::Status VersionExists(LevelDBTransaction* transaction,
- int64 database_id,
- int64 object_store_id,
- int64 version,
+ int64_t database_id,
+ int64_t object_store_id,
+ int64_t version,
const std::string& encoded_primary_key,
bool* exists) {
const std::string key =
@@ -2997,7 +2999,7 @@ static leveldb::Status VersionExists(LevelDBTransaction* transaction,
return s;
StringPiece slice(data);
- int64 decoded;
+ int64_t decoded;
if (!DecodeInt(&slice, &decoded) || !slice.empty())
return InternalInconsistencyStatus();
*exists = (decoded == version);
@@ -3006,9 +3008,9 @@ static leveldb::Status VersionExists(LevelDBTransaction* transaction,
leveldb::Status IndexedDBBackingStore::FindKeyInIndex(
IndexedDBBackingStore::Transaction* transaction,
- int64 database_id,
- int64 object_store_id,
- int64 index_id,
+ int64_t database_id,
+ int64_t object_store_id,
+ int64_t index_id,
const IndexedDBKey& key,
std::string* found_encoded_primary_key,
bool* found) {
@@ -3036,7 +3038,7 @@ leveldb::Status IndexedDBBackingStore::FindKeyInIndex(
StringPiece slice(it->Value());
- int64 version;
+ int64_t version;
if (!DecodeVarInt(&slice, &version)) {
INTERNAL_READ_ERROR_UNTESTED(FIND_KEY_IN_INDEX);
return InternalInconsistencyStatus();
@@ -3065,9 +3067,9 @@ leveldb::Status IndexedDBBackingStore::FindKeyInIndex(
leveldb::Status IndexedDBBackingStore::GetPrimaryKeyViaIndex(
IndexedDBBackingStore::Transaction* transaction,
- int64 database_id,
- int64 object_store_id,
- int64 index_id,
+ int64_t database_id,
+ int64_t object_store_id,
+ int64_t index_id,
const IndexedDBKey& key,
scoped_ptr<IndexedDBKey>* primary_key) {
IDB_TRACE("IndexedDBBackingStore::GetPrimaryKeyViaIndex");
@@ -3103,9 +3105,9 @@ leveldb::Status IndexedDBBackingStore::GetPrimaryKeyViaIndex(
leveldb::Status IndexedDBBackingStore::KeyExistsInIndex(
IndexedDBBackingStore::Transaction* transaction,
- int64 database_id,
- int64 object_store_id,
- int64 index_id,
+ int64_t database_id,
+ int64_t object_store_id,
+ int64_t index_id,
const IndexedDBKey& index_key,
scoped_ptr<IndexedDBKey>* found_primary_key,
bool* exists) {
@@ -3161,13 +3163,12 @@ IndexedDBBackingStore::Cursor::Cursor(
IndexedDBBackingStore::Cursor::Cursor(
scoped_refptr<IndexedDBBackingStore> backing_store,
IndexedDBBackingStore::Transaction* transaction,
- int64 database_id,
+ int64_t database_id,
const CursorOptions& cursor_options)
: backing_store_(backing_store.get()),
transaction_(transaction),
database_id_(database_id),
- cursor_options_(cursor_options) {
-}
+ cursor_options_(cursor_options) {}
IndexedDBBackingStore::Cursor::~Cursor() {}
bool IndexedDBBackingStore::Cursor::FirstSeek(leveldb::Status* s) {
@@ -3182,7 +3183,8 @@ bool IndexedDBBackingStore::Cursor::FirstSeek(leveldb::Status* s) {
return Continue(0, READY, s);
}
-bool IndexedDBBackingStore::Cursor::Advance(uint32 count, leveldb::Status* s) {
+bool IndexedDBBackingStore::Cursor::Advance(uint32_t count,
+ leveldb::Status* s) {
*s = leveldb::Status::OK();
while (count--) {
if (!Continue(s))
@@ -3423,7 +3425,7 @@ class ObjectStoreKeyCursorImpl : public IndexedDBBackingStore::Cursor {
ObjectStoreKeyCursorImpl(
scoped_refptr<IndexedDBBackingStore> backing_store,
IndexedDBBackingStore::Transaction* transaction,
- int64 database_id,
+ int64_t database_id,
const IndexedDBBackingStore::Cursor::CursorOptions& cursor_options)
: IndexedDBBackingStore::Cursor(backing_store,
transaction,
@@ -3468,7 +3470,7 @@ bool ObjectStoreKeyCursorImpl::LoadCurrentRow(leveldb::Status* s) {
current_key_ = object_store_data_key.user_key();
- int64 version;
+ int64_t version;
slice = StringPiece(iterator_->Value());
if (!DecodeVarInt(&slice, &version)) {
INTERNAL_READ_ERROR_UNTESTED(LOAD_CURRENT_ROW);
@@ -3489,7 +3491,7 @@ class ObjectStoreCursorImpl : public IndexedDBBackingStore::Cursor {
ObjectStoreCursorImpl(
scoped_refptr<IndexedDBBackingStore> backing_store,
IndexedDBBackingStore::Transaction* transaction,
- int64 database_id,
+ int64_t database_id,
const IndexedDBBackingStore::Cursor::CursorOptions& cursor_options)
: IndexedDBBackingStore::Cursor(backing_store,
transaction,
@@ -3534,7 +3536,7 @@ bool ObjectStoreCursorImpl::LoadCurrentRow(leveldb::Status* s) {
current_key_ = object_store_data_key.user_key();
- int64 version;
+ int64_t version;
StringPiece value_slice = StringPiece(iterator_->Value());
if (!DecodeVarInt(&value_slice, &version)) {
INTERNAL_READ_ERROR_UNTESTED(LOAD_CURRENT_ROW);
@@ -3561,7 +3563,7 @@ class IndexKeyCursorImpl : public IndexedDBBackingStore::Cursor {
IndexKeyCursorImpl(
scoped_refptr<IndexedDBBackingStore> backing_store,
IndexedDBBackingStore::Transaction* transaction,
- int64 database_id,
+ int64_t database_id,
const IndexedDBBackingStore::Cursor::CursorOptions& cursor_options)
: IndexedDBBackingStore::Cursor(backing_store,
transaction,
@@ -3622,7 +3624,7 @@ bool IndexKeyCursorImpl::LoadCurrentRow(leveldb::Status* s) {
DCHECK(current_key_);
slice = StringPiece(iterator_->Value());
- int64 index_data_version;
+ int64_t index_data_version;
if (!DecodeVarInt(&slice, &index_data_version)) {
INTERNAL_READ_ERROR_UNTESTED(LOAD_CURRENT_ROW);
*s = InternalInconsistencyStatus();
@@ -3656,7 +3658,7 @@ bool IndexKeyCursorImpl::LoadCurrentRow(leveldb::Status* s) {
return false;
}
- int64 object_store_data_version;
+ int64_t object_store_data_version;
slice = StringPiece(result);
if (!DecodeVarInt(&slice, &object_store_data_version)) {
INTERNAL_READ_ERROR_UNTESTED(LOAD_CURRENT_ROW);
@@ -3677,7 +3679,7 @@ class IndexCursorImpl : public IndexedDBBackingStore::Cursor {
IndexCursorImpl(
scoped_refptr<IndexedDBBackingStore> backing_store,
IndexedDBBackingStore::Transaction* transaction,
- int64 database_id,
+ int64_t database_id,
const IndexedDBBackingStore::Cursor::CursorOptions& cursor_options)
: IndexedDBBackingStore::Cursor(backing_store,
transaction,
@@ -3739,7 +3741,7 @@ bool IndexCursorImpl::LoadCurrentRow(leveldb::Status* s) {
DCHECK(current_key_);
slice = StringPiece(iterator_->Value());
- int64 index_data_version;
+ int64_t index_data_version;
if (!DecodeVarInt(&slice, &index_data_version)) {
INTERNAL_READ_ERROR_UNTESTED(LOAD_CURRENT_ROW);
*s = InternalInconsistencyStatus();
@@ -3773,7 +3775,7 @@ bool IndexCursorImpl::LoadCurrentRow(leveldb::Status* s) {
return false;
}
- int64 object_store_data_version;
+ int64_t object_store_data_version;
slice = StringPiece(result);
if (!DecodeVarInt(&slice, &object_store_data_version)) {
INTERNAL_READ_ERROR_UNTESTED(LOAD_CURRENT_ROW);
@@ -3794,8 +3796,8 @@ bool IndexCursorImpl::LoadCurrentRow(leveldb::Status* s) {
bool ObjectStoreCursorOptions(
LevelDBTransaction* transaction,
- int64 database_id,
- int64 object_store_id,
+ int64_t database_id,
+ int64_t object_store_id,
const IndexedDBKeyRange& range,
blink::WebIDBCursorDirection direction,
IndexedDBBackingStore::Cursor::CursorOptions* cursor_options) {
@@ -3867,9 +3869,9 @@ bool ObjectStoreCursorOptions(
bool IndexCursorOptions(
LevelDBTransaction* transaction,
- int64 database_id,
- int64 object_store_id,
- int64 index_id,
+ int64_t database_id,
+ int64_t object_store_id,
+ int64_t index_id,
const IndexedDBKeyRange& range,
blink::WebIDBCursorDirection direction,
IndexedDBBackingStore::Cursor::CursorOptions* cursor_options) {
@@ -3942,8 +3944,8 @@ bool IndexCursorOptions(
scoped_ptr<IndexedDBBackingStore::Cursor>
IndexedDBBackingStore::OpenObjectStoreCursor(
IndexedDBBackingStore::Transaction* transaction,
- int64 database_id,
- int64 object_store_id,
+ int64_t database_id,
+ int64_t object_store_id,
const IndexedDBKeyRange& range,
blink::WebIDBCursorDirection direction,
leveldb::Status* s) {
@@ -3969,8 +3971,8 @@ IndexedDBBackingStore::OpenObjectStoreCursor(
scoped_ptr<IndexedDBBackingStore::Cursor>
IndexedDBBackingStore::OpenObjectStoreKeyCursor(
IndexedDBBackingStore::Transaction* transaction,
- int64 database_id,
- int64 object_store_id,
+ int64_t database_id,
+ int64_t object_store_id,
const IndexedDBKeyRange& range,
blink::WebIDBCursorDirection direction,
leveldb::Status* s) {
@@ -3996,9 +3998,9 @@ IndexedDBBackingStore::OpenObjectStoreKeyCursor(
scoped_ptr<IndexedDBBackingStore::Cursor>
IndexedDBBackingStore::OpenIndexKeyCursor(
IndexedDBBackingStore::Transaction* transaction,
- int64 database_id,
- int64 object_store_id,
- int64 index_id,
+ int64_t database_id,
+ int64_t object_store_id,
+ int64_t index_id,
const IndexedDBKeyRange& range,
blink::WebIDBCursorDirection direction,
leveldb::Status* s) {
@@ -4025,9 +4027,9 @@ IndexedDBBackingStore::OpenIndexKeyCursor(
scoped_ptr<IndexedDBBackingStore::Cursor>
IndexedDBBackingStore::OpenIndexCursor(
IndexedDBBackingStore::Transaction* transaction,
- int64 database_id,
- int64 object_store_id,
- int64 index_id,
+ int64_t database_id,
+ int64_t object_store_id,
+ int64_t index_id,
const IndexedDBKeyRange& range,
blink::WebIDBCursorDirection direction,
leveldb::Status* s) {
@@ -4100,7 +4102,7 @@ leveldb::Status IndexedDBBackingStore::Transaction::HandleBlobPreTransaction(
for (auto& iter : blob_change_map_) {
std::vector<IndexedDBBlobInfo*> new_blob_keys;
for (auto& entry : iter.second->mutable_blob_info()) {
- int64 next_blob_key = -1;
+ int64_t next_blob_key = -1;
bool result = GetBlobKeyGeneratorCurrentNumber(
pre_transaction.get(), database_id_, &next_blob_key);
if (!result || next_blob_key < 0)
@@ -4401,9 +4403,8 @@ void IndexedDBBackingStore::Transaction::Rollback() {
IndexedDBBackingStore::BlobChangeRecord::BlobChangeRecord(
const std::string& key,
- int64 object_store_id)
- : key_(key), object_store_id_(object_store_id) {
-}
+ int64_t object_store_id)
+ : key_(key), object_store_id_(object_store_id) {}
IndexedDBBackingStore::BlobChangeRecord::~BlobChangeRecord() {
}
@@ -4434,8 +4435,8 @@ IndexedDBBackingStore::BlobChangeRecord::Clone() const {
}
leveldb::Status IndexedDBBackingStore::Transaction::PutBlobInfoIfNeeded(
- int64 database_id,
- int64 object_store_id,
+ int64_t database_id,
+ int64_t object_store_id,
const std::string& object_store_data_key,
std::vector<IndexedDBBlobInfo>* blob_info,
ScopedVector<storage::BlobDataHandle>* handles) {
@@ -4469,8 +4470,8 @@ leveldb::Status IndexedDBBackingStore::Transaction::PutBlobInfoIfNeeded(
// leveldb transaction, but only w.r.t. the user keys altered--we don't keep the
// changes to exists or index keys here.
void IndexedDBBackingStore::Transaction::PutBlobInfo(
- int64 database_id,
- int64 object_store_id,
+ int64_t database_id,
+ int64_t object_store_id,
const std::string& object_store_data_key,
std::vector<IndexedDBBlobInfo>* blob_info,
ScopedVector<storage::BlobDataHandle>* handles) {
diff --git a/content/browser/indexed_db/indexed_db_backing_store.h b/content/browser/indexed_db/indexed_db_backing_store.h
index 65db067..1ba2260 100644
--- a/content/browser/indexed_db/indexed_db_backing_store.h
+++ b/content/browser/indexed_db/indexed_db_backing_store.h
@@ -5,14 +5,17 @@
#ifndef CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_BACKING_STORE_H_
#define CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_BACKING_STORE_H_
+#include <stddef.h>
+#include <stdint.h>
+
#include <map>
#include <set>
#include <string>
#include <utility>
#include <vector>
-#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/memory/scoped_vector.h"
@@ -66,13 +69,13 @@ class CONTENT_EXPORT IndexedDBBackingStore
class CONTENT_EXPORT RecordIdentifier {
public:
- RecordIdentifier(const std::string& primary_key, int64 version);
+ RecordIdentifier(const std::string& primary_key, int64_t version);
RecordIdentifier();
~RecordIdentifier();
const std::string& primary_key() const { return primary_key_; }
- int64 version() const { return version_; }
- void Reset(const std::string& primary_key, int64 version) {
+ int64_t version() const { return version_; }
+ void Reset(const std::string& primary_key, int64_t version) {
primary_key_ = primary_key;
version_ = version;
}
@@ -81,7 +84,7 @@ class CONTENT_EXPORT IndexedDBBackingStore
// TODO(jsbell): Make it more clear that this is the *encoded* version of
// the key.
std::string primary_key_;
- int64 version_;
+ int64_t version_;
DISALLOW_COPY_AND_ASSIGN(RecordIdentifier);
};
@@ -96,11 +99,11 @@ class CONTENT_EXPORT IndexedDBBackingStore
class BlobChangeRecord {
public:
- BlobChangeRecord(const std::string& key, int64 object_store_id);
+ BlobChangeRecord(const std::string& key, int64_t object_store_id);
~BlobChangeRecord();
const std::string& key() const { return key_; }
- int64 object_store_id() const { return object_store_id_; }
+ int64_t object_store_id() const { return object_store_id_; }
void SetBlobInfo(std::vector<IndexedDBBlobInfo>* blob_info);
std::vector<IndexedDBBlobInfo>& mutable_blob_info() { return blob_info_; }
const std::vector<IndexedDBBlobInfo>& blob_info() const {
@@ -111,7 +114,7 @@ class CONTENT_EXPORT IndexedDBBackingStore
private:
std::string key_;
- int64 object_store_id_;
+ int64_t object_store_id_;
std::vector<IndexedDBBlobInfo> blob_info_;
ScopedVector<storage::BlobDataHandle> handles_;
DISALLOW_COPY_AND_ASSIGN(BlobChangeRecord);
@@ -145,13 +148,13 @@ class CONTENT_EXPORT IndexedDBBackingStore
transaction_ = NULL;
}
leveldb::Status PutBlobInfoIfNeeded(
- int64 database_id,
- int64 object_store_id,
+ int64_t database_id,
+ int64_t object_store_id,
const std::string& object_store_data_key,
std::vector<IndexedDBBlobInfo>*,
ScopedVector<storage::BlobDataHandle>* handles);
- void PutBlobInfo(int64 database_id,
- int64 object_store_id,
+ void PutBlobInfo(int64_t database_id,
+ int64_t object_store_id,
const std::string& object_store_data_key,
std::vector<IndexedDBBlobInfo>*,
ScopedVector<storage::BlobDataHandle>* handles);
@@ -159,7 +162,7 @@ class CONTENT_EXPORT IndexedDBBackingStore
LevelDBTransaction* transaction() { return transaction_.get(); }
leveldb::Status GetBlobInfoForRecord(
- int64 database_id,
+ int64_t database_id,
const std::string& object_store_data_key,
IndexedDBValue* value);
@@ -212,7 +215,7 @@ class CONTENT_EXPORT IndexedDBBackingStore
// TODO(ericu): Add a reason in the event of failure.
virtual void ReportWriteCompletion(bool succeeded,
- int64 bytes_written) = 0;
+ int64_t bytes_written) = 0;
virtual void Abort() = 0;
@@ -257,7 +260,7 @@ class CONTENT_EXPORT IndexedDBBackingStore
scoped_refptr<LevelDBTransaction> transaction_;
BlobChangeMap blob_change_map_;
BlobChangeMap incognito_blob_map_;
- int64 database_id_;
+ int64_t database_id_;
// List of blob files being newly written as part of this transaction.
// These will be added to the primary blob journal prior to commit, then
@@ -285,9 +288,9 @@ class CONTENT_EXPORT IndexedDBBackingStore
struct CursorOptions {
CursorOptions();
~CursorOptions();
- int64 database_id;
- int64 object_store_id;
- int64 index_id;
+ int64_t database_id;
+ int64_t object_store_id;
+ int64_t index_id;
std::string low_key;
bool low_open;
std::string high_key;
@@ -307,7 +310,7 @@ class CONTENT_EXPORT IndexedDBBackingStore
const IndexedDBKey* primary_key,
IteratorState state,
leveldb::Status*);
- bool Advance(uint32 count, leveldb::Status*);
+ bool Advance(uint32_t count, leveldb::Status*);
bool FirstSeek(leveldb::Status*);
virtual Cursor* Clone() = 0;
@@ -319,7 +322,7 @@ class CONTENT_EXPORT IndexedDBBackingStore
protected:
Cursor(scoped_refptr<IndexedDBBackingStore> backing_store,
Transaction* transaction,
- int64 database_id,
+ int64_t database_id,
const CursorOptions& cursor_options);
explicit Cursor(const IndexedDBBackingStore::Cursor* other);
@@ -332,7 +335,7 @@ class CONTENT_EXPORT IndexedDBBackingStore
IndexedDBBackingStore* backing_store_;
Transaction* transaction_;
- int64 database_id_;
+ int64_t database_id_;
const CursorOptions cursor_options_;
scoped_ptr<LevelDBIterator> iterator_;
scoped_ptr<IndexedDBKey> current_key_;
@@ -408,12 +411,12 @@ class CONTENT_EXPORT IndexedDBBackingStore
virtual leveldb::Status CreateIDBDatabaseMetaData(
const base::string16& name,
const base::string16& version,
- int64 int_version,
- int64* row_id);
+ int64_t int_version,
+ int64_t* row_id);
virtual bool UpdateIDBDatabaseIntVersion(
IndexedDBBackingStore::Transaction* transaction,
- int64 row_id,
- int64 int_version);
+ int64_t row_id,
+ int64_t int_version);
virtual leveldb::Status DeleteDatabase(const base::string16& name);
// Assumes caller has already closed the backing store.
@@ -423,136 +426,136 @@ class CONTENT_EXPORT IndexedDBBackingStore
const GURL& origin_url,
const std::string& message);
leveldb::Status GetObjectStores(
- int64 database_id,
+ int64_t database_id,
IndexedDBDatabaseMetadata::ObjectStoreMap* map) WARN_UNUSED_RESULT;
virtual leveldb::Status CreateObjectStore(
IndexedDBBackingStore::Transaction* transaction,
- int64 database_id,
- int64 object_store_id,
+ int64_t database_id,
+ int64_t object_store_id,
const base::string16& name,
const IndexedDBKeyPath& key_path,
bool auto_increment);
virtual leveldb::Status DeleteObjectStore(
IndexedDBBackingStore::Transaction* transaction,
- int64 database_id,
- int64 object_store_id) WARN_UNUSED_RESULT;
+ int64_t database_id,
+ int64_t object_store_id) WARN_UNUSED_RESULT;
virtual leveldb::Status GetRecord(
IndexedDBBackingStore::Transaction* transaction,
- int64 database_id,
- int64 object_store_id,
+ int64_t database_id,
+ int64_t object_store_id,
const IndexedDBKey& key,
IndexedDBValue* record) WARN_UNUSED_RESULT;
virtual leveldb::Status PutRecord(
IndexedDBBackingStore::Transaction* transaction,
- int64 database_id,
- int64 object_store_id,
+ int64_t database_id,
+ int64_t object_store_id,
const IndexedDBKey& key,
IndexedDBValue* value,
ScopedVector<storage::BlobDataHandle>* handles,
RecordIdentifier* record) WARN_UNUSED_RESULT;
virtual leveldb::Status ClearObjectStore(
IndexedDBBackingStore::Transaction* transaction,
- int64 database_id,
- int64 object_store_id) WARN_UNUSED_RESULT;
+ int64_t database_id,
+ int64_t object_store_id) WARN_UNUSED_RESULT;
virtual leveldb::Status DeleteRecord(
IndexedDBBackingStore::Transaction* transaction,
- int64 database_id,
- int64 object_store_id,
+ int64_t database_id,
+ int64_t object_store_id,
const RecordIdentifier& record) WARN_UNUSED_RESULT;
virtual leveldb::Status DeleteRange(
IndexedDBBackingStore::Transaction* transaction,
- int64 database_id,
- int64 object_store_id,
+ int64_t database_id,
+ int64_t object_store_id,
const IndexedDBKeyRange&) WARN_UNUSED_RESULT;
virtual leveldb::Status GetKeyGeneratorCurrentNumber(
IndexedDBBackingStore::Transaction* transaction,
- int64 database_id,
- int64 object_store_id,
- int64* current_number) WARN_UNUSED_RESULT;
+ int64_t database_id,
+ int64_t object_store_id,
+ int64_t* current_number) WARN_UNUSED_RESULT;
virtual leveldb::Status MaybeUpdateKeyGeneratorCurrentNumber(
IndexedDBBackingStore::Transaction* transaction,
- int64 database_id,
- int64 object_store_id,
- int64 new_state,
+ int64_t database_id,
+ int64_t object_store_id,
+ int64_t new_state,
bool check_current) WARN_UNUSED_RESULT;
virtual leveldb::Status KeyExistsInObjectStore(
IndexedDBBackingStore::Transaction* transaction,
- int64 database_id,
- int64 object_store_id,
+ int64_t database_id,
+ int64_t object_store_id,
const IndexedDBKey& key,
RecordIdentifier* found_record_identifier,
bool* found) WARN_UNUSED_RESULT;
virtual leveldb::Status CreateIndex(
IndexedDBBackingStore::Transaction* transaction,
- int64 database_id,
- int64 object_store_id,
- int64 index_id,
+ int64_t database_id,
+ int64_t object_store_id,
+ int64_t index_id,
const base::string16& name,
const IndexedDBKeyPath& key_path,
bool is_unique,
bool is_multi_entry) WARN_UNUSED_RESULT;
virtual leveldb::Status DeleteIndex(
IndexedDBBackingStore::Transaction* transaction,
- int64 database_id,
- int64 object_store_id,
- int64 index_id) WARN_UNUSED_RESULT;
+ int64_t database_id,
+ int64_t object_store_id,
+ int64_t index_id) WARN_UNUSED_RESULT;
virtual leveldb::Status PutIndexDataForRecord(
IndexedDBBackingStore::Transaction* transaction,
- int64 database_id,
- int64 object_store_id,
- int64 index_id,
+ int64_t database_id,
+ int64_t object_store_id,
+ int64_t index_id,
const IndexedDBKey& key,
const RecordIdentifier& record) WARN_UNUSED_RESULT;
virtual leveldb::Status GetPrimaryKeyViaIndex(
IndexedDBBackingStore::Transaction* transaction,
- int64 database_id,
- int64 object_store_id,
- int64 index_id,
+ int64_t database_id,
+ int64_t object_store_id,
+ int64_t index_id,
const IndexedDBKey& key,
scoped_ptr<IndexedDBKey>* primary_key) WARN_UNUSED_RESULT;
virtual leveldb::Status KeyExistsInIndex(
IndexedDBBackingStore::Transaction* transaction,
- int64 database_id,
- int64 object_store_id,
- int64 index_id,
+ int64_t database_id,
+ int64_t object_store_id,
+ int64_t index_id,
const IndexedDBKey& key,
scoped_ptr<IndexedDBKey>* found_primary_key,
bool* exists) WARN_UNUSED_RESULT;
// Public for IndexedDBActiveBlobRegistry::ReleaseBlobRef.
- virtual void ReportBlobUnused(int64 database_id, int64 blob_key);
+ virtual void ReportBlobUnused(int64_t database_id, int64_t blob_key);
- base::FilePath GetBlobFileName(int64 database_id, int64 key) const;
+ base::FilePath GetBlobFileName(int64_t database_id, int64_t key) const;
virtual scoped_ptr<Cursor> OpenObjectStoreKeyCursor(
IndexedDBBackingStore::Transaction* transaction,
- int64 database_id,
- int64 object_store_id,
+ int64_t database_id,
+ int64_t object_store_id,
const IndexedDBKeyRange& key_range,
blink::WebIDBCursorDirection,
leveldb::Status*);
virtual scoped_ptr<Cursor> OpenObjectStoreCursor(
IndexedDBBackingStore::Transaction* transaction,
- int64 database_id,
- int64 object_store_id,
+ int64_t database_id,
+ int64_t object_store_id,
const IndexedDBKeyRange& key_range,
blink::WebIDBCursorDirection,
leveldb::Status*);
virtual scoped_ptr<Cursor> OpenIndexKeyCursor(
IndexedDBBackingStore::Transaction* transaction,
- int64 database_id,
- int64 object_store_id,
- int64 index_id,
+ int64_t database_id,
+ int64_t object_store_id,
+ int64_t index_id,
const IndexedDBKeyRange& key_range,
blink::WebIDBCursorDirection,
leveldb::Status*);
virtual scoped_ptr<Cursor> OpenIndexCursor(
IndexedDBBackingStore::Transaction* transaction,
- int64 database_id,
- int64 object_store_id,
- int64 index_id,
+ int64_t database_id,
+ int64_t object_store_id,
+ int64_t index_id,
const IndexedDBKeyRange& key_range,
blink::WebIDBCursorDirection,
leveldb::Status*);
@@ -574,12 +577,12 @@ class CONTENT_EXPORT IndexedDBBackingStore
leveldb::Status SetUpMetadata();
virtual bool WriteBlobFile(
- int64 database_id,
+ int64_t database_id,
const Transaction::WriteDescriptor& descriptor,
Transaction::ChainedBlobWriter* chained_blob_writer);
// Remove the referenced file on disk.
- virtual bool RemoveBlobFile(int64 database_id, int64 key) const;
+ virtual bool RemoveBlobFile(int64_t database_id, int64_t key) const;
// Schedule a call to CleanPrimaryJournalIgnoreReturn() via
// an owned timer. If this object is destroyed, the timer
@@ -609,20 +612,20 @@ class CONTENT_EXPORT IndexedDBBackingStore
leveldb::Status FindKeyInIndex(
IndexedDBBackingStore::Transaction* transaction,
- int64 database_id,
- int64 object_store_id,
- int64 index_id,
+ int64_t database_id,
+ int64_t object_store_id,
+ int64_t index_id,
const IndexedDBKey& key,
std::string* found_encoded_primary_key,
bool* found);
- leveldb::Status GetIndexes(int64 database_id,
- int64 object_store_id,
+ leveldb::Status GetIndexes(int64_t database_id,
+ int64_t object_store_id,
IndexedDBObjectStoreMetadata::IndexMap* map)
WARN_UNUSED_RESULT;
// Remove the blob directory for the specified database and all contained
// blob files.
- bool RemoveBlobDirectory(int64 database_id) const;
+ bool RemoveBlobDirectory(int64_t database_id) const;
// Synchronously read the key-specified blob journal entry from the backing
// store, delete all referenced blob files, and erase the journal entry.
diff --git a/content/browser/indexed_db/indexed_db_backing_store_unittest.cc b/content/browser/indexed_db/indexed_db_backing_store_unittest.cc
index 09f1fa2..ce04ded 100644
--- a/content/browser/indexed_db/indexed_db_backing_store_unittest.cc
+++ b/content/browser/indexed_db/indexed_db_backing_store_unittest.cc
@@ -4,6 +4,9 @@
#include "content/browser/indexed_db/indexed_db_backing_store.h"
+#include <stddef.h>
+#include <stdint.h>
+
#include "base/callback.h"
#include "base/files/file_util.h"
#include "base/files/scoped_temp_dir.h"
@@ -109,14 +112,14 @@ class TestableIndexedDBBackingStore : public IndexedDBBackingStore {
return writes_;
}
void ClearWrites() { writes_.clear(); }
- const std::vector<int64>& removals() const { return removals_; }
+ const std::vector<int64_t>& removals() const { return removals_; }
void ClearRemovals() { removals_.clear(); }
protected:
~TestableIndexedDBBackingStore() override {}
bool WriteBlobFile(
- int64 database_id,
+ int64_t database_id,
const Transaction::WriteDescriptor& descriptor,
Transaction::ChainedBlobWriter* chained_blob_writer) override {
if (KeyPrefix::IsValidDatabaseId(database_id_)) {
@@ -136,7 +139,7 @@ class TestableIndexedDBBackingStore : public IndexedDBBackingStore {
return true;
}
- bool RemoveBlobFile(int64 database_id, int64 key) const override {
+ bool RemoveBlobFile(int64_t database_id, int64_t key) const override {
if (database_id_ != database_id ||
!KeyPrefix::IsValidDatabaseId(database_id)) {
return false;
@@ -167,12 +170,12 @@ class TestableIndexedDBBackingStore : public IndexedDBBackingStore {
task_runner),
database_id_(0) {}
- int64 database_id_;
+ int64_t database_id_;
std::vector<Transaction::WriteDescriptor> writes_;
// This is modified in an overridden virtual function that is properly const
// in the real implementation, therefore must be mutable here.
- mutable std::vector<int64> removals_;
+ mutable std::vector<int64_t> removals_;
DISALLOW_COPY_AND_ASSIGN(TestableIndexedDBBackingStore);
};
@@ -295,7 +298,7 @@ class IndexedDBBackingStoreTest : public testing::Test {
const std::vector<IndexedDBBlobInfo>& reads) const {
if (backing_store_->writes().size() != reads.size())
return false;
- std::set<int64> ids;
+ std::set<int64_t> ids;
for (size_t i = 0; i < backing_store_->writes().size(); ++i)
ids.insert(backing_store_->writes()[i].key());
if (ids.size() != backing_store_->writes().size())
@@ -753,12 +756,12 @@ TEST_F(IndexedDBBackingStoreTest, LiveBlobJournal) {
// Make sure that using very high ( more than 32 bit ) values for database_id
// and object_store_id still work.
TEST_F(IndexedDBBackingStoreTest, HighIds) {
- const int64 high_database_id = 1ULL << 35;
- const int64 high_object_store_id = 1ULL << 39;
+ const int64_t high_database_id = 1ULL << 35;
+ const int64_t high_object_store_id = 1ULL << 39;
// index_ids are capped at 32 bits for storage purposes.
- const int64 high_index_id = 1ULL << 29;
+ const int64_t high_index_id = 1ULL << 29;
- const int64 invalid_high_index_id = 1ULL << 37;
+ const int64_t invalid_high_index_id = 1ULL << 37;
const IndexedDBKey& index_key = m_key2;
std::string index_key_raw;
@@ -845,10 +848,11 @@ TEST_F(IndexedDBBackingStoreTest, HighIds) {
// Make sure that other invalid ids do not crash.
TEST_F(IndexedDBBackingStoreTest, InvalidIds) {
// valid ids for use when testing invalid ids
- const int64 database_id = 1;
- const int64 object_store_id = 1;
- const int64 index_id = kMinimumIndexId;
- const int64 invalid_low_index_id = 19; // index_ids must be > kMinimumIndexId
+ const int64_t database_id = 1;
+ const int64_t object_store_id = 1;
+ const int64_t index_id = kMinimumIndexId;
+ const int64_t invalid_low_index_id =
+ 19; // index_ids must be > kMinimumIndexId
IndexedDBValue result_value;
@@ -933,17 +937,17 @@ TEST_F(IndexedDBBackingStoreTest, InvalidIds) {
TEST_F(IndexedDBBackingStoreTest, CreateDatabase) {
const base::string16 database_name(ASCIIToUTF16("db1"));
- int64 database_id;
+ int64_t database_id;
const base::string16 version(ASCIIToUTF16("old_string_version"));
- const int64 int_version = 9;
+ const int64_t int_version = 9;
- const int64 object_store_id = 99;
+ const int64_t object_store_id = 99;
const base::string16 object_store_name(ASCIIToUTF16("object_store1"));
const bool auto_increment = true;
const IndexedDBKeyPath object_store_key_path(
ASCIIToUTF16("object_store_key"));
- const int64 index_id = 999;
+ const int64_t index_id = 999;
const base::string16 index_name(ASCIIToUTF16("index1"));
const bool unique = true;
const bool multi_entry = true;
@@ -1021,14 +1025,14 @@ TEST_F(IndexedDBBackingStoreTest, GetDatabaseNames) {
const base::string16 string_version(ASCIIToUTF16("string_version"));
const base::string16 db1_name(ASCIIToUTF16("db1"));
- const int64 db1_version = 1LL;
- int64 db1_id;
+ const int64_t db1_version = 1LL;
+ int64_t db1_id;
// Database records with DEFAULT_INT_VERSION represent stale data,
// and should not be enumerated.
const base::string16 db2_name(ASCIIToUTF16("db2"));
- const int64 db2_version = IndexedDBDatabaseMetadata::DEFAULT_INT_VERSION;
- int64 db2_id;
+ const int64_t db2_version = IndexedDBDatabaseMetadata::DEFAULT_INT_VERSION;
+ int64_t db2_id;
leveldb::Status s = backing_store_->CreateIDBDatabaseMetaData(
db1_name, string_version, db1_version, &db1_id);
diff --git a/content/browser/indexed_db/indexed_db_blob_info.cc b/content/browser/indexed_db/indexed_db_blob_info.cc
index d61de75..a2308c4 100644
--- a/content/browser/indexed_db/indexed_db_blob_info.cc
+++ b/content/browser/indexed_db/indexed_db_blob_info.cc
@@ -16,19 +16,17 @@ IndexedDBBlobInfo::IndexedDBBlobInfo()
IndexedDBBlobInfo::IndexedDBBlobInfo(const std::string& uuid,
const base::string16& type,
- int64 size)
+ int64_t size)
: is_file_(false),
uuid_(uuid),
type_(type),
size_(size),
- key_(DatabaseMetaDataKey::kInvalidBlobKey) {
-}
+ key_(DatabaseMetaDataKey::kInvalidBlobKey) {}
IndexedDBBlobInfo::IndexedDBBlobInfo(const base::string16& type,
- int64 size,
- int64 key)
- : is_file_(false), type_(type), size_(size), key_(key) {
-}
+ int64_t size,
+ int64_t key)
+ : is_file_(false), type_(type), size_(size), key_(key) {}
IndexedDBBlobInfo::IndexedDBBlobInfo(const std::string& uuid,
const base::FilePath& file_path,
@@ -43,11 +41,14 @@ IndexedDBBlobInfo::IndexedDBBlobInfo(const std::string& uuid,
key_(DatabaseMetaDataKey::kInvalidBlobKey) {
}
-IndexedDBBlobInfo::IndexedDBBlobInfo(int64 key,
+IndexedDBBlobInfo::IndexedDBBlobInfo(int64_t key,
const base::string16& type,
const base::string16& file_name)
- : is_file_(true), type_(type), size_(-1), file_name_(file_name), key_(key) {
-}
+ : is_file_(true),
+ type_(type),
+ size_(-1),
+ file_name_(file_name),
+ key_(key) {}
IndexedDBBlobInfo::IndexedDBBlobInfo(const IndexedDBBlobInfo& other) = default;
@@ -56,7 +57,7 @@ IndexedDBBlobInfo::~IndexedDBBlobInfo() = default;
IndexedDBBlobInfo& IndexedDBBlobInfo::operator=(
const IndexedDBBlobInfo& other) = default;
-void IndexedDBBlobInfo::set_size(int64 size) {
+void IndexedDBBlobInfo::set_size(int64_t size) {
DCHECK_EQ(-1, size_);
size_ = size;
}
@@ -78,7 +79,7 @@ void IndexedDBBlobInfo::set_last_modified(const base::Time& time) {
last_modified_ = time;
}
-void IndexedDBBlobInfo::set_key(int64 key) {
+void IndexedDBBlobInfo::set_key(int64_t key) {
DCHECK_EQ(DatabaseMetaDataKey::kInvalidBlobKey, key_);
key_ = key;
}
diff --git a/content/browser/indexed_db/indexed_db_blob_info.h b/content/browser/indexed_db/indexed_db_blob_info.h
index 60da707..c54e065 100644
--- a/content/browser/indexed_db/indexed_db_blob_info.h
+++ b/content/browser/indexed_db/indexed_db_blob_info.h
@@ -5,6 +5,8 @@
#ifndef CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_BLOB_INFO_H_
#define CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_BLOB_INFO_H_
+#include <stdint.h>
+
#include <string>
#include "base/callback.h"
@@ -22,14 +24,14 @@ class CONTENT_EXPORT IndexedDBBlobInfo {
// These two are used for Blobs.
IndexedDBBlobInfo(const std::string& uuid,
const base::string16& type,
- int64 size);
- IndexedDBBlobInfo(const base::string16& type, int64 size, int64 key);
+ int64_t size);
+ IndexedDBBlobInfo(const base::string16& type, int64_t size, int64_t key);
// These two are used for Files.
IndexedDBBlobInfo(const std::string& uuid,
const base::FilePath& file_path,
const base::string16& file_name,
const base::string16& type);
- IndexedDBBlobInfo(int64 key,
+ IndexedDBBlobInfo(int64_t key,
const base::string16& type,
const base::string16& file_name);
@@ -40,9 +42,9 @@ class CONTENT_EXPORT IndexedDBBlobInfo {
bool is_file() const { return is_file_; }
const std::string& uuid() const { return uuid_; }
const base::string16& type() const { return type_; }
- int64 size() const { return size_; }
+ int64_t size() const { return size_; }
const base::string16& file_name() const { return file_name_; }
- int64 key() const { return key_; }
+ int64_t key() const { return key_; }
const base::FilePath& file_path() const { return file_path_; }
const base::Time& last_modified() const { return last_modified_; }
const base::Closure& mark_used_callback() const {
@@ -50,11 +52,11 @@ class CONTENT_EXPORT IndexedDBBlobInfo {
}
const ReleaseCallback& release_callback() const { return release_callback_; }
- void set_size(int64 size);
+ void set_size(int64_t size);
void set_uuid(const std::string& uuid);
void set_file_path(const base::FilePath& file_path);
void set_last_modified(const base::Time& time);
- void set_key(int64 key);
+ void set_key(int64_t key);
void set_mark_used_callback(const base::Closure& mark_used_callback);
void set_release_callback(const ReleaseCallback& release_callback);
@@ -62,13 +64,13 @@ class CONTENT_EXPORT IndexedDBBlobInfo {
bool is_file_;
std::string uuid_; // Always for Blob; sometimes for File.
base::string16 type_; // Mime type.
- int64 size_; // -1 if unknown for File.
+ int64_t size_; // -1 if unknown for File.
base::string16 file_name_; // Only for File.
base::FilePath file_path_; // Only for File.
base::Time last_modified_; // Only for File; valid only if size is.
// Valid only when this comes out of the database.
- int64 key_;
+ int64_t key_;
base::Closure mark_used_callback_;
ReleaseCallback release_callback_;
};
diff --git a/content/browser/indexed_db/indexed_db_browsertest.cc b/content/browser/indexed_db/indexed_db_browsertest.cc
index bafe726..171753e 100644
--- a/content/browser/indexed_db/indexed_db_browsertest.cc
+++ b/content/browser/indexed_db/indexed_db_browsertest.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/command_line.h"
#include "base/files/file.h"
@@ -10,10 +13,12 @@
#include "base/files/file_util.h"
#include "base/lazy_instance.h"
#include "base/location.h"
+#include "base/macros.h"
#include "base/memory/ref_counted.h"
#include "base/single_thread_task_runner.h"
#include "base/strings/utf_string_conversions.h"
#include "base/test/thread_test_helper.h"
+#include "build/build_config.h"
#include "content/browser/browser_main_loop.h"
#include "content/browser/indexed_db/indexed_db_class_factory.h"
#include "content/browser/indexed_db/indexed_db_context_impl.h"
@@ -120,7 +125,7 @@ class IndexedDBBrowserTest : public ContentBrowserTest,
shell()->web_contents()->GetBrowserContext())->GetQuotaManager());
}
- static void SetTempQuota(int64 bytes, scoped_refptr<QuotaManager> qm) {
+ static void SetTempQuota(int64_t bytes, scoped_refptr<QuotaManager> qm) {
if (!BrowserThread::CurrentlyOn(BrowserThread::IO)) {
BrowserThread::PostTask(
BrowserThread::IO, FROM_HERE,
@@ -135,7 +140,7 @@ class IndexedDBBrowserTest : public ContentBrowserTest,
ASSERT_TRUE(helper->Run());
}
- virtual int64 RequestDiskUsage() {
+ virtual int64_t RequestDiskUsage() {
PostTaskAndReplyWithResult(
GetContext()->TaskRunner(),
FROM_HERE,
@@ -176,13 +181,11 @@ class IndexedDBBrowserTest : public ContentBrowserTest,
return GetTestClassFactory();
}
- virtual void DidGetDiskUsage(int64 bytes) {
- disk_usage_ = bytes;
- }
+ virtual void DidGetDiskUsage(int64_t bytes) { disk_usage_ = bytes; }
virtual void DidGetBlobFileCount(int count) { blob_file_count_ = count; }
- int64 disk_usage_;
+ int64_t disk_usage_;
int blob_file_count_ = 0;
DISALLOW_COPY_AND_ASSIGN(IndexedDBBrowserTest);
@@ -352,10 +355,10 @@ class IndexedDBBrowserTestWithVersion123456Schema : public
IN_PROC_BROWSER_TEST_F(IndexedDBBrowserTestWithVersion123456Schema,
DestroyTest) {
- int64 original_size = RequestDiskUsage();
+ int64_t original_size = RequestDiskUsage();
EXPECT_GT(original_size, 0);
SimpleTest(GetTestUrl("indexeddb", "open_bad_db.html"));
- int64 new_size = RequestDiskUsage();
+ int64_t new_size = RequestDiskUsage();
EXPECT_GT(new_size, 0);
EXPECT_NE(original_size, new_size);
}
@@ -367,10 +370,10 @@ class IndexedDBBrowserTestWithVersion987654SSVData : public
IN_PROC_BROWSER_TEST_F(IndexedDBBrowserTestWithVersion987654SSVData,
DestroyTest) {
- int64 original_size = RequestDiskUsage();
+ int64_t original_size = RequestDiskUsage();
EXPECT_GT(original_size, 0);
SimpleTest(GetTestUrl("indexeddb", "open_bad_db.html"));
- int64 new_size = RequestDiskUsage();
+ int64_t new_size = RequestDiskUsage();
EXPECT_GT(new_size, 0);
EXPECT_NE(original_size, new_size);
}
@@ -382,10 +385,10 @@ class IndexedDBBrowserTestWithCorruptLevelDB : public
IN_PROC_BROWSER_TEST_F(IndexedDBBrowserTestWithCorruptLevelDB,
DestroyTest) {
- int64 original_size = RequestDiskUsage();
+ int64_t original_size = RequestDiskUsage();
EXPECT_GT(original_size, 0);
SimpleTest(GetTestUrl("indexeddb", "open_bad_db.html"));
- int64 new_size = RequestDiskUsage();
+ int64_t new_size = RequestDiskUsage();
EXPECT_GT(new_size, 0);
EXPECT_NE(original_size, new_size);
}
@@ -397,10 +400,10 @@ class IndexedDBBrowserTestWithMissingSSTFile : public
IN_PROC_BROWSER_TEST_F(IndexedDBBrowserTestWithMissingSSTFile,
DestroyTest) {
- int64 original_size = RequestDiskUsage();
+ int64_t original_size = RequestDiskUsage();
EXPECT_GT(original_size, 0);
SimpleTest(GetTestUrl("indexeddb", "open_missing_table.html"));
- int64 new_size = RequestDiskUsage();
+ int64_t new_size = RequestDiskUsage();
EXPECT_GT(new_size, 0);
EXPECT_NE(original_size, new_size);
}
@@ -412,14 +415,14 @@ IN_PROC_BROWSER_TEST_F(IndexedDBBrowserTest, LevelDBLogFileTest) {
base::FilePath log_file(FILE_PATH_LITERAL("LOG"));
base::FilePath log_file_path =
GetContext()->data_path().Append(leveldb_dir).Append(log_file);
- int64 size;
+ int64_t size;
EXPECT_TRUE(base::GetFileSize(log_file_path, &size));
EXPECT_GT(size, 0);
}
IN_PROC_BROWSER_TEST_F(IndexedDBBrowserTest, CanDeleteWhenOverQuotaTest) {
SimpleTest(GetTestUrl("indexeddb", "fill_up_5k.html"));
- int64 size = RequestDiskUsage();
+ int64_t size = RequestDiskUsage();
const int kQuotaKilobytes = 2;
EXPECT_GT(size, kQuotaKilobytes * 1024);
SetQuota(kQuotaKilobytes);
@@ -481,7 +484,7 @@ IN_PROC_BROWSER_TEST_F(IndexedDBBrowserTest, BlobsCountAgainstQuota) {
IN_PROC_BROWSER_TEST_F(IndexedDBBrowserTest, DeleteForOriginDeletesBlobs) {
SimpleTest(GetTestUrl("indexeddb", "write_20mb_blob.html"));
- int64 size = RequestDiskUsage();
+ int64_t size = RequestDiskUsage();
// This assertion assumes that we do not compress blobs.
EXPECT_GT(size, 20 << 20 /* 20 MB */);
GetContext()->TaskRunner()->PostTask(
@@ -551,7 +554,7 @@ static void CorruptIndexedDBDatabase(
idb_data_path, recursive, base::FileEnumerator::FILES);
for (base::FilePath idb_file = enumerator.Next(); !idb_file.empty();
idb_file = enumerator.Next()) {
- int64 size(0);
+ int64_t size(0);
GetFileSize(idb_file, &size);
if (idb_file.Extension() == FILE_PATH_LITERAL(".ldb")) {
@@ -724,11 +727,11 @@ IN_PROC_BROWSER_TEST_F(IndexedDBBrowserTest,
DeleteCompactsBackingStore) {
const GURL test_url = GetTestUrl("indexeddb", "delete_compact.html");
SimpleTest(GURL(test_url.spec() + "#fill"));
- int64 after_filling = RequestDiskUsage();
+ int64_t after_filling = RequestDiskUsage();
EXPECT_GT(after_filling, 0);
SimpleTest(GURL(test_url.spec() + "#purge"));
- int64 after_deleting = RequestDiskUsage();
+ int64_t after_deleting = RequestDiskUsage();
EXPECT_LT(after_deleting, after_filling);
// The above tests verify basic assertions - that filling writes data and
diff --git a/content/browser/indexed_db/indexed_db_callbacks.cc b/content/browser/indexed_db/indexed_db_callbacks.cc
index 16bb523..6a5ca73 100644
--- a/content/browser/indexed_db/indexed_db_callbacks.cc
+++ b/content/browser/indexed_db/indexed_db_callbacks.cc
@@ -4,6 +4,8 @@
#include "content/browser/indexed_db/indexed_db_callbacks.h"
+#include <stddef.h>
+
#include <algorithm>
#include "base/metrics/histogram.h"
@@ -32,14 +34,14 @@ using storage::ShareableFileReference;
namespace content {
namespace {
-const int32 kNoCursor = -1;
-const int32 kNoDatabaseCallbacks = -1;
-const int64 kNoTransaction = -1;
+const int32_t kNoCursor = -1;
+const int32_t kNoDatabaseCallbacks = -1;
+const int64_t kNoTransaction = -1;
}
IndexedDBCallbacks::IndexedDBCallbacks(IndexedDBDispatcherHost* dispatcher_host,
- int32 ipc_thread_id,
- int32 ipc_callbacks_id)
+ int32_t ipc_thread_id,
+ int32_t ipc_callbacks_id)
: dispatcher_host_(dispatcher_host),
ipc_callbacks_id_(ipc_callbacks_id),
ipc_thread_id_(ipc_thread_id),
@@ -48,13 +50,12 @@ IndexedDBCallbacks::IndexedDBCallbacks(IndexedDBDispatcherHost* dispatcher_host,
ipc_database_id_(kNoDatabase),
ipc_database_callbacks_id_(kNoDatabaseCallbacks),
data_loss_(blink::WebIDBDataLossNone),
- sent_blocked_(false) {
-}
+ sent_blocked_(false) {}
IndexedDBCallbacks::IndexedDBCallbacks(IndexedDBDispatcherHost* dispatcher_host,
- int32 ipc_thread_id,
- int32 ipc_callbacks_id,
- int32 ipc_cursor_id)
+ int32_t ipc_thread_id,
+ int32_t ipc_callbacks_id,
+ int32_t ipc_cursor_id)
: dispatcher_host_(dispatcher_host),
ipc_callbacks_id_(ipc_callbacks_id),
ipc_thread_id_(ipc_thread_id),
@@ -63,14 +64,13 @@ IndexedDBCallbacks::IndexedDBCallbacks(IndexedDBDispatcherHost* dispatcher_host,
ipc_database_id_(kNoDatabase),
ipc_database_callbacks_id_(kNoDatabaseCallbacks),
data_loss_(blink::WebIDBDataLossNone),
- sent_blocked_(false) {
-}
+ sent_blocked_(false) {}
IndexedDBCallbacks::IndexedDBCallbacks(IndexedDBDispatcherHost* dispatcher_host,
- int32 ipc_thread_id,
- int32 ipc_callbacks_id,
- int32 ipc_database_callbacks_id,
- int64 host_transaction_id,
+ int32_t ipc_thread_id,
+ int32_t ipc_callbacks_id,
+ int32_t ipc_database_callbacks_id,
+ int64_t host_transaction_id,
const GURL& origin_url)
: dispatcher_host_(dispatcher_host),
ipc_callbacks_id_(ipc_callbacks_id),
@@ -81,8 +81,7 @@ IndexedDBCallbacks::IndexedDBCallbacks(IndexedDBDispatcherHost* dispatcher_host,
ipc_database_id_(kNoDatabase),
ipc_database_callbacks_id_(ipc_database_callbacks_id),
data_loss_(blink::WebIDBDataLossNone),
- sent_blocked_(false) {
-}
+ sent_blocked_(false) {}
IndexedDBCallbacks::~IndexedDBCallbacks() {}
@@ -119,7 +118,7 @@ void IndexedDBCallbacks::OnSuccess(const std::vector<base::string16>& value) {
dispatcher_host_ = NULL;
}
-void IndexedDBCallbacks::OnBlocked(int64 existing_version) {
+void IndexedDBCallbacks::OnBlocked(int64_t existing_version) {
DCHECK(dispatcher_host_.get());
DCHECK_EQ(kNoCursor, ipc_cursor_id_);
@@ -151,7 +150,7 @@ void IndexedDBCallbacks::OnDataLoss(blink::WebIDBDataLoss data_loss,
}
void IndexedDBCallbacks::OnUpgradeNeeded(
- int64 old_version,
+ int64_t old_version,
scoped_ptr<IndexedDBConnection> connection,
const IndexedDBDatabaseMetadata& metadata) {
DCHECK(dispatcher_host_.get());
@@ -162,7 +161,7 @@ void IndexedDBCallbacks::OnUpgradeNeeded(
DCHECK_NE(kNoDatabaseCallbacks, ipc_database_callbacks_id_);
dispatcher_host_->RegisterTransactionId(host_transaction_id_, origin_url_);
- int32 ipc_database_id =
+ int32_t ipc_database_id =
dispatcher_host_->Add(connection.release(), ipc_thread_id_, origin_url_);
if (ipc_database_id < 0)
return;
@@ -197,7 +196,7 @@ void IndexedDBCallbacks::OnSuccess(scoped_ptr<IndexedDBConnection> connection,
scoped_refptr<IndexedDBCallbacks> self(this);
- int32 ipc_object_id = kNoDatabase;
+ int32_t ipc_object_id = kNoDatabase;
// Only register if the connection was not previously sent in OnUpgradeNeeded.
if (ipc_database_id_ == kNoDatabase) {
ipc_object_id = dispatcher_host_->Add(
@@ -348,7 +347,7 @@ void IndexedDBCallbacks::OnSuccess(scoped_refptr<IndexedDBCursor> cursor,
DCHECK_EQ(kNoDatabaseCallbacks, ipc_database_callbacks_id_);
DCHECK_EQ(blink::WebIDBDataLossNone, data_loss_);
- int32 ipc_object_id = dispatcher_host_->Add(cursor.get());
+ int32_t ipc_object_id = dispatcher_host_->Add(cursor.get());
scoped_ptr<IndexedDBMsg_CallbacksSuccessIDBCursor_Params> params(
new IndexedDBMsg_CallbacksSuccessIDBCursor_Params());
params->ipc_thread_id = ipc_thread_id_;
@@ -581,7 +580,7 @@ void IndexedDBCallbacks::OnSuccess(const IndexedDBKey& value) {
dispatcher_host_ = NULL;
}
-void IndexedDBCallbacks::OnSuccess(int64 value) {
+void IndexedDBCallbacks::OnSuccess(int64_t value) {
DCHECK(dispatcher_host_.get());
DCHECK_EQ(kNoCursor, ipc_cursor_id_);
diff --git a/content/browser/indexed_db/indexed_db_callbacks.h b/content/browser/indexed_db/indexed_db_callbacks.h
index ed61f79..df10238 100644
--- a/content/browser/indexed_db/indexed_db_callbacks.h
+++ b/content/browser/indexed_db/indexed_db_callbacks.h
@@ -5,11 +5,13 @@
#ifndef CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_CALLBACKS_H_
#define CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_CALLBACKS_H_
+#include <stdint.h>
+
#include <string>
#include <vector>
-#include "base/basictypes.h"
#include "base/logging.h"
+#include "base/macros.h"
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
#include "base/strings/string16.h"
@@ -34,21 +36,21 @@ class CONTENT_EXPORT IndexedDBCallbacks
public:
// Simple payload responses
IndexedDBCallbacks(IndexedDBDispatcherHost* dispatcher_host,
- int32 ipc_thread_id,
- int32 ipc_callbacks_id);
+ int32_t ipc_thread_id,
+ int32_t ipc_callbacks_id);
// IndexedDBCursor responses
IndexedDBCallbacks(IndexedDBDispatcherHost* dispatcher_host,
- int32 ipc_thread_id,
- int32 ipc_callbacks_id,
- int32 ipc_cursor_id);
+ int32_t ipc_thread_id,
+ int32_t ipc_callbacks_id,
+ int32_t ipc_cursor_id);
// IndexedDBDatabase responses
IndexedDBCallbacks(IndexedDBDispatcherHost* dispatcher_host,
- int32 ipc_thread_id,
- int32 ipc_callbacks_id,
- int32 ipc_database_callbacks_id,
- int64 host_transaction_id,
+ int32_t ipc_thread_id,
+ int32_t ipc_callbacks_id,
+ int32_t ipc_database_callbacks_id,
+ int64_t host_transaction_id,
const GURL& origin_url);
virtual void OnError(const IndexedDBDatabaseError& error);
@@ -57,13 +59,13 @@ class CONTENT_EXPORT IndexedDBCallbacks
virtual void OnSuccess(const std::vector<base::string16>& string);
// IndexedDBFactory::Open / DeleteDatabase
- virtual void OnBlocked(int64 existing_version);
+ virtual void OnBlocked(int64_t existing_version);
// IndexedDBFactory::Open
virtual void OnDataLoss(blink::WebIDBDataLoss data_loss,
std::string data_loss_message);
virtual void OnUpgradeNeeded(
- int64 old_version,
+ int64_t old_version,
scoped_ptr<IndexedDBConnection> connection,
const content::IndexedDBDatabaseMetadata& metadata);
virtual void OnSuccess(scoped_ptr<IndexedDBConnection> connection,
@@ -99,7 +101,7 @@ class CONTENT_EXPORT IndexedDBCallbacks
// IndexedDBDatabase::Count
// IndexedDBFactory::DeleteDatabase
- virtual void OnSuccess(int64 value);
+ virtual void OnSuccess(int64_t value);
// IndexedDBDatabase::Delete
// IndexedDBCursor::Continue / Advance (when complete)
@@ -120,17 +122,17 @@ class CONTENT_EXPORT IndexedDBCallbacks
// Originally from IndexedDBCallbacks:
scoped_refptr<IndexedDBDispatcherHost> dispatcher_host_;
- int32 ipc_callbacks_id_;
- int32 ipc_thread_id_;
+ int32_t ipc_callbacks_id_;
+ int32_t ipc_thread_id_;
// IndexedDBCursor callbacks ------------------------
- int32 ipc_cursor_id_;
+ int32_t ipc_cursor_id_;
// IndexedDBDatabase callbacks ------------------------
- int64 host_transaction_id_;
+ int64_t host_transaction_id_;
GURL origin_url_;
- int32 ipc_database_id_;
- int32 ipc_database_callbacks_id_;
+ int32_t ipc_database_id_;
+ int32_t ipc_database_callbacks_id_;
// Stored in OnDataLoss, merged with OnUpgradeNeeded response.
blink::WebIDBDataLoss data_loss_;
diff --git a/content/browser/indexed_db/indexed_db_class_factory.cc b/content/browser/indexed_db/indexed_db_class_factory.cc
index cb77cca..fa20e62 100644
--- a/content/browser/indexed_db/indexed_db_class_factory.cc
+++ b/content/browser/indexed_db/indexed_db_class_factory.cc
@@ -33,9 +33,9 @@ IndexedDBDatabase* IndexedDBClassFactory::CreateIndexedDBDatabase(
}
IndexedDBTransaction* IndexedDBClassFactory::CreateIndexedDBTransaction(
- int64 id,
+ int64_t id,
scoped_refptr<IndexedDBDatabaseCallbacks> callbacks,
- const std::set<int64>& scope,
+ const std::set<int64_t>& scope,
blink::WebIDBTransactionMode mode,
IndexedDBDatabase* db,
IndexedDBBackingStore::Transaction* backing_store_transaction) {
diff --git a/content/browser/indexed_db/indexed_db_class_factory.h b/content/browser/indexed_db/indexed_db_class_factory.h
index b2d2026..31e5202 100644
--- a/content/browser/indexed_db/indexed_db_class_factory.h
+++ b/content/browser/indexed_db/indexed_db_class_factory.h
@@ -5,6 +5,8 @@
#ifndef CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_CLASS_FACTORY_H_
#define CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_CLASS_FACTORY_H_
+#include <stdint.h>
+
#include <set>
#include "base/lazy_instance.h"
@@ -45,9 +47,9 @@ class CONTENT_EXPORT IndexedDBClassFactory {
const IndexedDBDatabase::Identifier& unique_identifier);
virtual IndexedDBTransaction* CreateIndexedDBTransaction(
- int64 id,
+ int64_t id,
scoped_refptr<IndexedDBDatabaseCallbacks> callbacks,
- const std::set<int64>& scope,
+ const std::set<int64_t>& scope,
blink::WebIDBTransactionMode mode,
IndexedDBDatabase* db,
IndexedDBBackingStore::Transaction* backing_store_transaction);
diff --git a/content/browser/indexed_db/indexed_db_cleanup_on_io_error_unittest.cc b/content/browser/indexed_db/indexed_db_cleanup_on_io_error_unittest.cc
index 2b803d0..02636f8 100644
--- a/content/browser/indexed_db/indexed_db_cleanup_on_io_error_unittest.cc
+++ b/content/browser/indexed_db/indexed_db_cleanup_on_io_error_unittest.cc
@@ -7,6 +7,7 @@
#include "base/files/file.h"
#include "base/files/file_path.h"
#include "base/files/scoped_temp_dir.h"
+#include "base/macros.h"
#include "base/strings/string16.h"
#include "base/strings/utf_string_conversions.h"
#include "content/browser/indexed_db/indexed_db_backing_store.h"
diff --git a/content/browser/indexed_db/indexed_db_connection.h b/content/browser/indexed_db/indexed_db_connection.h
index 41925d8..4d828e5 100644
--- a/content/browser/indexed_db/indexed_db_connection.h
+++ b/content/browser/indexed_db/indexed_db_connection.h
@@ -5,6 +5,7 @@
#ifndef CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_CONNECTION_H_
#define CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_CONNECTION_H_
+#include "base/macros.h"
#include "base/memory/ref_counted.h"
#include "base/memory/weak_ptr.h"
#include "content/browser/indexed_db/indexed_db_database.h"
diff --git a/content/browser/indexed_db/indexed_db_context_impl.cc b/content/browser/indexed_db/indexed_db_context_impl.cc
index 4b3342e..582f16f 100644
--- a/content/browser/indexed_db/indexed_db_context_impl.cc
+++ b/content/browser/indexed_db/indexed_db_context_impl.cc
@@ -287,7 +287,7 @@ int IndexedDBContextImpl::GetOriginBlobFileCount(const GURL& origin_url) {
return count;
}
-int64 IndexedDBContextImpl::GetOriginDiskUsage(const GURL& origin_url) {
+int64_t IndexedDBContextImpl::GetOriginDiskUsage(const GURL& origin_url) {
DCHECK(TaskRunner()->RunsTasksOnCurrentThread());
if (data_path_.empty() || !IsInOriginSet(origin_url))
return 0;
@@ -464,7 +464,7 @@ void IndexedDBContextImpl::DatabaseDeleted(const GURL& origin_url) {
}
bool IndexedDBContextImpl::WouldBeOverQuota(const GURL& origin_url,
- int64 additional_bytes) {
+ int64_t additional_bytes) {
if (space_available_map_.find(origin_url) == space_available_map_.end()) {
// We haven't heard back from the QuotaManager yet, just let it through.
return false;
@@ -523,10 +523,10 @@ base::FilePath IndexedDBContextImpl::GetLevelDBPath(
.AddExtension(kLevelDBExtension);
}
-int64 IndexedDBContextImpl::ReadUsageFromDisk(const GURL& origin_url) const {
+int64_t IndexedDBContextImpl::ReadUsageFromDisk(const GURL& origin_url) const {
if (data_path_.empty())
return 0;
- int64 total_size = 0;
+ int64_t total_size = 0;
for (const base::FilePath& path : GetStoragePaths(origin_url))
total_size += base::ComputeDirectorySize(path);
return total_size;
@@ -540,9 +540,9 @@ void IndexedDBContextImpl::EnsureDiskUsageCacheInitialized(
void IndexedDBContextImpl::QueryDiskAndUpdateQuotaUsage(
const GURL& origin_url) {
- int64 former_disk_usage = origin_size_map_[origin_url];
- int64 current_disk_usage = ReadUsageFromDisk(origin_url);
- int64 difference = current_disk_usage - former_disk_usage;
+ int64_t former_disk_usage = origin_size_map_[origin_url];
+ int64_t current_disk_usage = ReadUsageFromDisk(origin_url);
+ int64_t difference = current_disk_usage - former_disk_usage;
if (difference) {
origin_size_map_[origin_url] = current_disk_usage;
// quota_manager_proxy() is NULL in unit tests.
@@ -558,8 +558,8 @@ void IndexedDBContextImpl::QueryDiskAndUpdateQuotaUsage(
void IndexedDBContextImpl::GotUsageAndQuota(const GURL& origin_url,
storage::QuotaStatusCode status,
- int64 usage,
- int64 quota) {
+ int64_t usage,
+ int64_t quota) {
DCHECK_CURRENTLY_ON(BrowserThread::IO);
DCHECK(status == storage::kQuotaStatusOk ||
status == storage::kQuotaErrorAbort)
@@ -577,8 +577,8 @@ void IndexedDBContextImpl::GotUsageAndQuota(const GURL& origin_url,
}
void IndexedDBContextImpl::GotUpdatedQuota(const GURL& origin_url,
- int64 usage,
- int64 quota) {
+ int64_t usage,
+ int64_t quota) {
DCHECK(TaskRunner()->RunsTasksOnCurrentThread());
space_available_map_[origin_url] = quota - usage;
}
diff --git a/content/browser/indexed_db/indexed_db_context_impl.h b/content/browser/indexed_db/indexed_db_context_impl.h
index 2955a3a..d175ce4 100644
--- a/content/browser/indexed_db/indexed_db_context_impl.h
+++ b/content/browser/indexed_db/indexed_db_context_impl.h
@@ -5,6 +5,9 @@
#ifndef CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_CONTEXT_IMPL_H_
#define CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_CONTEXT_IMPL_H_
+#include <stddef.h>
+#include <stdint.h>
+
#include <map>
#include <set>
#include <string>
@@ -13,6 +16,7 @@
#include "base/compiler_specific.h"
#include "base/files/file_path.h"
#include "base/gtest_prod_util.h"
+#include "base/macros.h"
#include "base/memory/scoped_ptr.h"
#include "content/browser/browser_main_loop.h"
#include "content/browser/indexed_db/indexed_db_factory.h"
@@ -66,7 +70,7 @@ class CONTENT_EXPORT IndexedDBContextImpl
// IndexedDBContext implementation:
base::SequencedTaskRunner* TaskRunner() const override;
std::vector<IndexedDBInfo> GetAllOriginsInfo() override;
- int64 GetOriginDiskUsage(const GURL& origin_url) override;
+ int64_t GetOriginDiskUsage(const GURL& origin_url) override;
void DeleteForOrigin(const GURL& origin_url) override;
void CopyOriginData(const GURL& origin_url,
IndexedDBContext* dest_context) override;
@@ -79,7 +83,7 @@ class CONTENT_EXPORT IndexedDBContextImpl
void ConnectionClosed(const GURL& origin_url, IndexedDBConnection* db);
void TransactionComplete(const GURL& origin_url);
void DatabaseDeleted(const GURL& origin_url);
- bool WouldBeOverQuota(const GURL& origin_url, int64 additional_bytes);
+ bool WouldBeOverQuota(const GURL& origin_url, int64_t additional_bytes);
bool IsOverQuota(const GURL& origin_url);
storage::QuotaManagerProxy* quota_manager_proxy();
@@ -120,20 +124,20 @@ class CONTENT_EXPORT IndexedDBContextImpl
FRIEND_TEST_ALL_PREFIXES(IndexedDBTest, ForceCloseOpenDatabasesOnDelete);
friend class IndexedDBQuotaClientTest;
- typedef std::map<GURL, int64> OriginToSizeMap;
+ typedef std::map<GURL, int64_t> OriginToSizeMap;
class IndexedDBGetUsageAndQuotaCallback;
base::FilePath GetBlobPath(const std::string& origin_id) const;
base::FilePath GetLevelDBPath(const GURL& origin_url) const;
base::FilePath GetLevelDBPath(const std::string& origin_id) const;
- int64 ReadUsageFromDisk(const GURL& origin_url) const;
+ int64_t ReadUsageFromDisk(const GURL& origin_url) const;
void EnsureDiskUsageCacheInitialized(const GURL& origin_url);
void QueryDiskAndUpdateQuotaUsage(const GURL& origin_url);
void GotUsageAndQuota(const GURL& origin_url,
storage::QuotaStatusCode,
- int64 usage,
- int64 quota);
- void GotUpdatedQuota(const GURL& origin_url, int64 usage, int64 quota);
+ int64_t usage,
+ int64_t quota);
+ void GotUpdatedQuota(const GURL& origin_url, int64_t usage, int64_t quota);
void QueryAvailableQuota(const GURL& origin_url);
std::set<GURL>* GetOriginSet();
diff --git a/content/browser/indexed_db/indexed_db_cursor.cc b/content/browser/indexed_db/indexed_db_cursor.cc
index 7172dab..5e3a96a 100644
--- a/content/browser/indexed_db/indexed_db_cursor.cc
+++ b/content/browser/indexed_db/indexed_db_cursor.cc
@@ -4,6 +4,8 @@
#include "content/browser/indexed_db/indexed_db_cursor.h"
+#include <stddef.h>
+
#include <vector>
#include "base/bind.h"
@@ -47,7 +49,7 @@ void IndexedDBCursor::Continue(scoped_ptr<IndexedDBKey> key,
callbacks));
}
-void IndexedDBCursor::Advance(uint32 count,
+void IndexedDBCursor::Advance(uint32_t count,
scoped_refptr<IndexedDBCallbacks> callbacks) {
IDB_TRACE("IndexedDBCursor::Advance");
@@ -58,7 +60,7 @@ void IndexedDBCursor::Advance(uint32 count,
}
void IndexedDBCursor::CursorAdvanceOperation(
- uint32 count,
+ uint32_t count,
scoped_refptr<IndexedDBCallbacks> callbacks,
IndexedDBTransaction* /*transaction*/) {
IDB_TRACE("IndexedDBCursor::CursorAdvanceOperation");
diff --git a/content/browser/indexed_db/indexed_db_cursor.h b/content/browser/indexed_db/indexed_db_cursor.h
index 9dc172a..5d1c318 100644
--- a/content/browser/indexed_db/indexed_db_cursor.h
+++ b/content/browser/indexed_db/indexed_db_cursor.h
@@ -5,9 +5,11 @@
#ifndef CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_CURSOR_H_
#define CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_CURSOR_H_
+#include <stdint.h>
+
#include <string>
-#include "base/basictypes.h"
+#include "base/macros.h"
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
#include "content/browser/indexed_db/indexed_db_backing_store.h"
@@ -27,7 +29,7 @@ class CONTENT_EXPORT IndexedDBCursor
blink::WebIDBTaskType task_type,
IndexedDBTransaction* transaction);
- void Advance(uint32 count, scoped_refptr<IndexedDBCallbacks> callbacks);
+ void Advance(uint32_t count, scoped_refptr<IndexedDBCallbacks> callbacks);
void Continue(scoped_ptr<IndexedDBKey> key,
scoped_ptr<IndexedDBKey> primary_key,
scoped_refptr<IndexedDBCallbacks> callbacks);
@@ -47,7 +49,7 @@ class CONTENT_EXPORT IndexedDBCursor
scoped_ptr<IndexedDBKey> primary_key,
scoped_refptr<IndexedDBCallbacks> callbacks,
IndexedDBTransaction* transaction);
- void CursorAdvanceOperation(uint32 count,
+ void CursorAdvanceOperation(uint32_t count,
scoped_refptr<IndexedDBCallbacks> callbacks,
IndexedDBTransaction* transaction);
void CursorPrefetchIterationOperation(
diff --git a/content/browser/indexed_db/indexed_db_database.cc b/content/browser/indexed_db/indexed_db_database.cc
index 03a41d1..60021d6 100644
--- a/content/browser/indexed_db/indexed_db_database.cc
+++ b/content/browser/indexed_db/indexed_db_database.cc
@@ -10,6 +10,7 @@
#include "base/auto_reset.h"
#include "base/logging.h"
+#include "base/macros.h"
#include "base/memory/scoped_ptr.h"
#include "base/memory/scoped_vector.h"
#include "base/metrics/histogram_macros.h"
@@ -75,8 +76,8 @@ class IndexedDBDatabase::PendingUpgradeCall {
public:
PendingUpgradeCall(scoped_refptr<IndexedDBCallbacks> callbacks,
scoped_ptr<IndexedDBConnection> connection,
- int64 transaction_id,
- int64 version)
+ int64_t transaction_id,
+ int64_t version)
: callbacks_(callbacks),
connection_(connection.Pass()),
version_(version),
@@ -86,14 +87,14 @@ class IndexedDBDatabase::PendingUpgradeCall {
scoped_ptr<IndexedDBConnection> ReleaseConnection() WARN_UNUSED_RESULT {
return connection_.Pass();
}
- int64 version() const { return version_; }
- int64 transaction_id() const { return transaction_id_; }
+ int64_t version() const { return version_; }
+ int64_t transaction_id() const { return transaction_id_; }
private:
scoped_refptr<IndexedDBCallbacks> callbacks_;
scoped_ptr<IndexedDBConnection> connection_;
- int64 version_;
- const int64 transaction_id_;
+ int64_t version_;
+ const int64_t transaction_id_;
};
// PendingSuccessCall has a IndexedDBConnection* because the connection is now
@@ -103,16 +104,16 @@ class IndexedDBDatabase::PendingSuccessCall {
public:
PendingSuccessCall(scoped_refptr<IndexedDBCallbacks> callbacks,
IndexedDBConnection* connection,
- int64 version)
+ int64_t version)
: callbacks_(callbacks), connection_(connection), version_(version) {}
scoped_refptr<IndexedDBCallbacks> callbacks() const { return callbacks_; }
IndexedDBConnection* connection() const { return connection_; }
- int64 version() const { return version_; }
+ int64_t version() const { return version_; }
private:
scoped_refptr<IndexedDBCallbacks> callbacks_;
IndexedDBConnection* connection_;
- int64 version_;
+ int64_t version_;
};
class IndexedDBDatabase::PendingDeleteCall {
@@ -162,7 +163,7 @@ IndexedDBDatabase::IndexedDBDatabase(const base::string16& name,
void IndexedDBDatabase::AddObjectStore(
const IndexedDBObjectStoreMetadata& object_store,
- int64 new_max_object_store_id) {
+ int64_t new_max_object_store_id) {
DCHECK(metadata_.object_stores.find(object_store.id) ==
metadata_.object_stores.end());
if (new_max_object_store_id != IndexedDBObjectStoreMetadata::kInvalidId) {
@@ -172,15 +173,15 @@ void IndexedDBDatabase::AddObjectStore(
metadata_.object_stores[object_store.id] = object_store;
}
-void IndexedDBDatabase::RemoveObjectStore(int64 object_store_id) {
+void IndexedDBDatabase::RemoveObjectStore(int64_t object_store_id) {
DCHECK(metadata_.object_stores.find(object_store_id) !=
metadata_.object_stores.end());
metadata_.object_stores.erase(object_store_id);
}
-void IndexedDBDatabase::AddIndex(int64 object_store_id,
+void IndexedDBDatabase::AddIndex(int64_t object_store_id,
const IndexedDBIndexMetadata& index,
- int64 new_max_index_id) {
+ int64_t new_max_index_id) {
DCHECK(metadata_.object_stores.find(object_store_id) !=
metadata_.object_stores.end());
IndexedDBObjectStoreMetadata object_store =
@@ -195,7 +196,7 @@ void IndexedDBDatabase::AddIndex(int64 object_store_id,
metadata_.object_stores[object_store_id] = object_store;
}
-void IndexedDBDatabase::RemoveIndex(int64 object_store_id, int64 index_id) {
+void IndexedDBDatabase::RemoveIndex(int64_t object_store_id, int64_t index_id) {
DCHECK(metadata_.object_stores.find(object_store_id) !=
metadata_.object_stores.end());
IndexedDBObjectStoreMetadata object_store =
@@ -243,7 +244,7 @@ scoped_ptr<IndexedDBConnection> IndexedDBDatabase::CreateConnection(
}
IndexedDBTransaction* IndexedDBDatabase::GetTransaction(
- int64 transaction_id) const {
+ int64_t transaction_id) const {
TransactionMap::const_iterator trans_iterator =
transactions_.find(transaction_id);
if (trans_iterator == transactions_.end())
@@ -251,7 +252,7 @@ IndexedDBTransaction* IndexedDBDatabase::GetTransaction(
return trans_iterator->second;
}
-bool IndexedDBDatabase::ValidateObjectStoreId(int64 object_store_id) const {
+bool IndexedDBDatabase::ValidateObjectStoreId(int64_t object_store_id) const {
if (!ContainsKey(metadata_.object_stores, object_store_id)) {
DLOG(ERROR) << "Invalid object_store_id";
return false;
@@ -259,8 +260,9 @@ bool IndexedDBDatabase::ValidateObjectStoreId(int64 object_store_id) const {
return true;
}
-bool IndexedDBDatabase::ValidateObjectStoreIdAndIndexId(int64 object_store_id,
- int64 index_id) const {
+bool IndexedDBDatabase::ValidateObjectStoreIdAndIndexId(
+ int64_t object_store_id,
+ int64_t index_id) const {
if (!ValidateObjectStoreId(object_store_id))
return false;
const IndexedDBObjectStoreMetadata& object_store_metadata =
@@ -273,8 +275,8 @@ bool IndexedDBDatabase::ValidateObjectStoreIdAndIndexId(int64 object_store_id,
}
bool IndexedDBDatabase::ValidateObjectStoreIdAndOptionalIndexId(
- int64 object_store_id,
- int64 index_id) const {
+ int64_t object_store_id,
+ int64_t index_id) const {
if (!ValidateObjectStoreId(object_store_id))
return false;
const IndexedDBObjectStoreMetadata& object_store_metadata =
@@ -288,8 +290,8 @@ bool IndexedDBDatabase::ValidateObjectStoreIdAndOptionalIndexId(
}
bool IndexedDBDatabase::ValidateObjectStoreIdAndNewIndexId(
- int64 object_store_id,
- int64 index_id) const {
+ int64_t object_store_id,
+ int64_t index_id) const {
if (!ValidateObjectStoreId(object_store_id))
return false;
const IndexedDBObjectStoreMetadata& object_store_metadata =
@@ -301,8 +303,8 @@ bool IndexedDBDatabase::ValidateObjectStoreIdAndNewIndexId(
return true;
}
-void IndexedDBDatabase::CreateObjectStore(int64 transaction_id,
- int64 object_store_id,
+void IndexedDBDatabase::CreateObjectStore(int64_t transaction_id,
+ int64_t object_store_id,
const base::string16& name,
const IndexedDBKeyPath& key_path,
bool auto_increment) {
@@ -358,8 +360,8 @@ void IndexedDBDatabase::CreateObjectStore(int64 transaction_id,
object_store_id));
}
-void IndexedDBDatabase::DeleteObjectStore(int64 transaction_id,
- int64 object_store_id) {
+void IndexedDBDatabase::DeleteObjectStore(int64_t transaction_id,
+ int64_t object_store_id) {
IDB_TRACE1("IndexedDBDatabase::DeleteObjectStore", "txn.id", transaction_id);
IndexedDBTransaction* transaction = GetTransaction(transaction_id);
if (!transaction)
@@ -375,9 +377,9 @@ void IndexedDBDatabase::DeleteObjectStore(int64 transaction_id,
object_store_id));
}
-void IndexedDBDatabase::CreateIndex(int64 transaction_id,
- int64 object_store_id,
- int64 index_id,
+void IndexedDBDatabase::CreateIndex(int64_t transaction_id,
+ int64_t object_store_id,
+ int64_t index_id,
const base::string16& name,
const IndexedDBKeyPath& key_path,
bool unique,
@@ -427,17 +429,17 @@ void IndexedDBDatabase::CreateIndex(int64 transaction_id,
}
void IndexedDBDatabase::CreateIndexAbortOperation(
- int64 object_store_id,
- int64 index_id,
+ int64_t object_store_id,
+ int64_t index_id,
IndexedDBTransaction* transaction) {
DCHECK(!transaction);
IDB_TRACE("IndexedDBDatabase::CreateIndexAbortOperation");
RemoveIndex(object_store_id, index_id);
}
-void IndexedDBDatabase::DeleteIndex(int64 transaction_id,
- int64 object_store_id,
- int64 index_id) {
+void IndexedDBDatabase::DeleteIndex(int64_t transaction_id,
+ int64_t object_store_id,
+ int64_t index_id) {
IDB_TRACE1("IndexedDBDatabase::DeleteIndex", "txn.id", transaction_id);
IndexedDBTransaction* transaction = GetTransaction(transaction_id);
if (!transaction)
@@ -455,8 +457,8 @@ void IndexedDBDatabase::DeleteIndex(int64 transaction_id,
}
void IndexedDBDatabase::DeleteIndexOperation(
- int64 object_store_id,
- int64 index_id,
+ int64_t object_store_id,
+ int64_t index_id,
IndexedDBTransaction* transaction) {
IDB_TRACE1(
"IndexedDBDatabase::DeleteIndexOperation", "txn.id", transaction->id());
@@ -491,7 +493,7 @@ void IndexedDBDatabase::DeleteIndexOperation(
}
void IndexedDBDatabase::DeleteIndexAbortOperation(
- int64 object_store_id,
+ int64_t object_store_id,
const IndexedDBIndexMetadata& index_metadata,
IndexedDBTransaction* transaction) {
DCHECK(!transaction);
@@ -499,7 +501,7 @@ void IndexedDBDatabase::DeleteIndexAbortOperation(
AddIndex(object_store_id, index_metadata, IndexedDBIndexMetadata::kInvalidId);
}
-void IndexedDBDatabase::Commit(int64 transaction_id) {
+void IndexedDBDatabase::Commit(int64_t transaction_id) {
// The frontend suggests that we commit, but we may have previously initiated
// an abort, and so have disposed of the transaction. on_abort has already
// been dispatched to the frontend, so it will find out about that
@@ -516,7 +518,7 @@ void IndexedDBDatabase::Commit(int64 transaction_id) {
}
}
-void IndexedDBDatabase::Abort(int64 transaction_id) {
+void IndexedDBDatabase::Abort(int64_t transaction_id) {
// If the transaction is unknown, then it has already been aborted by the
// backend before this call so it is safe to ignore it.
IDB_TRACE1("IndexedDBDatabase::Abort", "txn.id", transaction_id);
@@ -525,7 +527,7 @@ void IndexedDBDatabase::Abort(int64 transaction_id) {
transaction->Abort();
}
-void IndexedDBDatabase::Abort(int64 transaction_id,
+void IndexedDBDatabase::Abort(int64_t transaction_id,
const IndexedDBDatabaseError& error) {
IDB_TRACE1("IndexedDBDatabase::Abort(error)", "txn.id", transaction_id);
// If the transaction is unknown, then it has already been aborted by the
@@ -535,12 +537,12 @@ void IndexedDBDatabase::Abort(int64 transaction_id,
transaction->Abort(error);
}
-void IndexedDBDatabase::GetAll(int64 transaction_id,
- int64 object_store_id,
- int64 index_id,
+void IndexedDBDatabase::GetAll(int64_t transaction_id,
+ int64_t object_store_id,
+ int64_t index_id,
scoped_ptr<IndexedDBKeyRange> key_range,
bool key_only,
- int64 max_count,
+ int64_t max_count,
scoped_refptr<IndexedDBCallbacks> callbacks) {
IDB_TRACE1("IndexedDBDatabase::GetAll", "txn.id", transaction_id);
IndexedDBTransaction* transaction = GetTransaction(transaction_id);
@@ -557,9 +559,9 @@ void IndexedDBDatabase::GetAll(int64 transaction_id,
max_count, callbacks));
}
-void IndexedDBDatabase::Get(int64 transaction_id,
- int64 object_store_id,
- int64 index_id,
+void IndexedDBDatabase::Get(int64_t transaction_id,
+ int64_t object_store_id,
+ int64_t index_id,
scoped_ptr<IndexedDBKeyRange> key_range,
bool key_only,
scoped_refptr<IndexedDBCallbacks> callbacks) {
@@ -579,8 +581,8 @@ void IndexedDBDatabase::Get(int64 transaction_id,
}
void IndexedDBDatabase::GetOperation(
- int64 object_store_id,
- int64 index_id,
+ int64_t object_store_id,
+ int64_t index_id,
scoped_ptr<IndexedDBKeyRange> key_range,
indexed_db::CursorType cursor_type,
scoped_refptr<IndexedDBCallbacks> callbacks,
@@ -741,11 +743,11 @@ void IndexedDBDatabase::GetOperation(
}
void IndexedDBDatabase::GetAllOperation(
- int64 object_store_id,
- int64 index_id,
+ int64_t object_store_id,
+ int64_t index_id,
scoped_ptr<IndexedDBKeyRange> key_range,
indexed_db::CursorType cursor_type,
- int64 max_count,
+ int64_t max_count,
scoped_refptr<IndexedDBCallbacks> callbacks,
IndexedDBTransaction* transaction) {
IDB_TRACE1("IndexedDBDatabase::GetAllOperation", "txn.id", transaction->id());
@@ -815,7 +817,7 @@ void IndexedDBDatabase::GetAllOperation(
!object_store_metadata.key_path.IsNull();
size_t response_size = kMaxIDBMessageOverhead;
- int64 num_found_items = 0;
+ int64_t num_found_items = 0;
while (num_found_items++ < max_count) {
bool cursor_valid;
if (did_first_seek) {
@@ -880,11 +882,11 @@ void IndexedDBDatabase::GetAllOperation(
static scoped_ptr<IndexedDBKey> GenerateKey(
IndexedDBBackingStore* backing_store,
IndexedDBTransaction* transaction,
- int64 database_id,
- int64 object_store_id) {
- const int64 max_generator_value =
+ int64_t database_id,
+ int64_t object_store_id) {
+ const int64_t max_generator_value =
9007199254740992LL; // Maximum integer storable as ECMAScript number.
- int64 current_number;
+ int64_t current_number;
leveldb::Status s = backing_store->GetKeyGeneratorCurrentNumber(
transaction->BackingStoreTransaction(),
database_id,
@@ -902,22 +904,19 @@ static scoped_ptr<IndexedDBKey> GenerateKey(
static leveldb::Status UpdateKeyGenerator(IndexedDBBackingStore* backing_store,
IndexedDBTransaction* transaction,
- int64 database_id,
- int64 object_store_id,
+ int64_t database_id,
+ int64_t object_store_id,
const IndexedDBKey& key,
bool check_current) {
DCHECK_EQ(WebIDBKeyTypeNumber, key.type());
return backing_store->MaybeUpdateKeyGeneratorCurrentNumber(
- transaction->BackingStoreTransaction(),
- database_id,
- object_store_id,
- static_cast<int64>(floor(key.number())) + 1,
- check_current);
+ transaction->BackingStoreTransaction(), database_id, object_store_id,
+ static_cast<int64_t>(floor(key.number())) + 1, check_current);
}
struct IndexedDBDatabase::PutOperationParams {
PutOperationParams() {}
- int64 object_store_id;
+ int64_t object_store_id;
IndexedDBValue value;
ScopedVector<storage::BlobDataHandle> handles;
scoped_ptr<IndexedDBKey> key;
@@ -929,8 +928,8 @@ struct IndexedDBDatabase::PutOperationParams {
DISALLOW_COPY_AND_ASSIGN(PutOperationParams);
};
-void IndexedDBDatabase::Put(int64 transaction_id,
- int64 object_store_id,
+void IndexedDBDatabase::Put(int64_t transaction_id,
+ int64_t object_store_id,
IndexedDBValue* value,
ScopedVector<storage::BlobDataHandle>* handles,
scoped_ptr<IndexedDBKey> key,
@@ -1102,8 +1101,8 @@ void IndexedDBDatabase::PutOperation(scoped_ptr<PutOperationParams> params,
}
}
-void IndexedDBDatabase::SetIndexKeys(int64 transaction_id,
- int64 object_store_id,
+void IndexedDBDatabase::SetIndexKeys(int64_t transaction_id,
+ int64_t object_store_id,
scoped_ptr<IndexedDBKey> primary_key,
const std::vector<IndexKeys>& index_keys) {
IDB_TRACE1("IndexedDBDatabase::SetIndexKeys", "txn.id", transaction_id);
@@ -1178,9 +1177,9 @@ void IndexedDBDatabase::SetIndexKeys(int64 transaction_id,
}
}
-void IndexedDBDatabase::SetIndexesReady(int64 transaction_id,
- int64,
- const std::vector<int64>& index_ids) {
+void IndexedDBDatabase::SetIndexesReady(int64_t transaction_id,
+ int64_t,
+ const std::vector<int64_t>& index_ids) {
IndexedDBTransaction* transaction = GetTransaction(transaction_id);
if (!transaction)
return;
@@ -1202,8 +1201,8 @@ void IndexedDBDatabase::SetIndexesReadyOperation(
struct IndexedDBDatabase::OpenCursorOperationParams {
OpenCursorOperationParams() {}
- int64 object_store_id;
- int64 index_id;
+ int64_t object_store_id;
+ int64_t index_id;
scoped_ptr<IndexedDBKeyRange> key_range;
blink::WebIDBCursorDirection direction;
indexed_db::CursorType cursor_type;
@@ -1215,9 +1214,9 @@ struct IndexedDBDatabase::OpenCursorOperationParams {
};
void IndexedDBDatabase::OpenCursor(
- int64 transaction_id,
- int64 object_store_id,
- int64 index_id,
+ int64_t transaction_id,
+ int64_t object_store_id,
+ int64_t index_id,
scoped_ptr<IndexedDBKeyRange> key_range,
blink::WebIDBCursorDirection direction,
bool key_only,
@@ -1326,9 +1325,9 @@ void IndexedDBDatabase::OpenCursorOperation(
cursor, cursor->key(), cursor->primary_key(), cursor->Value());
}
-void IndexedDBDatabase::Count(int64 transaction_id,
- int64 object_store_id,
- int64 index_id,
+void IndexedDBDatabase::Count(int64_t transaction_id,
+ int64_t object_store_id,
+ int64_t index_id,
scoped_ptr<IndexedDBKeyRange> key_range,
scoped_refptr<IndexedDBCallbacks> callbacks) {
IDB_TRACE1("IndexedDBDatabase::Count", "txn.id", transaction_id);
@@ -1348,13 +1347,13 @@ void IndexedDBDatabase::Count(int64 transaction_id,
}
void IndexedDBDatabase::CountOperation(
- int64 object_store_id,
- int64 index_id,
+ int64_t object_store_id,
+ int64_t index_id,
scoped_ptr<IndexedDBKeyRange> key_range,
scoped_refptr<IndexedDBCallbacks> callbacks,
IndexedDBTransaction* transaction) {
IDB_TRACE1("IndexedDBDatabase::CountOperation", "txn.id", transaction->id());
- uint32 count = 0;
+ uint32_t count = 0;
scoped_ptr<IndexedDBBackingStore::Cursor> backing_store_cursor;
leveldb::Status s;
@@ -1400,8 +1399,8 @@ void IndexedDBDatabase::CountOperation(
}
void IndexedDBDatabase::DeleteRange(
- int64 transaction_id,
- int64 object_store_id,
+ int64_t transaction_id,
+ int64_t object_store_id,
scoped_ptr<IndexedDBKeyRange> key_range,
scoped_refptr<IndexedDBCallbacks> callbacks) {
IDB_TRACE1("IndexedDBDatabase::DeleteRange", "txn.id", transaction_id);
@@ -1421,7 +1420,7 @@ void IndexedDBDatabase::DeleteRange(
}
void IndexedDBDatabase::DeleteRangeOperation(
- int64 object_store_id,
+ int64_t object_store_id,
scoped_ptr<IndexedDBKeyRange> key_range,
scoped_refptr<IndexedDBCallbacks> callbacks,
IndexedDBTransaction* transaction) {
@@ -1447,8 +1446,8 @@ void IndexedDBDatabase::DeleteRangeOperation(
callbacks->OnSuccess();
}
-void IndexedDBDatabase::Clear(int64 transaction_id,
- int64 object_store_id,
+void IndexedDBDatabase::Clear(int64_t transaction_id,
+ int64_t object_store_id,
scoped_refptr<IndexedDBCallbacks> callbacks) {
IDB_TRACE1("IndexedDBDatabase::Clear", "txn.id", transaction_id);
IndexedDBTransaction* transaction = GetTransaction(transaction_id);
@@ -1464,7 +1463,7 @@ void IndexedDBDatabase::Clear(int64 transaction_id,
}
void IndexedDBDatabase::ClearOperation(
- int64 object_store_id,
+ int64_t object_store_id,
scoped_refptr<IndexedDBCallbacks> callbacks,
IndexedDBTransaction* transaction) {
IDB_TRACE1("IndexedDBDatabase::ClearOperation", "txn.id", transaction->id());
@@ -1484,7 +1483,7 @@ void IndexedDBDatabase::ClearOperation(
}
void IndexedDBDatabase::DeleteObjectStoreOperation(
- int64 object_store_id,
+ int64_t object_store_id,
IndexedDBTransaction* transaction) {
IDB_TRACE1("IndexedDBDatabase::DeleteObjectStoreOperation",
"txn.id",
@@ -1517,13 +1516,13 @@ void IndexedDBDatabase::DeleteObjectStoreOperation(
}
void IndexedDBDatabase::VersionChangeOperation(
- int64 version,
+ int64_t version,
scoped_refptr<IndexedDBCallbacks> callbacks,
scoped_ptr<IndexedDBConnection> connection,
IndexedDBTransaction* transaction) {
IDB_TRACE1(
"IndexedDBDatabase::VersionChangeOperation", "txn.id", transaction->id());
- int64 old_version = metadata_.int_version;
+ int64_t old_version = metadata_.int_version;
DCHECK_GT(version, old_version);
if (!backing_store_->UpdateIDBDatabaseIntVersion(
@@ -1660,9 +1659,9 @@ void IndexedDBDatabase::ProcessPendingCalls() {
}
void IndexedDBDatabase::CreateTransaction(
- int64 transaction_id,
+ int64_t transaction_id,
IndexedDBConnection* connection,
- const std::vector<int64>& object_store_ids,
+ const std::vector<int64_t>& object_store_ids,
blink::WebIDBTransactionMode mode) {
IDB_TRACE1("IndexedDBDatabase::CreateTransaction", "txn.id", transaction_id);
DCHECK(connections_.count(connection));
@@ -1690,7 +1689,7 @@ void IndexedDBDatabase::CreateTransaction(
// manages the lifetime of the object.
TransactionCreated(IndexedDBClassFactory::Get()->CreateIndexedDBTransaction(
transaction_id, connection->callbacks(),
- std::set<int64>(object_store_ids.begin(), object_store_ids.end()), mode,
+ std::set<int64_t>(object_store_ids.begin(), object_store_ids.end()), mode,
this, new IndexedDBBackingStore::Transaction(backing_store_.get())));
}
@@ -1760,7 +1759,7 @@ void IndexedDBDatabase::OpenConnection(
}
// We may need to change the version.
- int64 local_version = connection.version;
+ int64_t local_version = connection.version;
if (local_version == IndexedDBDatabaseMetadata::NO_INT_VERSION) {
if (!is_new_database) {
connection.callbacks->OnSuccess(
@@ -1801,8 +1800,8 @@ void IndexedDBDatabase::OpenConnection(
void IndexedDBDatabase::RunVersionChangeTransaction(
scoped_refptr<IndexedDBCallbacks> callbacks,
scoped_ptr<IndexedDBConnection> connection,
- int64 transaction_id,
- int64 requested_version) {
+ int64_t transaction_id,
+ int64_t requested_version) {
DCHECK(callbacks.get());
DCHECK(connections_.count(connection.get()));
if (ConnectionCount() > 1) {
@@ -1830,10 +1829,9 @@ void IndexedDBDatabase::RunVersionChangeTransaction(
void IndexedDBDatabase::RunVersionChangeTransactionFinal(
scoped_refptr<IndexedDBCallbacks> callbacks,
scoped_ptr<IndexedDBConnection> connection,
- int64 transaction_id,
- int64 requested_version) {
-
- std::vector<int64> object_store_ids;
+ int64_t transaction_id,
+ int64_t requested_version) {
+ std::vector<int64_t> object_store_ids;
CreateTransaction(transaction_id,
connection.get(),
object_store_ids,
@@ -1887,7 +1885,7 @@ void IndexedDBDatabase::DeleteDatabaseFinal(
}
return;
}
- int64 old_version = metadata_.int_version;
+ int64_t old_version = metadata_.int_version;
metadata_.version = kNoStringVersion;
metadata_.id = kInvalidId;
metadata_.int_version = IndexedDBDatabaseMetadata::NO_INT_VERSION;
@@ -1963,7 +1961,7 @@ void IndexedDBDatabase::Close(IndexedDBConnection* connection, bool forced) {
}
void IndexedDBDatabase::CreateObjectStoreAbortOperation(
- int64 object_store_id,
+ int64_t object_store_id,
IndexedDBTransaction* transaction) {
DCHECK(!transaction);
IDB_TRACE("IndexedDBDatabase::CreateObjectStoreAbortOperation");
@@ -1981,7 +1979,7 @@ void IndexedDBDatabase::DeleteObjectStoreAbortOperation(
void IndexedDBDatabase::VersionChangeAbortOperation(
const base::string16& previous_version,
- int64 previous_int_version,
+ int64_t previous_int_version,
IndexedDBTransaction* transaction) {
DCHECK(!transaction);
IDB_TRACE("IndexedDBDatabase::VersionChangeAbortOperation");
diff --git a/content/browser/indexed_db/indexed_db_database.h b/content/browser/indexed_db/indexed_db_database.h
index 66bfe5d..0049e6c 100644
--- a/content/browser/indexed_db/indexed_db_database.h
+++ b/content/browser/indexed_db/indexed_db_database.h
@@ -5,13 +5,16 @@
#ifndef CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_DATABASE_H_
#define CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_DATABASE_H_
+#include <stddef.h>
+#include <stdint.h>
+
#include <list>
#include <map>
#include <string>
#include <utility>
#include <vector>
-#include "base/basictypes.h"
+#include "base/macros.h"
#include "base/memory/ref_counted.h"
#include "content/browser/indexed_db/indexed_db.h"
#include "content/browser/indexed_db/indexed_db_backing_store.h"
@@ -39,13 +42,13 @@ class CONTENT_EXPORT IndexedDBDatabase
: NON_EXPORTED_BASE(public base::RefCounted<IndexedDBDatabase>) {
public:
// An index and corresponding set of keys
- typedef std::pair<int64, std::vector<IndexedDBKey> > IndexKeys;
+ typedef std::pair<int64_t, std::vector<IndexedDBKey>> IndexKeys;
// Identifier is pair of (origin url, database name).
typedef std::pair<GURL, base::string16> Identifier;
- static const int64 kInvalidId = 0;
- static const int64 kMinimumIndexId = 30;
+ static const int64_t kInvalidId = 0;
+ static const int64_t kMinimumIndexId = 30;
static scoped_refptr<IndexedDBDatabase> Create(
const base::string16& name,
@@ -57,30 +60,30 @@ class CONTENT_EXPORT IndexedDBDatabase
const Identifier& identifier() const { return identifier_; }
IndexedDBBackingStore* backing_store() { return backing_store_.get(); }
- int64 id() const { return metadata_.id; }
+ int64_t id() const { return metadata_.id; }
const base::string16& name() const { return metadata_.name; }
void AddObjectStore(const IndexedDBObjectStoreMetadata& metadata,
- int64 new_max_object_store_id);
- void RemoveObjectStore(int64 object_store_id);
- void AddIndex(int64 object_store_id,
+ int64_t new_max_object_store_id);
+ void RemoveObjectStore(int64_t object_store_id);
+ void AddIndex(int64_t object_store_id,
const IndexedDBIndexMetadata& metadata,
- int64 new_max_index_id);
- void RemoveIndex(int64 object_store_id, int64 index_id);
+ int64_t new_max_index_id);
+ void RemoveIndex(int64_t object_store_id, int64_t index_id);
void OpenConnection(const IndexedDBPendingConnection& connection);
void DeleteDatabase(scoped_refptr<IndexedDBCallbacks> callbacks);
const IndexedDBDatabaseMetadata& metadata() const { return metadata_; }
- void CreateObjectStore(int64 transaction_id,
- int64 object_store_id,
+ void CreateObjectStore(int64_t transaction_id,
+ int64_t object_store_id,
const base::string16& name,
const IndexedDBKeyPath& key_path,
bool auto_increment);
- void DeleteObjectStore(int64 transaction_id, int64 object_store_id);
- void CreateTransaction(int64 transaction_id,
+ void DeleteObjectStore(int64_t transaction_id, int64_t object_store_id);
+ void CreateTransaction(int64_t transaction_id,
IndexedDBConnection* connection,
- const std::vector<int64>& object_store_ids,
+ const std::vector<int64_t>& object_store_ids,
blink::WebIDBTransactionMode mode);
void Close(IndexedDBConnection* connection, bool forced);
void ForceClose();
@@ -90,18 +93,20 @@ class CONTENT_EXPORT IndexedDBDatabase
// pending connection.
void VersionChangeIgnored();
- void Commit(int64 transaction_id);
- void Abort(int64 transaction_id);
- void Abort(int64 transaction_id, const IndexedDBDatabaseError& error);
+ void Commit(int64_t transaction_id);
+ void Abort(int64_t transaction_id);
+ void Abort(int64_t transaction_id, const IndexedDBDatabaseError& error);
- void CreateIndex(int64 transaction_id,
- int64 object_store_id,
- int64 index_id,
+ void CreateIndex(int64_t transaction_id,
+ int64_t object_store_id,
+ int64_t index_id,
const base::string16& name,
const IndexedDBKeyPath& key_path,
bool unique,
bool multi_entry);
- void DeleteIndex(int64 transaction_id, int64 object_store_id, int64 index_id);
+ void DeleteIndex(int64_t transaction_id,
+ int64_t object_store_id,
+ int64_t index_id);
IndexedDBTransactionCoordinator& transaction_coordinator() {
return transaction_coordinator_;
@@ -116,53 +121,53 @@ class CONTENT_EXPORT IndexedDBDatabase
// Called by transactions to report failure committing to the backing store.
void TransactionCommitFailed(const leveldb::Status& status);
- void Get(int64 transaction_id,
- int64 object_store_id,
- int64 index_id,
+ void Get(int64_t transaction_id,
+ int64_t object_store_id,
+ int64_t index_id,
scoped_ptr<IndexedDBKeyRange> key_range,
bool key_only,
scoped_refptr<IndexedDBCallbacks> callbacks);
- void GetAll(int64 transaction_id,
- int64 object_store_id,
- int64 index_id,
+ void GetAll(int64_t transaction_id,
+ int64_t object_store_id,
+ int64_t index_id,
scoped_ptr<IndexedDBKeyRange> key_range,
bool key_only,
- int64 max_count,
+ int64_t max_count,
scoped_refptr<IndexedDBCallbacks> callbacks);
- void Put(int64 transaction_id,
- int64 object_store_id,
+ void Put(int64_t transaction_id,
+ int64_t object_store_id,
IndexedDBValue* value,
ScopedVector<storage::BlobDataHandle>* handles,
scoped_ptr<IndexedDBKey> key,
blink::WebIDBPutMode mode,
scoped_refptr<IndexedDBCallbacks> callbacks,
const std::vector<IndexKeys>& index_keys);
- void SetIndexKeys(int64 transaction_id,
- int64 object_store_id,
+ void SetIndexKeys(int64_t transaction_id,
+ int64_t object_store_id,
scoped_ptr<IndexedDBKey> primary_key,
const std::vector<IndexKeys>& index_keys);
- void SetIndexesReady(int64 transaction_id,
- int64 object_store_id,
- const std::vector<int64>& index_ids);
- void OpenCursor(int64 transaction_id,
- int64 object_store_id,
- int64 index_id,
+ void SetIndexesReady(int64_t transaction_id,
+ int64_t object_store_id,
+ const std::vector<int64_t>& index_ids);
+ void OpenCursor(int64_t transaction_id,
+ int64_t object_store_id,
+ int64_t index_id,
scoped_ptr<IndexedDBKeyRange> key_range,
blink::WebIDBCursorDirection,
bool key_only,
blink::WebIDBTaskType task_type,
scoped_refptr<IndexedDBCallbacks> callbacks);
- void Count(int64 transaction_id,
- int64 object_store_id,
- int64 index_id,
+ void Count(int64_t transaction_id,
+ int64_t object_store_id,
+ int64_t index_id,
scoped_ptr<IndexedDBKeyRange> key_range,
scoped_refptr<IndexedDBCallbacks> callbacks);
- void DeleteRange(int64 transaction_id,
- int64 object_store_id,
+ void DeleteRange(int64_t transaction_id,
+ int64_t object_store_id,
scoped_ptr<IndexedDBKeyRange> key_range,
scoped_refptr<IndexedDBCallbacks> callbacks);
- void Clear(int64 transaction_id,
- int64 object_store_id,
+ void Clear(int64_t transaction_id,
+ int64_t object_store_id,
scoped_refptr<IndexedDBCallbacks> callbacks);
// Number of connections that have progressed passed initial open call.
@@ -177,41 +182,40 @@ class CONTENT_EXPORT IndexedDBDatabase
size_t PendingDeleteCount() const;
// Asynchronous tasks scheduled within transactions:
- void CreateObjectStoreAbortOperation(int64 object_store_id,
+ void CreateObjectStoreAbortOperation(int64_t object_store_id,
IndexedDBTransaction* transaction);
- void DeleteObjectStoreOperation(
- int64 object_store_id,
- IndexedDBTransaction* transaction);
+ void DeleteObjectStoreOperation(int64_t object_store_id,
+ IndexedDBTransaction* transaction);
void DeleteObjectStoreAbortOperation(
const IndexedDBObjectStoreMetadata& object_store_metadata,
IndexedDBTransaction* transaction);
- void VersionChangeOperation(int64 version,
+ void VersionChangeOperation(int64_t version,
scoped_refptr<IndexedDBCallbacks> callbacks,
scoped_ptr<IndexedDBConnection> connection,
IndexedDBTransaction* transaction);
void VersionChangeAbortOperation(const base::string16& previous_version,
- int64 previous_int_version,
+ int64_t previous_int_version,
IndexedDBTransaction* transaction);
- void DeleteIndexOperation(int64 object_store_id,
- int64 index_id,
+ void DeleteIndexOperation(int64_t object_store_id,
+ int64_t index_id,
IndexedDBTransaction* transaction);
- void CreateIndexAbortOperation(int64 object_store_id,
- int64 index_id,
+ void CreateIndexAbortOperation(int64_t object_store_id,
+ int64_t index_id,
IndexedDBTransaction* transaction);
- void DeleteIndexAbortOperation(int64 object_store_id,
+ void DeleteIndexAbortOperation(int64_t object_store_id,
const IndexedDBIndexMetadata& index_metadata,
IndexedDBTransaction* transaction);
- void GetOperation(int64 object_store_id,
- int64 index_id,
+ void GetOperation(int64_t object_store_id,
+ int64_t index_id,
scoped_ptr<IndexedDBKeyRange> key_range,
indexed_db::CursorType cursor_type,
scoped_refptr<IndexedDBCallbacks> callbacks,
IndexedDBTransaction* transaction);
- void GetAllOperation(int64 object_store_id,
- int64 index_id,
+ void GetAllOperation(int64_t object_store_id,
+ int64_t index_id,
scoped_ptr<IndexedDBKeyRange> key_range,
indexed_db::CursorType cursor_type,
- int64 max_count,
+ int64_t max_count,
scoped_refptr<IndexedDBCallbacks> callbacks,
IndexedDBTransaction* transaction);
struct PutOperationParams;
@@ -222,16 +226,16 @@ class CONTENT_EXPORT IndexedDBDatabase
struct OpenCursorOperationParams;
void OpenCursorOperation(scoped_ptr<OpenCursorOperationParams> params,
IndexedDBTransaction* transaction);
- void CountOperation(int64 object_store_id,
- int64 index_id,
+ void CountOperation(int64_t object_store_id,
+ int64_t index_id,
scoped_ptr<IndexedDBKeyRange> key_range,
scoped_refptr<IndexedDBCallbacks> callbacks,
IndexedDBTransaction* transaction);
- void DeleteRangeOperation(int64 object_store_id,
+ void DeleteRangeOperation(int64_t object_store_id,
scoped_ptr<IndexedDBKeyRange> key_range,
scoped_refptr<IndexedDBCallbacks> callbacks,
IndexedDBTransaction* transaction);
- void ClearOperation(int64 object_store_id,
+ void ClearOperation(int64_t object_store_id,
scoped_refptr<IndexedDBCallbacks> callbacks,
IndexedDBTransaction* transaction);
@@ -253,7 +257,7 @@ class CONTENT_EXPORT IndexedDBDatabase
class PendingSuccessCall;
class PendingUpgradeCall;
- typedef std::map<int64, IndexedDBTransaction*> TransactionMap;
+ typedef std::map<int64_t, IndexedDBTransaction*> TransactionMap;
typedef std::list<IndexedDBPendingConnection> PendingOpenCallList;
typedef std::list<PendingDeleteCall*> PendingDeleteCallList;
typedef list_set<IndexedDBConnection*> ConnectionSet;
@@ -262,13 +266,13 @@ class CONTENT_EXPORT IndexedDBDatabase
leveldb::Status OpenInternal();
void RunVersionChangeTransaction(scoped_refptr<IndexedDBCallbacks> callbacks,
scoped_ptr<IndexedDBConnection> connection,
- int64 transaction_id,
- int64 requested_version);
+ int64_t transaction_id,
+ int64_t requested_version);
void RunVersionChangeTransactionFinal(
scoped_refptr<IndexedDBCallbacks> callbacks,
scoped_ptr<IndexedDBConnection> connection,
- int64 transaction_id,
- int64 requested_version);
+ int64_t transaction_id,
+ int64_t requested_version);
void ProcessPendingCalls();
bool IsDeleteDatabaseBlocked() const;
@@ -278,15 +282,15 @@ class CONTENT_EXPORT IndexedDBDatabase
scoped_refptr<IndexedDBDatabaseCallbacks> database_callbacks,
int child_process_id);
- IndexedDBTransaction* GetTransaction(int64 transaction_id) const;
+ IndexedDBTransaction* GetTransaction(int64_t transaction_id) const;
- bool ValidateObjectStoreId(int64 object_store_id) const;
- bool ValidateObjectStoreIdAndIndexId(int64 object_store_id,
- int64 index_id) const;
- bool ValidateObjectStoreIdAndOptionalIndexId(int64 object_store_id,
- int64 index_id) const;
- bool ValidateObjectStoreIdAndNewIndexId(int64 object_store_id,
- int64 index_id) const;
+ bool ValidateObjectStoreId(int64_t object_store_id) const;
+ bool ValidateObjectStoreIdAndIndexId(int64_t object_store_id,
+ int64_t index_id) const;
+ bool ValidateObjectStoreIdAndOptionalIndexId(int64_t object_store_id,
+ int64_t index_id) const;
+ bool ValidateObjectStoreIdAndNewIndexId(int64_t object_store_id,
+ int64_t index_id) const;
scoped_refptr<IndexedDBBackingStore> backing_store_;
IndexedDBDatabaseMetadata metadata_;
diff --git a/content/browser/indexed_db/indexed_db_database_callbacks.cc b/content/browser/indexed_db/indexed_db_database_callbacks.cc
index 3d47ad0..35b15c3 100644
--- a/content/browser/indexed_db/indexed_db_database_callbacks.cc
+++ b/content/browser/indexed_db/indexed_db_database_callbacks.cc
@@ -30,8 +30,8 @@ void IndexedDBDatabaseCallbacks::OnForcedClose() {
dispatcher_host_ = NULL;
}
-void IndexedDBDatabaseCallbacks::OnVersionChange(int64 old_version,
- int64 new_version) {
+void IndexedDBDatabaseCallbacks::OnVersionChange(int64_t old_version,
+ int64_t new_version) {
if (!dispatcher_host_.get())
return;
@@ -39,9 +39,8 @@ void IndexedDBDatabaseCallbacks::OnVersionChange(int64 old_version,
ipc_thread_id_, ipc_database_callbacks_id_, old_version, new_version));
}
-void IndexedDBDatabaseCallbacks::OnAbort(
- int64 host_transaction_id,
- const IndexedDBDatabaseError& error) {
+void IndexedDBDatabaseCallbacks::OnAbort(int64_t host_transaction_id,
+ const IndexedDBDatabaseError& error) {
if (!dispatcher_host_.get())
return;
@@ -54,7 +53,7 @@ void IndexedDBDatabaseCallbacks::OnAbort(
error.message()));
}
-void IndexedDBDatabaseCallbacks::OnComplete(int64 host_transaction_id) {
+void IndexedDBDatabaseCallbacks::OnComplete(int64_t host_transaction_id) {
if (!dispatcher_host_.get())
return;
diff --git a/content/browser/indexed_db/indexed_db_database_callbacks.h b/content/browser/indexed_db/indexed_db_database_callbacks.h
index ad16a04..5c8892e 100644
--- a/content/browser/indexed_db/indexed_db_database_callbacks.h
+++ b/content/browser/indexed_db/indexed_db_database_callbacks.h
@@ -5,7 +5,9 @@
#ifndef CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_DATABASE_CALLBACKS_H_
#define CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_DATABASE_CALLBACKS_H_
-#include "base/basictypes.h"
+#include <stdint.h>
+
+#include "base/macros.h"
#include "base/memory/ref_counted.h"
#include "content/common/content_export.h"
@@ -21,11 +23,11 @@ class CONTENT_EXPORT IndexedDBDatabaseCallbacks
int ipc_database_callbacks_id);
virtual void OnForcedClose();
- virtual void OnVersionChange(int64 old_version, int64 new_version);
+ virtual void OnVersionChange(int64_t old_version, int64_t new_version);
- virtual void OnAbort(int64 host_transaction_id,
+ virtual void OnAbort(int64_t host_transaction_id,
const IndexedDBDatabaseError& error);
- virtual void OnComplete(int64 host_transaction_id);
+ virtual void OnComplete(int64_t host_transaction_id);
protected:
virtual ~IndexedDBDatabaseCallbacks();
diff --git a/content/browser/indexed_db/indexed_db_database_error.cc b/content/browser/indexed_db/indexed_db_database_error.cc
index ff05a77..05c0cb5 100644
--- a/content/browser/indexed_db/indexed_db_database_error.cc
+++ b/content/browser/indexed_db/indexed_db_database_error.cc
@@ -6,19 +6,17 @@
namespace content {
-IndexedDBDatabaseError::IndexedDBDatabaseError(uint16 code) : code_(code) {
-}
+IndexedDBDatabaseError::IndexedDBDatabaseError(uint16_t code) : code_(code) {}
IndexedDBDatabaseError::IndexedDBDatabaseError() = default;
-IndexedDBDatabaseError::IndexedDBDatabaseError(uint16 code, const char* message)
- : code_(code), message_(base::ASCIIToUTF16(message)) {
-}
+IndexedDBDatabaseError::IndexedDBDatabaseError(uint16_t code,
+ const char* message)
+ : code_(code), message_(base::ASCIIToUTF16(message)) {}
-IndexedDBDatabaseError::IndexedDBDatabaseError(uint16 code,
+IndexedDBDatabaseError::IndexedDBDatabaseError(uint16_t code,
const base::string16& message)
- : code_(code), message_(message) {
-}
+ : code_(code), message_(message) {}
IndexedDBDatabaseError::~IndexedDBDatabaseError() = default;
diff --git a/content/browser/indexed_db/indexed_db_database_error.h b/content/browser/indexed_db/indexed_db_database_error.h
index 7b233f0..6106f75 100644
--- a/content/browser/indexed_db/indexed_db_database_error.h
+++ b/content/browser/indexed_db/indexed_db_database_error.h
@@ -5,7 +5,8 @@
#ifndef CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_DATABASE_ERROR_H_
#define CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_DATABASE_ERROR_H_
-#include "base/basictypes.h"
+#include <stdint.h>
+
#include "base/strings/string16.h"
#include "base/strings/utf_string_conversions.h"
@@ -14,18 +15,18 @@ namespace content {
class IndexedDBDatabaseError {
public:
IndexedDBDatabaseError();
- explicit IndexedDBDatabaseError(uint16 code);
- IndexedDBDatabaseError(uint16 code, const char* message);
- IndexedDBDatabaseError(uint16 code, const base::string16& message);
+ explicit IndexedDBDatabaseError(uint16_t code);
+ IndexedDBDatabaseError(uint16_t code, const char* message);
+ IndexedDBDatabaseError(uint16_t code, const base::string16& message);
~IndexedDBDatabaseError();
IndexedDBDatabaseError& operator=(const IndexedDBDatabaseError& rhs);
- uint16 code() const { return code_; }
+ uint16_t code() const { return code_; }
const base::string16& message() const { return message_; }
private:
- uint16 code_ = 0;
+ uint16_t code_ = 0;
base::string16 message_;
};
diff --git a/content/browser/indexed_db/indexed_db_database_unittest.cc b/content/browser/indexed_db/indexed_db_database_unittest.cc
index eb5df98..4987882 100644
--- a/content/browser/indexed_db/indexed_db_database_unittest.cc
+++ b/content/browser/indexed_db/indexed_db_database_unittest.cc
@@ -4,10 +4,13 @@
#include "content/browser/indexed_db/indexed_db_database.h"
+#include <stdint.h>
+
#include <set>
#include "base/auto_reset.h"
#include "base/logging.h"
+#include "base/macros.h"
#include "base/run_loop.h"
#include "base/strings/string16.h"
#include "base/strings/utf_string_conversions.h"
@@ -71,7 +74,7 @@ TEST(IndexedDBDatabaseTest, ConnectionLifecycle) {
scoped_refptr<MockIndexedDBCallbacks> request1(new MockIndexedDBCallbacks());
scoped_refptr<MockIndexedDBDatabaseCallbacks> callbacks1(
new MockIndexedDBDatabaseCallbacks());
- const int64 transaction_id1 = 1;
+ const int64_t transaction_id1 = 1;
IndexedDBPendingConnection connection1(
request1,
callbacks1,
@@ -85,7 +88,7 @@ TEST(IndexedDBDatabaseTest, ConnectionLifecycle) {
scoped_refptr<MockIndexedDBCallbacks> request2(new MockIndexedDBCallbacks());
scoped_refptr<MockIndexedDBDatabaseCallbacks> callbacks2(
new MockIndexedDBDatabaseCallbacks());
- const int64 transaction_id2 = 2;
+ const int64_t transaction_id2 = 2;
IndexedDBPendingConnection connection2(
request2,
callbacks2,
@@ -129,7 +132,7 @@ TEST(IndexedDBDatabaseTest, ForcedClose) {
scoped_refptr<MockIndexedDBDatabaseCallbacks> callbacks(
new MockIndexedDBDatabaseCallbacks());
scoped_refptr<MockIndexedDBCallbacks> request(new MockIndexedDBCallbacks());
- const int64 upgrade_transaction_id = 3;
+ const int64_t upgrade_transaction_id = 3;
IndexedDBPendingConnection connection(
request,
callbacks,
@@ -139,8 +142,8 @@ TEST(IndexedDBDatabaseTest, ForcedClose) {
database->OpenConnection(connection);
EXPECT_EQ(database.get(), request->connection()->database());
- const int64 transaction_id = 123;
- const std::vector<int64> scope;
+ const int64_t transaction_id = 123;
+ const std::vector<int64_t> scope;
database->CreateTransaction(transaction_id,
request->connection(),
scope,
@@ -159,8 +162,8 @@ class MockDeleteCallbacks : public IndexedDBCallbacks {
blocked_called_(false),
success_called_(false) {}
- void OnBlocked(int64 existing_version) override { blocked_called_ = true; }
- void OnSuccess(int64 result) override { success_called_ = true; }
+ void OnBlocked(int64_t existing_version) override { blocked_called_ = true; }
+ void OnSuccess(int64_t result) override { success_called_ = true; }
bool blocked_called() const { return blocked_called_; }
bool success_called() const { return success_called_; }
@@ -193,7 +196,7 @@ TEST(IndexedDBDatabaseTest, PendingDelete) {
scoped_refptr<MockIndexedDBCallbacks> request1(new MockIndexedDBCallbacks());
scoped_refptr<MockIndexedDBDatabaseCallbacks> callbacks1(
new MockIndexedDBDatabaseCallbacks());
- const int64 transaction_id1 = 1;
+ const int64_t transaction_id1 = 1;
IndexedDBPendingConnection connection(
request1,
callbacks1,
@@ -241,7 +244,7 @@ class IndexedDBDatabaseOperationTest : public testing::Test {
request_ = new MockIndexedDBCallbacks();
callbacks_ = new MockIndexedDBDatabaseCallbacks();
- const int64 transaction_id = 1;
+ const int64_t transaction_id = 1;
db_->OpenConnection(IndexedDBPendingConnection(
request_,
callbacks_,
@@ -252,7 +255,7 @@ class IndexedDBDatabaseOperationTest : public testing::Test {
db_->metadata().int_version);
transaction_ = IndexedDBClassFactory::Get()->CreateIndexedDBTransaction(
- transaction_id, callbacks_, std::set<int64>() /*scope*/,
+ transaction_id, callbacks_, std::set<int64_t>() /*scope*/,
blink::WebIDBTransactionModeVersionChange, db_.get(),
new IndexedDBFakeBackingStore::FakeTransaction(commit_success_));
db_->TransactionCreated(transaction_.get());
@@ -283,7 +286,7 @@ class IndexedDBDatabaseOperationTest : public testing::Test {
TEST_F(IndexedDBDatabaseOperationTest, CreateObjectStore) {
EXPECT_EQ(0ULL, db_->metadata().object_stores.size());
- const int64 store_id = 1001;
+ const int64_t store_id = 1001;
db_->CreateObjectStore(transaction_->id(),
store_id,
ASCIIToUTF16("store"),
@@ -297,14 +300,14 @@ TEST_F(IndexedDBDatabaseOperationTest, CreateObjectStore) {
TEST_F(IndexedDBDatabaseOperationTest, CreateIndex) {
EXPECT_EQ(0ULL, db_->metadata().object_stores.size());
- const int64 store_id = 1001;
+ const int64_t store_id = 1001;
db_->CreateObjectStore(transaction_->id(),
store_id,
ASCIIToUTF16("store"),
IndexedDBKeyPath(),
false /*auto_increment*/);
EXPECT_EQ(1ULL, db_->metadata().object_stores.size());
- const int64 index_id = 2002;
+ const int64_t index_id = 2002;
db_->CreateIndex(transaction_->id(),
store_id,
index_id,
@@ -336,7 +339,7 @@ class IndexedDBDatabaseOperationAbortTest
TEST_F(IndexedDBDatabaseOperationAbortTest, CreateObjectStore) {
EXPECT_EQ(0ULL, db_->metadata().object_stores.size());
- const int64 store_id = 1001;
+ const int64_t store_id = 1001;
db_->CreateObjectStore(transaction_->id(),
store_id,
ASCIIToUTF16("store"),
@@ -350,14 +353,14 @@ TEST_F(IndexedDBDatabaseOperationAbortTest, CreateObjectStore) {
TEST_F(IndexedDBDatabaseOperationAbortTest, CreateIndex) {
EXPECT_EQ(0ULL, db_->metadata().object_stores.size());
- const int64 store_id = 1001;
+ const int64_t store_id = 1001;
db_->CreateObjectStore(transaction_->id(),
store_id,
ASCIIToUTF16("store"),
IndexedDBKeyPath(),
false /*auto_increment*/);
EXPECT_EQ(1ULL, db_->metadata().object_stores.size());
- const int64 index_id = 2002;
+ const int64_t index_id = 2002;
db_->CreateIndex(transaction_->id(),
store_id,
index_id,
@@ -375,7 +378,7 @@ TEST_F(IndexedDBDatabaseOperationAbortTest, CreateIndex) {
TEST_F(IndexedDBDatabaseOperationTest, CreatePutDelete) {
EXPECT_EQ(0ULL, db_->metadata().object_stores.size());
- const int64 store_id = 1001;
+ const int64_t store_id = 1001;
// Creation is synchronous.
db_->CreateObjectStore(transaction_->id(),
diff --git a/content/browser/indexed_db/indexed_db_dispatcher_host.cc b/content/browser/indexed_db/indexed_db_dispatcher_host.cc
index 996e6a5..f089013 100644
--- a/content/browser/indexed_db/indexed_db_dispatcher_host.cc
+++ b/content/browser/indexed_db/indexed_db_dispatcher_host.cc
@@ -4,6 +4,8 @@
#include "content/browser/indexed_db/indexed_db_dispatcher_host.h"
+#include <stddef.h>
+
#include "base/bind.h"
#include "base/command_line.h"
#include "base/files/file_path.h"
@@ -76,7 +78,7 @@ IndexedDBDispatcherHost::~IndexedDBDispatcherHost() {
delete iter.second.first;
}
-void IndexedDBDispatcherHost::OnChannelConnected(int32 peer_pid) {
+void IndexedDBDispatcherHost::OnChannelConnected(int32_t peer_pid) {
BrowserMessageFilter::OnChannelConnected(peer_pid);
if (request_context_getter_.get()) {
@@ -160,63 +162,63 @@ bool IndexedDBDispatcherHost::OnMessageReceived(const IPC::Message& message) {
return handled;
}
-int32 IndexedDBDispatcherHost::Add(IndexedDBCursor* cursor) {
+int32_t IndexedDBDispatcherHost::Add(IndexedDBCursor* cursor) {
if (!cursor_dispatcher_host_) {
return 0;
}
return cursor_dispatcher_host_->map_.Add(cursor);
}
-int32 IndexedDBDispatcherHost::Add(IndexedDBConnection* connection,
- int32 ipc_thread_id,
- const GURL& origin_url) {
+int32_t IndexedDBDispatcherHost::Add(IndexedDBConnection* connection,
+ int32_t ipc_thread_id,
+ const GURL& origin_url) {
if (!database_dispatcher_host_) {
connection->Close();
delete connection;
return -1;
}
- int32 ipc_database_id = database_dispatcher_host_->map_.Add(connection);
+ int32_t ipc_database_id = database_dispatcher_host_->map_.Add(connection);
Context()->ConnectionOpened(origin_url, connection);
database_dispatcher_host_->database_url_map_[ipc_database_id] = origin_url;
return ipc_database_id;
}
-void IndexedDBDispatcherHost::RegisterTransactionId(int64 host_transaction_id,
+void IndexedDBDispatcherHost::RegisterTransactionId(int64_t host_transaction_id,
const GURL& url) {
if (!database_dispatcher_host_)
return;
database_dispatcher_host_->transaction_url_map_[host_transaction_id] = url;
}
-int64 IndexedDBDispatcherHost::HostTransactionId(int64 transaction_id) {
+int64_t IndexedDBDispatcherHost::HostTransactionId(int64_t transaction_id) {
// Inject the renderer process id into the transaction id, to
// uniquely identify this transaction, and effectively bind it to
// the renderer that initiated it. The lower 32 bits of
// transaction_id are guaranteed to be unique within that renderer.
base::ProcessId pid = peer_pid();
DCHECK(!(transaction_id >> 32)) << "Transaction ids can only be 32 bits";
- static_assert(sizeof(base::ProcessId) <= sizeof(int32),
+ static_assert(sizeof(base::ProcessId) <= sizeof(int32_t),
"Process ID must fit in 32 bits");
- return transaction_id | (static_cast<uint64>(pid) << 32);
+ return transaction_id | (static_cast<uint64_t>(pid) << 32);
}
-int64 IndexedDBDispatcherHost::RendererTransactionId(
- int64 host_transaction_id) {
+int64_t IndexedDBDispatcherHost::RendererTransactionId(
+ int64_t host_transaction_id) {
DCHECK(host_transaction_id >> 32 == peer_pid())
<< "Invalid renderer target for transaction id";
return host_transaction_id & 0xffffffff;
}
// static
-uint32 IndexedDBDispatcherHost::TransactionIdToRendererTransactionId(
- int64 host_transaction_id) {
+uint32_t IndexedDBDispatcherHost::TransactionIdToRendererTransactionId(
+ int64_t host_transaction_id) {
return host_transaction_id & 0xffffffff;
}
// static
-uint32 IndexedDBDispatcherHost::TransactionIdToProcessId(
- int64 host_transaction_id) {
+uint32_t IndexedDBDispatcherHost::TransactionIdToProcessId(
+ int64_t host_transaction_id) {
return (host_transaction_id >> 32) & 0xffffffff;
}
@@ -263,7 +265,8 @@ void IndexedDBDispatcherHost::DropBlobData(const std::string& uuid) {
}
}
-IndexedDBCursor* IndexedDBDispatcherHost::GetCursorFromId(int32 ipc_cursor_id) {
+IndexedDBCursor* IndexedDBDispatcherHost::GetCursorFromId(
+ int32_t ipc_cursor_id) {
DCHECK(indexed_db_context_->TaskRunner()->RunsTasksOnCurrentThread());
return cursor_dispatcher_host_->map_.Lookup(ipc_cursor_id);
}
@@ -328,7 +331,7 @@ void IndexedDBDispatcherHost::OnIDBFactoryOpen(
GURL origin_url =
storage::GetOriginFromIdentifier(params.database_identifier);
- int64 host_transaction_id = HostTransactionId(params.transaction_id);
+ int64_t host_transaction_id = HostTransactionId(params.transaction_id);
// TODO(dgrogan): Don't let a non-existing database be opened (and therefore
// created) if this origin is already over quota.
@@ -384,7 +387,7 @@ void IndexedDBDispatcherHost::OnAckReceivedBlobs(
DropBlobData(uuid);
}
-void IndexedDBDispatcherHost::FinishTransaction(int64 host_transaction_id,
+void IndexedDBDispatcherHost::FinishTransaction(int64_t host_transaction_id,
bool committed) {
DCHECK(indexed_db_context_->TaskRunner()->RunsTasksOnCurrentThread());
if (!database_dispatcher_host_)
@@ -409,7 +412,7 @@ void IndexedDBDispatcherHost::FinishTransaction(int64 host_transaction_id,
template <typename ObjectType>
ObjectType* IndexedDBDispatcherHost::GetOrTerminateProcess(
IDMap<ObjectType, IDMapOwnPointer>* map,
- int32 ipc_return_object_id) {
+ int32_t ipc_return_object_id) {
DCHECK(indexed_db_context_->TaskRunner()->RunsTasksOnCurrentThread());
ObjectType* return_object = map->Lookup(ipc_return_object_id);
if (!return_object) {
@@ -423,7 +426,7 @@ ObjectType* IndexedDBDispatcherHost::GetOrTerminateProcess(
template <typename ObjectType>
ObjectType* IndexedDBDispatcherHost::GetOrTerminateProcess(
RefIDMap<ObjectType>* map,
- int32 ipc_return_object_id) {
+ int32_t ipc_return_object_id) {
DCHECK(indexed_db_context_->TaskRunner()->RunsTasksOnCurrentThread());
ObjectType* return_object = map->Lookup(ipc_return_object_id);
if (!return_object) {
@@ -435,7 +438,8 @@ ObjectType* IndexedDBDispatcherHost::GetOrTerminateProcess(
}
template <typename MapType>
-void IndexedDBDispatcherHost::DestroyObject(MapType* map, int32 ipc_object_id) {
+void IndexedDBDispatcherHost::DestroyObject(MapType* map,
+ int32_t ipc_object_id) {
GetOrTerminateProcess(map, ipc_object_id);
map->Remove(ipc_object_id);
}
@@ -465,8 +469,8 @@ void IndexedDBDispatcherHost::DatabaseDispatcherHost::CloseAll() {
for (TransactionIDToDatabaseIDMap::iterator iter =
transaction_database_map_.begin();
iter != transaction_database_map_.end();) {
- int64 transaction_id = iter->first;
- int32 ipc_database_id = iter->second;
+ int64_t transaction_id = iter->first;
+ int32_t ipc_database_id = iter->second;
++iter;
IndexedDBConnection* connection = map_.Lookup(ipc_database_id);
if (connection && connection->IsConnected()) {
@@ -535,7 +539,8 @@ void IndexedDBDispatcherHost::DatabaseDispatcherHost::OnCreateObjectStore(
if (!connection || !connection->IsConnected())
return;
- int64 host_transaction_id = parent_->HostTransactionId(params.transaction_id);
+ int64_t host_transaction_id =
+ parent_->HostTransactionId(params.transaction_id);
connection->database()->CreateObjectStore(host_transaction_id,
params.object_store_id,
params.name,
@@ -550,9 +555,9 @@ void IndexedDBDispatcherHost::DatabaseDispatcherHost::OnCreateObjectStore(
}
void IndexedDBDispatcherHost::DatabaseDispatcherHost::OnDeleteObjectStore(
- int32 ipc_database_id,
- int64 transaction_id,
- int64 object_store_id) {
+ int32_t ipc_database_id,
+ int64_t transaction_id,
+ int64_t object_store_id) {
DCHECK(
parent_->indexed_db_context_->TaskRunner()->RunsTasksOnCurrentThread());
IndexedDBConnection* connection =
@@ -573,7 +578,8 @@ void IndexedDBDispatcherHost::DatabaseDispatcherHost::OnCreateTransaction(
if (!connection || !connection->IsConnected())
return;
- int64 host_transaction_id = parent_->HostTransactionId(params.transaction_id);
+ int64_t host_transaction_id =
+ parent_->HostTransactionId(params.transaction_id);
if (transaction_database_map_.find(host_transaction_id) !=
transaction_database_map_.end()) {
@@ -589,7 +595,7 @@ void IndexedDBDispatcherHost::DatabaseDispatcherHost::OnCreateTransaction(
}
void IndexedDBDispatcherHost::DatabaseDispatcherHost::OnClose(
- int32 ipc_database_id) {
+ int32_t ipc_database_id) {
DCHECK(
parent_->indexed_db_context_->TaskRunner()->RunsTasksOnCurrentThread());
IndexedDBConnection* connection =
@@ -600,7 +606,7 @@ void IndexedDBDispatcherHost::DatabaseDispatcherHost::OnClose(
}
void IndexedDBDispatcherHost::DatabaseDispatcherHost::OnVersionChangeIgnored(
- int32 ipc_database_id) {
+ int32_t ipc_database_id) {
DCHECK(
parent_->indexed_db_context_->TaskRunner()->RunsTasksOnCurrentThread());
IndexedDBConnection* connection =
@@ -611,7 +617,7 @@ void IndexedDBDispatcherHost::DatabaseDispatcherHost::OnVersionChangeIgnored(
}
void IndexedDBDispatcherHost::DatabaseDispatcherHost::OnDestroyed(
- int32 ipc_object_id) {
+ int32_t ipc_object_id) {
DCHECK(
parent_->indexed_db_context_->TaskRunner()->RunsTasksOnCurrentThread());
IndexedDBConnection* connection =
@@ -694,7 +700,8 @@ void IndexedDBDispatcherHost::DatabaseDispatcherHost::OnPut(
scoped_refptr<IndexedDBCallbacks> callbacks(new IndexedDBCallbacks(
parent_, params.ipc_thread_id, params.ipc_callbacks_id));
- int64 host_transaction_id = parent_->HostTransactionId(params.transaction_id);
+ int64_t host_transaction_id =
+ parent_->HostTransactionId(params.transaction_id);
std::vector<IndexedDBBlobInfo> blob_info(
params.value.blob_or_file_info.size());
@@ -754,7 +761,8 @@ void IndexedDBDispatcherHost::DatabaseDispatcherHost::OnSetIndexKeys(
if (!connection || !connection->IsConnected())
return;
- int64 host_transaction_id = parent_->HostTransactionId(params.transaction_id);
+ int64_t host_transaction_id =
+ parent_->HostTransactionId(params.transaction_id);
connection->database()->SetIndexKeys(
host_transaction_id,
params.object_store_id,
@@ -763,10 +771,10 @@ void IndexedDBDispatcherHost::DatabaseDispatcherHost::OnSetIndexKeys(
}
void IndexedDBDispatcherHost::DatabaseDispatcherHost::OnSetIndexesReady(
- int32 ipc_database_id,
- int64 transaction_id,
- int64 object_store_id,
- const std::vector<int64>& index_ids) {
+ int32_t ipc_database_id,
+ int64_t transaction_id,
+ int64_t object_store_id,
+ const std::vector<int64_t>& index_ids) {
DCHECK(
parent_->indexed_db_context_->TaskRunner()->RunsTasksOnCurrentThread());
IndexedDBConnection* connection =
@@ -838,11 +846,11 @@ void IndexedDBDispatcherHost::DatabaseDispatcherHost::OnDeleteRange(
}
void IndexedDBDispatcherHost::DatabaseDispatcherHost::OnClear(
- int32 ipc_thread_id,
- int32 ipc_callbacks_id,
- int32 ipc_database_id,
- int64 transaction_id,
- int64 object_store_id) {
+ int32_t ipc_thread_id,
+ int32_t ipc_callbacks_id,
+ int32_t ipc_database_id,
+ int64_t transaction_id,
+ int64_t object_store_id) {
DCHECK(
parent_->indexed_db_context_->TaskRunner()->RunsTasksOnCurrentThread());
IndexedDBConnection* connection =
@@ -858,8 +866,8 @@ void IndexedDBDispatcherHost::DatabaseDispatcherHost::OnClear(
}
void IndexedDBDispatcherHost::DatabaseDispatcherHost::OnAbort(
- int32 ipc_database_id,
- int64 transaction_id) {
+ int32_t ipc_database_id,
+ int64_t transaction_id) {
DCHECK(
parent_->indexed_db_context_->TaskRunner()->RunsTasksOnCurrentThread());
IndexedDBConnection* connection =
@@ -871,8 +879,8 @@ void IndexedDBDispatcherHost::DatabaseDispatcherHost::OnAbort(
}
void IndexedDBDispatcherHost::DatabaseDispatcherHost::OnCommit(
- int32 ipc_database_id,
- int64 transaction_id) {
+ int32_t ipc_database_id,
+ int64_t transaction_id) {
DCHECK(
parent_->indexed_db_context_->TaskRunner()->RunsTasksOnCurrentThread());
IndexedDBConnection* connection =
@@ -880,8 +888,8 @@ void IndexedDBDispatcherHost::DatabaseDispatcherHost::OnCommit(
if (!connection || !connection->IsConnected())
return;
- int64 host_transaction_id = parent_->HostTransactionId(transaction_id);
- int64 transaction_size = transaction_size_map_[host_transaction_id];
+ int64_t host_transaction_id = parent_->HostTransactionId(transaction_id);
+ int64_t transaction_size = transaction_size_map_[host_transaction_id];
if (transaction_size &&
parent_->Context()->WouldBeOverQuota(
transaction_url_map_[host_transaction_id], transaction_size)) {
@@ -903,7 +911,8 @@ void IndexedDBDispatcherHost::DatabaseDispatcherHost::OnCreateIndex(
if (!connection || !connection->IsConnected())
return;
- int64 host_transaction_id = parent_->HostTransactionId(params.transaction_id);
+ int64_t host_transaction_id =
+ parent_->HostTransactionId(params.transaction_id);
connection->database()->CreateIndex(host_transaction_id,
params.object_store_id,
params.index_id,
@@ -920,10 +929,10 @@ void IndexedDBDispatcherHost::DatabaseDispatcherHost::OnCreateIndex(
}
void IndexedDBDispatcherHost::DatabaseDispatcherHost::OnDeleteIndex(
- int32 ipc_database_id,
- int64 transaction_id,
- int64 object_store_id,
- int64 index_id) {
+ int32_t ipc_database_id,
+ int64_t transaction_id,
+ int64_t object_store_id,
+ int64_t index_id) {
DCHECK(
parent_->indexed_db_context_->TaskRunner()->RunsTasksOnCurrentThread());
IndexedDBConnection* connection =
@@ -968,10 +977,10 @@ bool IndexedDBDispatcherHost::CursorDispatcherHost::OnMessageReceived(
}
void IndexedDBDispatcherHost::CursorDispatcherHost::OnAdvance(
- int32 ipc_cursor_id,
- int32 ipc_thread_id,
- int32 ipc_callbacks_id,
- uint32 count) {
+ int32_t ipc_cursor_id,
+ int32_t ipc_thread_id,
+ int32_t ipc_callbacks_id,
+ uint32_t count) {
DCHECK(
parent_->indexed_db_context_->TaskRunner()->RunsTasksOnCurrentThread());
IndexedDBCursor* idb_cursor =
@@ -986,9 +995,9 @@ void IndexedDBDispatcherHost::CursorDispatcherHost::OnAdvance(
}
void IndexedDBDispatcherHost::CursorDispatcherHost::OnContinue(
- int32 ipc_cursor_id,
- int32 ipc_thread_id,
- int32 ipc_callbacks_id,
+ int32_t ipc_cursor_id,
+ int32_t ipc_thread_id,
+ int32_t ipc_callbacks_id,
const IndexedDBKey& key,
const IndexedDBKey& primary_key) {
DCHECK(
@@ -1008,9 +1017,9 @@ void IndexedDBDispatcherHost::CursorDispatcherHost::OnContinue(
}
void IndexedDBDispatcherHost::CursorDispatcherHost::OnPrefetch(
- int32 ipc_cursor_id,
- int32 ipc_thread_id,
- int32 ipc_callbacks_id,
+ int32_t ipc_cursor_id,
+ int32_t ipc_thread_id,
+ int32_t ipc_callbacks_id,
int n) {
DCHECK(
parent_->indexed_db_context_->TaskRunner()->RunsTasksOnCurrentThread());
@@ -1026,7 +1035,7 @@ void IndexedDBDispatcherHost::CursorDispatcherHost::OnPrefetch(
}
void IndexedDBDispatcherHost::CursorDispatcherHost::OnPrefetchReset(
- int32 ipc_cursor_id,
+ int32_t ipc_cursor_id,
int used_prefetches,
int unused_prefetches) {
DCHECK(
@@ -1044,7 +1053,7 @@ void IndexedDBDispatcherHost::CursorDispatcherHost::OnPrefetchReset(
}
void IndexedDBDispatcherHost::CursorDispatcherHost::OnDestroyed(
- int32 ipc_object_id) {
+ int32_t ipc_object_id) {
DCHECK(
parent_->indexed_db_context_->TaskRunner()->RunsTasksOnCurrentThread());
parent_->DestroyObject(&map_, ipc_object_id);
diff --git a/content/browser/indexed_db/indexed_db_dispatcher_host.h b/content/browser/indexed_db/indexed_db_dispatcher_host.h
index b576a46..29edb8a 100644
--- a/content/browser/indexed_db/indexed_db_dispatcher_host.h
+++ b/content/browser/indexed_db/indexed_db_dispatcher_host.h
@@ -5,13 +5,15 @@
#ifndef CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_DISPATCHER_HOST_H_
#define CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_DISPATCHER_HOST_H_
+#include <stdint.h>
+
#include <map>
#include <string>
#include <utility>
#include <vector>
-#include "base/basictypes.h"
#include "base/id_map.h"
+#include "base/macros.h"
#include "base/memory/ref_counted.h"
#include "content/browser/fileapi/chrome_blob_storage_context.h"
#include "content/public/browser/browser_message_filter.h"
@@ -61,14 +63,14 @@ class IndexedDBDispatcherHost : public BrowserMessageFilter {
const content::IndexedDBDatabaseMetadata& metadata);
// BrowserMessageFilter implementation.
- void OnChannelConnected(int32 peer_pid) override;
+ void OnChannelConnected(int32_t peer_pid) override;
void OnChannelClosing() override;
void OnDestruct() const override;
base::TaskRunner* OverrideTaskRunnerForMessage(
const IPC::Message& message) override;
bool OnMessageReceived(const IPC::Message& message) override;
- void FinishTransaction(int64 host_transaction_id, bool committed);
+ void FinishTransaction(int64_t host_transaction_id, bool committed);
// A shortcut for accessing our context.
IndexedDBContextImpl* Context() { return indexed_db_context_.get(); }
@@ -78,24 +80,26 @@ class IndexedDBDispatcherHost : public BrowserMessageFilter {
// IndexedDBCallbacks call these methods to add the results into the
// applicable map. See below for more details.
- int32 Add(IndexedDBCursor* cursor);
- int32 Add(IndexedDBConnection* connection,
- int32 ipc_thread_id,
- const GURL& origin_url);
+ int32_t Add(IndexedDBCursor* cursor);
+ int32_t Add(IndexedDBConnection* connection,
+ int32_t ipc_thread_id,
+ const GURL& origin_url);
- void RegisterTransactionId(int64 host_transaction_id, const GURL& origin_url);
+ void RegisterTransactionId(int64_t host_transaction_id,
+ const GURL& origin_url);
- IndexedDBCursor* GetCursorFromId(int32 ipc_cursor_id);
+ IndexedDBCursor* GetCursorFromId(int32_t ipc_cursor_id);
// These are called to map a 32-bit front-end (renderer-specific) transaction
// id to and from a back-end ("host") transaction id that encodes the process
// id in the high 32 bits. The mapping is host-specific and ids are validated.
- int64 HostTransactionId(int64 transaction_id);
- int64 RendererTransactionId(int64 host_transaction_id);
+ int64_t HostTransactionId(int64_t transaction_id);
+ int64_t RendererTransactionId(int64_t host_transaction_id);
// These are called to decode a host transaction ID, for diagnostic purposes.
- static uint32 TransactionIdToRendererTransactionId(int64 host_transaction_id);
- static uint32 TransactionIdToProcessId(int64 host_transaction_id);
+ static uint32_t TransactionIdToRendererTransactionId(
+ int64_t host_transaction_id);
+ static uint32_t TransactionIdToProcessId(int64_t host_transaction_id);
std::string HoldBlobData(const IndexedDBBlobInfo& blob_info);
@@ -107,16 +111,16 @@ class IndexedDBDispatcherHost : public BrowserMessageFilter {
// Used in nested classes.
typedef std::map<std::string, std::pair<storage::BlobDataHandle*, int>>
BlobDataHandleMap;
- typedef std::map<int64, int64> TransactionIDToDatabaseIDMap;
- typedef std::map<int64, uint64> TransactionIDToSizeMap;
- typedef std::map<int64, GURL> TransactionIDToURLMap;
- typedef std::map<int32, GURL> WebIDBObjectIDToURLMap;
+ typedef std::map<int64_t, int64_t> TransactionIDToDatabaseIDMap;
+ typedef std::map<int64_t, uint64_t> TransactionIDToSizeMap;
+ typedef std::map<int64_t, GURL> TransactionIDToURLMap;
+ typedef std::map<int32_t, GURL> WebIDBObjectIDToURLMap;
// IDMap for RefCounted types
template <typename RefCountedType>
class RefIDMap {
public:
- typedef int32 KeyType;
+ typedef int32_t KeyType;
RefIDMap() {}
~RefIDMap() {}
@@ -154,14 +158,14 @@ class IndexedDBDispatcherHost : public BrowserMessageFilter {
void OnCreateObjectStore(
const IndexedDBHostMsg_DatabaseCreateObjectStore_Params& params);
- void OnDeleteObjectStore(int32 ipc_database_id,
- int64 transaction_id,
- int64 object_store_id);
+ void OnDeleteObjectStore(int32_t ipc_database_id,
+ int64_t transaction_id,
+ int64_t object_store_id);
void OnCreateTransaction(
const IndexedDBHostMsg_DatabaseCreateTransaction_Params&);
- void OnClose(int32 ipc_database_id);
- void OnVersionChangeIgnored(int32 ipc_database_id);
- void OnDestroyed(int32 ipc_database_id);
+ void OnClose(int32_t ipc_database_id);
+ void OnVersionChangeIgnored(int32_t ipc_database_id);
+ void OnDestroyed(int32_t ipc_database_id);
void OnGet(const IndexedDBHostMsg_DatabaseGet_Params& params);
void OnGetAll(const IndexedDBHostMsg_DatabaseGetAll_Params& params);
@@ -172,28 +176,28 @@ class IndexedDBDispatcherHost : public BrowserMessageFilter {
std::vector<storage::BlobDataHandle*> handles);
void OnSetIndexKeys(
const IndexedDBHostMsg_DatabaseSetIndexKeys_Params& params);
- void OnSetIndexesReady(int32 ipc_database_id,
- int64 transaction_id,
- int64 object_store_id,
- const std::vector<int64>& ids);
+ void OnSetIndexesReady(int32_t ipc_database_id,
+ int64_t transaction_id,
+ int64_t object_store_id,
+ const std::vector<int64_t>& ids);
void OnOpenCursor(const IndexedDBHostMsg_DatabaseOpenCursor_Params& params);
void OnCount(const IndexedDBHostMsg_DatabaseCount_Params& params);
void OnDeleteRange(
const IndexedDBHostMsg_DatabaseDeleteRange_Params& params);
- void OnClear(int32 ipc_thread_id,
- int32 ipc_callbacks_id,
- int32 ipc_database_id,
- int64 transaction_id,
- int64 object_store_id);
+ void OnClear(int32_t ipc_thread_id,
+ int32_t ipc_callbacks_id,
+ int32_t ipc_database_id,
+ int64_t transaction_id,
+ int64_t object_store_id);
void OnCreateIndex(
const IndexedDBHostMsg_DatabaseCreateIndex_Params& params);
- void OnDeleteIndex(int32 ipc_database_id,
- int64 transaction_id,
- int64 object_store_id,
- int64 index_id);
+ void OnDeleteIndex(int32_t ipc_database_id,
+ int64_t transaction_id,
+ int64_t object_store_id,
+ int64_t index_id);
- void OnAbort(int32 ipc_database_id, int64 transaction_id);
- void OnCommit(int32 ipc_database_id, int64 transaction_id);
+ void OnAbort(int32_t ipc_database_id, int64_t transaction_id);
+ void OnCommit(int32_t ipc_database_id, int64_t transaction_id);
IndexedDBDispatcherHost* parent_;
IDMap<IndexedDBConnection, IDMapOwnPointer> map_;
WebIDBObjectIDToURLMap database_url_map_;
@@ -212,23 +216,23 @@ class IndexedDBDispatcherHost : public BrowserMessageFilter {
bool OnMessageReceived(const IPC::Message& message);
- void OnAdvance(int32 ipc_object_store_id,
- int32 ipc_thread_id,
- int32 ipc_callbacks_id,
- uint32 count);
- void OnContinue(int32 ipc_object_store_id,
- int32 ipc_thread_id,
- int32 ipc_callbacks_id,
+ void OnAdvance(int32_t ipc_object_store_id,
+ int32_t ipc_thread_id,
+ int32_t ipc_callbacks_id,
+ uint32_t count);
+ void OnContinue(int32_t ipc_object_store_id,
+ int32_t ipc_thread_id,
+ int32_t ipc_callbacks_id,
const IndexedDBKey& key,
const IndexedDBKey& primary_key);
- void OnPrefetch(int32 ipc_cursor_id,
- int32 ipc_thread_id,
- int32 ipc_callbacks_id,
+ void OnPrefetch(int32_t ipc_cursor_id,
+ int32_t ipc_thread_id,
+ int32_t ipc_callbacks_id,
int n);
- void OnPrefetchReset(int32 ipc_cursor_id,
+ void OnPrefetchReset(int32_t ipc_cursor_id,
int used_prefetches,
int unused_prefetches);
- void OnDestroyed(int32 ipc_cursor_id);
+ void OnDestroyed(int32_t ipc_cursor_id);
IndexedDBDispatcherHost* parent_;
RefIDMap<IndexedDBCursor> map_;
@@ -242,13 +246,13 @@ class IndexedDBDispatcherHost : public BrowserMessageFilter {
// Helper templates.
template <class ReturnType>
ReturnType* GetOrTerminateProcess(IDMap<ReturnType, IDMapOwnPointer>* map,
- int32 ipc_return_object_id);
+ int32_t ipc_return_object_id);
template <class ReturnType>
ReturnType* GetOrTerminateProcess(RefIDMap<ReturnType>* map,
- int32 ipc_return_object_id);
+ int32_t ipc_return_object_id);
template <typename MapType>
- void DestroyObject(MapType* map, int32 ipc_object_id);
+ void DestroyObject(MapType* map, int32_t ipc_object_id);
// Message processing. Most of the work is delegated to the dispatcher hosts
// below.
diff --git a/content/browser/indexed_db/indexed_db_factory.h b/content/browser/indexed_db/indexed_db_factory.h
index dc52342..a50e5b3 100644
--- a/content/browser/indexed_db/indexed_db_factory.h
+++ b/content/browser/indexed_db/indexed_db_factory.h
@@ -5,13 +5,15 @@
#ifndef CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_FACTORY_H_
#define CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_FACTORY_H_
+#include <stddef.h>
+
#include <map>
#include <set>
#include <string>
#include <utility>
-#include "base/basictypes.h"
#include "base/files/file_path.h"
+#include "base/macros.h"
#include "base/memory/ref_counted.h"
#include "base/strings/string16.h"
#include "content/browser/indexed_db/indexed_db_callbacks.h"
diff --git a/content/browser/indexed_db/indexed_db_factory_impl.cc b/content/browser/indexed_db/indexed_db_factory_impl.cc
index e66ff62..2261dcc 100644
--- a/content/browser/indexed_db/indexed_db_factory_impl.cc
+++ b/content/browser/indexed_db/indexed_db_factory_impl.cc
@@ -4,6 +4,8 @@
#include "content/browser/indexed_db/indexed_db_factory_impl.h"
+#include <stdint.h>
+
#include <utility>
#include <vector>
@@ -23,7 +25,7 @@ using base::ASCIIToUTF16;
namespace content {
-const int64 kBackingStoreGracePeriodMs = 2000;
+const int64_t kBackingStoreGracePeriodMs = 2000;
IndexedDBFactoryImpl::IndexedDBFactoryImpl(IndexedDBContextImpl* context)
: context_(context) {
@@ -270,7 +272,7 @@ void IndexedDBFactoryImpl::DeleteDatabase(
return;
}
if (!ContainsValue(names, name)) {
- const int64 version = 0;
+ const int64_t version = 0;
callbacks->OnSuccess(version);
backing_store = NULL;
ReleaseBackingStore(origin_url, false /* immediate */);
diff --git a/content/browser/indexed_db/indexed_db_factory_impl.h b/content/browser/indexed_db/indexed_db_factory_impl.h
index d225fd9..b8a8d1a 100644
--- a/content/browser/indexed_db/indexed_db_factory_impl.h
+++ b/content/browser/indexed_db/indexed_db_factory_impl.h
@@ -5,11 +5,14 @@
#ifndef CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_FACTORY_IMPL_H_
#define CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_FACTORY_IMPL_H_
+#include <stddef.h>
+
#include <map>
#include <set>
#include <string>
#include "base/gtest_prod_util.h"
+#include "base/macros.h"
#include "content/browser/indexed_db/indexed_db_factory.h"
namespace content {
diff --git a/content/browser/indexed_db/indexed_db_factory_unittest.cc b/content/browser/indexed_db/indexed_db_factory_unittest.cc
index 8be121a..c971431 100644
--- a/content/browser/indexed_db/indexed_db_factory_unittest.cc
+++ b/content/browser/indexed_db/indexed_db_factory_unittest.cc
@@ -2,9 +2,12 @@
// 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/file_util.h"
#include "base/files/scoped_temp_dir.h"
#include "base/logging.h"
+#include "base/macros.h"
#include "base/message_loop/message_loop.h"
#include "base/strings/utf_string_conversions.h"
#include "base/test/test_simple_task_runner.h"
@@ -273,7 +276,7 @@ TEST_F(IndexedDBFactoryTest, BackingStoreReleasedOnForcedClose) {
scoped_refptr<MockIndexedDBCallbacks> callbacks(new MockIndexedDBCallbacks());
scoped_refptr<MockIndexedDBDatabaseCallbacks> db_callbacks(
new MockIndexedDBDatabaseCallbacks());
- const int64 transaction_id = 1;
+ const int64_t transaction_id = 1;
IndexedDBPendingConnection connection(
callbacks,
db_callbacks,
@@ -306,7 +309,7 @@ TEST_F(IndexedDBFactoryTest, BackingStoreReleaseDelayedOnClose) {
scoped_refptr<MockIndexedDBCallbacks> callbacks(new MockIndexedDBCallbacks());
scoped_refptr<MockIndexedDBDatabaseCallbacks> db_callbacks(
new MockIndexedDBDatabaseCallbacks());
- const int64 transaction_id = 1;
+ const int64_t transaction_id = 1;
IndexedDBPendingConnection connection(
callbacks,
db_callbacks,
@@ -401,7 +404,7 @@ TEST_F(IndexedDBFactoryTest, ForceCloseReleasesBackingStore) {
scoped_refptr<MockIndexedDBCallbacks> callbacks(new MockIndexedDBCallbacks());
scoped_refptr<MockIndexedDBDatabaseCallbacks> db_callbacks(
new MockIndexedDBDatabaseCallbacks());
- const int64 transaction_id = 1;
+ const int64_t transaction_id = 1;
IndexedDBPendingConnection connection(
callbacks,
db_callbacks,
@@ -443,7 +446,7 @@ class UpgradeNeededCallbacks : public MockIndexedDBCallbacks {
}
void OnUpgradeNeeded(
- int64 old_version,
+ int64_t old_version,
scoped_ptr<IndexedDBConnection> connection,
const content::IndexedDBDatabaseMetadata& metadata) override {
connection_ = connection.Pass();
@@ -479,8 +482,8 @@ TEST_F(IndexedDBFactoryTest, DatabaseFailedOpen) {
ASSERT_TRUE(temp_directory.CreateUniqueTempDir());
const base::string16 db_name(ASCIIToUTF16("db"));
- const int64 db_version = 2;
- const int64 transaction_id = 1;
+ const int64_t db_version = 2;
+ const int64_t transaction_id = 1;
scoped_refptr<IndexedDBDatabaseCallbacks> db_callbacks(
new MockIndexedDBDatabaseCallbacks());
diff --git a/content/browser/indexed_db/indexed_db_fake_backing_store.cc b/content/browser/indexed_db/indexed_db_fake_backing_store.cc
index 49040ae..01f83cb 100644
--- a/content/browser/indexed_db/indexed_db_fake_backing_store.cc
+++ b/content/browser/indexed_db/indexed_db_fake_backing_store.cc
@@ -46,13 +46,13 @@ leveldb::Status IndexedDBFakeBackingStore::GetIDBDatabaseMetaData(
leveldb::Status IndexedDBFakeBackingStore::CreateIDBDatabaseMetaData(
const base::string16& name,
const base::string16& version,
- int64 int_version,
- int64* row_id) {
+ int64_t int_version,
+ int64_t* row_id) {
return leveldb::Status::OK();
}
bool IndexedDBFakeBackingStore::UpdateIDBDatabaseIntVersion(Transaction*,
- int64 row_id,
- int64 version) {
+ int64_t row_id,
+ int64_t version) {
return false;
}
leveldb::Status IndexedDBFakeBackingStore::DeleteDatabase(
@@ -62,8 +62,8 @@ leveldb::Status IndexedDBFakeBackingStore::DeleteDatabase(
leveldb::Status IndexedDBFakeBackingStore::CreateObjectStore(
Transaction*,
- int64 database_id,
- int64 object_store_id,
+ int64_t database_id,
+ int64_t object_store_id,
const base::string16& name,
const IndexedDBKeyPath&,
bool auto_increment) {
@@ -72,15 +72,15 @@ leveldb::Status IndexedDBFakeBackingStore::CreateObjectStore(
leveldb::Status IndexedDBFakeBackingStore::DeleteObjectStore(
Transaction* transaction,
- int64 database_id,
- int64 object_store_id) {
+ int64_t database_id,
+ int64_t object_store_id) {
return leveldb::Status::OK();
}
leveldb::Status IndexedDBFakeBackingStore::PutRecord(
IndexedDBBackingStore::Transaction* transaction,
- int64 database_id,
- int64 object_store_id,
+ int64_t database_id,
+ int64_t object_store_id,
const IndexedDBKey& key,
IndexedDBValue* value,
ScopedVector<storage::BlobDataHandle>* handles,
@@ -90,36 +90,36 @@ leveldb::Status IndexedDBFakeBackingStore::PutRecord(
leveldb::Status IndexedDBFakeBackingStore::ClearObjectStore(
Transaction*,
- int64 database_id,
- int64 object_store_id) {
+ int64_t database_id,
+ int64_t object_store_id) {
return leveldb::Status::OK();
}
leveldb::Status IndexedDBFakeBackingStore::DeleteRecord(
Transaction*,
- int64 database_id,
- int64 object_store_id,
+ int64_t database_id,
+ int64_t object_store_id,
const RecordIdentifier&) {
return leveldb::Status::OK();
}
leveldb::Status IndexedDBFakeBackingStore::GetKeyGeneratorCurrentNumber(
Transaction*,
- int64 database_id,
- int64 object_store_id,
- int64* current_number) {
+ int64_t database_id,
+ int64_t object_store_id,
+ int64_t* current_number) {
return leveldb::Status::OK();
}
leveldb::Status IndexedDBFakeBackingStore::MaybeUpdateKeyGeneratorCurrentNumber(
Transaction*,
- int64 database_id,
- int64 object_store_id,
- int64 new_number,
+ int64_t database_id,
+ int64_t object_store_id,
+ int64_t new_number,
bool check_current) {
return leveldb::Status::OK();
}
leveldb::Status IndexedDBFakeBackingStore::KeyExistsInObjectStore(
Transaction*,
- int64 database_id,
- int64 object_store_id,
+ int64_t database_id,
+ int64_t object_store_id,
const IndexedDBKey&,
RecordIdentifier* found_record_identifier,
bool* found) {
@@ -128,9 +128,9 @@ leveldb::Status IndexedDBFakeBackingStore::KeyExistsInObjectStore(
leveldb::Status IndexedDBFakeBackingStore::CreateIndex(
Transaction*,
- int64 database_id,
- int64 object_store_id,
- int64 index_id,
+ int64_t database_id,
+ int64_t object_store_id,
+ int64_t index_id,
const base::string16& name,
const IndexedDBKeyPath&,
bool is_unique,
@@ -139,29 +139,29 @@ leveldb::Status IndexedDBFakeBackingStore::CreateIndex(
}
leveldb::Status IndexedDBFakeBackingStore::DeleteIndex(Transaction*,
- int64 database_id,
- int64 object_store_id,
- int64 index_id) {
+ int64_t database_id,
+ int64_t object_store_id,
+ int64_t index_id) {
return leveldb::Status::OK();
}
leveldb::Status IndexedDBFakeBackingStore::PutIndexDataForRecord(
Transaction*,
- int64 database_id,
- int64 object_store_id,
- int64 index_id,
+ int64_t database_id,
+ int64_t object_store_id,
+ int64_t index_id,
const IndexedDBKey&,
const RecordIdentifier&) {
return leveldb::Status::OK();
}
-void IndexedDBFakeBackingStore::ReportBlobUnused(int64 database_id,
- int64 blob_key) {}
+void IndexedDBFakeBackingStore::ReportBlobUnused(int64_t database_id,
+ int64_t blob_key) {}
scoped_ptr<IndexedDBBackingStore::Cursor>
IndexedDBFakeBackingStore::OpenObjectStoreKeyCursor(
IndexedDBBackingStore::Transaction* transaction,
- int64 database_id,
- int64 object_store_id,
+ int64_t database_id,
+ int64_t object_store_id,
const IndexedDBKeyRange& key_range,
blink::WebIDBCursorDirection,
leveldb::Status* s) {
@@ -170,8 +170,8 @@ IndexedDBFakeBackingStore::OpenObjectStoreKeyCursor(
scoped_ptr<IndexedDBBackingStore::Cursor>
IndexedDBFakeBackingStore::OpenObjectStoreCursor(
IndexedDBBackingStore::Transaction* transaction,
- int64 database_id,
- int64 object_store_id,
+ int64_t database_id,
+ int64_t object_store_id,
const IndexedDBKeyRange& key_range,
blink::WebIDBCursorDirection,
leveldb::Status* s) {
@@ -180,9 +180,9 @@ IndexedDBFakeBackingStore::OpenObjectStoreCursor(
scoped_ptr<IndexedDBBackingStore::Cursor>
IndexedDBFakeBackingStore::OpenIndexKeyCursor(
IndexedDBBackingStore::Transaction* transaction,
- int64 database_id,
- int64 object_store_id,
- int64 index_id,
+ int64_t database_id,
+ int64_t object_store_id,
+ int64_t index_id,
const IndexedDBKeyRange& key_range,
blink::WebIDBCursorDirection,
leveldb::Status* s) {
@@ -191,9 +191,9 @@ IndexedDBFakeBackingStore::OpenIndexKeyCursor(
scoped_ptr<IndexedDBBackingStore::Cursor>
IndexedDBFakeBackingStore::OpenIndexCursor(
IndexedDBBackingStore::Transaction* transaction,
- int64 database_id,
- int64 object_store_id,
- int64 index_id,
+ int64_t database_id,
+ int64_t object_store_id,
+ int64_t index_id,
const IndexedDBKeyRange& key_range,
blink::WebIDBCursorDirection,
leveldb::Status* s) {
diff --git a/content/browser/indexed_db/indexed_db_fake_backing_store.h b/content/browser/indexed_db/indexed_db_fake_backing_store.h
index 9a4fd09..8f03300 100644
--- a/content/browser/indexed_db/indexed_db_fake_backing_store.h
+++ b/content/browser/indexed_db/indexed_db_fake_backing_store.h
@@ -5,8 +5,11 @@
#ifndef CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_FAKE_BACKING_STORE_H_
#define CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_FAKE_BACKING_STORE_H_
+#include <stdint.h>
+
#include <vector>
+#include "base/macros.h"
#include "content/browser/indexed_db/indexed_db_backing_store.h"
namespace base {
@@ -28,100 +31,101 @@ class IndexedDBFakeBackingStore : public IndexedDBBackingStore {
bool* found) override;
leveldb::Status CreateIDBDatabaseMetaData(const base::string16& name,
const base::string16& version,
- int64 int_version,
- int64* row_id) override;
+ int64_t int_version,
+ int64_t* row_id) override;
bool UpdateIDBDatabaseIntVersion(Transaction*,
- int64 row_id,
- int64 version) override;
+ int64_t row_id,
+ int64_t version) override;
leveldb::Status DeleteDatabase(const base::string16& name) override;
leveldb::Status CreateObjectStore(Transaction*,
- int64 database_id,
- int64 object_store_id,
+ int64_t database_id,
+ int64_t object_store_id,
const base::string16& name,
const IndexedDBKeyPath&,
bool auto_increment) override;
leveldb::Status DeleteObjectStore(Transaction* transaction,
- int64 database_id,
- int64 object_store_id) override;
+ int64_t database_id,
+ int64_t object_store_id) override;
leveldb::Status PutRecord(IndexedDBBackingStore::Transaction* transaction,
- int64 database_id,
- int64 object_store_id,
+ int64_t database_id,
+ int64_t object_store_id,
const IndexedDBKey& key,
IndexedDBValue* value,
ScopedVector<storage::BlobDataHandle>* handles,
RecordIdentifier* record) override;
leveldb::Status ClearObjectStore(Transaction*,
- int64 database_id,
- int64 object_store_id) override;
+ int64_t database_id,
+ int64_t object_store_id) override;
leveldb::Status DeleteRecord(Transaction*,
- int64 database_id,
- int64 object_store_id,
+ int64_t database_id,
+ int64_t object_store_id,
const RecordIdentifier&) override;
- leveldb::Status GetKeyGeneratorCurrentNumber(Transaction*,
- int64 database_id,
- int64 object_store_id,
- int64* current_number) override;
+ leveldb::Status GetKeyGeneratorCurrentNumber(
+ Transaction*,
+ int64_t database_id,
+ int64_t object_store_id,
+ int64_t* current_number) override;
leveldb::Status MaybeUpdateKeyGeneratorCurrentNumber(
Transaction*,
- int64 database_id,
- int64 object_store_id,
- int64 new_number,
+ int64_t database_id,
+ int64_t object_store_id,
+ int64_t new_number,
bool check_current) override;
leveldb::Status KeyExistsInObjectStore(
Transaction*,
- int64 database_id,
- int64 object_store_id,
+ int64_t database_id,
+ int64_t object_store_id,
const IndexedDBKey&,
RecordIdentifier* found_record_identifier,
bool* found) override;
leveldb::Status CreateIndex(Transaction*,
- int64 database_id,
- int64 object_store_id,
- int64 index_id,
+ int64_t database_id,
+ int64_t object_store_id,
+ int64_t index_id,
const base::string16& name,
const IndexedDBKeyPath&,
bool is_unique,
bool is_multi_entry) override;
leveldb::Status DeleteIndex(Transaction*,
- int64 database_id,
- int64 object_store_id,
- int64 index_id) override;
+ int64_t database_id,
+ int64_t object_store_id,
+ int64_t index_id) override;
leveldb::Status PutIndexDataForRecord(Transaction*,
- int64 database_id,
- int64 object_store_id,
- int64 index_id,
+ int64_t database_id,
+ int64_t object_store_id,
+ int64_t index_id,
const IndexedDBKey&,
const RecordIdentifier&) override;
- void ReportBlobUnused(int64 database_id, int64 blob_key) override;
+ void ReportBlobUnused(int64_t database_id, int64_t blob_key) override;
scoped_ptr<Cursor> OpenObjectStoreKeyCursor(
Transaction* transaction,
- int64 database_id,
- int64 object_store_id,
+ int64_t database_id,
+ int64_t object_store_id,
const IndexedDBKeyRange& key_range,
blink::WebIDBCursorDirection,
leveldb::Status*) override;
scoped_ptr<Cursor> OpenObjectStoreCursor(Transaction* transaction,
- int64 database_id,
- int64 object_store_id,
+ int64_t database_id,
+ int64_t object_store_id,
const IndexedDBKeyRange& key_range,
blink::WebIDBCursorDirection,
leveldb::Status*) override;
scoped_ptr<Cursor> OpenIndexKeyCursor(Transaction* transaction,
- int64 database_id,
- int64 object_store_id,
- int64 index_id,
+ int64_t database_id,
+ int64_t object_store_id,
+ int64_t index_id,
const IndexedDBKeyRange& key_range,
blink::WebIDBCursorDirection,
leveldb::Status*) override;
scoped_ptr<Cursor> OpenIndexCursor(Transaction* transaction,
- int64 database_id,
- int64 object_store_id,
- int64 index_id,
+ int64_t database_id,
+ int64_t object_store_id,
+ int64_t index_id,
const IndexedDBKeyRange& key_range,
blink::WebIDBCursorDirection,
leveldb::Status*) override;
diff --git a/content/browser/indexed_db/indexed_db_index_writer.cc b/content/browser/indexed_db/indexed_db_index_writer.cc
index 53ae963..6378c9b 100644
--- a/content/browser/indexed_db/indexed_db_index_writer.cc
+++ b/content/browser/indexed_db/indexed_db_index_writer.cc
@@ -4,6 +4,8 @@
#include "content/browser/indexed_db/indexed_db_index_writer.h"
+#include <stddef.h>
+
#include "base/logging.h"
#include "base/strings/utf_string_conversions.h"
#include "content/browser/indexed_db/indexed_db_backing_store.h"
@@ -31,9 +33,9 @@ IndexWriter::~IndexWriter() {}
bool IndexWriter::VerifyIndexKeys(
IndexedDBBackingStore* backing_store,
IndexedDBBackingStore::Transaction* transaction,
- int64 database_id,
- int64 object_store_id,
- int64 index_id,
+ int64_t database_id,
+ int64_t object_store_id,
+ int64_t index_id,
bool* can_add_keys,
const IndexedDBKey& primary_key,
base::string16* error_message) const {
@@ -68,9 +70,9 @@ void IndexWriter::WriteIndexKeys(
const IndexedDBBackingStore::RecordIdentifier& record_identifier,
IndexedDBBackingStore* backing_store,
IndexedDBBackingStore::Transaction* transaction,
- int64 database_id,
- int64 object_store_id) const {
- int64 index_id = index_metadata_.id;
+ int64_t database_id,
+ int64_t object_store_id) const {
+ int64_t index_id = index_metadata_.id;
DCHECK_EQ(index_id, index_keys_.first);
for (size_t i = 0; i < index_keys_.second.size(); ++i) {
leveldb::Status s =
@@ -89,9 +91,9 @@ void IndexWriter::WriteIndexKeys(
bool IndexWriter::AddingKeyAllowed(
IndexedDBBackingStore* backing_store,
IndexedDBBackingStore::Transaction* transaction,
- int64 database_id,
- int64 object_store_id,
- int64 index_id,
+ int64_t database_id,
+ int64_t object_store_id,
+ int64_t index_id,
const IndexedDBKey& index_key,
const IndexedDBKey& primary_key,
bool* allowed) const {
@@ -121,7 +123,7 @@ bool IndexWriter::AddingKeyAllowed(
bool MakeIndexWriters(
IndexedDBTransaction* transaction,
IndexedDBBackingStore* backing_store,
- int64 database_id,
+ int64_t database_id,
const IndexedDBObjectStoreMetadata& object_store,
const IndexedDBKey& primary_key, // makes a copy
bool key_was_generated,
diff --git a/content/browser/indexed_db/indexed_db_index_writer.h b/content/browser/indexed_db/indexed_db_index_writer.h
index ef4bb16..41b7de3 100644
--- a/content/browser/indexed_db/indexed_db_index_writer.h
+++ b/content/browser/indexed_db/indexed_db_index_writer.h
@@ -5,10 +5,12 @@
#ifndef CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_INDEX_WRITER_H_
#define CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_INDEX_WRITER_H_
+#include <stdint.h>
+
#include <map>
#include <vector>
-#include "base/basictypes.h"
+#include "base/macros.h"
#include "base/memory/scoped_vector.h"
#include "content/browser/indexed_db/indexed_db_backing_store.h"
#include "content/browser/indexed_db/indexed_db_database.h"
@@ -29,9 +31,9 @@ class IndexWriter {
bool VerifyIndexKeys(IndexedDBBackingStore* store,
IndexedDBBackingStore::Transaction* transaction,
- int64 database_id,
- int64 object_store_id,
- int64 index_id,
+ int64_t database_id,
+ int64_t object_store_id,
+ int64_t index_id,
bool* can_add_keys,
const IndexedDBKey& primary_key,
base::string16* error_message) const WARN_UNUSED_RESULT;
@@ -39,17 +41,17 @@ class IndexWriter {
void WriteIndexKeys(const IndexedDBBackingStore::RecordIdentifier& record,
IndexedDBBackingStore* store,
IndexedDBBackingStore::Transaction* transaction,
- int64 database_id,
- int64 object_store_id) const;
+ int64_t database_id,
+ int64_t object_store_id) const;
~IndexWriter();
private:
bool AddingKeyAllowed(IndexedDBBackingStore* store,
IndexedDBBackingStore::Transaction* transaction,
- int64 database_id,
- int64 object_store_id,
- int64 index_id,
+ int64_t database_id,
+ int64_t object_store_id,
+ int64_t index_id,
const IndexedDBKey& index_key,
const IndexedDBKey& primary_key,
bool* allowed) const WARN_UNUSED_RESULT;
@@ -63,7 +65,7 @@ class IndexWriter {
bool MakeIndexWriters(
IndexedDBTransaction* transaction,
IndexedDBBackingStore* store,
- int64 database_id,
+ int64_t database_id,
const IndexedDBObjectStoreMetadata& metadata,
const IndexedDBKey& primary_key,
bool key_was_generated,
diff --git a/content/browser/indexed_db/indexed_db_internals_ui.cc b/content/browser/indexed_db/indexed_db_internals_ui.cc
index 2dfd650..5b4d5d9 100644
--- a/content/browser/indexed_db/indexed_db_internals_ui.cc
+++ b/content/browser/indexed_db/indexed_db_internals_ui.cc
@@ -8,6 +8,7 @@
#include "base/bind.h"
#include "base/files/scoped_temp_dir.h"
+#include "base/macros.h"
#include "base/threading/platform_thread.h"
#include "base/values.h"
#include "content/browser/indexed_db/indexed_db_context_impl.h"
diff --git a/content/browser/indexed_db/indexed_db_internals_ui.h b/content/browser/indexed_db/indexed_db_internals_ui.h
index 157978f..90467de 100644
--- a/content/browser/indexed_db/indexed_db_internals_ui.h
+++ b/content/browser/indexed_db/indexed_db_internals_ui.h
@@ -5,8 +5,11 @@
#ifndef CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_INTERNALS_UI_H_
#define CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_INTERNALS_UI_H_
+#include <stddef.h>
+
#include <vector>
+#include "base/macros.h"
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
#include "content/public/browser/download_interrupt_reasons.h"
diff --git a/content/browser/indexed_db/indexed_db_leveldb_coding.cc b/content/browser/indexed_db/indexed_db_leveldb_coding.cc
index f4d01de..fe46ea4 100644
--- a/content/browser/indexed_db/indexed_db_leveldb_coding.cc
+++ b/content/browser/indexed_db/indexed_db_leveldb_coding.cc
@@ -223,7 +223,7 @@ static const unsigned char kIndexMetaDataTypeMaximum = 255;
const unsigned char kMinimumIndexId = 30;
-inline void EncodeIntSafely(int64 value, int64 max, std::string* into) {
+inline void EncodeIntSafely(int64_t value, int64_t max, std::string* into) {
DCHECK_LE(value, max);
return EncodeInt(value, into);
}
@@ -248,12 +248,12 @@ void EncodeBool(bool value, std::string* into) {
into->push_back(value ? 1 : 0);
}
-void EncodeInt(int64 value, std::string* into) {
+void EncodeInt(int64_t value, std::string* into) {
#ifndef NDEBUG
// Exercised by unit tests in debug only.
DCHECK_GE(value, 0);
#endif
- uint64 n = static_cast<uint64>(value);
+ uint64_t n = static_cast<uint64_t>(value);
do {
unsigned char c = n;
@@ -262,12 +262,12 @@ void EncodeInt(int64 value, std::string* into) {
} while (n);
}
-void EncodeVarInt(int64 value, std::string* into) {
+void EncodeVarInt(int64_t value, std::string* into) {
#ifndef NDEBUG
// Exercised by unit tests in debug only.
DCHECK_GE(value, 0);
#endif
- uint64 n = static_cast<uint64>(value);
+ uint64_t n = static_cast<uint64_t>(value);
do {
unsigned char c = n & 0x7f;
@@ -404,16 +404,16 @@ bool DecodeBool(StringPiece* slice, bool* value) {
return true;
}
-bool DecodeInt(StringPiece* slice, int64* value) {
+bool DecodeInt(StringPiece* slice, int64_t* value) {
if (slice->empty())
return false;
StringPiece::const_iterator it = slice->begin();
int shift = 0;
- int64 ret = 0;
+ int64_t ret = 0;
while (it != slice->end()) {
unsigned char c = *it++;
- ret |= static_cast<int64>(c) << shift;
+ ret |= static_cast<int64_t>(c) << shift;
shift += 8;
}
*value = ret;
@@ -421,19 +421,19 @@ bool DecodeInt(StringPiece* slice, int64* value) {
return true;
}
-bool DecodeVarInt(StringPiece* slice, int64* value) {
+bool DecodeVarInt(StringPiece* slice, int64_t* value) {
if (slice->empty())
return false;
StringPiece::const_iterator it = slice->begin();
int shift = 0;
- int64 ret = 0;
+ int64_t ret = 0;
do {
if (it == slice->end())
return false;
unsigned char c = *it;
- ret |= static_cast<int64>(c & 0x7f) << shift;
+ ret |= static_cast<int64_t>(c & 0x7f) << shift;
shift += 7;
} while (*it++ & 0x80);
*value = ret;
@@ -466,7 +466,7 @@ bool DecodeStringWithLength(StringPiece* slice, base::string16* value) {
if (slice->empty())
return false;
- int64 length = 0;
+ int64_t length = 0;
if (!DecodeVarInt(slice, &length) || length < 0)
return false;
size_t bytes = length * sizeof(base::char16);
@@ -485,7 +485,7 @@ bool DecodeBinary(StringPiece* slice, std::string* value) {
if (slice->empty())
return false;
- int64 length = 0;
+ int64_t length = 0;
if (!DecodeVarInt(slice, &length) || length < 0)
return false;
size_t size = length;
@@ -510,7 +510,7 @@ bool DecodeIDBKey(StringPiece* slice, scoped_ptr<IndexedDBKey>* value) {
return true;
case kIndexedDBKeyArrayTypeByte: {
- int64 length = 0;
+ int64_t length = 0;
if (!DecodeVarInt(slice, &length) || length < 0)
return false;
IndexedDBKey::KeyArray array;
@@ -599,7 +599,7 @@ bool DecodeIDBKeyPath(StringPiece* slice, IndexedDBKeyPath* value) {
}
case WebIDBKeyPathTypeArray: {
std::vector<base::string16> array;
- int64 count;
+ int64_t count;
if (!DecodeVarInt(slice, &count))
return false;
DCHECK_GE(count, 0);
@@ -621,8 +621,8 @@ bool DecodeIDBKeyPath(StringPiece* slice, IndexedDBKeyPath* value) {
bool DecodeBlobJournal(StringPiece* slice, BlobJournalType* journal) {
BlobJournalType output;
while (!slice->empty()) {
- int64 database_id = -1;
- int64 blob_key = -1;
+ int64_t database_id = -1;
+ int64_t blob_key = -1;
if (!DecodeVarInt(slice, &database_id))
return false;
if (!KeyPrefix::IsValidDatabaseId(database_id))
@@ -648,7 +648,7 @@ bool ConsumeEncodedIDBKey(StringPiece* slice) {
case kIndexedDBKeyMinKeyTypeByte:
return true;
case kIndexedDBKeyArrayTypeByte: {
- int64 length;
+ int64_t length;
if (!DecodeVarInt(slice, &length))
return false;
while (length--) {
@@ -658,7 +658,7 @@ bool ConsumeEncodedIDBKey(StringPiece* slice) {
return true;
}
case kIndexedDBKeyBinaryTypeByte: {
- int64 length = 0;
+ int64_t length = 0;
if (!DecodeVarInt(slice, &length) || length < 0)
return false;
if (slice->size() < static_cast<size_t>(length))
@@ -667,7 +667,7 @@ bool ConsumeEncodedIDBKey(StringPiece* slice) {
return true;
}
case kIndexedDBKeyStringTypeByte: {
- int64 length = 0;
+ int64_t length = 0;
if (!DecodeVarInt(slice, &length) || length < 0)
return false;
if (slice->size() < static_cast<size_t>(length) * sizeof(base::char16))
@@ -721,7 +721,7 @@ static WebIDBKeyType KeyTypeByteToKeyType(unsigned char type) {
int CompareEncodedStringsWithLength(StringPiece* slice1,
StringPiece* slice2,
bool* ok) {
- int64 len1, len2;
+ int64_t len1, len2;
if (!DecodeVarInt(slice1, &len1) || !DecodeVarInt(slice2, &len2)) {
*ok = false;
return 0;
@@ -754,7 +754,7 @@ int CompareEncodedStringsWithLength(StringPiece* slice1,
int CompareEncodedBinary(StringPiece* slice1,
StringPiece* slice2,
bool* ok) {
- int64 len1, len2;
+ int64_t len1, len2;
if (!DecodeVarInt(slice1, &len1) || !DecodeVarInt(slice2, &len2)) {
*ok = false;
return 0;
@@ -786,13 +786,13 @@ int CompareEncodedBinary(StringPiece* slice1,
return binary1.compare(binary2);
}
-static int CompareInts(int64 a, int64 b) {
+static int CompareInts(int64_t a, int64_t b) {
#ifndef NDEBUG
// Exercised by unit tests in debug only.
DCHECK_GE(a, 0);
DCHECK_GE(b, 0);
#endif
- int64 diff = a - b;
+ int64_t diff = a - b;
if (diff < 0)
return -1;
if (diff > 0)
@@ -831,13 +831,13 @@ int CompareEncodedIDBKeys(StringPiece* slice_a,
// Null type or max type; no payload to compare.
return 0;
case kIndexedDBKeyArrayTypeByte: {
- int64 length_a, length_b;
+ int64_t length_a, length_b;
if (!DecodeVarInt(slice_a, &length_a) ||
!DecodeVarInt(slice_b, &length_b)) {
*ok = false;
return 0;
}
- for (int64 i = 0; i < length_a && i < length_b; ++i) {
+ for (int64_t i = 0; i < length_a && i < length_b; ++i) {
int result = CompareEncodedIDBKeys(slice_a, slice_b, ok);
if (!*ok || result)
return result;
@@ -940,8 +940,8 @@ int CompareSuffix<IndexDataKey>(StringPiece* slice_a,
return 0;
// sequence number [optional]
- int64 sequence_number_a = -1;
- int64 sequence_number_b = -1;
+ int64_t sequence_number_a = -1;
+ int64_t sequence_number_b = -1;
if (!slice_a->empty() && !DecodeVarInt(slice_a, &sequence_number_a))
return 0;
if (!slice_b->empty() && !DecodeVarInt(slice_b, &sequence_number_b))
@@ -1133,12 +1133,12 @@ KeyPrefix::KeyPrefix()
object_store_id_(INVALID_TYPE),
index_id_(INVALID_TYPE) {}
-KeyPrefix::KeyPrefix(int64 database_id)
+KeyPrefix::KeyPrefix(int64_t database_id)
: database_id_(database_id), object_store_id_(0), index_id_(0) {
DCHECK(KeyPrefix::IsValidDatabaseId(database_id));
}
-KeyPrefix::KeyPrefix(int64 database_id, int64 object_store_id)
+KeyPrefix::KeyPrefix(int64_t database_id, int64_t object_store_id)
: database_id_(database_id),
object_store_id_(object_store_id),
index_id_(0) {
@@ -1146,7 +1146,9 @@ KeyPrefix::KeyPrefix(int64 database_id, int64 object_store_id)
DCHECK(KeyPrefix::IsValidObjectStoreId(object_store_id));
}
-KeyPrefix::KeyPrefix(int64 database_id, int64 object_store_id, int64 index_id)
+KeyPrefix::KeyPrefix(int64_t database_id,
+ int64_t object_store_id,
+ int64_t index_id)
: database_id_(database_id),
object_store_id_(object_store_id),
index_id_(index_id) {
@@ -1156,9 +1158,9 @@ KeyPrefix::KeyPrefix(int64 database_id, int64 object_store_id, int64 index_id)
}
KeyPrefix::KeyPrefix(enum Type type,
- int64 database_id,
- int64 object_store_id,
- int64 index_id)
+ int64_t database_id,
+ int64_t object_store_id,
+ int64_t index_id)
: database_id_(database_id),
object_store_id_(object_store_id),
index_id_(index_id) {
@@ -1167,25 +1169,25 @@ KeyPrefix::KeyPrefix(enum Type type,
DCHECK(KeyPrefix::IsValidObjectStoreId(object_store_id));
}
-KeyPrefix KeyPrefix::CreateWithSpecialIndex(int64 database_id,
- int64 object_store_id,
- int64 index_id) {
+KeyPrefix KeyPrefix::CreateWithSpecialIndex(int64_t database_id,
+ int64_t object_store_id,
+ int64_t index_id) {
DCHECK(KeyPrefix::IsValidDatabaseId(database_id));
DCHECK(KeyPrefix::IsValidObjectStoreId(object_store_id));
DCHECK(index_id);
return KeyPrefix(INVALID_TYPE, database_id, object_store_id, index_id);
}
-bool KeyPrefix::IsValidDatabaseId(int64 database_id) {
+bool KeyPrefix::IsValidDatabaseId(int64_t database_id) {
return (database_id > 0) && (database_id < KeyPrefix::kMaxDatabaseId);
}
-bool KeyPrefix::IsValidObjectStoreId(int64 object_store_id) {
+bool KeyPrefix::IsValidObjectStoreId(int64_t object_store_id) {
return (object_store_id > 0) &&
(object_store_id < KeyPrefix::kMaxObjectStoreId);
}
-bool KeyPrefix::IsValidIndexId(int64 index_id) {
+bool KeyPrefix::IsValidIndexId(int64_t index_id) {
return (index_id >= kMinimumIndexId) && (index_id < KeyPrefix::kMaxIndexId);
}
@@ -1236,9 +1238,9 @@ std::string KeyPrefix::Encode() const {
return EncodeInternal(database_id_, object_store_id_, index_id_);
}
-std::string KeyPrefix::EncodeInternal(int64 database_id,
- int64 object_store_id,
- int64 index_id) {
+std::string KeyPrefix::EncodeInternal(int64_t database_id,
+ int64_t object_store_id,
+ int64_t index_id) {
std::string database_id_string;
std::string object_store_id_string;
std::string index_id_string;
@@ -1356,7 +1358,7 @@ bool DatabaseFreeListKey::Decode(StringPiece* slice,
return true;
}
-std::string DatabaseFreeListKey::Encode(int64 database_id) {
+std::string DatabaseFreeListKey::Encode(int64_t database_id) {
std::string ret = KeyPrefix::EncodeEmpty();
ret.push_back(kDatabaseFreeListTypeByte);
EncodeVarInt(database_id, &ret);
@@ -1364,10 +1366,10 @@ std::string DatabaseFreeListKey::Encode(int64 database_id) {
}
std::string DatabaseFreeListKey::EncodeMaxKey() {
- return Encode(std::numeric_limits<int64>::max());
+ return Encode(std::numeric_limits<int64_t>::max());
}
-int64 DatabaseFreeListKey::DatabaseId() const {
+int64_t DatabaseFreeListKey::DatabaseId() const {
DCHECK_GE(database_id_, 0);
return database_id_;
}
@@ -1421,15 +1423,15 @@ int DatabaseNameKey::Compare(const DatabaseNameKey& other) {
return database_name_.compare(other.database_name_);
}
-bool DatabaseMetaDataKey::IsValidBlobKey(int64 blob_key) {
+bool DatabaseMetaDataKey::IsValidBlobKey(int64_t blob_key) {
return blob_key >= kBlobKeyGeneratorInitialNumber;
}
-const int64 DatabaseMetaDataKey::kAllBlobsKey = 1;
-const int64 DatabaseMetaDataKey::kBlobKeyGeneratorInitialNumber = 2;
-const int64 DatabaseMetaDataKey::kInvalidBlobKey = -1;
+const int64_t DatabaseMetaDataKey::kAllBlobsKey = 1;
+const int64_t DatabaseMetaDataKey::kBlobKeyGeneratorInitialNumber = 2;
+const int64_t DatabaseMetaDataKey::kInvalidBlobKey = -1;
-std::string DatabaseMetaDataKey::Encode(int64 database_id,
+std::string DatabaseMetaDataKey::Encode(int64_t database_id,
MetaDataType meta_data_type) {
KeyPrefix prefix(database_id);
std::string ret = prefix.Encode();
@@ -1460,8 +1462,8 @@ bool ObjectStoreMetaDataKey::Decode(StringPiece* slice,
return true;
}
-std::string ObjectStoreMetaDataKey::Encode(int64 database_id,
- int64 object_store_id,
+std::string ObjectStoreMetaDataKey::Encode(int64_t database_id,
+ int64_t object_store_id,
unsigned char meta_data_type) {
KeyPrefix prefix(database_id);
std::string ret = prefix.Encode();
@@ -1471,18 +1473,17 @@ std::string ObjectStoreMetaDataKey::Encode(int64 database_id,
return ret;
}
-std::string ObjectStoreMetaDataKey::EncodeMaxKey(int64 database_id) {
- return Encode(database_id,
- std::numeric_limits<int64>::max(),
+std::string ObjectStoreMetaDataKey::EncodeMaxKey(int64_t database_id) {
+ return Encode(database_id, std::numeric_limits<int64_t>::max(),
kObjectMetaDataTypeMaximum);
}
-std::string ObjectStoreMetaDataKey::EncodeMaxKey(int64 database_id,
- int64 object_store_id) {
+std::string ObjectStoreMetaDataKey::EncodeMaxKey(int64_t database_id,
+ int64_t object_store_id) {
return Encode(database_id, object_store_id, kObjectMetaDataTypeMaximum);
}
-int64 ObjectStoreMetaDataKey::ObjectStoreId() const {
+int64_t ObjectStoreMetaDataKey::ObjectStoreId() const {
DCHECK_GE(object_store_id_, 0);
return object_store_id_;
}
@@ -1520,9 +1521,9 @@ bool IndexMetaDataKey::Decode(StringPiece* slice, IndexMetaDataKey* result) {
return true;
}
-std::string IndexMetaDataKey::Encode(int64 database_id,
- int64 object_store_id,
- int64 index_id,
+std::string IndexMetaDataKey::Encode(int64_t database_id,
+ int64_t object_store_id,
+ int64_t index_id,
unsigned char meta_data_type) {
KeyPrefix prefix(database_id);
std::string ret = prefix.Encode();
@@ -1533,17 +1534,15 @@ std::string IndexMetaDataKey::Encode(int64 database_id,
return ret;
}
-std::string IndexMetaDataKey::EncodeMaxKey(int64 database_id,
- int64 object_store_id) {
- return Encode(database_id,
- object_store_id,
- std::numeric_limits<int64>::max(),
- kIndexMetaDataTypeMaximum);
+std::string IndexMetaDataKey::EncodeMaxKey(int64_t database_id,
+ int64_t object_store_id) {
+ return Encode(database_id, object_store_id,
+ std::numeric_limits<int64_t>::max(), kIndexMetaDataTypeMaximum);
}
-std::string IndexMetaDataKey::EncodeMaxKey(int64 database_id,
- int64 object_store_id,
- int64 index_id) {
+std::string IndexMetaDataKey::EncodeMaxKey(int64_t database_id,
+ int64_t object_store_id,
+ int64_t index_id) {
return Encode(
database_id, object_store_id, index_id, kIndexMetaDataTypeMaximum);
}
@@ -1559,7 +1558,7 @@ int IndexMetaDataKey::Compare(const IndexMetaDataKey& other) {
return meta_data_type_ - other.meta_data_type_;
}
-int64 IndexMetaDataKey::IndexId() const {
+int64_t IndexMetaDataKey::IndexId() const {
DCHECK_GE(index_id_, 0);
return index_id_;
}
@@ -1583,8 +1582,8 @@ bool ObjectStoreFreeListKey::Decode(StringPiece* slice,
return true;
}
-std::string ObjectStoreFreeListKey::Encode(int64 database_id,
- int64 object_store_id) {
+std::string ObjectStoreFreeListKey::Encode(int64_t database_id,
+ int64_t object_store_id) {
KeyPrefix prefix(database_id);
std::string ret = prefix.Encode();
ret.push_back(kObjectStoreFreeListTypeByte);
@@ -1592,11 +1591,11 @@ std::string ObjectStoreFreeListKey::Encode(int64 database_id,
return ret;
}
-std::string ObjectStoreFreeListKey::EncodeMaxKey(int64 database_id) {
- return Encode(database_id, std::numeric_limits<int64>::max());
+std::string ObjectStoreFreeListKey::EncodeMaxKey(int64_t database_id) {
+ return Encode(database_id, std::numeric_limits<int64_t>::max());
}
-int64 ObjectStoreFreeListKey::ObjectStoreId() const {
+int64_t ObjectStoreFreeListKey::ObjectStoreId() const {
DCHECK_GE(object_store_id_, 0);
return object_store_id_;
}
@@ -1629,9 +1628,9 @@ bool IndexFreeListKey::Decode(StringPiece* slice, IndexFreeListKey* result) {
return true;
}
-std::string IndexFreeListKey::Encode(int64 database_id,
- int64 object_store_id,
- int64 index_id) {
+std::string IndexFreeListKey::Encode(int64_t database_id,
+ int64_t object_store_id,
+ int64_t index_id) {
KeyPrefix prefix(database_id);
std::string ret = prefix.Encode();
ret.push_back(kIndexFreeListTypeByte);
@@ -1640,10 +1639,10 @@ std::string IndexFreeListKey::Encode(int64 database_id,
return ret;
}
-std::string IndexFreeListKey::EncodeMaxKey(int64 database_id,
- int64 object_store_id) {
- return Encode(
- database_id, object_store_id, std::numeric_limits<int64>::max());
+std::string IndexFreeListKey::EncodeMaxKey(int64_t database_id,
+ int64_t object_store_id) {
+ return Encode(database_id, object_store_id,
+ std::numeric_limits<int64_t>::max());
}
int IndexFreeListKey::Compare(const IndexFreeListKey& other) {
@@ -1654,12 +1653,12 @@ int IndexFreeListKey::Compare(const IndexFreeListKey& other) {
return CompareInts(index_id_, other.index_id_);
}
-int64 IndexFreeListKey::ObjectStoreId() const {
+int64_t IndexFreeListKey::ObjectStoreId() const {
DCHECK_GE(object_store_id_, 0);
return object_store_id_;
}
-int64 IndexFreeListKey::IndexId() const {
+int64_t IndexFreeListKey::IndexId() const {
DCHECK_GE(index_id_, 0);
return index_id_;
}
@@ -1685,7 +1684,7 @@ bool ObjectStoreNamesKey::Decode(StringPiece* slice,
}
std::string ObjectStoreNamesKey::Encode(
- int64 database_id,
+ int64_t database_id,
const base::string16& object_store_name) {
KeyPrefix prefix(database_id);
std::string ret = prefix.Encode();
@@ -1720,8 +1719,8 @@ bool IndexNamesKey::Decode(StringPiece* slice, IndexNamesKey* result) {
return true;
}
-std::string IndexNamesKey::Encode(int64 database_id,
- int64 object_store_id,
+std::string IndexNamesKey::Encode(int64_t database_id,
+ int64_t object_store_id,
const base::string16& index_name) {
KeyPrefix prefix(database_id);
std::string ret = prefix.Encode();
@@ -1754,8 +1753,8 @@ bool ObjectStoreDataKey::Decode(StringPiece* slice,
return true;
}
-std::string ObjectStoreDataKey::Encode(int64 database_id,
- int64 object_store_id,
+std::string ObjectStoreDataKey::Encode(int64_t database_id,
+ int64_t object_store_id,
const std::string encoded_user_key) {
KeyPrefix prefix(KeyPrefix::CreateWithSpecialIndex(
database_id, object_store_id, kSpecialIndexNumber));
@@ -1765,8 +1764,8 @@ std::string ObjectStoreDataKey::Encode(int64 database_id,
return ret;
}
-std::string ObjectStoreDataKey::Encode(int64 database_id,
- int64 object_store_id,
+std::string ObjectStoreDataKey::Encode(int64_t database_id,
+ int64_t object_store_id,
const IndexedDBKey& user_key) {
std::string encoded_key;
EncodeIDBKey(user_key, &encoded_key);
@@ -1782,7 +1781,7 @@ scoped_ptr<IndexedDBKey> ObjectStoreDataKey::user_key() const {
return key.Pass();
}
-const int64 ObjectStoreDataKey::kSpecialIndexNumber = kObjectStoreDataIndexId;
+const int64_t ObjectStoreDataKey::kSpecialIndexNumber = kObjectStoreDataIndexId;
ExistsEntryKey::ExistsEntryKey() {}
ExistsEntryKey::~ExistsEntryKey() {}
@@ -1799,8 +1798,8 @@ bool ExistsEntryKey::Decode(StringPiece* slice, ExistsEntryKey* result) {
return true;
}
-std::string ExistsEntryKey::Encode(int64 database_id,
- int64 object_store_id,
+std::string ExistsEntryKey::Encode(int64_t database_id,
+ int64_t object_store_id,
const std::string& encoded_key) {
KeyPrefix prefix(KeyPrefix::CreateWithSpecialIndex(
database_id, object_store_id, kSpecialIndexNumber));
@@ -1809,8 +1808,8 @@ std::string ExistsEntryKey::Encode(int64 database_id,
return ret;
}
-std::string ExistsEntryKey::Encode(int64 database_id,
- int64 object_store_id,
+std::string ExistsEntryKey::Encode(int64_t database_id,
+ int64_t object_store_id,
const IndexedDBKey& user_key) {
std::string encoded_key;
EncodeIDBKey(user_key, &encoded_key);
@@ -1826,7 +1825,7 @@ scoped_ptr<IndexedDBKey> ExistsEntryKey::user_key() const {
return key.Pass();
}
-const int64 ExistsEntryKey::kSpecialIndexNumber = kExistsEntryIndexId;
+const int64_t ExistsEntryKey::kSpecialIndexNumber = kExistsEntryIndexId;
bool BlobEntryKey::Decode(StringPiece* slice, BlobEntryKey* result) {
KeyPrefix prefix;
@@ -1870,14 +1869,14 @@ std::string BlobEntryKey::ReencodeToObjectStoreDataKey(StringPiece* slice) {
key.database_id_, key.object_store_id_, key.encoded_user_key_);
}
-std::string BlobEntryKey::EncodeMinKeyForObjectStore(int64 database_id,
- int64 object_store_id) {
+std::string BlobEntryKey::EncodeMinKeyForObjectStore(int64_t database_id,
+ int64_t object_store_id) {
// Our implied encoded_user_key_ here is empty, the lowest possible key.
return Encode(database_id, object_store_id, std::string());
}
-std::string BlobEntryKey::EncodeStopKeyForObjectStore(int64 database_id,
- int64 object_store_id) {
+std::string BlobEntryKey::EncodeStopKeyForObjectStore(int64_t database_id,
+ int64_t object_store_id) {
DCHECK(KeyPrefix::ValidIds(database_id, object_store_id));
KeyPrefix prefix(KeyPrefix::CreateWithSpecialIndex(
database_id, object_store_id, kSpecialIndexNumber + 1));
@@ -1889,16 +1888,16 @@ std::string BlobEntryKey::Encode() const {
return Encode(database_id_, object_store_id_, encoded_user_key_);
}
-std::string BlobEntryKey::Encode(int64 database_id,
- int64 object_store_id,
+std::string BlobEntryKey::Encode(int64_t database_id,
+ int64_t object_store_id,
const IndexedDBKey& user_key) {
std::string encoded_key;
EncodeIDBKey(user_key, &encoded_key);
return Encode(database_id, object_store_id, encoded_key);
}
-std::string BlobEntryKey::Encode(int64 database_id,
- int64 object_store_id,
+std::string BlobEntryKey::Encode(int64_t database_id,
+ int64_t object_store_id,
const std::string& encoded_user_key) {
DCHECK(KeyPrefix::ValidIds(database_id, object_store_id));
KeyPrefix prefix(KeyPrefix::CreateWithSpecialIndex(
@@ -1906,7 +1905,7 @@ std::string BlobEntryKey::Encode(int64 database_id,
return prefix.Encode() + encoded_user_key;
}
-const int64 BlobEntryKey::kSpecialIndexNumber = kBlobEntryIndexId;
+const int64_t BlobEntryKey::kSpecialIndexNumber = kBlobEntryIndexId;
IndexDataKey::IndexDataKey()
: database_id_(-1),
@@ -1946,12 +1945,12 @@ bool IndexDataKey::Decode(StringPiece* slice, IndexDataKey* result) {
return true;
}
-std::string IndexDataKey::Encode(int64 database_id,
- int64 object_store_id,
- int64 index_id,
+std::string IndexDataKey::Encode(int64_t database_id,
+ int64_t object_store_id,
+ int64_t index_id,
const std::string& encoded_user_key,
const std::string& encoded_primary_key,
- int64 sequence_number) {
+ int64_t sequence_number) {
KeyPrefix prefix(database_id, object_store_id, index_id);
std::string ret = prefix.Encode();
ret.append(encoded_user_key);
@@ -1960,9 +1959,9 @@ std::string IndexDataKey::Encode(int64 database_id,
return ret;
}
-std::string IndexDataKey::Encode(int64 database_id,
- int64 object_store_id,
- int64 index_id,
+std::string IndexDataKey::Encode(int64_t database_id,
+ int64_t object_store_id,
+ int64_t index_id,
const IndexedDBKey& user_key) {
std::string encoded_key;
EncodeIDBKey(user_key, &encoded_key);
@@ -1970,9 +1969,9 @@ std::string IndexDataKey::Encode(int64 database_id,
database_id, object_store_id, index_id, encoded_key, MinIDBKey(), 0);
}
-std::string IndexDataKey::Encode(int64 database_id,
- int64 object_store_id,
- int64 index_id,
+std::string IndexDataKey::Encode(int64_t database_id,
+ int64_t object_store_id,
+ int64_t index_id,
const IndexedDBKey& user_key,
const IndexedDBKey& user_primary_key) {
std::string encoded_key;
@@ -1987,35 +1986,31 @@ std::string IndexDataKey::Encode(int64 database_id,
0);
}
-std::string IndexDataKey::EncodeMinKey(int64 database_id,
- int64 object_store_id,
- int64 index_id) {
+std::string IndexDataKey::EncodeMinKey(int64_t database_id,
+ int64_t object_store_id,
+ int64_t index_id) {
return Encode(
database_id, object_store_id, index_id, MinIDBKey(), MinIDBKey(), 0);
}
-std::string IndexDataKey::EncodeMaxKey(int64 database_id,
- int64 object_store_id,
- int64 index_id) {
- return Encode(database_id,
- object_store_id,
- index_id,
- MaxIDBKey(),
- MaxIDBKey(),
- std::numeric_limits<int64>::max());
+std::string IndexDataKey::EncodeMaxKey(int64_t database_id,
+ int64_t object_store_id,
+ int64_t index_id) {
+ return Encode(database_id, object_store_id, index_id, MaxIDBKey(),
+ MaxIDBKey(), std::numeric_limits<int64_t>::max());
}
-int64 IndexDataKey::DatabaseId() const {
+int64_t IndexDataKey::DatabaseId() const {
DCHECK_GE(database_id_, 0);
return database_id_;
}
-int64 IndexDataKey::ObjectStoreId() const {
+int64_t IndexDataKey::ObjectStoreId() const {
DCHECK_GE(object_store_id_, 0);
return object_store_id_;
}
-int64 IndexDataKey::IndexId() const {
+int64_t IndexDataKey::IndexId() const {
DCHECK_GE(index_id_, 0);
return index_id_;
}
diff --git a/content/browser/indexed_db/indexed_db_leveldb_coding.h b/content/browser/indexed_db/indexed_db_leveldb_coding.h
index 4d72652..bd3724c 100644
--- a/content/browser/indexed_db/indexed_db_leveldb_coding.h
+++ b/content/browser/indexed_db/indexed_db_leveldb_coding.h
@@ -5,12 +5,15 @@
#ifndef CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_LEVELDB_CODING_H_
#define CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_LEVELDB_CODING_H_
+#include <stddef.h>
+#include <stdint.h>
+
#include <string>
#include <utility>
#include <vector>
-#include "base/basictypes.h"
#include "base/logging.h"
+#include "base/macros.h"
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
#include "base/strings/string16.h"
@@ -31,8 +34,8 @@ typedef std::vector<BlobJournalEntryType> BlobJournalType;
CONTENT_EXPORT void EncodeByte(unsigned char value, std::string* into);
CONTENT_EXPORT void EncodeBool(bool value, std::string* into);
-CONTENT_EXPORT void EncodeInt(int64 value, std::string* into);
-CONTENT_EXPORT void EncodeVarInt(int64 value, std::string* into);
+CONTENT_EXPORT void EncodeInt(int64_t value, std::string* into);
+CONTENT_EXPORT void EncodeVarInt(int64_t value, std::string* into);
CONTENT_EXPORT void EncodeString(const base::string16& value,
std::string* into);
CONTENT_EXPORT void EncodeStringWithLength(const base::string16& value,
@@ -50,9 +53,9 @@ CONTENT_EXPORT WARN_UNUSED_RESULT bool DecodeByte(base::StringPiece* slice,
CONTENT_EXPORT WARN_UNUSED_RESULT bool DecodeBool(base::StringPiece* slice,
bool* value);
CONTENT_EXPORT WARN_UNUSED_RESULT bool DecodeInt(base::StringPiece* slice,
- int64* value);
+ int64_t* value);
CONTENT_EXPORT WARN_UNUSED_RESULT bool DecodeVarInt(base::StringPiece* slice,
- int64* value);
+ int64_t* value);
CONTENT_EXPORT WARN_UNUSED_RESULT bool DecodeString(base::StringPiece* slice,
base::string16* value);
CONTENT_EXPORT WARN_UNUSED_RESULT bool DecodeStringWithLength(
@@ -118,58 +121,58 @@ class KeyPrefix {
kMaxObjectStoreIdSizeBytes * 8 - 1; // 63
static const size_t kMaxIndexIdBits = kMaxIndexIdSizeBytes * 8 - 1; // 31
- static const int64 kMaxDatabaseId =
- (1ULL << kMaxDatabaseIdBits) - 1; // max signed int64
- static const int64 kMaxObjectStoreId =
- (1ULL << kMaxObjectStoreIdBits) - 1; // max signed int64
- static const int64 kMaxIndexId =
- (1ULL << kMaxIndexIdBits) - 1; // max signed int32
+ static const int64_t kMaxDatabaseId =
+ (1ULL << kMaxDatabaseIdBits) - 1; // max signed int64_t
+ static const int64_t kMaxObjectStoreId =
+ (1ULL << kMaxObjectStoreIdBits) - 1; // max signed int64_t
+ static const int64_t kMaxIndexId =
+ (1ULL << kMaxIndexIdBits) - 1; // max signed int32_t
- static const int64 kInvalidId = -1;
+ static const int64_t kInvalidId = -1;
KeyPrefix();
- explicit KeyPrefix(int64 database_id);
- KeyPrefix(int64 database_id, int64 object_store_id);
- KeyPrefix(int64 database_id, int64 object_store_id, int64 index_id);
- static KeyPrefix CreateWithSpecialIndex(int64 database_id,
- int64 object_store_id,
- int64 index_id);
+ explicit KeyPrefix(int64_t database_id);
+ KeyPrefix(int64_t database_id, int64_t object_store_id);
+ KeyPrefix(int64_t database_id, int64_t object_store_id, int64_t index_id);
+ static KeyPrefix CreateWithSpecialIndex(int64_t database_id,
+ int64_t object_store_id,
+ int64_t index_id);
static bool Decode(base::StringPiece* slice, KeyPrefix* result);
std::string Encode() const;
static std::string EncodeEmpty();
int Compare(const KeyPrefix& other) const;
- CONTENT_EXPORT static bool IsValidDatabaseId(int64 database_id);
- static bool IsValidObjectStoreId(int64 index_id);
- static bool IsValidIndexId(int64 index_id);
- static bool ValidIds(int64 database_id,
- int64 object_store_id,
- int64 index_id) {
+ CONTENT_EXPORT static bool IsValidDatabaseId(int64_t database_id);
+ static bool IsValidObjectStoreId(int64_t index_id);
+ static bool IsValidIndexId(int64_t index_id);
+ static bool ValidIds(int64_t database_id,
+ int64_t object_store_id,
+ int64_t index_id) {
return IsValidDatabaseId(database_id) &&
IsValidObjectStoreId(object_store_id) && IsValidIndexId(index_id);
}
- static bool ValidIds(int64 database_id, int64 object_store_id) {
+ static bool ValidIds(int64_t database_id, int64_t object_store_id) {
return IsValidDatabaseId(database_id) &&
IsValidObjectStoreId(object_store_id);
}
Type type() const;
- int64 database_id_;
- int64 object_store_id_;
- int64 index_id_;
+ int64_t database_id_;
+ int64_t object_store_id_;
+ int64_t index_id_;
private:
// Special constructor for CreateWithSpecialIndex()
KeyPrefix(enum Type,
- int64 database_id,
- int64 object_store_id,
- int64 index_id);
+ int64_t database_id,
+ int64_t object_store_id,
+ int64_t index_id);
- static std::string EncodeInternal(int64 database_id,
- int64 object_store_id,
- int64 index_id);
+ static std::string EncodeInternal(int64_t database_id,
+ int64_t object_store_id,
+ int64_t index_id);
};
class SchemaVersionKey {
@@ -201,13 +204,13 @@ class DatabaseFreeListKey {
public:
DatabaseFreeListKey();
static bool Decode(base::StringPiece* slice, DatabaseFreeListKey* result);
- CONTENT_EXPORT static std::string Encode(int64 database_id);
+ CONTENT_EXPORT static std::string Encode(int64_t database_id);
static CONTENT_EXPORT std::string EncodeMaxKey();
- int64 DatabaseId() const;
+ int64_t DatabaseId() const;
int Compare(const DatabaseFreeListKey& other) const;
private:
- int64 database_id_;
+ int64_t database_id_;
};
class DatabaseNameKey {
@@ -241,13 +244,13 @@ class DatabaseMetaDataKey {
MAX_SIMPLE_METADATA_TYPE = 6
};
- CONTENT_EXPORT static const int64 kAllBlobsKey;
- static const int64 kBlobKeyGeneratorInitialNumber;
+ CONTENT_EXPORT static const int64_t kAllBlobsKey;
+ static const int64_t kBlobKeyGeneratorInitialNumber;
// All keys <= 0 are invalid. This one's just a convenient example.
- static const int64 kInvalidBlobKey;
+ static const int64_t kInvalidBlobKey;
- static bool IsValidBlobKey(int64 blob_key);
- CONTENT_EXPORT static std::string Encode(int64 database_id,
+ static bool IsValidBlobKey(int64_t blob_key);
+ CONTENT_EXPORT static std::string Encode(int64_t database_id,
MetaDataType type);
};
@@ -266,18 +269,18 @@ class ObjectStoreMetaDataKey {
ObjectStoreMetaDataKey();
static bool Decode(base::StringPiece* slice, ObjectStoreMetaDataKey* result);
- CONTENT_EXPORT static std::string Encode(int64 database_id,
- int64 object_store_id,
+ CONTENT_EXPORT static std::string Encode(int64_t database_id,
+ int64_t object_store_id,
unsigned char meta_data_type);
- CONTENT_EXPORT static std::string EncodeMaxKey(int64 database_id);
- CONTENT_EXPORT static std::string EncodeMaxKey(int64 database_id,
- int64 object_store_id);
- int64 ObjectStoreId() const;
+ CONTENT_EXPORT static std::string EncodeMaxKey(int64_t database_id);
+ CONTENT_EXPORT static std::string EncodeMaxKey(int64_t database_id,
+ int64_t object_store_id);
+ int64_t ObjectStoreId() const;
unsigned char MetaDataType() const;
int Compare(const ObjectStoreMetaDataKey& other);
private:
- int64 object_store_id_;
+ int64_t object_store_id_;
unsigned char meta_data_type_;
};
@@ -292,22 +295,22 @@ class IndexMetaDataKey {
IndexMetaDataKey();
static bool Decode(base::StringPiece* slice, IndexMetaDataKey* result);
- CONTENT_EXPORT static std::string Encode(int64 database_id,
- int64 object_store_id,
- int64 index_id,
+ CONTENT_EXPORT static std::string Encode(int64_t database_id,
+ int64_t object_store_id,
+ int64_t index_id,
unsigned char meta_data_type);
- CONTENT_EXPORT static std::string EncodeMaxKey(int64 database_id,
- int64 object_store_id);
- CONTENT_EXPORT static std::string EncodeMaxKey(int64 database_id,
- int64 object_store_id,
- int64 index_id);
+ CONTENT_EXPORT static std::string EncodeMaxKey(int64_t database_id,
+ int64_t object_store_id);
+ CONTENT_EXPORT static std::string EncodeMaxKey(int64_t database_id,
+ int64_t object_store_id,
+ int64_t index_id);
int Compare(const IndexMetaDataKey& other);
- int64 IndexId() const;
+ int64_t IndexId() const;
unsigned char meta_data_type() const { return meta_data_type_; }
private:
- int64 object_store_id_;
- int64 index_id_;
+ int64_t object_store_id_;
+ int64_t index_id_;
unsigned char meta_data_type_;
};
@@ -315,32 +318,32 @@ class ObjectStoreFreeListKey {
public:
ObjectStoreFreeListKey();
static bool Decode(base::StringPiece* slice, ObjectStoreFreeListKey* result);
- CONTENT_EXPORT static std::string Encode(int64 database_id,
- int64 object_store_id);
- CONTENT_EXPORT static std::string EncodeMaxKey(int64 database_id);
- int64 ObjectStoreId() const;
+ CONTENT_EXPORT static std::string Encode(int64_t database_id,
+ int64_t object_store_id);
+ CONTENT_EXPORT static std::string EncodeMaxKey(int64_t database_id);
+ int64_t ObjectStoreId() const;
int Compare(const ObjectStoreFreeListKey& other);
private:
- int64 object_store_id_;
+ int64_t object_store_id_;
};
class IndexFreeListKey {
public:
IndexFreeListKey();
static bool Decode(base::StringPiece* slice, IndexFreeListKey* result);
- CONTENT_EXPORT static std::string Encode(int64 database_id,
- int64 object_store_id,
- int64 index_id);
- CONTENT_EXPORT static std::string EncodeMaxKey(int64 database_id,
- int64 object_store_id);
+ CONTENT_EXPORT static std::string Encode(int64_t database_id,
+ int64_t object_store_id,
+ int64_t index_id);
+ CONTENT_EXPORT static std::string EncodeMaxKey(int64_t database_id,
+ int64_t object_store_id);
int Compare(const IndexFreeListKey& other);
- int64 ObjectStoreId() const;
- int64 IndexId() const;
+ int64_t ObjectStoreId() const;
+ int64_t IndexId() const;
private:
- int64 object_store_id_;
- int64 index_id_;
+ int64_t object_store_id_;
+ int64_t index_id_;
};
class ObjectStoreNamesKey {
@@ -350,7 +353,7 @@ class ObjectStoreNamesKey {
// mapping become unreliable? Can we remove this?
static bool Decode(base::StringPiece* slice, ObjectStoreNamesKey* result);
CONTENT_EXPORT static std::string Encode(
- int64 database_id,
+ int64_t database_id,
const base::string16& object_store_name);
int Compare(const ObjectStoreNamesKey& other);
base::string16 object_store_name() const { return object_store_name_; }
@@ -366,30 +369,30 @@ class IndexNamesKey {
// TODO(jsbell): We never use this to look up index ids, because a mapping
// is kept at a higher level.
static bool Decode(base::StringPiece* slice, IndexNamesKey* result);
- CONTENT_EXPORT static std::string Encode(int64 database_id,
- int64 object_store_id,
+ CONTENT_EXPORT static std::string Encode(int64_t database_id,
+ int64_t object_store_id,
const base::string16& index_name);
int Compare(const IndexNamesKey& other);
base::string16 index_name() const { return index_name_; }
private:
- int64 object_store_id_;
+ int64_t object_store_id_;
base::string16 index_name_;
};
class ObjectStoreDataKey {
public:
- static const int64 kSpecialIndexNumber;
+ static const int64_t kSpecialIndexNumber;
ObjectStoreDataKey();
~ObjectStoreDataKey();
static bool Decode(base::StringPiece* slice, ObjectStoreDataKey* result);
- CONTENT_EXPORT static std::string Encode(int64 database_id,
- int64 object_store_id,
+ CONTENT_EXPORT static std::string Encode(int64_t database_id,
+ int64_t object_store_id,
const std::string encoded_user_key);
- static std::string Encode(int64 database_id,
- int64 object_store_id,
+ static std::string Encode(int64_t database_id,
+ int64_t object_store_id,
const IndexedDBKey& user_key);
scoped_ptr<IndexedDBKey> user_key() const;
private:
@@ -402,16 +405,16 @@ class ExistsEntryKey {
~ExistsEntryKey();
static bool Decode(base::StringPiece* slice, ExistsEntryKey* result);
- CONTENT_EXPORT static std::string Encode(int64 database_id,
- int64 object_store_id,
+ CONTENT_EXPORT static std::string Encode(int64_t database_id,
+ int64_t object_store_id,
const std::string& encoded_key);
- static std::string Encode(int64 database_id,
- int64 object_store_id,
+ static std::string Encode(int64_t database_id,
+ int64_t object_store_id,
const IndexedDBKey& user_key);
scoped_ptr<IndexedDBKey> user_key() const;
private:
- static const int64 kSpecialIndexNumber;
+ static const int64_t kSpecialIndexNumber;
std::string encoded_user_key_;
DISALLOW_COPY_AND_ASSIGN(ExistsEntryKey);
@@ -424,25 +427,25 @@ class BlobEntryKey {
static bool FromObjectStoreDataKey(base::StringPiece* slice,
BlobEntryKey* result);
static std::string ReencodeToObjectStoreDataKey(base::StringPiece* slice);
- static std::string EncodeMinKeyForObjectStore(int64 database_id,
- int64 object_store_id);
- static std::string EncodeStopKeyForObjectStore(int64 database_id,
- int64 object_store_id);
- static std::string Encode(int64 database_id,
- int64 object_store_id,
+ static std::string EncodeMinKeyForObjectStore(int64_t database_id,
+ int64_t object_store_id);
+ static std::string EncodeStopKeyForObjectStore(int64_t database_id,
+ int64_t object_store_id);
+ static std::string Encode(int64_t database_id,
+ int64_t object_store_id,
const IndexedDBKey& user_key);
std::string Encode() const;
- int64 database_id() const { return database_id_; }
- int64 object_store_id() const { return object_store_id_; }
+ int64_t database_id() const { return database_id_; }
+ int64_t object_store_id() const { return object_store_id_; }
private:
- static const int64 kSpecialIndexNumber;
+ static const int64_t kSpecialIndexNumber;
- static std::string Encode(int64 database_id,
- int64 object_store_id,
+ static std::string Encode(int64_t database_id,
+ int64_t object_store_id,
const std::string& encoded_user_key);
- int64 database_id_;
- int64 object_store_id_;
+ int64_t database_id_;
+ int64_t object_store_id_;
// This is the user's ObjectStoreDataKey, not the BlobEntryKey itself.
std::string encoded_user_key_;
};
@@ -453,40 +456,40 @@ class IndexDataKey {
~IndexDataKey();
static bool Decode(base::StringPiece* slice, IndexDataKey* result);
CONTENT_EXPORT static std::string Encode(
- int64 database_id,
- int64 object_store_id,
- int64 index_id,
+ int64_t database_id,
+ int64_t object_store_id,
+ int64_t index_id,
const std::string& encoded_user_key,
const std::string& encoded_primary_key,
- int64 sequence_number);
- static std::string Encode(int64 database_id,
- int64 object_store_id,
- int64 index_id,
+ int64_t sequence_number);
+ static std::string Encode(int64_t database_id,
+ int64_t object_store_id,
+ int64_t index_id,
const IndexedDBKey& user_key);
- static std::string Encode(int64 database_id,
- int64 object_store_id,
- int64 index_id,
+ static std::string Encode(int64_t database_id,
+ int64_t object_store_id,
+ int64_t index_id,
const IndexedDBKey& user_key,
const IndexedDBKey& user_primary_key);
- static std::string EncodeMinKey(int64 database_id,
- int64 object_store_id,
- int64 index_id);
- CONTENT_EXPORT static std::string EncodeMaxKey(int64 database_id,
- int64 object_store_id,
- int64 index_id);
- int64 DatabaseId() const;
- int64 ObjectStoreId() const;
- int64 IndexId() const;
+ static std::string EncodeMinKey(int64_t database_id,
+ int64_t object_store_id,
+ int64_t index_id);
+ CONTENT_EXPORT static std::string EncodeMaxKey(int64_t database_id,
+ int64_t object_store_id,
+ int64_t index_id);
+ int64_t DatabaseId() const;
+ int64_t ObjectStoreId() const;
+ int64_t IndexId() const;
scoped_ptr<IndexedDBKey> user_key() const;
scoped_ptr<IndexedDBKey> primary_key() const;
private:
- int64 database_id_;
- int64 object_store_id_;
- int64 index_id_;
+ int64_t database_id_;
+ int64_t object_store_id_;
+ int64_t index_id_;
std::string encoded_user_key_;
std::string encoded_primary_key_;
- int64 sequence_number_;
+ int64_t sequence_number_;
DISALLOW_COPY_AND_ASSIGN(IndexDataKey);
};
diff --git a/content/browser/indexed_db/indexed_db_leveldb_coding_unittest.cc b/content/browser/indexed_db/indexed_db_leveldb_coding_unittest.cc
index bba0c76..2f9e141 100644
--- a/content/browser/indexed_db/indexed_db_leveldb_coding_unittest.cc
+++ b/content/browser/indexed_db/indexed_db_leveldb_coding_unittest.cc
@@ -4,10 +4,13 @@
#include "content/browser/indexed_db/indexed_db_leveldb_coding.h"
+#include <stddef.h>
+#include <stdint.h>
+
#include <limits>
#include <vector>
-#include "base/basictypes.h"
+#include "base/macros.h"
#include "base/strings/string16.h"
#include "base/strings/string_piece.h"
#include "base/strings/utf_string_conversions.h"
@@ -169,7 +172,7 @@ TEST(IndexedDBLevelDBCodingTest, MinIDBKey) {
EXPECT_LT(CompareKeys(min_key, date_key), 0);
}
-static std::string WrappedEncodeInt(int64 value) {
+static std::string WrappedEncodeInt(int64_t value) {
std::string buffer;
EncodeInt(value, &buffer);
return buffer;
@@ -213,7 +216,7 @@ TEST(IndexedDBLevelDBCodingTest, DecodeBool) {
}
TEST(IndexedDBLevelDBCodingTest, DecodeInt) {
- std::vector<int64> test_cases;
+ std::vector<int64_t> test_cases;
test_cases.push_back(0);
test_cases.push_back(1);
test_cases.push_back(255);
@@ -227,11 +230,11 @@ TEST(IndexedDBLevelDBCodingTest, DecodeInt) {
#endif
for (size_t i = 0; i < test_cases.size(); ++i) {
- int64 n = test_cases[i];
+ int64_t n = test_cases[i];
std::string v = WrappedEncodeInt(n);
ASSERT_GT(v.size(), 0u);
StringPiece slice(v);
- int64 value;
+ int64_t value;
EXPECT_TRUE(DecodeInt(&slice, &value));
EXPECT_EQ(n, value);
EXPECT_TRUE(slice.empty());
@@ -245,12 +248,12 @@ TEST(IndexedDBLevelDBCodingTest, DecodeInt) {
}
{
StringPiece slice;
- int64 value;
+ int64_t value;
EXPECT_FALSE(DecodeInt(&slice, &value));
}
}
-static std::string WrappedEncodeVarInt(int64 value) {
+static std::string WrappedEncodeVarInt(int64_t value) {
std::string buffer;
EncodeVarInt(value, &buffer);
return buffer;
@@ -270,7 +273,7 @@ TEST(IndexedDBLevelDBCodingTest, EncodeVarInt) {
}
TEST(IndexedDBLevelDBCodingTest, DecodeVarInt) {
- std::vector<int64> test_cases;
+ std::vector<int64_t> test_cases;
test_cases.push_back(0);
test_cases.push_back(1);
test_cases.push_back(255);
@@ -284,11 +287,11 @@ TEST(IndexedDBLevelDBCodingTest, DecodeVarInt) {
#endif
for (size_t i = 0; i < test_cases.size(); ++i) {
- int64 n = test_cases[i];
+ int64_t n = test_cases[i];
std::string v = WrappedEncodeVarInt(n);
ASSERT_GT(v.size(), 0u);
StringPiece slice(v);
- int64 res;
+ int64_t res;
EXPECT_TRUE(DecodeVarInt(&slice, &res));
EXPECT_EQ(n, res);
EXPECT_TRUE(slice.empty());
@@ -949,8 +952,8 @@ TEST(IndexedDBLevelDBCodingTest, ComparisonTest) {
keys.push_back(IndexDataKey::Encode(1, 1, 30, MaxIDBKey(), MaxIDBKey(), 1));
keys.push_back(IndexDataKey::Encode(1, 1, 31, MinIDBKey(), MinIDBKey(), 0));
keys.push_back(IndexDataKey::Encode(1, 2, 30, MinIDBKey(), MinIDBKey(), 0));
- keys.push_back(
- IndexDataKey::EncodeMaxKey(1, 2, std::numeric_limits<int32>::max() - 1));
+ keys.push_back(IndexDataKey::EncodeMaxKey(
+ 1, 2, std::numeric_limits<int32_t>::max() - 1));
for (size_t i = 0; i < keys.size(); ++i) {
EXPECT_EQ(Compare(keys[i], keys[i], false), 0);
@@ -972,7 +975,7 @@ TEST(IndexedDBLevelDBCodingTest, EncodeVarIntVSEncodeByteTest) {
unsigned char n = test_cases[i];
std::string a = WrappedEncodeByte(n);
- std::string b = WrappedEncodeVarInt(static_cast<int64>(n));
+ std::string b = WrappedEncodeVarInt(static_cast<int64_t>(n));
EXPECT_EQ(a.size(), b.size());
EXPECT_EQ(*a.begin(), *b.begin());
diff --git a/content/browser/indexed_db/indexed_db_metadata.cc b/content/browser/indexed_db/indexed_db_metadata.cc
index 92c4c31..74bdfbf 100644
--- a/content/browser/indexed_db/indexed_db_metadata.cc
+++ b/content/browser/indexed_db/indexed_db_metadata.cc
@@ -9,7 +9,7 @@ namespace content {
IndexedDBIndexMetadata::IndexedDBIndexMetadata() = default;
IndexedDBIndexMetadata::IndexedDBIndexMetadata(const base::string16& name,
- int64 id,
+ int64_t id,
const IndexedDBKeyPath& key_path,
bool unique,
bool multi_entry)
@@ -17,8 +17,7 @@ IndexedDBIndexMetadata::IndexedDBIndexMetadata(const base::string16& name,
id(id),
key_path(key_path),
unique(unique),
- multi_entry(multi_entry) {
-}
+ multi_entry(multi_entry) {}
IndexedDBIndexMetadata::IndexedDBIndexMetadata(
const IndexedDBIndexMetadata& other) = default;
@@ -30,10 +29,10 @@ IndexedDBIndexMetadata& IndexedDBIndexMetadata::operator=(
IndexedDBObjectStoreMetadata::IndexedDBObjectStoreMetadata(
const base::string16& name,
- int64 id,
+ int64_t id,
const IndexedDBKeyPath& key_path,
bool auto_increment,
- int64 max_index_id)
+ int64_t max_index_id)
: name(name),
id(id),
key_path(key_path),
@@ -55,10 +54,10 @@ IndexedDBDatabaseMetadata::IndexedDBDatabaseMetadata()
IndexedDBDatabaseMetadata::IndexedDBDatabaseMetadata(
const base::string16& name,
- int64 id,
+ int64_t id,
const base::string16& version,
- int64 int_version,
- int64 max_object_store_id)
+ int64_t int_version,
+ int64_t max_object_store_id)
: name(name),
id(id),
version(version),
diff --git a/content/browser/indexed_db/indexed_db_metadata.h b/content/browser/indexed_db/indexed_db_metadata.h
index e294868..2888017 100644
--- a/content/browser/indexed_db/indexed_db_metadata.h
+++ b/content/browser/indexed_db/indexed_db_metadata.h
@@ -5,20 +5,21 @@
#ifndef CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_METADATA_H_
#define CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_METADATA_H_
+#include <stdint.h>
+
#include <map>
-#include "base/basictypes.h"
#include "base/strings/string16.h"
#include "content/common/indexed_db/indexed_db_key_path.h"
namespace content {
struct CONTENT_EXPORT IndexedDBIndexMetadata {
- static const int64 kInvalidId = -1;
+ static const int64_t kInvalidId = -1;
IndexedDBIndexMetadata();
IndexedDBIndexMetadata(const base::string16& name,
- int64 id,
+ int64_t id,
const IndexedDBKeyPath& key_path,
bool unique,
bool multi_entry);
@@ -27,33 +28,33 @@ struct CONTENT_EXPORT IndexedDBIndexMetadata {
IndexedDBIndexMetadata& operator=(const IndexedDBIndexMetadata& other);
base::string16 name;
- int64 id;
+ int64_t id;
IndexedDBKeyPath key_path;
bool unique;
bool multi_entry;
};
struct CONTENT_EXPORT IndexedDBObjectStoreMetadata {
- typedef std::map<int64, IndexedDBIndexMetadata> IndexMap;
+ typedef std::map<int64_t, IndexedDBIndexMetadata> IndexMap;
- static const int64 kInvalidId = -1;
+ static const int64_t kInvalidId = -1;
IndexedDBObjectStoreMetadata();
IndexedDBObjectStoreMetadata(const base::string16& name,
- int64 id,
+ int64_t id,
const IndexedDBKeyPath& key_path,
bool auto_increment,
- int64 max_index_id);
+ int64_t max_index_id);
IndexedDBObjectStoreMetadata(const IndexedDBObjectStoreMetadata& other);
~IndexedDBObjectStoreMetadata();
IndexedDBObjectStoreMetadata& operator=(
const IndexedDBObjectStoreMetadata& other);
base::string16 name;
- int64 id;
+ int64_t id;
IndexedDBKeyPath key_path;
bool auto_increment;
- int64 max_index_id;
+ int64_t max_index_id;
IndexMap indexes;
};
@@ -65,23 +66,23 @@ struct CONTENT_EXPORT IndexedDBDatabaseMetadata {
DEFAULT_INT_VERSION = 0
};
- typedef std::map<int64, IndexedDBObjectStoreMetadata> ObjectStoreMap;
+ typedef std::map<int64_t, IndexedDBObjectStoreMetadata> ObjectStoreMap;
IndexedDBDatabaseMetadata();
IndexedDBDatabaseMetadata(const base::string16& name,
- int64 id,
+ int64_t id,
const base::string16& version,
- int64 int_version,
- int64 max_object_store_id);
+ int64_t int_version,
+ int64_t max_object_store_id);
IndexedDBDatabaseMetadata(const IndexedDBDatabaseMetadata& other);
~IndexedDBDatabaseMetadata();
IndexedDBDatabaseMetadata& operator=(IndexedDBDatabaseMetadata& other);
base::string16 name;
- int64 id;
+ int64_t id;
base::string16 version;
- int64 int_version;
- int64 max_object_store_id;
+ int64_t int_version;
+ int64_t max_object_store_id;
ObjectStoreMap object_stores;
};
diff --git a/content/browser/indexed_db/indexed_db_pending_connection.cc b/content/browser/indexed_db/indexed_db_pending_connection.cc
index b1d6318..ee16aba 100644
--- a/content/browser/indexed_db/indexed_db_pending_connection.cc
+++ b/content/browser/indexed_db/indexed_db_pending_connection.cc
@@ -10,8 +10,8 @@ IndexedDBPendingConnection::IndexedDBPendingConnection(
scoped_refptr<IndexedDBCallbacks> callbacks_in,
scoped_refptr<IndexedDBDatabaseCallbacks> database_callbacks_in,
int child_process_id_in,
- int64 transaction_id_in,
- int64 version_in)
+ int64_t transaction_id_in,
+ int64_t version_in)
: callbacks(callbacks_in),
database_callbacks(database_callbacks_in),
child_process_id(child_process_id_in),
diff --git a/content/browser/indexed_db/indexed_db_pending_connection.h b/content/browser/indexed_db/indexed_db_pending_connection.h
index 598bef2..b66d9cd 100644
--- a/content/browser/indexed_db/indexed_db_pending_connection.h
+++ b/content/browser/indexed_db/indexed_db_pending_connection.h
@@ -5,7 +5,8 @@
#ifndef CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_PENDING_CONNECTION_H_
#define CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_PENDING_CONNECTION_H_
-#include "base/basictypes.h"
+#include <stdint.h>
+
#include "base/memory/ref_counted.h"
#include "content/browser/indexed_db/indexed_db_callbacks.h"
#include "content/browser/indexed_db/indexed_db_database_callbacks.h"
@@ -21,14 +22,14 @@ struct CONTENT_EXPORT IndexedDBPendingConnection {
scoped_refptr<IndexedDBCallbacks> callbacks_in,
scoped_refptr<IndexedDBDatabaseCallbacks> database_callbacks_in,
int child_process_id_in,
- int64 transaction_id_in,
- int64 version_in);
+ int64_t transaction_id_in,
+ int64_t version_in);
~IndexedDBPendingConnection();
scoped_refptr<IndexedDBCallbacks> callbacks;
scoped_refptr<IndexedDBDatabaseCallbacks> database_callbacks;
int child_process_id;
- int64 transaction_id;
- int64 version;
+ int64_t transaction_id;
+ int64_t version;
};
} // namespace content
diff --git a/content/browser/indexed_db/indexed_db_quota_client.cc b/content/browser/indexed_db/indexed_db_quota_client.cc
index a33e428..433b2c1 100644
--- a/content/browser/indexed_db/indexed_db_quota_client.cc
+++ b/content/browser/indexed_db/indexed_db_quota_client.cc
@@ -4,6 +4,8 @@
#include "content/browser/indexed_db/indexed_db_quota_client.h"
+#include <stdint.h>
+
#include <vector>
#include "base/logging.h"
@@ -25,8 +27,8 @@ storage::QuotaStatusCode DeleteOriginDataOnIndexedDBThread(
return storage::kQuotaStatusOk;
}
-int64 GetOriginUsageOnIndexedDBThread(IndexedDBContextImpl* context,
- const GURL& origin) {
+int64_t GetOriginUsageOnIndexedDBThread(IndexedDBContextImpl* context,
+ const GURL& origin) {
DCHECK(context->TaskRunner()->RunsTasksOnCurrentThread());
return context->GetOriginDiskUsage(origin);
}
diff --git a/content/browser/indexed_db/indexed_db_quota_client.h b/content/browser/indexed_db/indexed_db_quota_client.h
index a99588c..8724638 100644
--- a/content/browser/indexed_db/indexed_db_quota_client.h
+++ b/content/browser/indexed_db/indexed_db_quota_client.h
@@ -8,6 +8,7 @@
#include <set>
#include <string>
+#include "base/macros.h"
#include "base/memory/ref_counted.h"
#include "base/memory/weak_ptr.h"
#include "content/common/content_export.h"
diff --git a/content/browser/indexed_db/indexed_db_quota_client_unittest.cc b/content/browser/indexed_db/indexed_db_quota_client_unittest.cc
index 3bec0b0..31a4136 100644
--- a/content/browser/indexed_db/indexed_db_quota_client_unittest.cc
+++ b/content/browser/indexed_db/indexed_db_quota_client_unittest.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 <stdint.h>
+
#include <map>
#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/macros.h"
#include "base/test/test_simple_task_runner.h"
#include "base/threading/thread.h"
#include "content/browser/browser_thread_impl.h"
@@ -74,9 +77,9 @@ class IndexedDBQuotaClientTest : public testing::Test {
base::MessageLoop::current()->RunUntilIdle();
}
- int64 GetOriginUsage(storage::QuotaClient* client,
- const GURL& origin,
- storage::StorageType type) {
+ int64_t GetOriginUsage(storage::QuotaClient* client,
+ const GURL& origin,
+ storage::StorageType type) {
usage_ = -1;
client->GetOriginUsage(
origin,
@@ -148,7 +151,7 @@ class IndexedDBQuotaClientTest : public testing::Test {
}
private:
- void OnGetOriginUsageComplete(int64 usage) { usage_ = usage; }
+ void OnGetOriginUsageComplete(int64_t usage) { usage_ = usage; }
void OnGetOriginsComplete(const std::set<GURL>& origins) {
origins_ = origins;
@@ -159,7 +162,7 @@ class IndexedDBQuotaClientTest : public testing::Test {
}
base::ScopedTempDir temp_dir_;
- int64 usage_;
+ int64_t usage_;
std::set<GURL> origins_;
scoped_refptr<base::TestSimpleTaskRunner> task_runner_;
scoped_refptr<IndexedDBContextImpl> idb_context_;
diff --git a/content/browser/indexed_db/indexed_db_transaction.cc b/content/browser/indexed_db/indexed_db_transaction.cc
index 36faa51..befca11 100644
--- a/content/browser/indexed_db/indexed_db_transaction.cc
+++ b/content/browser/indexed_db/indexed_db_transaction.cc
@@ -21,7 +21,7 @@
namespace content {
-const int64 kInactivityTimeoutPeriodSeconds = 60;
+const int64_t kInactivityTimeoutPeriodSeconds = 60;
IndexedDBTransaction::TaskQueue::TaskQueue() {}
IndexedDBTransaction::TaskQueue::~TaskQueue() { clear(); }
@@ -54,9 +54,9 @@ IndexedDBTransaction::Operation IndexedDBTransaction::TaskStack::pop() {
}
IndexedDBTransaction::IndexedDBTransaction(
- int64 id,
+ int64_t id,
scoped_refptr<IndexedDBDatabaseCallbacks> callbacks,
- const std::set<int64>& object_store_ids,
+ const std::set<int64_t>& object_store_ids,
blink::WebIDBTransactionMode mode,
IndexedDBDatabase* database,
IndexedDBBackingStore::Transaction* backing_store_transaction)
diff --git a/content/browser/indexed_db/indexed_db_transaction.h b/content/browser/indexed_db/indexed_db_transaction.h
index 6171b31..18dfb47 100644
--- a/content/browser/indexed_db/indexed_db_transaction.h
+++ b/content/browser/indexed_db/indexed_db_transaction.h
@@ -5,12 +5,14 @@
#ifndef CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_TRANSACTION_H_
#define CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_TRANSACTION_H_
+#include <stdint.h>
+
#include <queue>
#include <set>
#include <stack>
-#include "base/basictypes.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/time/time.h"
@@ -47,7 +49,7 @@ class CONTENT_EXPORT IndexedDBTransaction
void Start();
blink::WebIDBTransactionMode mode() const { return mode_; }
- const std::set<int64>& scope() const { return object_store_ids_; }
+ const std::set<int64_t>& scope() const { return object_store_ids_; }
void ScheduleTask(Operation task) {
ScheduleTask(blink::WebIDBTaskTypeNormal, task);
@@ -64,7 +66,7 @@ class CONTENT_EXPORT IndexedDBTransaction
IndexedDBBackingStore::Transaction* BackingStoreTransaction() {
return transaction_.get();
}
- int64 id() const { return id_; }
+ int64_t id() const { return id_; }
IndexedDBDatabase* database() const { return database_.get(); }
IndexedDBDatabaseCallbacks* connection() const { return callbacks_.get(); }
@@ -85,9 +87,9 @@ class CONTENT_EXPORT IndexedDBTransaction
// Test classes may derive, but most creation should be done via
// IndexedDBClassFactory.
IndexedDBTransaction(
- int64 id,
+ int64_t id,
scoped_refptr<IndexedDBDatabaseCallbacks> callbacks,
- const std::set<int64>& object_store_ids,
+ const std::set<int64_t>& object_store_ids,
blink::WebIDBTransactionMode mode,
IndexedDBDatabase* db,
IndexedDBBackingStore::Transaction* backing_store_transaction);
@@ -121,8 +123,8 @@ class CONTENT_EXPORT IndexedDBTransaction
leveldb::Status CommitPhaseTwo();
void Timeout();
- const int64 id_;
- const std::set<int64> object_store_ids_;
+ const int64_t id_;
+ const std::set<int64_t> object_store_ids_;
const blink::WebIDBTransactionMode mode_;
bool used_;
diff --git a/content/browser/indexed_db/indexed_db_transaction_coordinator.cc b/content/browser/indexed_db/indexed_db_transaction_coordinator.cc
index 58e838b..f552141 100644
--- a/content/browser/indexed_db/indexed_db_transaction_coordinator.cc
+++ b/content/browser/indexed_db/indexed_db_transaction_coordinator.cc
@@ -4,7 +4,6 @@
#include "content/browser/indexed_db/indexed_db_transaction_coordinator.h"
-#include "base/basictypes.h"
#include "base/logging.h"
#include "content/browser/indexed_db/indexed_db_transaction.h"
#include "third_party/WebKit/public/platform/modules/indexeddb/WebIDBTypes.h"
@@ -87,7 +86,7 @@ void IndexedDBTransactionCoordinator::ProcessQueuedTransactions() {
// taking a snapshot of the database, which does not include uncommitted
// data. ("Version change" transactions are exclusive, but handled by the
// connection sequencing in IndexedDBDatabase.)
- std::set<int64> locked_scope;
+ std::set<int64_t> locked_scope;
for (const auto& transaction : started_transactions_) {
if (transaction->mode() == blink::WebIDBTransactionModeReadWrite) {
// Started read/write transactions have exclusive access to the object
@@ -136,7 +135,7 @@ static bool DoSetsIntersect(const std::set<T>& set1,
bool IndexedDBTransactionCoordinator::CanStartTransaction(
IndexedDBTransaction* const transaction,
- const std::set<int64>& locked_scope) const {
+ const std::set<int64_t>& locked_scope) const {
DCHECK(queued_transactions_.count(transaction));
switch (transaction->mode()) {
case blink::WebIDBTransactionModeVersionChange:
diff --git a/content/browser/indexed_db/indexed_db_transaction_coordinator.h b/content/browser/indexed_db/indexed_db_transaction_coordinator.h
index 890541d..e32883a 100644
--- a/content/browser/indexed_db/indexed_db_transaction_coordinator.h
+++ b/content/browser/indexed_db/indexed_db_transaction_coordinator.h
@@ -5,10 +5,13 @@
#ifndef CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_TRANSACTION_COORDINATOR_H_
#define CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_TRANSACTION_COORDINATOR_H_
+#include <stdint.h>
+
#include <map>
#include <set>
#include <vector>
+#include "base/macros.h"
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
#include "content/browser/indexed_db/list_set.h"
@@ -41,7 +44,7 @@ class IndexedDBTransactionCoordinator {
void ProcessQueuedTransactions();
bool CanStartTransaction(IndexedDBTransaction* const transaction,
- const std::set<int64>& locked_scope) const;
+ const std::set<int64_t>& locked_scope) const;
// Transactions in different states are grouped below.
// list_set is used to provide stable ordering; required by spec
diff --git a/content/browser/indexed_db/indexed_db_transaction_unittest.cc b/content/browser/indexed_db/indexed_db_transaction_unittest.cc
index e033dd79e..9842968 100644
--- a/content/browser/indexed_db/indexed_db_transaction_unittest.cc
+++ b/content/browser/indexed_db/indexed_db_transaction_unittest.cc
@@ -4,8 +4,11 @@
#include "content/browser/indexed_db/indexed_db_transaction.h"
+#include <stdint.h>
+
#include "base/bind.h"
#include "base/logging.h"
+#include "base/macros.h"
#include "base/message_loop/message_loop.h"
#include "base/strings/utf_string_conversions.h"
#include "content/browser/indexed_db/indexed_db_fake_backing_store.h"
@@ -79,8 +82,8 @@ class IndexedDBTransactionTestMode
};
TEST_F(IndexedDBTransactionTest, Timeout) {
- const int64 id = 0;
- const std::set<int64> scope;
+ const int64_t id = 0;
+ const std::set<int64_t> scope;
const leveldb::Status commit_success = leveldb::Status::OK();
scoped_refptr<IndexedDBTransaction> transaction = new IndexedDBTransaction(
id,
@@ -123,8 +126,8 @@ TEST_F(IndexedDBTransactionTest, Timeout) {
}
TEST_F(IndexedDBTransactionTest, NoTimeoutReadOnly) {
- const int64 id = 0;
- const std::set<int64> scope;
+ const int64_t id = 0;
+ const std::set<int64_t> scope;
const leveldb::Status commit_success = leveldb::Status::OK();
scoped_refptr<IndexedDBTransaction> transaction = new IndexedDBTransaction(
id,
@@ -155,8 +158,8 @@ TEST_F(IndexedDBTransactionTest, NoTimeoutReadOnly) {
}
TEST_P(IndexedDBTransactionTestMode, ScheduleNormalTask) {
- const int64 id = 0;
- const std::set<int64> scope;
+ const int64_t id = 0;
+ const std::set<int64_t> scope;
const leveldb::Status commit_success = leveldb::Status::OK();
scoped_refptr<IndexedDBTransaction> transaction = new IndexedDBTransaction(
id,
@@ -217,8 +220,8 @@ TEST_P(IndexedDBTransactionTestMode, ScheduleNormalTask) {
}
TEST_F(IndexedDBTransactionTest, SchedulePreemptiveTask) {
- const int64 id = 0;
- const std::set<int64> scope;
+ const int64_t id = 0;
+ const std::set<int64_t> scope;
const leveldb::Status commit_failure = leveldb::Status::Corruption("Ouch.");
scoped_refptr<IndexedDBTransaction> transaction = new IndexedDBTransaction(
id,
@@ -278,8 +281,8 @@ TEST_F(IndexedDBTransactionTest, SchedulePreemptiveTask) {
}
TEST_P(IndexedDBTransactionTestMode, AbortTasks) {
- const int64 id = 0;
- const std::set<int64> scope;
+ const int64_t id = 0;
+ const std::set<int64_t> scope;
const leveldb::Status commit_failure = leveldb::Status::Corruption("Ouch.");
scoped_refptr<IndexedDBTransaction> transaction = new IndexedDBTransaction(
id,
@@ -308,8 +311,8 @@ TEST_P(IndexedDBTransactionTestMode, AbortTasks) {
}
TEST_P(IndexedDBTransactionTestMode, AbortPreemptive) {
- const int64 id = 0;
- const std::set<int64> scope;
+ const int64_t id = 0;
+ const std::set<int64_t> scope;
const leveldb::Status commit_success = leveldb::Status::OK();
scoped_refptr<IndexedDBTransaction> transaction = new IndexedDBTransaction(
id,
diff --git a/content/browser/indexed_db/indexed_db_unittest.cc b/content/browser/indexed_db/indexed_db_unittest.cc
index ddb1fdc..8628a6b 100644
--- a/content/browser/indexed_db/indexed_db_unittest.cc
+++ b/content/browser/indexed_db/indexed_db_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 <stdint.h>
+
#include "base/files/file_util.h"
#include "base/files/scoped_temp_dir.h"
+#include "base/macros.h"
#include "base/test/test_simple_task_runner.h"
#include "base/threading/thread.h"
#include "content/browser/browser_thread_impl.h"
@@ -263,7 +266,7 @@ TEST_F(IndexedDBTest, ForceCloseOpenDatabasesOnCommitFailure) {
scoped_refptr<MockIndexedDBCallbacks> callbacks(new MockIndexedDBCallbacks());
scoped_refptr<MockIndexedDBDatabaseCallbacks> db_callbacks(
new MockIndexedDBDatabaseCallbacks());
- const int64 transaction_id = 1;
+ const int64_t transaction_id = 1;
IndexedDBPendingConnection connection(
callbacks,
db_callbacks,
diff --git a/content/browser/indexed_db/indexed_db_value.h b/content/browser/indexed_db/indexed_db_value.h
index 7b2377a..33bb45a 100644
--- a/content/browser/indexed_db/indexed_db_value.h
+++ b/content/browser/indexed_db/indexed_db_value.h
@@ -5,6 +5,8 @@
#ifndef CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_VALUE_H_
#define CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_VALUE_H_
+#include <stddef.h>
+
#include <algorithm>
#include <string>
#include <vector>
diff --git a/content/browser/indexed_db/leveldb/leveldb_database.cc b/content/browser/indexed_db/leveldb/leveldb_database.cc
index 7efd986..3bce96c 100644
--- a/content/browser/indexed_db/leveldb/leveldb_database.cc
+++ b/content/browser/indexed_db/leveldb/leveldb_database.cc
@@ -4,11 +4,13 @@
#include "content/browser/indexed_db/leveldb/leveldb_database.h"
+#include <stdint.h>
+
#include <cerrno>
-#include "base/basictypes.h"
#include "base/files/file.h"
#include "base/logging.h"
+#include "base/macros.h"
#include "base/memory/scoped_ptr.h"
#include "base/metrics/histogram.h"
#include "base/strings/string16.h"
@@ -16,6 +18,7 @@
#include "base/strings/stringprintf.h"
#include "base/strings/utf_string_conversions.h"
#include "base/sys_info.h"
+#include "build/build_config.h"
#include "content/browser/indexed_db/indexed_db_class_factory.h"
#include "content/browser/indexed_db/indexed_db_tracing.h"
#include "content/browser/indexed_db/leveldb/leveldb_comparator.h"
@@ -165,7 +168,7 @@ static int CheckFreeSpace(const char* const type,
const base::FilePath& file_name) {
std::string name =
std::string("WebCore.IndexedDB.LevelDB.Open") + type + "FreeDiskSpace";
- int64 free_disk_space_in_k_bytes =
+ int64_t free_disk_space_in_k_bytes =
base::SysInfo::AmountOfFreeDiskSpace(file_name) / 1024;
if (free_disk_space_in_k_bytes < 0) {
base::Histogram::FactoryGet(
@@ -179,7 +182,7 @@ static int CheckFreeSpace(const char* const type,
int clamped_disk_space_k_bytes = free_disk_space_in_k_bytes > INT_MAX
? INT_MAX
: free_disk_space_in_k_bytes;
- const uint64 histogram_max = static_cast<uint64>(1e9);
+ const uint64_t histogram_max = static_cast<uint64_t>(1e9);
static_assert(histogram_max <= INT_MAX, "histogram_max too big");
base::Histogram::FactoryGet(name,
1,
diff --git a/content/browser/indexed_db/leveldb/leveldb_database.h b/content/browser/indexed_db/leveldb/leveldb_database.h
index 60a38ec..d5e469a 100644
--- a/content/browser/indexed_db/leveldb/leveldb_database.h
+++ b/content/browser/indexed_db/leveldb/leveldb_database.h
@@ -8,6 +8,7 @@
#include <string>
#include "base/files/file_path.h"
+#include "base/macros.h"
#include "base/memory/scoped_ptr.h"
#include "base/strings/string16.h"
#include "base/strings/string_piece.h"
diff --git a/content/browser/indexed_db/leveldb/leveldb_iterator_impl.h b/content/browser/indexed_db/leveldb/leveldb_iterator_impl.h
index 72b92e0..8128429 100644
--- a/content/browser/indexed_db/leveldb/leveldb_iterator_impl.h
+++ b/content/browser/indexed_db/leveldb/leveldb_iterator_impl.h
@@ -5,6 +5,7 @@
#ifndef CONTENT_BROWSER_INDEXED_DB_LEVELDB_LEVELDB_ITERATOR_IMPL_H_
#define CONTENT_BROWSER_INDEXED_DB_LEVELDB_LEVELDB_ITERATOR_IMPL_H_
+#include "base/macros.h"
#include "base/memory/scoped_ptr.h"
#include "content/browser/indexed_db/leveldb/leveldb_iterator.h"
#include "content/common/content_export.h"
diff --git a/content/browser/indexed_db/leveldb/leveldb_transaction.h b/content/browser/indexed_db/leveldb/leveldb_transaction.h
index 28d7656..bc9afb1 100644
--- a/content/browser/indexed_db/leveldb/leveldb_transaction.h
+++ b/content/browser/indexed_db/leveldb/leveldb_transaction.h
@@ -10,6 +10,7 @@
#include <string>
#include "base/gtest_prod_util.h"
+#include "base/macros.h"
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
#include "base/strings/string_piece.h"
diff --git a/content/browser/indexed_db/leveldb/leveldb_unittest.cc b/content/browser/indexed_db/leveldb/leveldb_unittest.cc
index f3012cc..e25d9de 100644
--- a/content/browser/indexed_db/leveldb/leveldb_unittest.cc
+++ b/content/browser/indexed_db/leveldb/leveldb_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 <algorithm>
#include <cstring>
#include <string>
diff --git a/content/browser/indexed_db/list_set.h b/content/browser/indexed_db/list_set.h
index 98f3b88..7ab40e5 100644
--- a/content/browser/indexed_db/list_set.h
+++ b/content/browser/indexed_db/list_set.h
@@ -5,6 +5,8 @@
#ifndef CONTENT_BROWSER_INDEXED_DB_LIST_SET_H_
#define CONTENT_BROWSER_INDEXED_DB_LIST_SET_H_
+#include <stddef.h>
+
#include <algorithm>
#include <iterator>
#include <list>
diff --git a/content/browser/indexed_db/mock_browsertest_indexed_db_class_factory.cc b/content/browser/indexed_db/mock_browsertest_indexed_db_class_factory.cc
index dc02ff7..1ece582 100644
--- a/content/browser/indexed_db/mock_browsertest_indexed_db_class_factory.cc
+++ b/content/browser/indexed_db/mock_browsertest_indexed_db_class_factory.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/logging.h"
@@ -60,9 +62,9 @@ class IndexedDBTestDatabase : public IndexedDBDatabase {
class IndexedDBTestTransaction : public IndexedDBTransaction {
public:
IndexedDBTestTransaction(
- int64 id,
+ int64_t id,
scoped_refptr<IndexedDBDatabaseCallbacks> callbacks,
- const std::set<int64>& scope,
+ const std::set<int64_t>& scope,
blink::WebIDBTransactionMode mode,
IndexedDBDatabase* db,
IndexedDBBackingStore::Transaction* backing_store_transaction)
@@ -262,9 +264,9 @@ MockBrowserTestIndexedDBClassFactory::CreateIndexedDBDatabase(
IndexedDBTransaction*
MockBrowserTestIndexedDBClassFactory::CreateIndexedDBTransaction(
- int64 id,
+ int64_t id,
scoped_refptr<IndexedDBDatabaseCallbacks> callbacks,
- const std::set<int64>& scope,
+ const std::set<int64_t>& scope,
blink::WebIDBTransactionMode mode,
IndexedDBDatabase* db,
IndexedDBBackingStore::Transaction* backing_store_transaction) {
diff --git a/content/browser/indexed_db/mock_browsertest_indexed_db_class_factory.h b/content/browser/indexed_db/mock_browsertest_indexed_db_class_factory.h
index 1b77071..acc050a 100644
--- a/content/browser/indexed_db/mock_browsertest_indexed_db_class_factory.h
+++ b/content/browser/indexed_db/mock_browsertest_indexed_db_class_factory.h
@@ -5,6 +5,8 @@
#ifndef CONTENT_BROWSER_INDEXED_DB_MOCK_BROWSERTEST_INDEXED_DB_CLASS_FACTORY_H_
#define CONTENT_BROWSER_INDEXED_DB_MOCK_BROWSERTEST_INDEXED_DB_CLASS_FACTORY_H_
+#include <stdint.h>
+
#include <map>
#include <set>
@@ -44,9 +46,9 @@ class MockBrowserTestIndexedDBClassFactory : public IndexedDBClassFactory {
IndexedDBFactory* factory,
const IndexedDBDatabase::Identifier& unique_identifier) override;
IndexedDBTransaction* CreateIndexedDBTransaction(
- int64 id,
+ int64_t id,
scoped_refptr<IndexedDBDatabaseCallbacks> callbacks,
- const std::set<int64>& scope,
+ const std::set<int64_t>& scope,
blink::WebIDBTransactionMode mode,
IndexedDBDatabase* db,
IndexedDBBackingStore::Transaction* backing_store_transaction) override;
diff --git a/content/browser/indexed_db/mock_indexed_db_callbacks.cc b/content/browser/indexed_db/mock_indexed_db_callbacks.cc
index 62afee8..6d9e48d 100644
--- a/content/browser/indexed_db/mock_indexed_db_callbacks.cc
+++ b/content/browser/indexed_db/mock_indexed_db_callbacks.cc
@@ -19,8 +19,7 @@ MockIndexedDBCallbacks::~MockIndexedDBCallbacks() {
void MockIndexedDBCallbacks::OnSuccess() {}
-void MockIndexedDBCallbacks::OnSuccess(int64 result) {
-}
+void MockIndexedDBCallbacks::OnSuccess(int64_t result) {}
void MockIndexedDBCallbacks::OnSuccess(const std::vector<base::string16>&) {}
diff --git a/content/browser/indexed_db/mock_indexed_db_callbacks.h b/content/browser/indexed_db/mock_indexed_db_callbacks.h
index 24743fe..44fa8d7 100644
--- a/content/browser/indexed_db/mock_indexed_db_callbacks.h
+++ b/content/browser/indexed_db/mock_indexed_db_callbacks.h
@@ -5,8 +5,11 @@
#ifndef CONTENT_BROWSER_INDEXED_DB_MOCK_INDEXED_DB_CALLBACKS_H_
#define CONTENT_BROWSER_INDEXED_DB_MOCK_INDEXED_DB_CALLBACKS_H_
+#include <stdint.h>
+
#include <vector>
+#include "base/macros.h"
#include "content/browser/indexed_db/indexed_db_callbacks.h"
#include "content/browser/indexed_db/indexed_db_connection.h"
@@ -18,7 +21,7 @@ class MockIndexedDBCallbacks : public IndexedDBCallbacks {
explicit MockIndexedDBCallbacks(bool expect_connection);
void OnSuccess() override;
- void OnSuccess(int64 result) override;
+ void OnSuccess(int64_t result) override;
void OnSuccess(const std::vector<base::string16>& result) override;
void OnSuccess(const IndexedDBKey& key) override;
void OnSuccess(scoped_ptr<IndexedDBConnection> connection,
diff --git a/content/browser/indexed_db/mock_indexed_db_database_callbacks.cc b/content/browser/indexed_db/mock_indexed_db_database_callbacks.cc
index 479bb3a..dbb7565 100644
--- a/content/browser/indexed_db/mock_indexed_db_database_callbacks.cc
+++ b/content/browser/indexed_db/mock_indexed_db_database_callbacks.cc
@@ -18,7 +18,7 @@ void MockIndexedDBDatabaseCallbacks::OnForcedClose() {
}
void MockIndexedDBDatabaseCallbacks::OnAbort(
- int64 transaction_id,
+ int64_t transaction_id,
const IndexedDBDatabaseError& error) {
abort_called_ = true;
}
diff --git a/content/browser/indexed_db/mock_indexed_db_database_callbacks.h b/content/browser/indexed_db/mock_indexed_db_database_callbacks.h
index 31a29645..20ea2b5 100644
--- a/content/browser/indexed_db/mock_indexed_db_database_callbacks.h
+++ b/content/browser/indexed_db/mock_indexed_db_database_callbacks.h
@@ -5,6 +5,9 @@
#ifndef CONTENT_BROWSER_INDEXED_DB_MOCK_INDEXED_DB_DATABASE_CALLBACKS_H_
#define CONTENT_BROWSER_INDEXED_DB_MOCK_INDEXED_DB_DATABASE_CALLBACKS_H_
+#include <stdint.h>
+
+#include "base/macros.h"
#include "content/browser/indexed_db/indexed_db_callbacks.h"
#include "content/browser/indexed_db/indexed_db_connection.h"
@@ -14,11 +17,11 @@ class MockIndexedDBDatabaseCallbacks : public IndexedDBDatabaseCallbacks {
public:
MockIndexedDBDatabaseCallbacks();
- void OnVersionChange(int64 old_version, int64 new_version) override {}
+ void OnVersionChange(int64_t old_version, int64_t new_version) override {}
void OnForcedClose() override;
- void OnAbort(int64 transaction_id,
+ void OnAbort(int64_t transaction_id,
const IndexedDBDatabaseError& error) override;
- void OnComplete(int64 transaction_id) override {}
+ void OnComplete(int64_t transaction_id) override {}
bool abort_called() const { return abort_called_; }
bool forced_close_called() const { return forced_close_called_; }
diff --git a/content/browser/indexed_db/mock_indexed_db_factory.h b/content/browser/indexed_db/mock_indexed_db_factory.h
index b480758..207edf3 100644
--- a/content/browser/indexed_db/mock_indexed_db_factory.h
+++ b/content/browser/indexed_db/mock_indexed_db_factory.h
@@ -5,8 +5,11 @@
#ifndef CONTENT_BROWSER_INDEXED_DB_MOCK_INDEXED_DB_FACTORY_H_
#define CONTENT_BROWSER_INDEXED_DB_MOCK_INDEXED_DB_FACTORY_H_
+#include <stddef.h>
+
#include <string>
+#include "base/macros.h"
#include "content/browser/indexed_db/indexed_db_factory.h"
#include "testing/gmock/include/gmock/gmock.h"
diff --git a/content/browser/loader/async_resource_handler.cc b/content/browser/loader/async_resource_handler.cc
index ec02d13..df08aa7 100644
--- a/content/browser/loader/async_resource_handler.cc
+++ b/content/browser/loader/async_resource_handler.cc
@@ -11,6 +11,7 @@
#include "base/containers/hash_tables.h"
#include "base/debug/alias.h"
#include "base/logging.h"
+#include "base/macros.h"
#include "base/memory/shared_memory.h"
#include "base/metrics/histogram_macros.h"
#include "base/strings/string_number_conversions.h"
@@ -144,10 +145,10 @@ void AsyncResourceHandler::ReportUploadProgress() {
if (progress.position() == last_upload_position_)
return; // No progress made since last time.
- const uint64 kHalfPercentIncrements = 200;
+ const uint64_t kHalfPercentIncrements = 200;
const TimeDelta kOneSecond = TimeDelta::FromMilliseconds(1000);
- uint64 amt_since_last = progress.position() - last_upload_position_;
+ uint64_t amt_since_last = progress.position() - last_upload_position_;
TimeDelta time_since_last = TimeTicks::Now() - last_upload_ticks_;
bool is_finished = (progress.size() == progress.position());
diff --git a/content/browser/loader/async_resource_handler.h b/content/browser/loader/async_resource_handler.h
index 9d46096..d7f70c2 100644
--- a/content/browser/loader/async_resource_handler.h
+++ b/content/browser/loader/async_resource_handler.h
@@ -5,8 +5,11 @@
#ifndef CONTENT_BROWSER_LOADER_ASYNC_RESOURCE_HANDLER_H_
#define CONTENT_BROWSER_LOADER_ASYNC_RESOURCE_HANDLER_H_
+#include <stdint.h>
+
#include <string>
+#include "base/macros.h"
#include "base/memory/ref_counted.h"
#include "base/timer/timer.h"
#include "content/browser/loader/resource_handler.h"
@@ -78,7 +81,7 @@ class AsyncResourceHandler : public ResourceHandler,
bool sent_received_response_msg_;
bool sent_first_data_msg_;
- uint64 last_upload_position_;
+ uint64_t last_upload_position_;
bool waiting_for_upload_progress_ack_;
base::TimeTicks last_upload_ticks_;
base::RepeatingTimer progress_timer_;
diff --git a/content/browser/loader/async_resource_handler_browsertest.cc b/content/browser/loader/async_resource_handler_browsertest.cc
index 08d253e..2a854c0 100644
--- a/content/browser/loader/async_resource_handler_browsertest.cc
+++ b/content/browser/loader/async_resource_handler_browsertest.cc
@@ -4,11 +4,14 @@
#include "content/browser/loader/async_resource_handler.h"
+#include <stddef.h>
+
#include <string>
#include "base/format_macros.h"
#include "base/strings/string_util.h"
#include "base/strings/stringprintf.h"
+#include "build/build_config.h"
#include "content/public/common/content_switches.h"
#include "content/public/test/browser_test_utils.h"
#include "content/public/test/content_browser_test.h"
diff --git a/content/browser/loader/certificate_resource_handler.cc b/content/browser/loader/certificate_resource_handler.cc
index fd49181..1d7fbdd 100644
--- a/content/browser/loader/certificate_resource_handler.cc
+++ b/content/browser/loader/certificate_resource_handler.cc
@@ -5,6 +5,7 @@
#include "content/browser/loader/certificate_resource_handler.h"
#include <limits.h>
+#include <stddef.h>
#include "components/mime_util/mime_util.h"
#include "content/browser/loader/resource_request_info_impl.h"
diff --git a/content/browser/loader/cross_site_resource_handler.h b/content/browser/loader/cross_site_resource_handler.h
index db1dc84..3c38fc7 100644
--- a/content/browser/loader/cross_site_resource_handler.h
+++ b/content/browser/loader/cross_site_resource_handler.h
@@ -5,6 +5,7 @@
#ifndef CONTENT_BROWSER_LOADER_CROSS_SITE_RESOURCE_HANDLER_H_
#define CONTENT_BROWSER_LOADER_CROSS_SITE_RESOURCE_HANDLER_H_
+#include "base/macros.h"
#include "base/memory/ref_counted.h"
#include "base/memory/weak_ptr.h"
#include "content/browser/loader/layered_resource_handler.h"
diff --git a/content/browser/loader/cross_site_resource_handler_browsertest.cc b/content/browser/loader/cross_site_resource_handler_browsertest.cc
index 55d7bc0..a6df689 100644
--- a/content/browser/loader/cross_site_resource_handler_browsertest.cc
+++ b/content/browser/loader/cross_site_resource_handler_browsertest.cc
@@ -4,6 +4,7 @@
#include "base/callback.h"
#include "base/command_line.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/content/browser/loader/detachable_resource_handler.h b/content/browser/loader/detachable_resource_handler.h
index 4bb1763..9507226 100644
--- a/content/browser/loader/detachable_resource_handler.h
+++ b/content/browser/loader/detachable_resource_handler.h
@@ -5,8 +5,8 @@
#ifndef CONTENT_BROWSER_LOADER_DETACHABLE_RESOURCE_HANDLER_H_
#define CONTENT_BROWSER_LOADER_DETACHABLE_RESOURCE_HANDLER_H_
-#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/time/time.h"
diff --git a/content/browser/loader/mime_type_resource_handler.h b/content/browser/loader/mime_type_resource_handler.h
index b5e56c2..9217683 100644
--- a/content/browser/loader/mime_type_resource_handler.h
+++ b/content/browser/loader/mime_type_resource_handler.h
@@ -8,6 +8,7 @@
#include <string>
#include <vector>
+#include "base/macros.h"
#include "base/memory/weak_ptr.h"
#include "content/browser/loader/layered_resource_handler.h"
#include "content/common/content_export.h"
diff --git a/content/browser/loader/mime_type_resource_handler_unittest.cc b/content/browser/loader/mime_type_resource_handler_unittest.cc
index 43005ad..a496749 100644
--- a/content/browser/loader/mime_type_resource_handler_unittest.cc
+++ b/content/browser/loader/mime_type_resource_handler_unittest.cc
@@ -4,6 +4,8 @@
#include "content/browser/loader/mime_type_resource_handler.h"
+#include <stdint.h>
+
#include "base/files/file_path.h"
#include "base/logging.h"
#include "base/macros.h"
@@ -90,7 +92,7 @@ class TestResourceDispatcherHost : public ResourceDispatcherHostImpl {
net::URLRequest* request,
bool is_content_initiated,
bool must_download,
- uint32 id,
+ uint32_t id,
scoped_ptr<DownloadSaveInfo> save_info,
const DownloadUrlParameters::OnStartedCallback& started_cb) override {
return scoped_ptr<ResourceHandler>(new TestResourceHandler).Pass();
diff --git a/content/browser/loader/navigation_resource_throttle.h b/content/browser/loader/navigation_resource_throttle.h
index 753d99b..6357b20 100644
--- a/content/browser/loader/navigation_resource_throttle.h
+++ b/content/browser/loader/navigation_resource_throttle.h
@@ -5,7 +5,7 @@
#ifndef CONTENT_BROWSER_LOADER_NAVIGATION_RESOURCE_THROTTLE_H_
#define CONTENT_BROWSER_LOADER_NAVIGATION_RESOURCE_THROTTLE_H_
-#include "base/basictypes.h"
+#include "base/macros.h"
#include "base/memory/weak_ptr.h"
#include "content/public/browser/navigation_throttle.h"
#include "content/public/browser/resource_throttle.h"
diff --git a/content/browser/loader/navigation_url_loader.h b/content/browser/loader/navigation_url_loader.h
index d3d5866..0ba836a 100644
--- a/content/browser/loader/navigation_url_loader.h
+++ b/content/browser/loader/navigation_url_loader.h
@@ -5,7 +5,6 @@
#ifndef CONTENT_BROWSER_LOADER_NAVIGATION_URL_LOADER_H_
#define CONTENT_BROWSER_LOADER_NAVIGATION_URL_LOADER_H_
-#include "base/basictypes.h"
#include "base/macros.h"
#include "base/memory/scoped_ptr.h"
#include "content/common/content_export.h"
diff --git a/content/browser/loader/navigation_url_loader_impl_core.h b/content/browser/loader/navigation_url_loader_impl_core.h
index 9016ba6..b12629d 100644
--- a/content/browser/loader/navigation_url_loader_impl_core.h
+++ b/content/browser/loader/navigation_url_loader_impl_core.h
@@ -5,7 +5,6 @@
#ifndef CONTENT_BROWSER_LOADER_NAVIGATION_URL_LOADER_IMPL_CORE_H_
#define CONTENT_BROWSER_LOADER_NAVIGATION_URL_LOADER_IMPL_CORE_H_
-#include "base/basictypes.h"
#include "base/macros.h"
#include "base/memory/scoped_ptr.h"
#include "base/memory/weak_ptr.h"
diff --git a/content/browser/loader/power_save_block_resource_throttle.h b/content/browser/loader/power_save_block_resource_throttle.h
index 0d0c080..502eda5 100644
--- a/content/browser/loader/power_save_block_resource_throttle.h
+++ b/content/browser/loader/power_save_block_resource_throttle.h
@@ -5,8 +5,8 @@
#ifndef CONTENT_BROWSER_LOADER_POWER_SAVE_BLOCK_RESOURCE_THROTTLE_H_
#define CONTENT_BROWSER_LOADER_POWER_SAVE_BLOCK_RESOURCE_THROTTLE_H_
-#include "base/basictypes.h"
#include "base/compiler_specific.h"
+#include "base/macros.h"
#include "base/memory/scoped_ptr.h"
#include "base/timer/timer.h"
#include "content/public/browser/resource_throttle.h"
diff --git a/content/browser/loader/redirect_to_file_resource_handler.cc b/content/browser/loader/redirect_to_file_resource_handler.cc
index 12fd7d3..57f0df6 100644
--- a/content/browser/loader/redirect_to_file_resource_handler.cc
+++ b/content/browser/loader/redirect_to_file_resource_handler.cc
@@ -6,6 +6,7 @@
#include "base/bind.h"
#include "base/logging.h"
+#include "base/macros.h"
#include "base/threading/thread_restrictions.h"
#include "content/browser/loader/resource_request_info_impl.h"
#include "content/browser/loader/temporary_file_stream.h"
diff --git a/content/browser/loader/redirect_to_file_resource_handler.h b/content/browser/loader/redirect_to_file_resource_handler.h
index 1778921..cd4d60d 100644
--- a/content/browser/loader/redirect_to_file_resource_handler.h
+++ b/content/browser/loader/redirect_to_file_resource_handler.h
@@ -5,11 +5,11 @@
#ifndef CONTENT_BROWSER_LOADER_REDIRECT_TO_FILE_RESOURCE_HANDLER_H_
#define CONTENT_BROWSER_LOADER_REDIRECT_TO_FILE_RESOURCE_HANDLER_H_
-#include "base/basictypes.h"
#include "base/callback.h"
#include "base/compiler_specific.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"
diff --git a/content/browser/loader/resource_buffer.h b/content/browser/loader/resource_buffer.h
index 0908edb..e323bf1 100644
--- a/content/browser/loader/resource_buffer.h
+++ b/content/browser/loader/resource_buffer.h
@@ -7,7 +7,7 @@
#include <queue>
-#include "base/basictypes.h"
+#include "base/macros.h"
#include "base/memory/ref_counted.h"
#include "base/memory/shared_memory.h"
#include "content/common/content_export.h"
diff --git a/content/browser/loader/resource_dispatcher_host_browsertest.cc b/content/browser/loader/resource_dispatcher_host_browsertest.cc
index c0a4499..c6f0d1f 100644
--- a/content/browser/loader/resource_dispatcher_host_browsertest.cc
+++ b/content/browser/loader/resource_dispatcher_host_browsertest.cc
@@ -4,11 +4,13 @@
#include "base/bind.h"
#include "base/bind_helpers.h"
+#include "base/macros.h"
#include "base/memory/ref_counted.h"
#include "base/run_loop.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 "content/browser/download/download_manager_impl.h"
#include "content/browser/web_contents/web_contents_impl.h"
#include "content/public/browser/browser_context.h"
diff --git a/content/browser/loader/resource_dispatcher_host_impl.cc b/content/browser/loader/resource_dispatcher_host_impl.cc
index b8720c0..d132f9b 100644
--- a/content/browser/loader/resource_dispatcher_host_impl.cc
+++ b/content/browser/loader/resource_dispatcher_host_impl.cc
@@ -6,6 +6,8 @@
#include "content/browser/loader/resource_dispatcher_host_impl.h"
+#include <stddef.h>
+
#include <algorithm>
#include <set>
#include <vector>
@@ -16,6 +18,7 @@
#include "base/compiler_specific.h"
#include "base/debug/alias.h"
#include "base/logging.h"
+#include "base/macros.h"
#include "base/memory/scoped_ptr.h"
#include "base/memory/shared_memory.h"
#include "base/message_loop/message_loop.h"
@@ -647,7 +650,7 @@ DownloadInterruptReason ResourceDispatcherHostImpl::BeginDownload(
bool prefer_cache,
bool do_not_prompt_for_login,
scoped_ptr<DownloadSaveInfo> save_info,
- uint32 download_id,
+ uint32_t download_id,
const DownloadStartedCallback& started_callback) {
if (is_shutdown_)
return CallbackAndReturn(started_callback,
@@ -755,7 +758,7 @@ ResourceDispatcherHostImpl::CreateResourceHandlerForDownload(
net::URLRequest* request,
bool is_content_initiated,
bool must_download,
- uint32 id,
+ uint32_t id,
scoped_ptr<DownloadSaveInfo> save_info,
const DownloadUrlParameters::OnStartedCallback& started_cb) {
scoped_ptr<ResourceHandler> handler(
@@ -2316,11 +2319,11 @@ bool ResourceDispatcherHostImpl::LoadInfoIsMoreInteresting(const LoadInfo& a,
// Set |*_uploading_size| to be the size of the corresponding upload body if
// it's currently being uploaded.
- uint64 a_uploading_size = 0;
+ uint64_t a_uploading_size = 0;
if (a.load_state.state == net::LOAD_STATE_SENDING_REQUEST)
a_uploading_size = a.upload_size;
- uint64 b_uploading_size = 0;
+ uint64_t b_uploading_size = 0;
if (b.load_state.state == net::LOAD_STATE_SENDING_REQUEST)
b_uploading_size = b.upload_size;
diff --git a/content/browser/loader/resource_dispatcher_host_impl.h b/content/browser/loader/resource_dispatcher_host_impl.h
index cb2e89a..1c745bd 100644
--- a/content/browser/loader/resource_dispatcher_host_impl.h
+++ b/content/browser/loader/resource_dispatcher_host_impl.h
@@ -12,13 +12,15 @@
#ifndef CONTENT_BROWSER_LOADER_RESOURCE_DISPATCHER_HOST_IMPL_H_
#define CONTENT_BROWSER_LOADER_RESOURCE_DISPATCHER_HOST_IMPL_H_
+#include <stdint.h>
+
#include <map>
#include <set>
#include <string>
#include <vector>
-#include "base/basictypes.h"
#include "base/gtest_prod_util.h"
+#include "base/macros.h"
#include "base/memory/linked_ptr.h"
#include "base/memory/scoped_ptr.h"
#include "base/observer_list.h"
@@ -100,7 +102,7 @@ class CONTENT_EXPORT ResourceDispatcherHostImpl
bool prefer_cache,
bool do_not_prompt_for_login,
scoped_ptr<DownloadSaveInfo> save_info,
- uint32 download_id,
+ uint32_t download_id,
const DownloadStartedCallback& started_callback) override;
void ClearLoginDelegateForRequest(net::URLRequest* request) override;
void BlockRequestsForRoute(int child_id, int route_id) override;
@@ -240,7 +242,7 @@ class CONTENT_EXPORT ResourceDispatcherHostImpl
net::URLRequest* request,
bool is_content_initiated,
bool must_download,
- uint32 id,
+ uint32_t id,
scoped_ptr<DownloadSaveInfo> save_info,
const DownloadUrlParameters::OnStartedCallback& started_cb);
@@ -311,8 +313,8 @@ class CONTENT_EXPORT ResourceDispatcherHostImpl
struct LoadInfo {
GURL url;
net::LoadStateWithParam load_state;
- uint64 upload_position;
- uint64 upload_size;
+ uint64_t upload_position;
+ uint64_t upload_size;
};
// Map from ProcessID+RouteID pair to the "most interesting" LoadState.
diff --git a/content/browser/loader/resource_dispatcher_host_unittest.cc b/content/browser/loader/resource_dispatcher_host_unittest.cc
index d7b2b17..e158abc 100644
--- a/content/browser/loader/resource_dispatcher_host_unittest.cc
+++ b/content/browser/loader/resource_dispatcher_host_unittest.cc
@@ -2,13 +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 <vector>
-#include "base/basictypes.h"
#include "base/bind.h"
#include "base/files/file_path.h"
#include "base/files/file_util.h"
#include "base/location.h"
+#include "base/macros.h"
#include "base/memory/scoped_vector.h"
#include "base/memory/shared_memory.h"
#include "base/pickle.h"
diff --git a/content/browser/loader/resource_loader.h b/content/browser/loader/resource_loader.h
index 41f3d7e..5b5ecdb 100644
--- a/content/browser/loader/resource_loader.h
+++ b/content/browser/loader/resource_loader.h
@@ -5,6 +5,7 @@
#ifndef CONTENT_BROWSER_LOADER_RESOURCE_LOADER_H_
#define CONTENT_BROWSER_LOADER_RESOURCE_LOADER_H_
+#include "base/macros.h"
#include "base/memory/scoped_ptr.h"
#include "base/memory/weak_ptr.h"
#include "base/timer/timer.h"
diff --git a/content/browser/loader/resource_loader_unittest.cc b/content/browser/loader/resource_loader_unittest.cc
index 1b8bb45..2ff4738 100644
--- a/content/browser/loader/resource_loader_unittest.cc
+++ b/content/browser/loader/resource_loader_unittest.cc
@@ -4,6 +4,9 @@
#include "content/browser/loader/resource_loader.h"
+#include <stddef.h>
+#include <stdint.h>
+
#include "base/files/file.h"
#include "base/files/file_util.h"
#include "base/location.h"
@@ -492,7 +495,7 @@ class ResourceContextStub : public MockResourceContext {
// progress reporting.
class NonChunkedUploadDataStream : public net::UploadDataStream {
public:
- explicit NonChunkedUploadDataStream(uint64 size)
+ explicit NonChunkedUploadDataStream(uint64_t size)
: net::UploadDataStream(false, 0), stream_(0), size_(size) {}
void AppendData(const char* data) {
@@ -516,7 +519,7 @@ class NonChunkedUploadDataStream : public net::UploadDataStream {
void ResetInternal() override { stream_.Reset(); }
net::ChunkedUploadDataStream stream_;
- uint64 size_;
+ uint64_t size_;
DISALLOW_COPY_AND_ASSIGN(NonChunkedUploadDataStream);
};
diff --git a/content/browser/loader/resource_message_delegate.h b/content/browser/loader/resource_message_delegate.h
index 2a5dc45..f007f1c 100644
--- a/content/browser/loader/resource_message_delegate.h
+++ b/content/browser/loader/resource_message_delegate.h
@@ -5,7 +5,7 @@
#ifndef CONTENT_BROWSER_LOADER_RESOURCE_MESSAGE_DELEGATE_H_
#define CONTENT_BROWSER_LOADER_RESOURCE_MESSAGE_DELEGATE_H_
-#include "base/basictypes.h"
+#include "base/macros.h"
#include "content/common/content_export.h"
#include "content/public/browser/global_request_id.h"
diff --git a/content/browser/loader/resource_message_filter.h b/content/browser/loader/resource_message_filter.h
index 163f918..9bac419 100644
--- a/content/browser/loader/resource_message_filter.h
+++ b/content/browser/loader/resource_message_filter.h
@@ -6,6 +6,7 @@
#define CONTENT_BROWSER_LOADER_RESOURCE_MESSAGE_FILTER_H_
#include "base/callback_forward.h"
+#include "base/macros.h"
#include "base/memory/scoped_ptr.h"
#include "base/memory/weak_ptr.h"
#include "content/common/content_export.h"
diff --git a/content/browser/loader/resource_request_info_impl.h b/content/browser/loader/resource_request_info_impl.h
index 827a3f0..bb6c948 100644
--- a/content/browser/loader/resource_request_info_impl.h
+++ b/content/browser/loader/resource_request_info_impl.h
@@ -7,8 +7,8 @@
#include <string>
-#include "base/basictypes.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/memory/weak_ptr.h"
diff --git a/content/browser/loader/resource_scheduler.cc b/content/browser/loader/resource_scheduler.cc
index 83055a6..370f2f0 100644
--- a/content/browser/loader/resource_scheduler.cc
+++ b/content/browser/loader/resource_scheduler.cc
@@ -10,6 +10,7 @@
#include <string>
#include <vector>
+#include "base/macros.h"
#include "base/metrics/field_trial.h"
#include "base/metrics/histogram.h"
#include "base/stl_util.h"
@@ -167,14 +168,14 @@ class ResourceScheduler::RequestQueue {
private:
typedef std::map<ScheduledResourceRequest*, NetQueue::iterator> PointerMap;
- uint32 MakeFifoOrderingId() {
+ uint32_t MakeFifoOrderingId() {
fifo_ordering_ids_ += 1;
return fifo_ordering_ids_;
}
// Used to create an ordering ID for scheduled resources so that resources
// with same priority/intra_priority stay in fifo order.
- uint32 fifo_ordering_ids_;
+ uint32_t fifo_ordering_ids_;
NetQueue queue_;
PointerMap pointers_;
@@ -282,8 +283,8 @@ class ResourceScheduler::ScheduledResourceRequest : public ResourceThrottle {
net::URLRequest* url_request() { return request_; }
const net::URLRequest* url_request() const { return request_; }
bool is_async() const { return is_async_; }
- uint32 fifo_ordering() const { return fifo_ordering_; }
- void set_fifo_ordering(uint32 fifo_ordering) {
+ uint32_t fifo_ordering() const { return fifo_ordering_; }
+ void set_fifo_ordering(uint32_t fifo_ordering) {
fifo_ordering_ = fifo_ordering;
}
RequestAttributes attributes() const {
@@ -326,7 +327,7 @@ class ResourceScheduler::ScheduledResourceRequest : public ResourceThrottle {
RequestAttributes attributes_;
ResourceScheduler* scheduler_;
RequestPriorityParams priority_;
- uint32 fifo_ordering_;
+ uint32_t fifo_ordering_;
base::TimeTicks time_deferred_;
base::WeakPtrFactory<ResourceScheduler::ScheduledResourceRequest>
diff --git a/content/browser/loader/resource_scheduler.h b/content/browser/loader/resource_scheduler.h
index a50324b..444d97d 100644
--- a/content/browser/loader/resource_scheduler.h
+++ b/content/browser/loader/resource_scheduler.h
@@ -5,11 +5,14 @@
#ifndef CONTENT_BROWSER_LOADER_RESOURCE_SCHEDULER_H_
#define CONTENT_BROWSER_LOADER_RESOURCE_SCHEDULER_H_
+#include <stddef.h>
+#include <stdint.h>
+
#include <map>
#include <set>
-#include "base/basictypes.h"
#include "base/compiler_specific.h"
+#include "base/macros.h"
#include "base/memory/scoped_ptr.h"
#include "base/threading/non_thread_safe.h"
#include "base/timer/timer.h"
@@ -218,7 +221,7 @@ class CONTENT_EXPORT ResourceScheduler : public base::NonThreadSafe {
};
class Client;
- typedef int64 ClientId;
+ typedef int64_t ClientId;
typedef std::map<ClientId, Client*> ClientMap;
typedef std::set<ScheduledResourceRequest*> RequestSet;
diff --git a/content/browser/loader/resource_scheduler_filter.cc b/content/browser/loader/resource_scheduler_filter.cc
index 2777eaa..0738ec1 100644
--- a/content/browser/loader/resource_scheduler_filter.cc
+++ b/content/browser/loader/resource_scheduler_filter.cc
@@ -4,6 +4,9 @@
#include "content/browser/loader/resource_scheduler_filter.h"
+#include <stdint.h>
+
+#include "base/macros.h"
#include "content/browser/loader/resource_dispatcher_host_impl.h"
#include "content/browser/loader/resource_scheduler.h"
#include "content/common/frame_messages.h"
@@ -12,9 +15,8 @@
namespace content {
namespace {
-const uint32 kFilteredMessageClasses[] = {
- FrameMsgStart,
- ViewMsgStart,
+const uint32_t kFilteredMessageClasses[] = {
+ FrameMsgStart, ViewMsgStart,
};
} // namespace
diff --git a/content/browser/loader/stream_resource_handler.h b/content/browser/loader/stream_resource_handler.h
index 37f4d0d..6bc4253 100644
--- a/content/browser/loader/stream_resource_handler.h
+++ b/content/browser/loader/stream_resource_handler.h
@@ -5,6 +5,7 @@
#ifndef CONTENT_BROWSER_LOADER_STREAM_RESOURCE_HANDLER_H_
#define CONTENT_BROWSER_LOADER_STREAM_RESOURCE_HANDLER_H_
+#include "base/macros.h"
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
#include "content/browser/loader/resource_handler.h"
diff --git a/content/browser/loader/sync_resource_handler.h b/content/browser/loader/sync_resource_handler.h
index fb02847..49b0d91 100644
--- a/content/browser/loader/sync_resource_handler.h
+++ b/content/browser/loader/sync_resource_handler.h
@@ -5,6 +5,8 @@
#ifndef CONTENT_BROWSER_LOADER_SYNC_RESOURCE_HANDLER_H_
#define CONTENT_BROWSER_LOADER_SYNC_RESOURCE_HANDLER_H_
+#include <stdint.h>
+
#include <string>
#include "content/browser/loader/resource_handler.h"
@@ -56,7 +58,7 @@ class SyncResourceHandler : public ResourceHandler {
SyncLoadResult result_;
IPC::Message* result_message_;
ResourceDispatcherHostImpl* rdh_;
- int64 total_transfer_size_;
+ int64_t total_transfer_size_;
};
} // namespace content
diff --git a/content/browser/loader/temporary_file_stream_unittest.cc b/content/browser/loader/temporary_file_stream_unittest.cc
index af57f08..f3035b7 100644
--- a/content/browser/loader/temporary_file_stream_unittest.cc
+++ b/content/browser/loader/temporary_file_stream_unittest.cc
@@ -8,10 +8,10 @@
#include <string>
-#include "base/basictypes.h"
#include "base/bind.h"
#include "base/files/file_path.h"
#include "base/files/file_util.h"
+#include "base/macros.h"
#include "base/run_loop.h"
#include "content/public/test/test_browser_thread_bundle.h"
#include "net/base/file_stream.h"
diff --git a/content/browser/loader/throttling_resource_handler.h b/content/browser/loader/throttling_resource_handler.h
index 0d1287d..6abefc4 100644
--- a/content/browser/loader/throttling_resource_handler.h
+++ b/content/browser/loader/throttling_resource_handler.h
@@ -5,6 +5,8 @@
#ifndef CONTENT_BROWSER_LOADER_THROTTLING_RESOURCE_HANDLER_H_
#define CONTENT_BROWSER_LOADER_THROTTLING_RESOURCE_HANDLER_H_
+#include <stddef.h>
+
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_vector.h"
#include "content/browser/loader/layered_resource_handler.h"
diff --git a/content/browser/loader/upload_data_stream_builder.cc b/content/browser/loader/upload_data_stream_builder.cc
index 981d973..bcabe99 100644
--- a/content/browser/loader/upload_data_stream_builder.cc
+++ b/content/browser/loader/upload_data_stream_builder.cc
@@ -4,11 +4,14 @@
#include "content/browser/loader/upload_data_stream_builder.h"
+#include <stdint.h>
+
#include <limits>
#include <utility>
#include <vector>
#include "base/logging.h"
+#include "base/macros.h"
#include "base/memory/ref_counted.h"
#include "content/browser/fileapi/upload_file_system_file_element_reader.h"
#include "content/common/resource_request_body.h"
diff --git a/content/browser/loader/upload_data_stream_builder_unittest.cc b/content/browser/loader/upload_data_stream_builder_unittest.cc
index f31e284..fc92cc1 100644
--- a/content/browser/loader/upload_data_stream_builder_unittest.cc
+++ b/content/browser/loader/upload_data_stream_builder_unittest.cc
@@ -4,11 +4,14 @@
#include "content/browser/loader/upload_data_stream_builder.h"
+#include <stdint.h>
+
#include <algorithm>
#include <string>
#include "base/files/file_path.h"
#include "base/files/file_util.h"
+#include "base/macros.h"
#include "base/run_loop.h"
#include "base/thread_task_runner_handle.h"
#include "base/time/time.h"
@@ -41,10 +44,10 @@ TEST(UploadDataStreamBuilderTest, CreateUploadDataStream) {
const std::string kBlobData = "blobdata";
const char kData[] = "123";
const base::FilePath::StringType kFilePath = FILE_PATH_LITERAL("abc");
- const uint64 kFileOffset = 10U;
- const uint64 kFileLength = 100U;
+ const uint64_t kFileOffset = 10U;
+ const uint64_t kFileLength = 100U;
const base::Time kFileTime = base::Time::FromDoubleT(999);
- const int64 kIdentifier = 12345;
+ const int64_t kIdentifier = 12345;
BlobStorageContext context;
BlobDataBuilder builder(kBlob);
@@ -158,7 +161,7 @@ TEST(UploadDataStreamBuilderTest, ResetUploadStreamWithBlob) {
const std::string kBlob = "blobuuid";
const std::string kBlobData = "blobdata";
const int kBlobDataLength = 8;
- const int64 kIdentifier = 12345;
+ const int64_t kIdentifier = 12345;
BlobStorageContext blob_storage_context;
BlobDataBuilder builder(kBlob);
diff --git a/content/browser/mach_broker_mac.h b/content/browser/mach_broker_mac.h
index a1e47b9..f5d50ad 100644
--- a/content/browser/mach_broker_mac.h
+++ b/content/browser/mach_broker_mac.h
@@ -12,6 +12,7 @@
#include "base/mac/dispatch_source_mach.h"
#include "base/mac/scoped_mach_port.h"
+#include "base/macros.h"
#include "base/memory/scoped_ptr.h"
#include "base/memory/singleton.h"
#include "base/process/port_provider_mac.h"
diff --git a/content/browser/manifest/manifest_browsertest.cc b/content/browser/manifest/manifest_browsertest.cc
index 92ee4e5..f340f17 100644
--- a/content/browser/manifest/manifest_browsertest.cc
+++ b/content/browser/manifest/manifest_browsertest.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/command_line.h"
+#include "base/macros.h"
#include "base/path_service.h"
#include "base/strings/string_util.h"
#include "base/strings/stringprintf.h"
@@ -32,9 +35,9 @@ class MockWebContentsDelegate : public WebContentsDelegate {
}
bool AddMessageToConsole(WebContents* source,
- int32 level,
+ int32_t level,
const base::string16& message,
- int32 line_no,
+ int32_t line_no,
const base::string16& source_id) override;
private:
@@ -126,9 +129,9 @@ class ManifestBrowserTest : public ContentBrowserTest {
// to know about |test_|.
bool MockWebContentsDelegate::AddMessageToConsole(
WebContents* source,
- int32 level,
+ int32_t level,
const base::string16& message,
- int32 line_no,
+ int32_t line_no,
const base::string16& source_id) {
DCHECK(source == web_contents_);
diff --git a/content/browser/manifest/manifest_manager_host.cc b/content/browser/manifest/manifest_manager_host.cc
index 9c6c8b8..e6c70b5 100644
--- a/content/browser/manifest/manifest_manager_host.cc
+++ b/content/browser/manifest/manifest_manager_host.cc
@@ -4,6 +4,8 @@
#include "content/browser/manifest/manifest_manager_host.h"
+#include <stdint.h>
+
#include "base/stl_util.h"
#include "content/common/manifest_manager_messages.h"
#include "content/public/browser/render_frame_host.h"
diff --git a/content/browser/manifest/manifest_manager_host.h b/content/browser/manifest/manifest_manager_host.h
index 74cfa94..069a530 100644
--- a/content/browser/manifest/manifest_manager_host.h
+++ b/content/browser/manifest/manifest_manager_host.h
@@ -7,6 +7,7 @@
#include "base/callback_forward.h"
#include "base/id_map.h"
+#include "base/macros.h"
#include "content/public/browser/web_contents_observer.h"
namespace content {
diff --git a/content/browser/memory/memory_message_filter.h b/content/browser/memory/memory_message_filter.h
index 7567b37..ad13662 100644
--- a/content/browser/memory/memory_message_filter.h
+++ b/content/browser/memory/memory_message_filter.h
@@ -5,6 +5,7 @@
#ifndef CONTENT_BROWSER_MEMORY_MEMORY_MESSAGE_FILTER_H_
#define CONTENT_BROWSER_MEMORY_MEMORY_MESSAGE_FILTER_H_
+#include "base/macros.h"
#include "base/memory/memory_pressure_listener.h"
#include "content/common/content_export.h"
#include "content/public/browser/browser_message_filter.h"
diff --git a/content/browser/memory/memory_pressure_controller.h b/content/browser/memory/memory_pressure_controller.h
index b315ad3..f815409 100644
--- a/content/browser/memory/memory_pressure_controller.h
+++ b/content/browser/memory/memory_pressure_controller.h
@@ -8,6 +8,7 @@
#include <map>
#include "base/callback.h"
+#include "base/macros.h"
#include "base/memory/memory_pressure_listener.h"
#include "base/memory/singleton.h"
#include "content/common/content_export.h"
diff --git a/content/browser/message_port_message_filter.cc b/content/browser/message_port_message_filter.cc
index 5ff0319..a0949fa 100644
--- a/content/browser/message_port_message_filter.cc
+++ b/content/browser/message_port_message_filter.cc
@@ -4,6 +4,8 @@
#include "content/browser/message_port_message_filter.h"
+#include <stddef.h>
+
#include "content/browser/message_port_service.h"
#include "content/common/frame_messages.h"
#include "content/common/message_port_messages.h"
diff --git a/content/browser/message_port_message_filter.h b/content/browser/message_port_message_filter.h
index be6bfde..14a5cf7 100644
--- a/content/browser/message_port_message_filter.h
+++ b/content/browser/message_port_message_filter.h
@@ -6,6 +6,7 @@
#define CONTENT_BROWSER_MESSAGE_PORT_MESSAGE_FILTER_H_
#include "base/callback.h"
+#include "base/macros.h"
#include "content/common/content_export.h"
#include "content/public/browser/browser_message_filter.h"
#include "content/public/browser/message_port_delegate.h"
diff --git a/content/browser/message_port_provider.cc b/content/browser/message_port_provider.cc
index 989925b..ec465f3 100644
--- a/content/browser/message_port_provider.cc
+++ b/content/browser/message_port_provider.cc
@@ -4,7 +4,6 @@
#include "content/public/browser/message_port_provider.h"
-#include "base/basictypes.h"
#include "content/browser/browser_thread_impl.h"
#include "content/browser/message_port_message_filter.h"
#include "content/browser/message_port_service.h"
diff --git a/content/browser/message_port_provider_browsertest.cc b/content/browser/message_port_provider_browsertest.cc
index 425e08f..0106003 100644
--- a/content/browser/message_port_provider_browsertest.cc
+++ b/content/browser/message_port_provider_browsertest.cc
@@ -3,6 +3,7 @@
// found in the LICENSE file.
#include "base/bind.h"
+#include "base/macros.h"
#include "base/strings/utf_string_conversions.h"
#include "base/synchronization/waitable_event.h"
#include "content/browser/message_port_service.h"
diff --git a/content/browser/message_port_service.cc b/content/browser/message_port_service.cc
index d5e5b23..21fc76d 100644
--- a/content/browser/message_port_service.cc
+++ b/content/browser/message_port_service.cc
@@ -4,6 +4,8 @@
#include "content/browser/message_port_service.h"
+#include <stddef.h>
+
#include "content/common/message_port_messages.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/message_port_delegate.h"
diff --git a/content/browser/message_port_service.h b/content/browser/message_port_service.h
index 1c9a6a1..c3aeadb 100644
--- a/content/browser/message_port_service.h
+++ b/content/browser/message_port_service.h
@@ -9,7 +9,7 @@
#include <utility>
#include <vector>
-#include "base/basictypes.h"
+#include "base/macros.h"
#include "base/memory/singleton.h"
#include "base/strings/string16.h"
#include "content/common/content_export.h"
diff --git a/content/browser/mojo/mojo_app_connection_impl.cc b/content/browser/mojo/mojo_app_connection_impl.cc
index ca8d5a5..4fe8584 100644
--- a/content/browser/mojo/mojo_app_connection_impl.cc
+++ b/content/browser/mojo/mojo_app_connection_impl.cc
@@ -4,6 +4,8 @@
#include "content/browser/mojo/mojo_app_connection_impl.h"
+#include <stdint.h>
+
#include "base/bind.h"
#include "content/browser/mojo/mojo_shell_context.h"
#include "mojo/shell/capability_filter.h"
diff --git a/content/browser/mojo/mojo_application_host.cc b/content/browser/mojo/mojo_application_host.cc
index a9d0002..38aa8584 100644
--- a/content/browser/mojo/mojo_application_host.cc
+++ b/content/browser/mojo/mojo_application_host.cc
@@ -4,6 +4,7 @@
#include "content/browser/mojo/mojo_application_host.h"
+#include "build/build_config.h"
#include "content/common/mojo/mojo_messages.h"
#include "content/public/browser/browser_thread.h"
#include "ipc/ipc_sender.h"
diff --git a/content/browser/mojo/mojo_application_host.h b/content/browser/mojo/mojo_application_host.h
index 216b65a..0ed8ec9 100644
--- a/content/browser/mojo/mojo_application_host.h
+++ b/content/browser/mojo/mojo_application_host.h
@@ -5,8 +5,10 @@
#ifndef CONTENT_BROWSER_MOJO_MOJO_APPLICATION_HOST_H_
#define CONTENT_BROWSER_MOJO_MOJO_APPLICATION_HOST_H_
+#include "base/macros.h"
#include "base/memory/scoped_ptr.h"
#include "base/process/process_handle.h"
+#include "build/build_config.h"
#include "content/common/application_setup.mojom.h"
#include "content/common/mojo/channel_init.h"
#include "content/common/mojo/service_registry_impl.h"
diff --git a/content/browser/mojo/mojo_shell_client_host.cc b/content/browser/mojo/mojo_shell_client_host.cc
index 871cd5b..6e4cfbf 100644
--- a/content/browser/mojo/mojo_shell_client_host.cc
+++ b/content/browser/mojo/mojo_shell_client_host.cc
@@ -2,8 +2,12 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include <stdint.h>
+
+#include "base/macros.h"
#include "base/strings/stringprintf.h"
#include "base/thread_task_runner_handle.h"
+#include "build/build_config.h"
#include "content/browser/mojo/mojo_shell_client_host.h"
#include "content/common/mojo/mojo_messages.h"
#include "content/public/browser/browser_thread.h"
diff --git a/content/browser/navigator_connect/navigator_connect_context_impl.cc b/content/browser/navigator_connect/navigator_connect_context_impl.cc
index ca4aadd..c469605 100644
--- a/content/browser/navigator_connect/navigator_connect_context_impl.cc
+++ b/content/browser/navigator_connect/navigator_connect_context_impl.cc
@@ -4,6 +4,8 @@
#include "content/browser/navigator_connect/navigator_connect_context_impl.h"
+#include <stdint.h>
+
#include "content/browser/message_port_service.h"
#include "content/browser/navigator_connect/service_port_service_impl.h"
#include "content/browser/service_worker/service_worker_context_wrapper.h"
@@ -30,7 +32,7 @@ struct NavigatorConnectContextImpl::Port {
// If this port is associated with a service worker, these fields store that
// information.
- int64 service_worker_registration_id = kInvalidServiceWorkerRegistrationId;
+ int64_t service_worker_registration_id = kInvalidServiceWorkerRegistrationId;
GURL service_worker_registration_origin;
};
diff --git a/content/browser/navigator_connect/service_port_service_impl.h b/content/browser/navigator_connect/service_port_service_impl.h
index 3fec7b7..be1815e 100644
--- a/content/browser/navigator_connect/service_port_service_impl.h
+++ b/content/browser/navigator_connect/service_port_service_impl.h
@@ -5,6 +5,8 @@
#ifndef CONTENT_BROWSER_NAVIGATOR_CONNECT_SERVICE_PORT_SERVICE_IMPL_H_
#define CONTENT_BROWSER_NAVIGATOR_CONNECT_SERVICE_PORT_SERVICE_IMPL_H_
+#include <stdint.h>
+
#include "base/macros.h"
#include "base/memory/ref_counted.h"
#include "base/memory/weak_ptr.h"
diff --git a/content/browser/net/browser_online_state_observer.h b/content/browser/net/browser_online_state_observer.h
index 3a7867e..10eb28a 100644
--- a/content/browser/net/browser_online_state_observer.h
+++ b/content/browser/net/browser_online_state_observer.h
@@ -5,7 +5,7 @@
#ifndef CONTENT_BROWSER_NET_BROWSER_ONLINE_STATE_OBSERVER_H_
#define CONTENT_BROWSER_NET_BROWSER_ONLINE_STATE_OBSERVER_H_
-#include "base/basictypes.h"
+#include "base/macros.h"
#include "content/public/browser/notification_observer.h"
#include "content/public/browser/notification_registrar.h"
#include "net/base/network_change_notifier.h"
diff --git a/content/browser/net/quota_policy_cookie_store.cc b/content/browser/net/quota_policy_cookie_store.cc
index 6c94131..0a7191c 100644
--- a/content/browser/net/quota_policy_cookie_store.cc
+++ b/content/browser/net/quota_policy_cookie_store.cc
@@ -6,7 +6,6 @@
#include <list>
-#include "base/basictypes.h"
#include "base/bind.h"
#include "base/callback.h"
#include "base/files/file_path.h"
diff --git a/content/browser/net/quota_policy_cookie_store.h b/content/browser/net/quota_policy_cookie_store.h
index 4790cc8..6aee20f 100644
--- a/content/browser/net/quota_policy_cookie_store.h
+++ b/content/browser/net/quota_policy_cookie_store.h
@@ -5,11 +5,14 @@
#ifndef CONTENT_BROWSER_NET_QUOTA_POLICY_COOKIE_STORE_H_
#define CONTENT_BROWSER_NET_QUOTA_POLICY_COOKIE_STORE_H_
+#include <stddef.h>
+
#include <string>
#include <vector>
#include "base/callback_forward.h"
#include "base/compiler_specific.h"
+#include "base/macros.h"
#include "base/memory/ref_counted.h"
#include "content/common/content_export.h"
#include "net/cookies/cookie_monster.h"
diff --git a/content/browser/net/view_http_cache_job_factory.cc b/content/browser/net/view_http_cache_job_factory.cc
index 22b408e..d08626f 100644
--- a/content/browser/net/view_http_cache_job_factory.cc
+++ b/content/browser/net/view_http_cache_job_factory.cc
@@ -4,11 +4,14 @@
#include "content/browser/net/view_http_cache_job_factory.h"
+#include <stddef.h>
+
#include "base/bind.h"
#include "base/bind_helpers.h"
#include "base/callback.h"
#include "base/compiler_specific.h"
#include "base/location.h"
+#include "base/macros.h"
#include "base/memory/weak_ptr.h"
#include "base/numerics/safe_conversions.h"
#include "base/single_thread_task_runner.h"
diff --git a/content/browser/net_info_browsertest.cc b/content/browser/net_info_browsertest.cc
index bfc4d813..5a84556 100644
--- a/content/browser/net_info_browsertest.cc
+++ b/content/browser/net_info_browsertest.cc
@@ -5,6 +5,7 @@
#include "base/command_line.h"
#include "base/run_loop.h"
#include "base/strings/string_number_conversions.h"
+#include "build/build_config.h"
#include "content/public/common/content_switches.h"
#include "content/public/test/browser_test_utils.h"
#include "content/public/test/content_browser_test.h"
diff --git a/content/browser/notification_service_impl.h b/content/browser/notification_service_impl.h
index 8a74c75..bd04f74 100644
--- a/content/browser/notification_service_impl.h
+++ b/content/browser/notification_service_impl.h
@@ -7,6 +7,7 @@
#include <map>
+#include "base/macros.h"
#include "base/observer_list.h"
#include "content/common/content_export.h"
#include "content/public/browser/notification_service.h"
diff --git a/content/browser/notifications/notification_database.h b/content/browser/notifications/notification_database.h
index 7f51756..4f230a1 100644
--- a/content/browser/notifications/notification_database.h
+++ b/content/browser/notifications/notification_database.h
@@ -10,6 +10,7 @@
#include <vector>
#include "base/files/file_path.h"
+#include "base/macros.h"
#include "base/sequence_checker.h"
#include "content/common/content_export.h"
diff --git a/content/browser/notifications/notification_database_data_conversions.cc b/content/browser/notifications/notification_database_data_conversions.cc
index ff16527..cf19704 100644
--- a/content/browser/notifications/notification_database_data_conversions.cc
+++ b/content/browser/notifications/notification_database_data_conversions.cc
@@ -4,6 +4,8 @@
#include "content/browser/notifications/notification_database_data_conversions.h"
+#include <stddef.h>
+
#include "base/logging.h"
#include "base/strings/utf_string_conversions.h"
#include "content/browser/notifications/notification_database_data.pb.h"
diff --git a/content/browser/notifications/notification_database_data_unittest.cc b/content/browser/notifications/notification_database_data_unittest.cc
index 502d3d8..a080ae4 100644
--- a/content/browser/notifications/notification_database_data_unittest.cc
+++ b/content/browser/notifications/notification_database_data_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 "base/strings/string_number_conversions.h"
#include "base/strings/utf_string_conversions.h"
#include "content/browser/notifications/notification_database_data.pb.h"
diff --git a/content/browser/notifications/notification_database_unittest.cc b/content/browser/notifications/notification_database_unittest.cc
index 9d94730..40b6950 100644
--- a/content/browser/notifications/notification_database_unittest.cc
+++ b/content/browser/notifications/notification_database_unittest.cc
@@ -4,7 +4,11 @@
#include "content/browser/notifications/notification_database.h"
+#include <stddef.h>
+#include <stdint.h>
+
#include "base/files/scoped_temp_dir.h"
+#include "base/macros.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/utf_string_conversions.h"
#include "content/public/browser/notification_database_data.h"
diff --git a/content/browser/notifications/notification_event_dispatcher_impl.cc b/content/browser/notifications/notification_event_dispatcher_impl.cc
index eb14c85..d48491c 100644
--- a/content/browser/notifications/notification_event_dispatcher_impl.cc
+++ b/content/browser/notifications/notification_event_dispatcher_impl.cc
@@ -5,6 +5,7 @@
#include "content/browser/notifications/notification_event_dispatcher_impl.h"
#include "base/callback.h"
+#include "build/build_config.h"
#include "content/browser/notifications/platform_notification_context_impl.h"
#include "content/browser/service_worker/service_worker_context_wrapper.h"
#include "content/browser/service_worker/service_worker_registration.h"
diff --git a/content/browser/notifications/notification_event_dispatcher_impl.h b/content/browser/notifications/notification_event_dispatcher_impl.h
index e9fcc30..fbc5d42 100644
--- a/content/browser/notifications/notification_event_dispatcher_impl.h
+++ b/content/browser/notifications/notification_event_dispatcher_impl.h
@@ -5,6 +5,9 @@
#ifndef CONTENT_BROWSER_NOTIFICATIONS_NOTIFICATION_EVENT_DISPATCHER_IMPL_H_
#define CONTENT_BROWSER_NOTIFICATIONS_NOTIFICATION_EVENT_DISPATCHER_IMPL_H_
+#include <stdint.h>
+
+#include "base/macros.h"
#include "base/memory/singleton.h"
#include "content/public/browser/notification_event_dispatcher.h"
diff --git a/content/browser/notifications/notification_id_generator.cc b/content/browser/notifications/notification_id_generator.cc
index 252aae4..2bbc19f 100644
--- a/content/browser/notifications/notification_id_generator.cc
+++ b/content/browser/notifications/notification_id_generator.cc
@@ -10,6 +10,7 @@
#include "base/logging.h"
#include "base/sha1.h"
#include "base/strings/utf_string_conversions.h"
+#include "build/build_config.h"
#include "content/public/browser/browser_context.h"
#include "url/gurl.h"
diff --git a/content/browser/notifications/notification_id_generator_unittest.cc b/content/browser/notifications/notification_id_generator_unittest.cc
index 4f12fcc..aeef6bb 100644
--- a/content/browser/notifications/notification_id_generator_unittest.cc
+++ b/content/browser/notifications/notification_id_generator_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 <stdint.h>
+
+#include "base/macros.h"
#include "base/strings/string_number_conversions.h"
#include "content/browser/notifications/notification_id_generator.h"
#include "content/public/test/test_browser_context.h"
diff --git a/content/browser/notifications/notification_message_filter.cc b/content/browser/notifications/notification_message_filter.cc
index 98ec345..f8c3ba89 100644
--- a/content/browser/notifications/notification_message_filter.cc
+++ b/content/browser/notifications/notification_message_filter.cc
@@ -136,7 +136,7 @@ void NotificationMessageFilter::OnShowPlatformNotification(
void NotificationMessageFilter::OnShowPersistentNotification(
int request_id,
- int64 service_worker_registration_id,
+ int64_t service_worker_registration_id,
const GURL& origin,
const SkBitmap& icon,
const PlatformNotificationData& notification_data) {
diff --git a/content/browser/notifications/notification_message_filter.h b/content/browser/notifications/notification_message_filter.h
index 3eba996..74ecf2f 100644
--- a/content/browser/notifications/notification_message_filter.h
+++ b/content/browser/notifications/notification_message_filter.h
@@ -5,9 +5,12 @@
#ifndef CONTENT_BROWSER_NOTIFICATIONS_NOTIFICATION_MESSAGE_FILTER_H_
#define CONTENT_BROWSER_NOTIFICATIONS_NOTIFICATION_MESSAGE_FILTER_H_
+#include <stdint.h>
+
#include <map>
#include "base/callback_forward.h"
+#include "base/macros.h"
#include "base/memory/weak_ptr.h"
#include "content/public/browser/browser_message_filter.h"
#include "content/public/browser/notification_database_data.h"
@@ -58,7 +61,7 @@ class NotificationMessageFilter : public BrowserMessageFilter {
const PlatformNotificationData& notification_data);
void OnShowPersistentNotification(
int request_id,
- int64 service_worker_registration_id,
+ int64_t service_worker_registration_id,
const GURL& origin,
const SkBitmap& icon,
const PlatformNotificationData& notification_data);
diff --git a/content/browser/notifications/platform_notification_context_impl.h b/content/browser/notifications/platform_notification_context_impl.h
index 98e7818..250a2d8 100644
--- a/content/browser/notifications/platform_notification_context_impl.h
+++ b/content/browser/notifications/platform_notification_context_impl.h
@@ -12,6 +12,7 @@
#include "base/callback.h"
#include "base/compiler_specific.h"
#include "base/files/file_path.h"
+#include "base/macros.h"
#include "base/memory/ref_counted.h"
#include "content/browser/service_worker/service_worker_context_observer.h"
#include "content/common/content_export.h"
diff --git a/content/browser/notifications/platform_notification_context_unittest.cc b/content/browser/notifications/platform_notification_context_unittest.cc
index 8bf1c9e..c3a2e54 100644
--- a/content/browser/notifications/platform_notification_context_unittest.cc
+++ b/content/browser/notifications/platform_notification_context_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/bind.h"
#include "base/files/file_util.h"
#include "base/files/scoped_temp_dir.h"
diff --git a/content/browser/pepper_flash_settings_helper_impl.h b/content/browser/pepper_flash_settings_helper_impl.h
index 9a5887b..8d4edb6 100644
--- a/content/browser/pepper_flash_settings_helper_impl.h
+++ b/content/browser/pepper_flash_settings_helper_impl.h
@@ -5,8 +5,8 @@
#ifndef CONTENT_BROWSER_PEPPER_FLASH_SETTINGS_HELPER_IMPL_H_
#define CONTENT_BROWSER_PEPPER_FLASH_SETTINGS_HELPER_IMPL_H_
-#include "base/basictypes.h"
#include "base/compiler_specific.h"
+#include "base/macros.h"
#include "content/browser/ppapi_plugin_process_host.h"
#include "content/public/browser/pepper_flash_settings_helper.h"
diff --git a/content/browser/permissions/permission_service_impl.cc b/content/browser/permissions/permission_service_impl.cc
index 32c7c3a..dcda4ad 100644
--- a/content/browser/permissions/permission_service_impl.cc
+++ b/content/browser/permissions/permission_service_impl.cc
@@ -4,6 +4,8 @@
#include "content/browser/permissions/permission_service_impl.h"
+#include <stddef.h>
+
#include "base/bind.h"
#include "content/public/browser/browser_context.h"
#include "content/public/browser/permission_manager.h"
diff --git a/content/browser/plugin_content_origin_whitelist.h b/content/browser/plugin_content_origin_whitelist.h
index beaab51..fbeab39 100644
--- a/content/browser/plugin_content_origin_whitelist.h
+++ b/content/browser/plugin_content_origin_whitelist.h
@@ -7,6 +7,7 @@
#include <set>
+#include "base/macros.h"
#include "content/public/browser/web_contents_observer.h"
#include "url/origin.h"
diff --git a/content/browser/plugin_data_remover_impl.cc b/content/browser/plugin_data_remover_impl.cc
index d0cb9ac..fa0aab25 100644
--- a/content/browser/plugin_data_remover_impl.cc
+++ b/content/browser/plugin_data_remover_impl.cc
@@ -4,6 +4,8 @@
#include "content/browser/plugin_data_remover_impl.h"
+#include <stdint.h>
+
#include <limits>
#include "base/bind.h"
@@ -12,6 +14,7 @@
#include "base/strings/utf_string_conversions.h"
#include "base/synchronization/waitable_event.h"
#include "base/version.h"
+#include "build/build_config.h"
#include "content/browser/plugin_process_host.h"
#include "content/browser/plugin_service_impl.h"
#include "content/browser/renderer_host/pepper/pepper_flash_file_message_filter.h"
@@ -30,8 +33,8 @@ namespace {
// The minimum Flash Player version that implements NPP_ClearSiteData.
const char kMinFlashVersion[] = "10.3";
-const int64 kRemovalTimeoutMs = 10000;
-const uint64 kClearAllData = 0;
+const int64_t kRemovalTimeoutMs = 10000;
+const uint64_t kClearAllData = 0;
} // namespace
@@ -200,7 +203,7 @@ class PluginDataRemoverImpl::Context
friend class base::DeleteHelper<Context>;
~Context() override {}
- IPC::Message* CreatePpapiClearSiteDataMsg(uint64 max_age) {
+ IPC::Message* CreatePpapiClearSiteDataMsg(uint64_t max_age) {
base::FilePath profile_path =
PepperFlashFileMessageFilter::GetDataDirName(browser_context_path_);
// TODO(vtl): This "duplicates" logic in webkit/plugins/ppapi/file_path.cc
@@ -234,9 +237,9 @@ class PluginDataRemoverImpl::Context
return;
}
- uint64 max_age = begin_time_.is_null() ?
- std::numeric_limits<uint64>::max() :
- (base::Time::Now() - begin_time_).InSeconds();
+ uint64_t max_age = begin_time_.is_null()
+ ? std::numeric_limits<uint64_t>::max()
+ : (base::Time::Now() - begin_time_).InSeconds();
IPC::Message* msg;
if (is_ppapi) {
@@ -254,7 +257,7 @@ class PluginDataRemoverImpl::Context
// Handles the PpapiHostMsg_ClearSiteDataResult message by delegating to the
// PluginProcessHostMsg_ClearSiteDataResult handler.
- void OnPpapiClearSiteDataResult(uint32 request_id, bool success) {
+ void OnPpapiClearSiteDataResult(uint32_t request_id, bool success) {
DCHECK_EQ(0u, request_id);
OnClearSiteDataResult(success);
}
diff --git a/content/browser/plugin_data_remover_impl.h b/content/browser/plugin_data_remover_impl.h
index ed2b7ea..7baa087 100644
--- a/content/browser/plugin_data_remover_impl.h
+++ b/content/browser/plugin_data_remover_impl.h
@@ -8,6 +8,7 @@
#include <string>
#include "base/compiler_specific.h"
+#include "base/macros.h"
#include "base/memory/ref_counted.h"
#include "base/time/time.h"
#include "content/public/browser/plugin_data_remover.h"
diff --git a/content/browser/plugin_loader_posix.cc b/content/browser/plugin_loader_posix.cc
index 65f42a9..dcfb558 100644
--- a/content/browser/plugin_loader_posix.cc
+++ b/content/browser/plugin_loader_posix.cc
@@ -161,7 +161,7 @@ void PluginLoaderPosix::GetPluginsWrapper(
GetPlugins(callback);
}
-void PluginLoaderPosix::OnPluginLoaded(uint32 index,
+void PluginLoaderPosix::OnPluginLoaded(uint32_t index,
const WebPluginInfo& plugin) {
if (index != next_load_index_) {
LOG(ERROR) << "Received unexpected plugin load message for "
@@ -183,7 +183,7 @@ void PluginLoaderPosix::OnPluginLoaded(uint32 index,
FinishedLoadingPlugins();
}
-void PluginLoaderPosix::OnPluginLoadFailed(uint32 index,
+void PluginLoaderPosix::OnPluginLoadFailed(uint32_t index,
const base::FilePath& plugin_path) {
if (index != next_load_index_) {
LOG(ERROR) << "Received unexpected plugin load failure message for "
diff --git a/content/browser/plugin_loader_posix.h b/content/browser/plugin_loader_posix.h
index 2db1634..5181413 100644
--- a/content/browser/plugin_loader_posix.h
+++ b/content/browser/plugin_loader_posix.h
@@ -5,10 +5,13 @@
#ifndef CONTENT_BROWSER_PLUGIN_LOADER_POSIX_H_
#define CONTENT_BROWSER_PLUGIN_LOADER_POSIX_H_
+#include <stddef.h>
+#include <stdint.h>
+
#include <vector>
-#include "base/basictypes.h"
#include "base/compiler_specific.h"
+#include "base/macros.h"
#include "base/memory/ref_counted.h"
#include "base/time/time.h"
#include "content/browser/plugin_service_impl.h"
@@ -74,8 +77,8 @@ class CONTENT_EXPORT PluginLoaderPosix
const std::vector<WebPluginInfo>& plugins_unused);
// Message handlers.
- void OnPluginLoaded(uint32 index, const WebPluginInfo& plugin);
- void OnPluginLoadFailed(uint32 index, const base::FilePath& plugin_path);
+ void OnPluginLoaded(uint32_t index, const WebPluginInfo& plugin);
+ void OnPluginLoadFailed(uint32_t index, const base::FilePath& plugin_path);
// Returns an iterator to the plugin in |internal_plugins_| whose path
// matches |plugin_path|.
diff --git a/content/browser/plugin_loader_posix_unittest.cc b/content/browser/plugin_loader_posix_unittest.cc
index 9b7e29b..ec1fa0b 100644
--- a/content/browser/plugin_loader_posix_unittest.cc
+++ b/content/browser/plugin_loader_posix_unittest.cc
@@ -4,6 +4,9 @@
#include "content/browser/plugin_loader_posix.h"
+#include <stddef.h>
+#include <stdint.h>
+
#include "base/at_exit.h"
#include "base/bind.h"
#include "base/files/file_path.h"
@@ -54,11 +57,11 @@ class MockPluginLoaderPosix : public PluginLoaderPosix {
return false;
}
- void TestOnPluginLoaded(uint32 index, const WebPluginInfo& plugin) {
+ void TestOnPluginLoaded(uint32_t index, const WebPluginInfo& plugin) {
OnPluginLoaded(index, plugin);
}
- void TestOnPluginLoadFailed(uint32 index, const base::FilePath& path) {
+ void TestOnPluginLoadFailed(uint32_t index, const base::FilePath& path) {
OnPluginLoadFailed(index, path);
}
diff --git a/content/browser/plugin_process_host.cc b/content/browser/plugin_process_host.cc
index 8069d35..9ede7a2 100644
--- a/content/browser/plugin_process_host.cc
+++ b/content/browser/plugin_process_host.cc
@@ -4,9 +4,7 @@
#include "content/browser/plugin_process_host.h"
-#if defined(OS_WIN)
-#include <windows.h>
-#endif
+#include <stddef.h>
#include <utility>
#include <vector>
@@ -17,11 +15,13 @@
#include "base/files/file_path.h"
#include "base/lazy_instance.h"
#include "base/logging.h"
+#include "base/macros.h"
#include "base/metrics/histogram.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/string_util.h"
#include "base/strings/utf_string_conversions.h"
#include "base/synchronization/lock.h"
+#include "build/build_config.h"
#include "components/tracing/tracing_switches.h"
#include "content/browser/browser_child_process_host_impl.h"
#include "content/browser/gpu/gpu_data_manager_impl.h"
@@ -45,6 +45,10 @@
#include "ui/gfx/switches.h"
#include "ui/gl/gl_switches.h"
+#if defined(OS_WIN)
+#include <windows.h>
+#endif
+
#if defined(OS_MACOSX)
#include "base/mac/mac_util.h"
#include "ui/gfx/geometry/rect.h"
@@ -298,7 +302,7 @@ bool PluginProcessHost::OnMessageReceived(const IPC::Message& msg) {
return handled;
}
-void PluginProcessHost::OnChannelConnected(int32 peer_pid) {
+void PluginProcessHost::OnChannelConnected(int32_t peer_pid) {
for (size_t i = 0; i < pending_requests_.size(); ++i) {
RequestPluginChannel(pending_requests_[i]);
}
diff --git a/content/browser/plugin_process_host.h b/content/browser/plugin_process_host.h
index af49056..66ec73d 100644
--- a/content/browser/plugin_process_host.h
+++ b/content/browser/plugin_process_host.h
@@ -7,14 +7,16 @@
#include "build/build_config.h"
+#include <stdint.h>
+
#include <list>
#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/process/process_handle.h"
#include "content/common/content_export.h"
@@ -88,7 +90,7 @@ class CONTENT_EXPORT PluginProcessHost : public BrowserChildProcessHostDelegate,
void ForceShutdown();
bool OnMessageReceived(const IPC::Message& msg) override;
- void OnChannelConnected(int32 peer_pid) override;
+ void OnChannelConnected(int32_t peer_pid) override;
void OnChannelError() override;
// Tells the plugin process to create a new channel for communication with a
@@ -141,9 +143,10 @@ class CONTENT_EXPORT PluginProcessHost : public BrowserChildProcessHostDelegate,
#endif
#if defined(OS_MACOSX)
- void OnPluginShowWindow(uint32 window_id, gfx::Rect window_rect,
+ void OnPluginShowWindow(uint32_t window_id,
+ gfx::Rect window_rect,
bool modal);
- void OnPluginHideWindow(uint32 window_id, gfx::Rect window_rect);
+ void OnPluginHideWindow(uint32_t window_id, gfx::Rect window_rect);
void OnPluginSetCursorVisibility(bool visible);
#endif
@@ -178,11 +181,11 @@ class CONTENT_EXPORT PluginProcessHost : public BrowserChildProcessHostDelegate,
#endif
#if defined(OS_MACOSX)
// Tracks plugin windows currently visible.
- std::set<uint32> plugin_visible_windows_set_;
+ std::set<uint32_t> plugin_visible_windows_set_;
// Tracks full screen windows currently visible.
- std::set<uint32> plugin_fullscreen_windows_set_;
+ std::set<uint32_t> plugin_fullscreen_windows_set_;
// Tracks modal windows currently visible.
- std::set<uint32> plugin_modal_windows_set_;
+ std::set<uint32_t> plugin_modal_windows_set_;
// Tracks the current visibility of the cursor.
bool plugin_cursor_visible_;
#endif
diff --git a/content/browser/plugin_process_host_mac.cc b/content/browser/plugin_process_host_mac.cc
index c7ece47..8bd0443 100644
--- a/content/browser/plugin_process_host_mac.cc
+++ b/content/browser/plugin_process_host_mac.cc
@@ -3,6 +3,7 @@
// found in the LICENSE file.
#include <Carbon/Carbon.h>
+#include <stdint.h>
#include "build/build_config.h"
@@ -19,7 +20,7 @@
namespace content {
-void PluginProcessHost::OnPluginShowWindow(uint32 window_id,
+void PluginProcessHost::OnPluginShowWindow(uint32_t window_id,
gfx::Rect window_rect,
bool modal) {
plugin_visible_windows_set_.insert(window_id);
@@ -57,7 +58,7 @@ static void ReleasePluginFullScreen(pid_t plugin_pid) {
}
}
-void PluginProcessHost::OnPluginHideWindow(uint32 window_id,
+void PluginProcessHost::OnPluginHideWindow(uint32_t window_id,
gfx::Rect window_rect) {
bool had_windows = !plugin_visible_windows_set_.empty();
plugin_visible_windows_set_.erase(window_id);
diff --git a/content/browser/plugin_service_impl.cc b/content/browser/plugin_service_impl.cc
index 6fba93b..09ae4dc 100644
--- a/content/browser/plugin_service_impl.cc
+++ b/content/browser/plugin_service_impl.cc
@@ -4,6 +4,8 @@
#include "content/browser/plugin_service_impl.h"
+#include <stddef.h>
+
#include "base/bind.h"
#include "base/command_line.h"
#include "base/compiler_specific.h"
@@ -15,6 +17,7 @@
#include "base/strings/utf_string_conversions.h"
#include "base/synchronization/waitable_event.h"
#include "base/threading/thread.h"
+#include "build/build_config.h"
#include "content/browser/ppapi_plugin_process_host.h"
#include "content/browser/renderer_host/render_process_host_impl.h"
#include "content/browser/renderer_host/render_view_host_impl.h"
diff --git a/content/browser/plugin_service_impl.h b/content/browser/plugin_service_impl.h
index 9f462ad..644a262 100644
--- a/content/browser/plugin_service_impl.h
+++ b/content/browser/plugin_service_impl.h
@@ -16,8 +16,8 @@
#include <set>
#include <vector>
-#include "base/basictypes.h"
#include "base/compiler_specific.h"
+#include "base/macros.h"
#include "base/memory/scoped_vector.h"
#include "base/memory/singleton.h"
#include "base/synchronization/waitable_event_watcher.h"
diff --git a/content/browser/power_monitor_message_broadcaster.h b/content/browser/power_monitor_message_broadcaster.h
index 3221fad..4d81e0c 100644
--- a/content/browser/power_monitor_message_broadcaster.h
+++ b/content/browser/power_monitor_message_broadcaster.h
@@ -5,7 +5,7 @@
#ifndef CONTENT_BROWSER_POWER_MONITOR_MESSAGE_BROADCASTER_H_
#define CONTENT_BROWSER_POWER_MONITOR_MESSAGE_BROADCASTER_H_
-#include "base/basictypes.h"
+#include "base/macros.h"
#include "base/power_monitor/power_observer.h"
#include "content/common/content_export.h"
diff --git a/content/browser/power_monitor_message_broadcaster_unittest.cc b/content/browser/power_monitor_message_broadcaster_unittest.cc
index 32deb1e..72e2729 100644
--- a/content/browser/power_monitor_message_broadcaster_unittest.cc
+++ b/content/browser/power_monitor_message_broadcaster_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/test/power_monitor_test_base.h"
#include "content/browser/power_monitor_message_broadcaster.h"
#include "content/common/power_monitor_messages.h"
diff --git a/content/browser/power_save_blocker_android.cc b/content/browser/power_save_blocker_android.cc
index 20ea63c..0adcd29 100644
--- a/content/browser/power_save_blocker_android.cc
+++ b/content/browser/power_save_blocker_android.cc
@@ -4,6 +4,7 @@
#include "base/android/jni_android.h"
#include "base/logging.h"
+#include "base/macros.h"
#include "content/browser/android/content_view_core_impl.h"
#include "content/browser/power_save_blocker_impl.h"
#include "content/browser/web_contents/web_contents_impl.h"
diff --git a/content/browser/power_save_blocker_chromeos.cc b/content/browser/power_save_blocker_chromeos.cc
index 83c6e8a..bf50c89 100644
--- a/content/browser/power_save_blocker_chromeos.cc
+++ b/content/browser/power_save_blocker_chromeos.cc
@@ -6,10 +6,10 @@
#include <string>
-#include "base/basictypes.h"
#include "base/bind.h"
#include "base/location.h"
#include "base/logging.h"
+#include "base/macros.h"
#include "base/memory/ref_counted.h"
#include "chromeos/dbus/power_policy_controller.h"
#include "content/public/browser/browser_thread.h"
diff --git a/content/browser/power_save_blocker_impl.cc b/content/browser/power_save_blocker_impl.cc
index 97e37f5..d8cea4b 100644
--- a/content/browser/power_save_blocker_impl.cc
+++ b/content/browser/power_save_blocker_impl.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 "content/browser/power_save_blocker_impl.h"
namespace content {
diff --git a/content/browser/power_save_blocker_impl.h b/content/browser/power_save_blocker_impl.h
index 76af725..a01fc60 100644
--- a/content/browser/power_save_blocker_impl.h
+++ b/content/browser/power_save_blocker_impl.h
@@ -7,7 +7,9 @@
#include <string>
+#include "base/macros.h"
#include "base/memory/ref_counted.h"
+#include "build/build_config.h"
#include "content/public/browser/power_save_blocker.h"
namespace content {
diff --git a/content/browser/power_save_blocker_ozone.cc b/content/browser/power_save_blocker_ozone.cc
index 0ec03b1..c310235 100644
--- a/content/browser/power_save_blocker_ozone.cc
+++ b/content/browser/power_save_blocker_ozone.cc
@@ -4,6 +4,7 @@
#include "content/browser/power_save_blocker_impl.h"
+#include "base/macros.h"
#include "base/memory/ref_counted.h"
namespace content {
diff --git a/content/browser/power_save_blocker_win.cc b/content/browser/power_save_blocker_win.cc
index 6d28411..32c61f2 100644
--- a/content/browser/power_save_blocker_win.cc
+++ b/content/browser/power_save_blocker_win.cc
@@ -7,6 +7,7 @@
#include <windows.h>
#include "base/logging.h"
+#include "base/macros.h"
#include "base/strings/utf_string_conversions.h"
#include "base/win/scoped_handle.h"
#include "base/win/windows_version.h"
diff --git a/content/browser/power_save_blocker_x11.cc b/content/browser/power_save_blocker_x11.cc
index ba48074..97eefef 100644
--- a/content/browser/power_save_blocker_x11.cc
+++ b/content/browser/power_save_blocker_x11.cc
@@ -5,19 +5,20 @@
#include "content/browser/power_save_blocker_impl.h"
#include <X11/Xlib.h>
+#include <stdint.h>
#include <X11/extensions/dpms.h>
// Xlib #defines Status, but we can't have that for some of our headers.
#ifdef Status
#undef Status
#endif
-#include "base/basictypes.h"
#include "base/bind.h"
#include "base/callback.h"
#include "base/command_line.h"
#include "base/environment.h"
#include "base/files/file_path.h"
#include "base/logging.h"
+#include "base/macros.h"
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
#include "base/memory/singleton.h"
diff --git a/content/browser/power_usage_monitor_impl.cc b/content/browser/power_usage_monitor_impl.cc
index adf1a83..92d835a 100644
--- a/content/browser/power_usage_monitor_impl.cc
+++ b/content/browser/power_usage_monitor_impl.cc
@@ -4,6 +4,8 @@
#include "content/browser/power_usage_monitor_impl.h"
+#include <stddef.h>
+
#include "base/bind.h"
#include "base/lazy_instance.h"
#include "base/logging.h"
diff --git a/content/browser/power_usage_monitor_impl.h b/content/browser/power_usage_monitor_impl.h
index 9b95ae4..0e3b4e3 100644
--- a/content/browser/power_usage_monitor_impl.h
+++ b/content/browser/power_usage_monitor_impl.h
@@ -5,9 +5,9 @@
#ifndef CONTENT_BROWSER_POWER_USAGE_MONITOR_IMPL_H_
#define CONTENT_BROWSER_POWER_USAGE_MONITOR_IMPL_H_
-#include "base/basictypes.h"
#include "base/containers/hash_tables.h"
#include "base/gtest_prod_util.h"
+#include "base/macros.h"
#include "base/memory/singleton.h"
#include "base/power_monitor/power_monitor.h"
#include "base/time/time.h"
diff --git a/content/browser/ppapi_plugin_process_host.cc b/content/browser/ppapi_plugin_process_host.cc
index 23ce9d0..10719d0 100644
--- a/content/browser/ppapi_plugin_process_host.cc
+++ b/content/browser/ppapi_plugin_process_host.cc
@@ -4,15 +4,19 @@
#include "content/browser/ppapi_plugin_process_host.h"
+#include <stddef.h>
+
#include <string>
#include <utility>
#include "base/base_switches.h"
#include "base/command_line.h"
#include "base/files/file_path.h"
+#include "base/macros.h"
#include "base/metrics/field_trial.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/utf_string_conversions.h"
+#include "build/build_config.h"
#include "content/browser/browser_child_process_host_impl.h"
#include "content/browser/plugin_service_impl.h"
#include "content/browser/renderer_host/render_message_filter.h"
@@ -188,7 +192,7 @@ PpapiPluginProcessHost* PpapiPluginProcessHost::CreateBrokerHost(
// static
void PpapiPluginProcessHost::DidCreateOutOfProcessInstance(
int plugin_process_id,
- int32 pp_instance,
+ int32_t pp_instance,
const PepperRendererInstanceData& instance_data) {
for (PpapiPluginProcessHostIterator iter; !iter.Done(); ++iter) {
if (iter->process_.get() &&
@@ -211,7 +215,7 @@ void PpapiPluginProcessHost::DidCreateOutOfProcessInstance(
// static
void PpapiPluginProcessHost::DidDeleteOutOfProcessInstance(
int plugin_process_id,
- int32 pp_instance) {
+ int32_t pp_instance) {
for (PpapiPluginProcessHostIterator iter; !iter.Done(); ++iter) {
if (iter->process_.get() &&
iter->process_->GetData().id == plugin_process_id) {
@@ -228,7 +232,7 @@ void PpapiPluginProcessHost::DidDeleteOutOfProcessInstance(
// static
void PpapiPluginProcessHost::OnPluginInstanceThrottleStateChange(
int plugin_process_id,
- int32 pp_instance,
+ int32_t pp_instance,
bool is_throttled) {
for (PpapiPluginProcessHostIterator iter; !iter.Done(); ++iter) {
if (iter->process_.get() &&
@@ -275,7 +279,7 @@ PpapiPluginProcessHost::PpapiPluginProcessHost(
const base::FilePath& profile_data_directory)
: profile_data_directory_(profile_data_directory),
is_broker_(false) {
- uint32 base_permissions = info.permissions;
+ uint32_t base_permissions = info.permissions;
// We don't have to do any whitelisting for APIs in this process host, so
// don't bother passing a browser context or document url here.
@@ -462,7 +466,7 @@ bool PpapiPluginProcessHost::OnMessageReceived(const IPC::Message& msg) {
}
// Called when the browser <--> plugin channel has been established.
-void PpapiPluginProcessHost::OnChannelConnected(int32 peer_pid) {
+void PpapiPluginProcessHost::OnChannelConnected(int32_t peer_pid) {
// This will actually load the plugin. Errors will actually not be reported
// back at this point. Instead, the plugin will fail to establish the
// connections when we request them on behalf of the renderer(s).
diff --git a/content/browser/ppapi_plugin_process_host.h b/content/browser/ppapi_plugin_process_host.h
index e4c58a9..9659349 100644
--- a/content/browser/ppapi_plugin_process_host.h
+++ b/content/browser/ppapi_plugin_process_host.h
@@ -5,11 +5,13 @@
#ifndef CONTENT_BROWSER_PPAPI_PLUGIN_PROCESS_HOST_H_
#define CONTENT_BROWSER_PPAPI_PLUGIN_PROCESS_HOST_H_
+#include <stdint.h>
+
#include <queue>
#include <vector>
-#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/process/process.h"
@@ -83,16 +85,16 @@ class PpapiPluginProcessHost : public BrowserChildProcessHostDelegate,
// the plugin.
static void DidCreateOutOfProcessInstance(
int plugin_process_id,
- int32 pp_instance,
+ int32_t pp_instance,
const PepperRendererInstanceData& instance_data);
// The opposite of DIdCreate... above.
static void DidDeleteOutOfProcessInstance(int plugin_process_id,
- int32 pp_instance);
+ int32_t pp_instance);
// Notification that a Plugin instance has been throttled or unthrottled.
static void OnPluginInstanceThrottleStateChange(int plugin_process_id,
- int32 pp_instance,
+ int32_t pp_instance,
bool is_throttled);
// Returns the instances that match the specified process name.
@@ -135,7 +137,7 @@ class PpapiPluginProcessHost : public BrowserChildProcessHostDelegate,
void OnProcessCrashed(int exit_code) override;
bool OnMessageReceived(const IPC::Message& msg) override;
- void OnChannelConnected(int32 peer_pid) override;
+ void OnChannelConnected(int32_t peer_pid) override;
void OnChannelError() override;
void CancelRequests();
diff --git a/content/browser/presentation/presentation_service_impl.cc b/content/browser/presentation/presentation_service_impl.cc
index 62778c9..569c9e6 100644
--- a/content/browser/presentation/presentation_service_impl.cc
+++ b/content/browser/presentation/presentation_service_impl.cc
@@ -4,6 +4,9 @@
#include "content/browser/presentation/presentation_service_impl.h"
+#include <stddef.h>
+#include <stdint.h>
+
#include <algorithm>
#include <string>
#include <vector>
diff --git a/content/browser/presentation/presentation_service_impl.h b/content/browser/presentation/presentation_service_impl.h
index e06a13f..88a7054 100644
--- a/content/browser/presentation/presentation_service_impl.h
+++ b/content/browser/presentation/presentation_service_impl.h
@@ -9,7 +9,6 @@
#include <map>
#include <string>
-#include "base/basictypes.h"
#include "base/compiler_specific.h"
#include "base/containers/hash_tables.h"
#include "base/gtest_prod_util.h"
diff --git a/content/browser/presentation/presentation_service_impl_unittest.cc b/content/browser/presentation/presentation_service_impl_unittest.cc
index 4bb69bc..657350c 100644
--- a/content/browser/presentation/presentation_service_impl_unittest.cc
+++ b/content/browser/presentation/presentation_service_impl_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 <string>
#include <vector>
@@ -661,8 +664,8 @@ TEST_F(PresentationServiceImplTest, SendStringMessage) {
TEST_F(PresentationServiceImplTest, SendArrayBuffer) {
// Test Array buffer data.
- const uint8 buffer[] = {0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48};
- std::vector<uint8> data;
+ const uint8_t buffer[] = {0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48};
+ std::vector<uint8_t> data;
data.assign(buffer, buffer + sizeof(buffer));
presentation::PresentationSessionInfoPtr session(
@@ -673,7 +676,7 @@ TEST_F(PresentationServiceImplTest, SendArrayBuffer) {
presentation::SessionMessage::New());
message_request->type = presentation::PresentationMessageType::
PRESENTATION_MESSAGE_TYPE_ARRAY_BUFFER;
- message_request->data = mojo::Array<uint8>::From(data);
+ message_request->data = mojo::Array<uint8_t>::From(data);
service_ptr_->SendSessionMessage(
session.Pass(), message_request.Pass(),
base::Bind(&PresentationServiceImplTest::ExpectSendMessageMojoCallback,
@@ -705,9 +708,9 @@ TEST_F(PresentationServiceImplTest, SendArrayBufferWithExceedingLimit) {
// Create buffer with size exceeding the limit.
// Use same size as in content::kMaxPresentationSessionMessageSize.
const size_t kMaxBufferSizeInBytes = 64 * 1024; // 64 KB.
- uint8 buffer[kMaxBufferSizeInBytes+1];
+ uint8_t buffer[kMaxBufferSizeInBytes + 1];
memset(buffer, 0, kMaxBufferSizeInBytes+1);
- std::vector<uint8> data;
+ std::vector<uint8_t> data;
data.assign(buffer, buffer + sizeof(buffer));
presentation::PresentationSessionInfoPtr session(
@@ -718,7 +721,7 @@ TEST_F(PresentationServiceImplTest, SendArrayBufferWithExceedingLimit) {
presentation::SessionMessage::New());
message_request->type = presentation::PresentationMessageType::
PRESENTATION_MESSAGE_TYPE_ARRAY_BUFFER;
- message_request->data = mojo::Array<uint8>::From(data);
+ message_request->data = mojo::Array<uint8_t>::From(data);
service_ptr_->SendSessionMessage(
session.Pass(), message_request.Pass(),
base::Bind(&PresentationServiceImplTest::ExpectSendMessageMojoCallback,
@@ -738,8 +741,8 @@ TEST_F(PresentationServiceImplTest, SendArrayBufferWithExceedingLimit) {
}
TEST_F(PresentationServiceImplTest, SendBlobData) {
- const uint8 buffer[] = {0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07};
- std::vector<uint8> data;
+ const uint8_t buffer[] = {0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07};
+ std::vector<uint8_t> data;
data.assign(buffer, buffer + sizeof(buffer));
presentation::PresentationSessionInfoPtr session(
@@ -750,7 +753,7 @@ TEST_F(PresentationServiceImplTest, SendBlobData) {
presentation::SessionMessage::New());
message_request->type =
presentation::PresentationMessageType::PRESENTATION_MESSAGE_TYPE_BLOB;
- message_request->data = mojo::Array<uint8>::From(data);
+ message_request->data = mojo::Array<uint8_t>::From(data);
service_ptr_->SendSessionMessage(
session.Pass(), message_request.Pass(),
base::Bind(&PresentationServiceImplTest::ExpectSendMessageMojoCallback,
diff --git a/content/browser/profiler_controller_impl.h b/content/browser/profiler_controller_impl.h
index 0939d85..3248d92 100644
--- a/content/browser/profiler_controller_impl.h
+++ b/content/browser/profiler_controller_impl.h
@@ -5,6 +5,7 @@
#ifndef CONTENT_BROWSER_PROFILER_CONTROLLER_IMPL_H_
#define CONTENT_BROWSER_PROFILER_CONTROLLER_IMPL_H_
+#include "base/macros.h"
#include "base/memory/singleton.h"
#include "base/process/process.h"
#include "content/common/content_export.h"
diff --git a/content/browser/profiler_message_filter.cc b/content/browser/profiler_message_filter.cc
index 0b7acf0..b94c0e9 100644
--- a/content/browser/profiler_message_filter.cc
+++ b/content/browser/profiler_message_filter.cc
@@ -14,7 +14,7 @@ ProfilerMessageFilter::ProfilerMessageFilter(content::ProcessType process_type)
: BrowserMessageFilter(ChildProcessMsgStart), process_type_(process_type) {
}
-void ProfilerMessageFilter::OnChannelConnected(int32 peer_pid) {
+void ProfilerMessageFilter::OnChannelConnected(int32_t peer_pid) {
tracked_objects::ThreadData::Status status =
tracked_objects::ThreadData::status();
Send(new ChildProcessMsg_SetProfilerStatus(status));
diff --git a/content/browser/profiler_message_filter.h b/content/browser/profiler_message_filter.h
index 2b2d6a6..d29f971 100644
--- a/content/browser/profiler_message_filter.h
+++ b/content/browser/profiler_message_filter.h
@@ -5,8 +5,11 @@
#ifndef CONTENT_BROWSER_PROFILER_MESSAGE_FILTER_H_
#define CONTENT_BROWSER_PROFILER_MESSAGE_FILTER_H_
+#include <stdint.h>
+
#include <string>
+#include "base/macros.h"
#include "content/public/browser/browser_message_filter.h"
#include "content/public/common/process_type.h"
@@ -22,7 +25,7 @@ class ProfilerMessageFilter : public BrowserMessageFilter {
explicit ProfilerMessageFilter(content::ProcessType process_type);
// BrowserMessageFilter implementation.
- void OnChannelConnected(int32 peer_pid) override;
+ void OnChannelConnected(int32_t peer_pid) override;
// BrowserMessageFilter implementation.
bool OnMessageReceived(const IPC::Message& message) override;
diff --git a/content/browser/push_messaging/push_messaging_message_filter.cc b/content/browser/push_messaging/push_messaging_message_filter.cc
index 116f895..c3ccfe3 100644
--- a/content/browser/push_messaging/push_messaging_message_filter.cc
+++ b/content/browser/push_messaging/push_messaging_message_filter.cc
@@ -9,6 +9,7 @@
#include "base/bind.h"
#include "base/bind_helpers.h"
#include "base/logging.h"
+#include "base/macros.h"
#include "base/metrics/histogram.h"
#include "base/strings/string_number_conversions.h"
#include "content/browser/renderer_host/render_process_host_impl.h"
diff --git a/content/browser/push_messaging/push_messaging_message_filter.h b/content/browser/push_messaging/push_messaging_message_filter.h
index 674ec09..aba0b34 100644
--- a/content/browser/push_messaging/push_messaging_message_filter.h
+++ b/content/browser/push_messaging/push_messaging_message_filter.h
@@ -8,6 +8,7 @@
#include <stdint.h>
#include <string>
+#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/content/browser/push_messaging/push_messaging_router.cc b/content/browser/push_messaging/push_messaging_router.cc
index 35147cf..bc95216 100644
--- a/content/browser/push_messaging/push_messaging_router.cc
+++ b/content/browser/push_messaging/push_messaging_router.cc
@@ -33,7 +33,7 @@ void RunDeliverCallback(
void PushMessagingRouter::DeliverMessage(
BrowserContext* browser_context,
const GURL& origin,
- int64 service_worker_registration_id,
+ int64_t service_worker_registration_id,
const std::string& data,
const DeliverMessageCallback& deliver_message_callback) {
DCHECK_CURRENTLY_ON(BrowserThread::UI);
@@ -52,7 +52,7 @@ void PushMessagingRouter::DeliverMessage(
// static
void PushMessagingRouter::FindServiceWorkerRegistration(
const GURL& origin,
- int64 service_worker_registration_id,
+ int64_t service_worker_registration_id,
const std::string& data,
const DeliverMessageCallback& deliver_message_callback,
scoped_refptr<ServiceWorkerContextWrapper> service_worker_context) {
diff --git a/content/browser/push_messaging/push_messaging_router.h b/content/browser/push_messaging/push_messaging_router.h
index aeaf3e4..dae9973 100644
--- a/content/browser/push_messaging/push_messaging_router.h
+++ b/content/browser/push_messaging/push_messaging_router.h
@@ -5,6 +5,9 @@
#ifndef CONTENT_BROWSER_PUSH_MESSAGING_PUSH_MESSAGING_ROUTER_H_
#define CONTENT_BROWSER_PUSH_MESSAGING_PUSH_MESSAGING_ROUTER_H_
+#include <stdint.h>
+
+#include "base/macros.h"
#include "base/memory/ref_counted.h"
#include "base/memory/weak_ptr.h"
#include "content/common/service_worker/service_worker_status_code.h"
@@ -27,7 +30,7 @@ class PushMessagingRouter {
static void DeliverMessage(
BrowserContext* browser_context,
const GURL& origin,
- int64 service_worker_registration_id,
+ int64_t service_worker_registration_id,
const std::string& data,
const DeliverMessageCallback& deliver_message_callback);
@@ -36,7 +39,7 @@ class PushMessagingRouter {
// dispatched. Must be called on the IO thread.
static void FindServiceWorkerRegistration(
const GURL& origin,
- int64 service_worker_registration_id,
+ int64_t service_worker_registration_id,
const std::string& data,
const DeliverMessageCallback& deliver_message_callback,
scoped_refptr<ServiceWorkerContextWrapper> service_worker_context);
diff --git a/content/browser/quota/mock_quota_manager.h b/content/browser/quota/mock_quota_manager.h
index ecb0d72..9dfd779 100644
--- a/content/browser/quota/mock_quota_manager.h
+++ b/content/browser/quota/mock_quota_manager.h
@@ -12,6 +12,7 @@
#include <utility>
#include <vector>
+#include "base/macros.h"
#include "base/memory/scoped_ptr.h"
#include "storage/browser/quota/quota_client.h"
#include "storage/browser/quota/quota_manager.h"
diff --git a/content/browser/quota/mock_quota_manager_proxy.h b/content/browser/quota/mock_quota_manager_proxy.h
index 3ba9810..118761d 100644
--- a/content/browser/quota/mock_quota_manager_proxy.h
+++ b/content/browser/quota/mock_quota_manager_proxy.h
@@ -5,6 +5,9 @@
#ifndef CONTENT_BROWSER_QUOTA_MOCK_QUOTA_MANAGER_PROXY_H_
#define CONTENT_BROWSER_QUOTA_MOCK_QUOTA_MANAGER_PROXY_H_
+#include <stdint.h>
+
+#include "base/macros.h"
#include "content/browser/quota/mock_quota_manager.h"
#include "storage/browser/quota/quota_client.h"
#include "storage/browser/quota/quota_manager_proxy.h"
diff --git a/content/browser/quota/mock_quota_manager_unittest.cc b/content/browser/quota/mock_quota_manager_unittest.cc
index e5e170c..9a46cf3 100644
--- a/content/browser/quota/mock_quota_manager_unittest.cc
+++ b/content/browser/quota/mock_quota_manager_unittest.cc
@@ -7,6 +7,7 @@
#include "base/bind.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/thread_task_runner_handle.h"
diff --git a/content/browser/quota/quota_backend_impl_unittest.cc b/content/browser/quota/quota_backend_impl_unittest.cc
index 6139e8a..516cab3 100644
--- a/content/browser/quota/quota_backend_impl_unittest.cc
+++ b/content/browser/quota/quota_backend_impl_unittest.cc
@@ -4,9 +4,12 @@
#include "storage/browser/fileapi/quota/quota_backend_impl.h"
+#include <stdint.h>
+
#include <string>
#include "base/files/scoped_temp_dir.h"
+#include "base/macros.h"
#include "base/thread_task_runner_handle.h"
#include "storage/browser/fileapi/file_system_usage_cache.h"
#include "storage/browser/fileapi/obfuscated_file_util.h"
@@ -28,9 +31,9 @@ const char kOrigin[] = "http://example.com";
bool DidReserveQuota(bool accepted,
base::File::Error* error_out,
- int64* delta_out,
+ int64_t* delta_out,
base::File::Error error,
- int64 delta) {
+ int64_t delta) {
DCHECK(error_out);
DCHECK(delta_out);
*error_out = error;
@@ -56,7 +59,7 @@ class MockQuotaManagerProxy : public storage::QuotaManagerProxy {
void NotifyStorageModified(storage::QuotaClient::ID client_id,
const GURL& origin,
storage::StorageType type,
- int64 delta) override {
+ int64_t delta) override {
++storage_modified_count_;
usage_ += delta;
ASSERT_LE(usage_, quota_);
@@ -70,17 +73,17 @@ class MockQuotaManagerProxy : public storage::QuotaManagerProxy {
}
int storage_modified_count() { return storage_modified_count_; }
- int64 usage() { return usage_; }
- void set_usage(int64 usage) { usage_ = usage; }
- void set_quota(int64 quota) { quota_ = quota; }
+ int64_t usage() { return usage_; }
+ void set_usage(int64_t usage) { usage_ = usage; }
+ void set_quota(int64_t quota) { quota_ = quota; }
protected:
~MockQuotaManagerProxy() override {}
private:
int storage_modified_count_;
- int64 usage_;
- int64 quota_;
+ int64_t usage_;
+ int64_t quota_;
DISALLOW_COPY_AND_ASSIGN(MockQuotaManagerProxy);
};
@@ -159,9 +162,9 @@ TEST_F(QuotaBackendImplTest, ReserveQuota_Basic) {
InitializeForOriginAndType(GURL(kOrigin), type);
quota_manager_proxy_->set_quota(10000);
- int64 delta = 0;
+ int64_t delta = 0;
- const int64 kDelta1 = 1000;
+ const int64_t kDelta1 = 1000;
base::File::Error error = base::File::FILE_ERROR_FAILED;
backend_->ReserveQuota(GURL(kOrigin), type, kDelta1,
base::Bind(&DidReserveQuota, true, &error, &delta));
@@ -169,7 +172,7 @@ TEST_F(QuotaBackendImplTest, ReserveQuota_Basic) {
EXPECT_EQ(kDelta1, delta);
EXPECT_EQ(kDelta1, quota_manager_proxy_->usage());
- const int64 kDelta2 = -300;
+ const int64_t kDelta2 = -300;
error = base::File::FILE_ERROR_FAILED;
backend_->ReserveQuota(GURL(kOrigin), type, kDelta2,
base::Bind(&DidReserveQuota, true, &error, &delta));
@@ -185,9 +188,9 @@ TEST_F(QuotaBackendImplTest, ReserveQuota_NoSpace) {
InitializeForOriginAndType(GURL(kOrigin), type);
quota_manager_proxy_->set_quota(100);
- int64 delta = 0;
+ int64_t delta = 0;
- const int64 kDelta = 1000;
+ const int64_t kDelta = 1000;
base::File::Error error = base::File::FILE_ERROR_FAILED;
backend_->ReserveQuota(GURL(kOrigin), type, kDelta,
base::Bind(&DidReserveQuota, true, &error, &delta));
@@ -203,9 +206,9 @@ TEST_F(QuotaBackendImplTest, ReserveQuota_Revert) {
InitializeForOriginAndType(GURL(kOrigin), type);
quota_manager_proxy_->set_quota(10000);
- int64 delta = 0;
+ int64_t delta = 0;
- const int64 kDelta = 1000;
+ const int64_t kDelta = 1000;
base::File::Error error = base::File::FILE_ERROR_FAILED;
backend_->ReserveQuota(GURL(kOrigin), type, kDelta,
base::Bind(&DidReserveQuota, false, &error, &delta));
@@ -219,11 +222,11 @@ TEST_F(QuotaBackendImplTest, ReserveQuota_Revert) {
TEST_F(QuotaBackendImplTest, ReleaseReservedQuota) {
storage::FileSystemType type = storage::kFileSystemTypeTemporary;
InitializeForOriginAndType(GURL(kOrigin), type);
- const int64 kInitialUsage = 2000;
+ const int64_t kInitialUsage = 2000;
quota_manager_proxy_->set_usage(kInitialUsage);
quota_manager_proxy_->set_quota(10000);
- const int64 kSize = 1000;
+ const int64_t kSize = 1000;
backend_->ReleaseReservedQuota(GURL(kOrigin), type, kSize);
EXPECT_EQ(kInitialUsage - kSize, quota_manager_proxy_->usage());
@@ -236,14 +239,14 @@ TEST_F(QuotaBackendImplTest, CommitQuotaUsage) {
quota_manager_proxy_->set_quota(10000);
base::FilePath path = GetUsageCachePath(GURL(kOrigin), type);
- const int64 kDelta1 = 1000;
+ const int64_t kDelta1 = 1000;
backend_->CommitQuotaUsage(GURL(kOrigin), type, kDelta1);
EXPECT_EQ(kDelta1, quota_manager_proxy_->usage());
- int64 usage = 0;
+ int64_t usage = 0;
EXPECT_TRUE(file_system_usage_cache_.GetUsage(path, &usage));
EXPECT_EQ(kDelta1, usage);
- const int64 kDelta2 = -300;
+ const int64_t kDelta2 = -300;
backend_->CommitQuotaUsage(GURL(kOrigin), type, kDelta2);
EXPECT_EQ(kDelta1 + kDelta2, quota_manager_proxy_->usage());
usage = 0;
@@ -259,7 +262,7 @@ TEST_F(QuotaBackendImplTest, DirtyCount) {
base::FilePath path = GetUsageCachePath(GURL(kOrigin), type);
backend_->IncrementDirtyCount(GURL(kOrigin), type);
- uint32 dirty = 0;
+ uint32_t dirty = 0;
ASSERT_TRUE(file_system_usage_cache_.GetDirty(path, &dirty));
EXPECT_EQ(1u, dirty);
diff --git a/content/browser/quota/quota_database_unittest.cc b/content/browser/quota/quota_database_unittest.cc
index 8365e64..6bf0cd9 100644
--- a/content/browser/quota/quota_database_unittest.cc
+++ b/content/browser/quota/quota_database_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 <algorithm>
#include <iterator>
#include <set>
@@ -10,6 +13,7 @@
#include "base/callback.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 "content/public/test/mock_special_storage_policy.h"
#include "sql/connection.h"
@@ -87,7 +91,7 @@ class QuotaDatabaseTest : public testing::Test {
const int kQuota1 = 13579;
const int kQuota2 = kQuota1 + 1024;
- int64 quota = -1;
+ int64_t quota = -1;
EXPECT_FALSE(db.GetHostQuota(kHost, kStorageTypeTemporary, &quota));
EXPECT_FALSE(db.GetHostQuota(kHost, kStorageTypePersistent, &quota));
@@ -116,9 +120,9 @@ class QuotaDatabaseTest : public testing::Test {
const char* kTempQuotaKey = QuotaDatabase::kTemporaryQuotaOverrideKey;
const char* kAvailSpaceKey = QuotaDatabase::kDesiredAvailableSpaceKey;
- int64 value = 0;
- const int64 kValue1 = 456;
- const int64 kValue2 = 123000;
+ int64_t value = 0;
+ const int64_t kValue1 = 456;
+ const int64_t kValue2 = 123000;
EXPECT_FALSE(db.GetQuotaConfigValue(kTempQuotaKey, &value));
EXPECT_FALSE(db.GetQuotaConfigValue(kAvailSpaceKey, &value));
diff --git a/content/browser/quota/quota_manager_unittest.cc b/content/browser/quota/quota_manager_unittest.cc
index abe4635..80889ba 100644
--- a/content/browser/quota/quota_manager_unittest.cc
+++ b/content/browser/quota/quota_manager_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 <algorithm>
#include <set>
#include <sstream>
@@ -10,6 +13,7 @@
#include "base/bind.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/memory/weak_ptr.h"
#include "base/run_loop.h"
@@ -54,15 +58,16 @@ const StorageType kSync = kStorageTypeSyncable;
const int kAllClients = QuotaClient::kAllClientsMask;
-const int64 kAvailableSpaceForApp = 13377331U;
+const int64_t kAvailableSpaceForApp = 13377331U;
-const int64 kMinimumPreserveForSystem = QuotaManager::kMinimumPreserveForSystem;
+const int64_t kMinimumPreserveForSystem =
+ QuotaManager::kMinimumPreserveForSystem;
const int kPerHostTemporaryPortion = QuotaManager::kPerHostTemporaryPortion;
const GURL kTestEvictionOrigin = GURL("http://test.eviction.policy/result");
// Returns a deterministic value for the amount of available disk space.
-int64 GetAvailableDiskSpaceForTest(const base::FilePath&) {
+int64_t GetAvailableDiskSpaceForTest(const base::FilePath&) {
return kAvailableSpaceForApp + kMinimumPreserveForSystem;
}
@@ -75,8 +80,8 @@ class TestEvictionPolicy : 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 {
callback.Run(kTestEvictionOrigin);
}
@@ -168,7 +173,7 @@ class QuotaManagerTest : public testing::Test {
weak_factory_.GetWeakPtr()));
}
- void SetTemporaryGlobalQuota(int64 new_quota) {
+ void SetTemporaryGlobalQuota(int64_t new_quota) {
quota_status_ = kQuotaStatusUnknown;
quota_ = -1;
quota_manager_->SetTemporaryGlobalOverrideQuota(
@@ -186,7 +191,7 @@ class QuotaManagerTest : public testing::Test {
weak_factory_.GetWeakPtr()));
}
- void SetPersistentHostQuota(const std::string& host, int64 new_quota) {
+ void SetPersistentHostQuota(const std::string& host, int64_t new_quota) {
quota_status_ = kQuotaStatusUnknown;
quota_ = -1;
quota_manager_->SetPersistentHostQuota(
@@ -347,38 +352,35 @@ class QuotaManagerTest : public testing::Test {
usage_info_.insert(usage_info_.begin(), entries.begin(), entries.end());
}
- void DidGetUsageAndQuota(QuotaStatusCode status, int64 usage, int64 quota) {
+ void DidGetUsageAndQuota(QuotaStatusCode status,
+ int64_t usage,
+ int64_t quota) {
quota_status_ = status;
usage_ = usage;
quota_ = quota;
}
- void DidGetQuota(QuotaStatusCode status,
- int64 quota) {
+ void DidGetQuota(QuotaStatusCode status, int64_t quota) {
quota_status_ = status;
quota_ = quota;
}
- void DidGetAvailableSpace(QuotaStatusCode status, int64 available_space) {
+ void DidGetAvailableSpace(QuotaStatusCode status, int64_t available_space) {
quota_status_ = status;
available_space_ = available_space;
}
- void DidGetHostQuota(QuotaStatusCode status,
- int64 quota) {
+ void DidGetHostQuota(QuotaStatusCode status, int64_t quota) {
quota_status_ = status;
quota_ = quota;
}
- void DidGetGlobalUsage(int64 usage,
- int64 unlimited_usage) {
+ void DidGetGlobalUsage(int64_t usage, int64_t unlimited_usage) {
usage_ = usage;
unlimited_usage_ = unlimited_usage;
}
- void DidGetHostUsage(int64 usage) {
- usage_ = usage;
- }
+ void DidGetHostUsage(int64_t usage) { usage_ = usage; }
void StatusCallback(QuotaStatusCode status) {
++status_callback_count_;
@@ -414,8 +416,9 @@ class QuotaManagerTest : public testing::Test {
void set_additional_callback_count(int c) { additional_callback_count_ = c; }
int additional_callback_count() const { return additional_callback_count_; }
- void DidGetUsageAndQuotaAdditional(
- QuotaStatusCode status, int64 usage, int64 quota) {
+ void DidGetUsageAndQuotaAdditional(QuotaStatusCode status,
+ int64_t usage,
+ int64_t quota) {
++additional_callback_count_;
}
@@ -430,11 +433,11 @@ class QuotaManagerTest : public testing::Test {
QuotaStatusCode status() const { return quota_status_; }
const UsageInfoEntries& usage_info() const { return usage_info_; }
- int64 usage() const { return usage_; }
- int64 limited_usage() const { return limited_usage_; }
- int64 unlimited_usage() const { return unlimited_usage_; }
- int64 quota() const { return quota_; }
- int64 available_space() const { return available_space_; }
+ int64_t usage() const { return usage_; }
+ int64_t limited_usage() const { return limited_usage_; }
+ int64_t unlimited_usage() const { return unlimited_usage_; }
+ int64_t quota() const { return quota_; }
+ int64_t available_space() const { return available_space_; }
const GURL& eviction_origin() const { return eviction_origin_; }
const std::set<GURL>& modified_origins() const { return modified_origins_; }
StorageType modified_origins_type() const { return modified_origins_type_; }
@@ -460,11 +463,11 @@ class QuotaManagerTest : public testing::Test {
QuotaStatusCode quota_status_;
UsageInfoEntries usage_info_;
- int64 usage_;
- int64 limited_usage_;
- int64 unlimited_usage_;
- int64 quota_;
- int64 available_space_;
+ int64_t usage_;
+ int64_t limited_usage_;
+ int64_t unlimited_usage_;
+ int64_t quota_;
+ int64_t available_space_;
GURL eviction_origin_;
std::set<GURL> modified_origins_;
StorageType modified_origins_type_;
@@ -539,7 +542,7 @@ TEST_F(QuotaManagerTest, GetUsageAndQuota_Simple) {
EXPECT_EQ(kQuotaStatusOk, status());
EXPECT_EQ(10, usage());
EXPECT_LE(0, quota());
- int64 quota_returned_for_foo = quota();
+ int64_t quota_returned_for_foo = quota();
GetUsageAndQuotaForWebApps(GURL("http://bar.com/"), kTemp);
base::RunLoop().RunUntilIdle();
@@ -666,7 +669,7 @@ TEST_F(QuotaManagerTest, GetUsage_MultipleClients) {
RegisterClient(CreateClient(kData2, arraysize(kData2),
QuotaClient::kDatabase));
- const int64 kTempQuotaBase =
+ const int64_t kTempQuotaBase =
GetAvailableDiskSpaceForTest(base::FilePath()) / kPerHostTemporaryPortion;
GetUsageAndQuotaForWebApps(GURL("http://foo.com/"), kTemp);
@@ -1255,15 +1258,15 @@ TEST_F(QuotaManagerTest, GetUsage_WithDeleteOrigin) {
GetGlobalUsage(kTemp);
base::RunLoop().RunUntilIdle();
- int64 predelete_global_tmp = usage();
+ int64_t predelete_global_tmp = usage();
GetHostUsage("foo.com", kTemp);
base::RunLoop().RunUntilIdle();
- int64 predelete_host_tmp = usage();
+ int64_t predelete_host_tmp = usage();
GetHostUsage("foo.com", kPerm);
base::RunLoop().RunUntilIdle();
- int64 predelete_host_pers = usage();
+ int64_t predelete_host_pers = usage();
DeleteClientOriginData(client, GURL("http://foo.com/"),
kTemp);
@@ -1322,15 +1325,15 @@ TEST_F(QuotaManagerTest, EvictOriginData) {
GetGlobalUsage(kTemp);
base::RunLoop().RunUntilIdle();
- int64 predelete_global_tmp = usage();
+ int64_t predelete_global_tmp = usage();
GetHostUsage("foo.com", kTemp);
base::RunLoop().RunUntilIdle();
- int64 predelete_host_tmp = usage();
+ int64_t predelete_host_tmp = usage();
GetHostUsage("foo.com", kPerm);
base::RunLoop().RunUntilIdle();
- int64 predelete_host_pers = usage();
+ int64_t predelete_host_pers = usage();
for (size_t i = 0; i < arraysize(kData1); ++i)
quota_manager()->NotifyStorageAccessed(QuotaClient::kUnknown,
@@ -1447,15 +1450,15 @@ TEST_F(QuotaManagerTest, EvictOriginDataWithDeletionError) {
GetGlobalUsage(kTemp);
base::RunLoop().RunUntilIdle();
- int64 predelete_global_tmp = usage();
+ int64_t predelete_global_tmp = usage();
GetHostUsage("foo.com", kTemp);
base::RunLoop().RunUntilIdle();
- int64 predelete_host_tmp = usage();
+ int64_t predelete_host_tmp = usage();
GetHostUsage("foo.com", kPerm);
base::RunLoop().RunUntilIdle();
- int64 predelete_host_pers = usage();
+ int64_t predelete_host_pers = usage();
for (size_t i = 0; i < arraysize(kData); ++i)
NotifyStorageAccessed(client, GURL(kData[i].origin), kData[i].type);
@@ -1552,15 +1555,15 @@ TEST_F(QuotaManagerTest, DeleteHostDataSimple) {
GetGlobalUsage(kTemp);
base::RunLoop().RunUntilIdle();
- const int64 predelete_global_tmp = usage();
+ const int64_t predelete_global_tmp = usage();
GetHostUsage("foo.com", kTemp);
base::RunLoop().RunUntilIdle();
- int64 predelete_host_tmp = usage();
+ int64_t predelete_host_tmp = usage();
GetHostUsage("foo.com", kPerm);
base::RunLoop().RunUntilIdle();
- int64 predelete_host_pers = usage();
+ int64_t predelete_host_pers = usage();
DeleteHostData(std::string(), kTemp, kAllClients);
base::RunLoop().RunUntilIdle();
@@ -1618,23 +1621,23 @@ TEST_F(QuotaManagerTest, DeleteHostDataMultiple) {
GetGlobalUsage(kTemp);
base::RunLoop().RunUntilIdle();
- const int64 predelete_global_tmp = usage();
+ const int64_t predelete_global_tmp = usage();
GetHostUsage("foo.com", kTemp);
base::RunLoop().RunUntilIdle();
- const int64 predelete_foo_tmp = usage();
+ const int64_t predelete_foo_tmp = usage();
GetHostUsage("bar.com", kTemp);
base::RunLoop().RunUntilIdle();
- const int64 predelete_bar_tmp = usage();
+ const int64_t predelete_bar_tmp = usage();
GetHostUsage("foo.com", kPerm);
base::RunLoop().RunUntilIdle();
- const int64 predelete_foo_pers = usage();
+ const int64_t predelete_foo_pers = usage();
GetHostUsage("bar.com", kPerm);
base::RunLoop().RunUntilIdle();
- const int64 predelete_bar_pers = usage();
+ const int64_t predelete_bar_pers = usage();
reset_status_callback_count();
DeleteHostData("foo.com", kTemp, kAllClients);
@@ -1706,23 +1709,23 @@ TEST_F(QuotaManagerTest, DeleteOriginDataMultiple) {
GetGlobalUsage(kTemp);
base::RunLoop().RunUntilIdle();
- const int64 predelete_global_tmp = usage();
+ const int64_t predelete_global_tmp = usage();
GetHostUsage("foo.com", kTemp);
base::RunLoop().RunUntilIdle();
- const int64 predelete_foo_tmp = usage();
+ const int64_t predelete_foo_tmp = usage();
GetHostUsage("bar.com", kTemp);
base::RunLoop().RunUntilIdle();
- const int64 predelete_bar_tmp = usage();
+ const int64_t predelete_bar_tmp = usage();
GetHostUsage("foo.com", kPerm);
base::RunLoop().RunUntilIdle();
- const int64 predelete_foo_pers = usage();
+ const int64_t predelete_foo_pers = usage();
GetHostUsage("bar.com", kPerm);
base::RunLoop().RunUntilIdle();
- const int64 predelete_bar_pers = usage();
+ const int64_t predelete_bar_pers = usage();
for (size_t i = 0; i < arraysize(kData1); ++i)
quota_manager()->NotifyStorageAccessed(QuotaClient::kUnknown,
@@ -2074,7 +2077,7 @@ TEST_F(QuotaManagerTest, DeleteSpecificClientTypeSingleOrigin) {
GetHostUsage("foo.com", kTemp);
base::RunLoop().RunUntilIdle();
- const int64 predelete_foo_tmp = usage();
+ const int64_t predelete_foo_tmp = usage();
DeleteOriginData(GURL("http://foo.com/"), kTemp, QuotaClient::kFileSystem);
base::RunLoop().RunUntilIdle();
@@ -2130,7 +2133,7 @@ TEST_F(QuotaManagerTest, DeleteSpecificClientTypeSingleHost) {
GetHostUsage("foo.com", kTemp);
base::RunLoop().RunUntilIdle();
- const int64 predelete_foo_tmp = usage();
+ const int64_t predelete_foo_tmp = usage();
DeleteHostData("foo.com", kTemp, QuotaClient::kFileSystem);
base::RunLoop().RunUntilIdle();
@@ -2185,7 +2188,7 @@ TEST_F(QuotaManagerTest, DeleteMultipleClientTypesSingleOrigin) {
GetHostUsage("foo.com", kTemp);
base::RunLoop().RunUntilIdle();
- const int64 predelete_foo_tmp = usage();
+ const int64_t predelete_foo_tmp = usage();
DeleteOriginData(GURL("http://foo.com/"), kTemp,
QuotaClient::kFileSystem | QuotaClient::kDatabase);
@@ -2230,7 +2233,7 @@ TEST_F(QuotaManagerTest, DeleteMultipleClientTypesSingleHost) {
GetHostUsage("foo.com", kTemp);
base::RunLoop().RunUntilIdle();
- const int64 predelete_foo_tmp = usage();
+ const int64_t predelete_foo_tmp = usage();
DeleteHostData("foo.com", kTemp,
QuotaClient::kFileSystem | QuotaClient::kAppcache);
@@ -2268,8 +2271,9 @@ TEST_F(QuotaManagerTest, GetUsageAndQuota_Incognito) {
base::RunLoop().RunUntilIdle();
EXPECT_EQ(kQuotaStatusOk, status());
EXPECT_EQ(10, usage());
- EXPECT_LE(std::min(static_cast<int64>(100 / kPerHostTemporaryPortion),
- QuotaManager::kIncognitoDefaultQuotaLimit), quota());
+ EXPECT_LE(std::min(static_cast<int64_t>(100 / kPerHostTemporaryPortion),
+ QuotaManager::kIncognitoDefaultQuotaLimit),
+ quota());
mock_special_storage_policy()->AddUnlimited(GURL("http://foo.com/"));
GetUsageAndQuotaForWebApps(GURL("http://foo.com/"), kPerm);
diff --git a/content/browser/quota/quota_reservation_manager_unittest.cc b/content/browser/quota/quota_reservation_manager_unittest.cc
index 05fff80..7aca253 100644
--- a/content/browser/quota/quota_reservation_manager_unittest.cc
+++ b/content/browser/quota/quota_reservation_manager_unittest.cc
@@ -4,12 +4,15 @@
#include "storage/browser/fileapi/quota/quota_reservation_manager.h"
+#include <stdint.h>
+
#include "base/bind.h"
#include "base/bind_helpers.h"
#include "base/files/file.h"
#include "base/files/file_util.h"
#include "base/files/scoped_temp_dir.h"
#include "base/location.h"
+#include "base/macros.h"
#include "base/run_loop.h"
#include "base/single_thread_task_runner.h"
#include "base/thread_task_runner_handle.h"
@@ -28,17 +31,17 @@ namespace {
const char kOrigin[] = "http://example.com";
const storage::FileSystemType kType = kFileSystemTypeTemporary;
-const int64 kInitialFileSize = 1;
+const int64_t kInitialFileSize = 1;
typedef QuotaReservationManager::ReserveQuotaCallback ReserveQuotaCallback;
-int64 GetFileSize(const base::FilePath& path) {
- int64 size = 0;
+int64_t GetFileSize(const base::FilePath& path) {
+ int64_t size = 0;
base::GetFileSize(path, &size);
return size;
}
-void SetFileSize(const base::FilePath& path, int64 size) {
+void SetFileSize(const base::FilePath& path, int64_t size) {
base::File file(path, base::File::FLAG_OPEN_ALWAYS | base::File::FLAG_WRITE);
ASSERT_TRUE(file.IsValid());
ASSERT_TRUE(file.SetLength(size));
@@ -53,7 +56,7 @@ class FakeBackend : public QuotaReservationManager::QuotaBackend {
void ReserveQuota(const GURL& origin,
storage::FileSystemType type,
- int64 delta,
+ int64_t delta,
const ReserveQuotaCallback& callback) override {
EXPECT_EQ(GURL(kOrigin), origin);
EXPECT_EQ(kType, type);
@@ -65,7 +68,7 @@ class FakeBackend : public QuotaReservationManager::QuotaBackend {
void ReleaseReservedQuota(const GURL& origin,
storage::FileSystemType type,
- int64 size) override {
+ int64_t size) override {
EXPECT_LE(0, size);
EXPECT_EQ(GURL(kOrigin), origin);
EXPECT_EQ(kType, type);
@@ -74,7 +77,7 @@ class FakeBackend : public QuotaReservationManager::QuotaBackend {
void CommitQuotaUsage(const GURL& origin,
storage::FileSystemType type,
- int64 delta) override {
+ int64_t delta) override {
EXPECT_EQ(GURL(kOrigin), origin);
EXPECT_EQ(kType, type);
on_disk_usage_ += delta;
@@ -86,12 +89,12 @@ class FakeBackend : public QuotaReservationManager::QuotaBackend {
void DecrementDirtyCount(const GURL& origin,
storage::FileSystemType type) override {}
- int64 on_memory_usage() { return on_memory_usage_; }
- int64 on_disk_usage() { return on_disk_usage_; }
+ int64_t on_memory_usage() { return on_memory_usage_; }
+ int64_t on_disk_usage() { return on_disk_usage_; }
private:
- int64 on_memory_usage_;
- int64 on_disk_usage_;
+ int64_t on_memory_usage_;
+ int64_t on_disk_usage_;
DISALLOW_COPY_AND_ASSIGN(FakeBackend);
};
@@ -111,8 +114,8 @@ class FakeWriter {
EXPECT_FALSE(dirty_);
}
- int64 Truncate(int64 length) {
- int64 consumed = 0;
+ int64_t Truncate(int64_t length) {
+ int64_t consumed = 0;
if (max_written_offset_ < length) {
consumed = length - max_written_offset_;
@@ -122,10 +125,10 @@ class FakeWriter {
return consumed;
}
- int64 Write(int64 max_offset) {
+ int64_t Write(int64_t max_offset) {
dirty_ = true;
- int64 consumed = 0;
+ int64_t consumed = 0;
if (max_written_offset_ < max_offset) {
consumed = max_offset - max_written_offset_;
max_written_offset_ = max_offset;
@@ -135,7 +138,7 @@ class FakeWriter {
return consumed;
}
- int64 Append(int64 amount) {
+ int64_t Append(int64_t amount) {
dirty_ = true;
append_mode_write_amount_ += amount;
SetFileSize(path_, GetFileSize(path_) + amount);
@@ -157,8 +160,8 @@ class FakeWriter {
private:
scoped_ptr<OpenFileHandle> handle_;
base::FilePath path_;
- int64 max_written_offset_;
- int64 append_mode_write_amount_;
+ int64_t max_written_offset_;
+ int64_t append_mode_write_amount_;
bool dirty_;
};
@@ -168,7 +171,7 @@ void ExpectSuccess(bool* done, base::File::Error error) {
EXPECT_EQ(base::File::FILE_OK, error);
}
-void RefreshReservation(QuotaReservation* reservation, int64 size) {
+void RefreshReservation(QuotaReservation* reservation, int64_t size) {
DCHECK(reservation);
bool done = false;
@@ -222,7 +225,7 @@ TEST_F(QuotaReservationManagerTest, BasicTest) {
{
RefreshReservation(reservation.get(), 10 + 20 + 3);
- int64 cached_reserved_quota = reservation->remaining_quota();
+ int64_t cached_reserved_quota = reservation->remaining_quota();
FakeWriter writer(reservation->GetOpenFileHandle(file_path()));
cached_reserved_quota -= writer.Write(kInitialFileSize + 10);
@@ -263,7 +266,7 @@ TEST_F(QuotaReservationManagerTest, MultipleWriter) {
{
RefreshReservation(reservation.get(), 10 + 20 + 30 + 40 + 5);
- int64 cached_reserved_quota = reservation->remaining_quota();
+ int64_t cached_reserved_quota = reservation->remaining_quota();
FakeWriter writer1(reservation->GetOpenFileHandle(file_path()));
FakeWriter writer2(reservation->GetOpenFileHandle(file_path()));
FakeWriter writer3(reservation->GetOpenFileHandle(file_path()));
@@ -295,12 +298,12 @@ TEST_F(QuotaReservationManagerTest, MultipleClient) {
scoped_refptr<QuotaReservation> reservation1 =
reservation_manager()->CreateReservation(GURL(kOrigin), kType);
RefreshReservation(reservation1.get(), 10);
- int64 cached_reserved_quota1 = reservation1->remaining_quota();
+ int64_t cached_reserved_quota1 = reservation1->remaining_quota();
scoped_refptr<QuotaReservation> reservation2 =
reservation_manager()->CreateReservation(GURL(kOrigin), kType);
RefreshReservation(reservation2.get(), 20);
- int64 cached_reserved_quota2 = reservation2->remaining_quota();
+ int64_t cached_reserved_quota2 = reservation2->remaining_quota();
scoped_ptr<FakeWriter> writer1(
new FakeWriter(reservation1->GetOpenFileHandle(file_path())));
diff --git a/content/browser/quota/quota_temporary_storage_evictor_unittest.cc b/content/browser/quota/quota_temporary_storage_evictor_unittest.cc
index c6733e5..21478c3 100644
--- a/content/browser/quota/quota_temporary_storage_evictor_unittest.cc
+++ b/content/browser/quota/quota_temporary_storage_evictor_unittest.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 <stdint.h>
+
#include <list>
#include <map>
#include <utility>
#include "base/bind.h"
#include "base/callback.h"
+#include "base/macros.h"
#include "base/memory/scoped_ptr.h"
#include "base/memory/weak_ptr.h"
#include "base/run_loop.h"
@@ -41,7 +44,7 @@ class MockQuotaEvictionHandler : public storage::QuotaEvictionHandler {
callback.Run(storage::kQuotaErrorInvalidModification);
return;
}
- int64 origin_usage = EnsureOriginRemoved(origin);
+ int64_t origin_usage = EnsureOriginRemoved(origin);
if (origin_usage >= 0)
available_space_ += origin_usage;
callback.Run(storage::kQuotaStatusOk);
@@ -61,7 +64,7 @@ class MockQuotaEvictionHandler : public storage::QuotaEvictionHandler {
void GetEvictionOrigin(StorageType type,
const std::set<GURL>& exceptions,
- int64 global_quota,
+ int64_t global_quota,
const storage::GetOriginCallback& callback) override {
if (origin_order_.empty())
callback.Run(GURL());
@@ -69,19 +72,16 @@ class MockQuotaEvictionHandler : public storage::QuotaEvictionHandler {
callback.Run(GURL(origin_order_.front()));
}
- int64 GetUsage() const {
- int64 total_usage = 0;
- for (std::map<GURL, int64>::const_iterator p = origins_.begin();
- p != origins_.end();
- ++p)
+ int64_t GetUsage() const {
+ int64_t total_usage = 0;
+ for (std::map<GURL, int64_t>::const_iterator p = origins_.begin();
+ p != origins_.end(); ++p)
total_usage += p->second;
return total_usage;
}
- void set_quota(int64 quota) {
- quota_ = quota;
- }
- void set_available_space(int64 available_space) {
+ void set_quota(int64_t quota) { quota_ = quota; }
+ void set_available_space(int64_t available_space) {
available_space_ = available_space;
}
void set_task_for_get_usage_and_quota(const base::Closure& task) {
@@ -97,7 +97,7 @@ class MockQuotaEvictionHandler : public storage::QuotaEvictionHandler {
// Simulates an access to |origin|. It reorders the internal LRU list.
// It internally uses AddOrigin().
void AccessOrigin(const GURL& origin) {
- std::map<GURL, int64>::iterator found = origins_.find(origin);
+ std::map<GURL, int64_t>::iterator found = origins_.find(origin);
EXPECT_TRUE(origins_.end() != found);
AddOrigin(origin, found->second);
}
@@ -105,15 +105,15 @@ class MockQuotaEvictionHandler : public storage::QuotaEvictionHandler {
// Simulates adding or overwriting the |origin| to the internal origin set
// with the |usage|. It also adds or moves the |origin| to the end of the
// LRU list.
- void AddOrigin(const GURL& origin, int64 usage) {
+ void AddOrigin(const GURL& origin, int64_t usage) {
EnsureOriginRemoved(origin);
origin_order_.push_back(origin);
origins_[origin] = usage;
}
private:
- int64 EnsureOriginRemoved(const GURL& origin) {
- int64 origin_usage;
+ int64_t EnsureOriginRemoved(const GURL& origin) {
+ int64_t origin_usage;
if (origins_.find(origin) == origins_.end())
return -1;
else
@@ -124,10 +124,10 @@ class MockQuotaEvictionHandler : public storage::QuotaEvictionHandler {
return origin_usage;
}
- int64 quota_;
- int64 available_space_;
+ int64_t quota_;
+ int64_t available_space_;
std::list<GURL> origin_order_;
- std::map<GURL, int64> origins_;
+ std::map<GURL, int64_t> origins_;
bool error_on_evict_origin_data_;
bool error_on_get_usage_and_quota_;
@@ -157,7 +157,7 @@ class QuotaTemporaryStorageEvictorTest : public testing::Test {
}
void TaskForRepeatedEvictionTest(
- const std::pair<GURL, int64>& origin_to_be_added,
+ const std::pair<GURL, int64_t>& origin_to_be_added,
const GURL& origin_to_be_accessed,
int expected_usage_after_first,
int expected_usage_after_second) {
@@ -203,11 +203,11 @@ class QuotaTemporaryStorageEvictorTest : public testing::Test {
return num_get_usage_and_quota_for_eviction_;
}
- int64 default_min_available_disk_space_to_start_eviction() const {
+ int64_t default_min_available_disk_space_to_start_eviction() const {
return 1000 * 1000 * 500;
}
- void set_min_available_disk_space_to_start_eviction(int64 value) const {
+ void set_min_available_disk_space_to_start_eviction(int64_t value) const {
temporary_storage_evictor_->set_min_available_disk_space_to_start_eviction(
value);
}
@@ -268,12 +268,12 @@ TEST_F(QuotaTemporaryStorageEvictorTest, MultipleEvictionTest) {
}
TEST_F(QuotaTemporaryStorageEvictorTest, RepeatedEvictionTest) {
- const int64 a_size = 400;
- const int64 b_size = 150;
- const int64 c_size = 120;
- const int64 d_size = 292;
- const int64 initial_total_size = a_size + b_size + c_size + d_size;
- const int64 e_size = 275;
+ const int64_t a_size = 400;
+ const int64_t b_size = 150;
+ const int64_t c_size = 120;
+ const int64_t d_size = 292;
+ const int64_t initial_total_size = a_size + b_size + c_size + d_size;
+ const int64_t e_size = 275;
quota_eviction_handler()->AddOrigin(GURL("http://www.d.com"), d_size);
quota_eviction_handler()->AddOrigin(GURL("http://www.c.com"), c_size);
@@ -302,11 +302,11 @@ TEST_F(QuotaTemporaryStorageEvictorTest, RepeatedEvictionTest) {
}
TEST_F(QuotaTemporaryStorageEvictorTest, RepeatedEvictionSkippedTest) {
- const int64 a_size = 400;
- const int64 b_size = 150;
- const int64 c_size = 120;
- const int64 d_size = 292;
- const int64 initial_total_size = a_size + b_size + c_size + d_size;
+ const int64_t a_size = 400;
+ const int64_t b_size = 150;
+ const int64_t c_size = 120;
+ const int64_t d_size = 292;
+ const int64_t initial_total_size = a_size + b_size + c_size + d_size;
quota_eviction_handler()->AddOrigin(GURL("http://www.d.com"), d_size);
quota_eviction_handler()->AddOrigin(GURL("http://www.c.com"), c_size);
@@ -333,12 +333,12 @@ TEST_F(QuotaTemporaryStorageEvictorTest, RepeatedEvictionSkippedTest) {
}
TEST_F(QuotaTemporaryStorageEvictorTest, RepeatedEvictionWithAccessOriginTest) {
- const int64 a_size = 400;
- const int64 b_size = 150;
- const int64 c_size = 120;
- const int64 d_size = 292;
- const int64 initial_total_size = a_size + b_size + c_size + d_size;
- const int64 e_size = 275;
+ const int64_t a_size = 400;
+ const int64_t b_size = 150;
+ const int64_t c_size = 120;
+ const int64_t d_size = 292;
+ const int64_t initial_total_size = a_size + b_size + c_size + d_size;
+ const int64_t e_size = 275;
quota_eviction_handler()->AddOrigin(GURL("http://www.d.com"), d_size);
quota_eviction_handler()->AddOrigin(GURL("http://www.c.com"), c_size);
diff --git a/content/browser/quota/storage_monitor_unittest.cc b/content/browser/quota/storage_monitor_unittest.cc
index 0edd49e..002e860 100644
--- a/content/browser/quota/storage_monitor_unittest.cc
+++ b/content/browser/quota/storage_monitor_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 <vector>
#include "base/files/scoped_temp_dir.h"
@@ -72,7 +74,7 @@ class UsageMockQuotaManager : public QuotaManager {
callback_status_(kQuotaStatusOk),
initialized_(false) {}
- void SetCallbackParams(int64 usage, int64 quota, QuotaStatusCode status) {
+ void SetCallbackParams(int64_t usage, int64_t quota, QuotaStatusCode status) {
initialized_ = true;
callback_quota_ = quota;
callback_usage_ = usage;
@@ -97,8 +99,8 @@ class UsageMockQuotaManager : public QuotaManager {
~UsageMockQuotaManager() override {}
private:
- int64 callback_usage_;
- int64 callback_quota_;
+ int64_t callback_usage_;
+ int64_t callback_quota_;
QuotaStatusCode callback_status_;
bool initialized_;
GetUsageAndQuotaCallback delayed_callback_;
@@ -321,8 +323,8 @@ TEST_F(HostStorageObserversTest, InitializeOnUsageChange) {
GURL(kDefaultOrigin),
base::TimeDelta::FromHours(1),
false);
- const int64 kUsage = 324554;
- const int64 kQuota = 234354354;
+ const int64_t kUsage = 324554;
+ const int64_t kQuota = 234354354;
quota_manager_->SetCallbackParams(kUsage, kQuota, kQuotaStatusOk);
MockObserver mock_observer;
@@ -338,7 +340,7 @@ TEST_F(HostStorageObserversTest, InitializeOnUsageChange) {
// Verify that HostStorageObservers handles subsequent usage changes
// correctly.
- const int64 kDelta = 2345;
+ const int64_t kDelta = 2345;
expected_event.usage += kDelta;
SetLastNotificationTime(host_observers, &mock_observer);
host_observers.NotifyUsageChange(params.filter, kDelta);
@@ -349,8 +351,8 @@ TEST_F(HostStorageObserversTest, InitializeOnUsageChange) {
// Verify that HostStorageObservers is initialized after the adding the first
// observer that elected to receive the initial state.
TEST_F(HostStorageObserversTest, InitializeOnObserver) {
- const int64 kUsage = 74387;
- const int64 kQuota = 92834743;
+ const int64_t kUsage = 74387;
+ const int64_t kQuota = 92834743;
quota_manager_->SetCallbackParams(kUsage, kQuota, kQuotaStatusOk);
HostStorageObservers host_observers(quota_manager_.get());
@@ -379,7 +381,7 @@ TEST_F(HostStorageObserversTest, InitializeOnObserver) {
EXPECT_EQ(0, GetRequiredUpdatesCount(host_observers));
// Verify that both observers will receive events after a usage change.
- const int64 kDelta = 2345;
+ const int64_t kDelta = 2345;
expected_event.usage += kDelta;
SetLastNotificationTime(host_observers, &mock_observer2);
host_observers.NotifyUsageChange(params.filter, kDelta);
@@ -407,8 +409,8 @@ TEST_F(HostStorageObserversTest, NegativeUsageAndQuota) {
GURL(kDefaultOrigin),
base::TimeDelta::FromHours(1),
false);
- const int64 kUsage = -324554;
- const int64 kQuota = -234354354;
+ const int64_t kUsage = -324554;
+ const int64_t kQuota = -234354354;
quota_manager_->SetCallbackParams(kUsage, kQuota, kQuotaStatusOk);
MockObserver mock_observer;
@@ -431,8 +433,8 @@ TEST_F(HostStorageObserversTest, RecoverFromBadUsageInit) {
host_observers.AddObserver(&mock_observer, params);
// Set up the quota manager to return an error status.
- const int64 kUsage = 6656;
- const int64 kQuota = 99585556;
+ const int64_t kUsage = 6656;
+ const int64_t kQuota = 99585556;
quota_manager_->SetCallbackParams(kUsage, kQuota, kQuotaErrorNotSupported);
// Verify that |host_observers| is not initialized and an event has not been
@@ -473,9 +475,9 @@ TEST_F(HostStorageObserversTest, AsyncInitialization) {
// Simulate notifying |host_observers| of a usage change before initialization
// is complete.
- const int64 kUsage = 6656;
- const int64 kQuota = 99585556;
- const int64 kDelta = 327643;
+ const int64_t kUsage = 6656;
+ const int64_t kQuota = 99585556;
+ const int64_t kDelta = 327643;
host_observers.NotifyUsageChange(params.filter, kDelta);
EXPECT_EQ(0, mock_observer.EventCount());
EXPECT_FALSE(host_observers.is_initialized());
@@ -613,8 +615,8 @@ TEST_F(StorageMonitorTest, AddObservers) {
// Test dispatching events to storage observers.
TEST_F(StorageMonitorTest, EventDispatch) {
// Verify dispatch of events.
- const int64 kUsage = 5325;
- const int64 kQuota = 903845;
+ const int64_t kUsage = 5325;
+ const int64_t kQuota = 903845;
quota_manager_->SetCallbackParams(kUsage, kQuota, kQuotaStatusOk);
storage_monitor_->NotifyUsageChange(params1_.filter, 9048543);
@@ -675,7 +677,7 @@ class StorageMonitorIntegrationTest : public testing::Test {
// storage observer will receive a storage event.
TEST_F(StorageMonitorIntegrationTest, NotifyUsageEvent) {
const StorageType kTestStorageType = kStorageTypePersistent;
- const int64 kTestUsage = 234743;
+ const int64_t kTestUsage = 234743;
// Register the observer.
StorageObserver::MonitorParams params(kTestStorageType,
diff --git a/content/browser/quota/usage_tracker_unittest.cc b/content/browser/quota/usage_tracker_unittest.cc
index 3cfdf2cb..78d19b2 100644
--- a/content/browser/quota/usage_tracker_unittest.cc
+++ b/content/browser/quota/usage_tracker_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 <stdint.h>
+
#include "base/bind.h"
#include "base/location.h"
+#include "base/macros.h"
#include "base/run_loop.h"
#include "base/single_thread_task_runner.h"
#include "base/thread_task_runner_handle.h"
@@ -25,19 +28,17 @@ namespace content {
namespace {
void DidGetGlobalUsage(bool* done,
- int64* usage_out,
- int64* unlimited_usage_out,
- int64 usage,
- int64 unlimited_usage) {
+ int64_t* usage_out,
+ int64_t* unlimited_usage_out,
+ int64_t usage,
+ int64_t unlimited_usage) {
EXPECT_FALSE(*done);
*done = true;
*usage_out = usage;
*unlimited_usage_out = unlimited_usage;
}
-void DidGetUsage(bool* done,
- int64* usage_out,
- int64 usage) {
+void DidGetUsage(bool* done, int64_t* usage_out, int64_t usage) {
EXPECT_FALSE(*done);
*done = true;
*usage_out = usage;
@@ -58,7 +59,7 @@ class MockQuotaClient : public QuotaClient {
StorageType type,
const GetUsageCallback& callback) override {
EXPECT_EQ(kStorageTypeTemporary, type);
- int64 usage = GetUsage(origin);
+ int64_t usage = GetUsage(origin);
base::ThreadTaskRunnerHandle::Get()->PostTask(FROM_HERE,
base::Bind(callback, usage));
}
@@ -102,23 +103,23 @@ class MockQuotaClient : public QuotaClient {
return type == storage::kStorageTypeTemporary;
}
- int64 GetUsage(const GURL& origin) {
+ int64_t GetUsage(const GURL& origin) {
UsageMap::const_iterator found = usage_map_.find(origin);
if (found == usage_map_.end())
return 0;
return found->second;
}
- void SetUsage(const GURL& origin, int64 usage) {
+ void SetUsage(const GURL& origin, int64_t usage) {
usage_map_[origin] = usage;
}
- int64 UpdateUsage(const GURL& origin, int64 delta) {
+ int64_t UpdateUsage(const GURL& origin, int64_t delta) {
return usage_map_[origin] += delta;
}
private:
- typedef std::map<GURL, int64> UsageMap;
+ typedef std::map<GURL, int64_t> UsageMap;
UsageMap usage_map_;
@@ -139,17 +140,17 @@ class UsageTrackerTest : public testing::Test {
return &usage_tracker_;
}
- void UpdateUsage(const GURL& origin, int64 delta) {
+ void UpdateUsage(const GURL& origin, int64_t delta) {
quota_client_.UpdateUsage(origin, delta);
usage_tracker_.UpdateUsageCache(quota_client_.id(), origin, delta);
base::RunLoop().RunUntilIdle();
}
- void UpdateUsageWithoutNotification(const GURL& origin, int64 delta) {
+ void UpdateUsageWithoutNotification(const GURL& origin, int64_t delta) {
quota_client_.UpdateUsage(origin, delta);
}
- void GetGlobalLimitedUsage(int64* limited_usage) {
+ void GetGlobalLimitedUsage(int64_t* limited_usage) {
bool done = false;
usage_tracker_.GetGlobalLimitedUsage(base::Bind(
&DidGetUsage, &done, limited_usage));
@@ -158,7 +159,7 @@ class UsageTrackerTest : public testing::Test {
EXPECT_TRUE(done);
}
- void GetGlobalUsage(int64* usage, int64* unlimited_usage) {
+ void GetGlobalUsage(int64_t* usage, int64_t* unlimited_usage) {
bool done = false;
usage_tracker_.GetGlobalUsage(base::Bind(
&DidGetGlobalUsage,
@@ -168,7 +169,7 @@ class UsageTrackerTest : public testing::Test {
EXPECT_TRUE(done);
}
- void GetHostUsage(const std::string& host, int64* usage) {
+ void GetHostUsage(const std::string& host, int64_t* usage) {
bool done = false;
usage_tracker_.GetHostUsage(host, base::Bind(&DidGetUsage, &done, usage));
base::RunLoop().RunUntilIdle();
@@ -214,9 +215,9 @@ class UsageTrackerTest : public testing::Test {
};
TEST_F(UsageTrackerTest, GrantAndRevokeUnlimitedStorage) {
- int64 usage = 0;
- int64 unlimited_usage = 0;
- int64 host_usage = 0;
+ int64_t usage = 0;
+ int64_t unlimited_usage = 0;
+ int64_t host_usage = 0;
GetGlobalUsage(&usage, &unlimited_usage);
EXPECT_EQ(0, usage);
EXPECT_EQ(0, unlimited_usage);
@@ -247,9 +248,9 @@ TEST_F(UsageTrackerTest, GrantAndRevokeUnlimitedStorage) {
}
TEST_F(UsageTrackerTest, CacheDisabledClientTest) {
- int64 usage = 0;
- int64 unlimited_usage = 0;
- int64 host_usage = 0;
+ int64_t usage = 0;
+ int64_t unlimited_usage = 0;
+ int64_t host_usage = 0;
const GURL origin("http://example.com");
const std::string host(net::GetHostOrSpecFromURL(origin));
@@ -313,9 +314,9 @@ TEST_F(UsageTrackerTest, LimitedGlobalUsageTest) {
UpdateUsageWithoutNotification(kNonCached, 4);
UpdateUsageWithoutNotification(kNonCachedUnlimited, 8);
- int64 limited_usage = 0;
- int64 total_usage = 0;
- int64 unlimited_usage = 0;
+ int64_t limited_usage = 0;
+ int64_t total_usage = 0;
+ int64_t unlimited_usage = 0;
GetGlobalLimitedUsage(&limited_usage);
GetGlobalUsage(&total_usage, &unlimited_usage);
diff --git a/content/browser/quota_dispatcher_host.cc b/content/browser/quota_dispatcher_host.cc
index 234eb54..8f2043bb 100644
--- a/content/browser/quota_dispatcher_host.cc
+++ b/content/browser/quota_dispatcher_host.cc
@@ -4,6 +4,8 @@
#include "content/browser/quota_dispatcher_host.h"
+#include <stdint.h>
+
#include "base/bind.h"
#include "base/memory/weak_ptr.h"
#include "base/numerics/safe_conversions.h"
@@ -84,8 +86,9 @@ class QuotaDispatcherHost::QueryUsageAndQuotaDispatcher
}
private:
- void DidQueryStorageUsageAndQuota(
- QuotaStatusCode status, int64 usage, int64 quota) {
+ void DidQueryStorageUsageAndQuota(QuotaStatusCode status,
+ int64_t usage,
+ int64_t quota) {
if (!dispatcher_host())
return;
// crbug.com/349708
@@ -117,10 +120,11 @@ class QuotaDispatcherHost::RequestQuotaDispatcher
current_quota_(0),
requested_quota_(0),
weak_factory_(this) {
- // Convert the requested size from uint64 to int64 since the quota backend
- // requires int64 values.
- // TODO(nhiroki): The backend should accept uint64 values.
- requested_quota_ = base::saturated_cast<int64>(params_.requested_size);
+ // Convert the requested size from uint64_t to int64_t since the quota
+ // backend
+ // requires int64_t values.
+ // TODO(nhiroki): The backend should accept uint64_t values.
+ requested_quota_ = base::saturated_cast<int64_t>(params_.requested_size);
}
~RequestQuotaDispatcher() override {}
@@ -146,8 +150,8 @@ class QuotaDispatcherHost::RequestQuotaDispatcher
private:
void DidGetPersistentUsageAndQuota(QuotaStatusCode status,
- int64 usage,
- int64 quota) {
+ int64_t usage,
+ int64_t quota) {
if (!dispatcher_host())
return;
if (status != storage::kQuotaStatusOk) {
@@ -174,8 +178,8 @@ class QuotaDispatcherHost::RequestQuotaDispatcher
}
void DidGetTemporaryUsageAndQuota(QuotaStatusCode status,
- int64 usage,
- int64 quota) {
+ int64_t usage,
+ int64_t quota) {
DidFinish(status, usage, std::min(requested_quota_, quota));
}
@@ -194,13 +198,11 @@ class QuotaDispatcherHost::RequestQuotaDispatcher
base::Bind(&self_type::DidSetHostQuota, weak_factory_.GetWeakPtr()));
}
- void DidSetHostQuota(QuotaStatusCode status, int64 new_quota) {
+ void DidSetHostQuota(QuotaStatusCode status, int64_t new_quota) {
DidFinish(status, current_usage_, new_quota);
}
- void DidFinish(QuotaStatusCode status,
- int64 usage,
- int64 granted_quota) {
+ void DidFinish(QuotaStatusCode status, int64_t usage, int64_t granted_quota) {
if (!dispatcher_host())
return;
DCHECK(dispatcher_host());
@@ -214,9 +216,9 @@ class QuotaDispatcherHost::RequestQuotaDispatcher
}
StorageQuotaParams params_;
- int64 current_usage_;
- int64 current_quota_;
- int64 requested_quota_;
+ int64_t current_usage_;
+ int64_t current_quota_;
+ int64_t requested_quota_;
base::WeakPtrFactory<self_type> weak_factory_;
};
diff --git a/content/browser/quota_dispatcher_host.h b/content/browser/quota_dispatcher_host.h
index 8a30f22..5b8cf87 100644
--- a/content/browser/quota_dispatcher_host.h
+++ b/content/browser/quota_dispatcher_host.h
@@ -5,8 +5,8 @@
#ifndef CONTENT_BROWSER_QUOTA_DISPATCHER_HOST_H_
#define CONTENT_BROWSER_QUOTA_DISPATCHER_HOST_H_
-#include "base/basictypes.h"
#include "base/id_map.h"
+#include "base/macros.h"
#include "content/public/browser/browser_message_filter.h"
#include "storage/common/quota/quota_types.h"
diff --git a/content/browser/resource_context_impl.cc b/content/browser/resource_context_impl.cc
index b99c80d..a4f0303 100644
--- a/content/browser/resource_context_impl.cc
+++ b/content/browser/resource_context_impl.cc
@@ -4,6 +4,8 @@
#include "content/browser/resource_context_impl.h"
+#include <stdint.h>
+
#include "base/logging.h"
#include "content/browser/fileapi/chrome_blob_storage_context.h"
#include "content/browser/loader/resource_dispatcher_host_impl.h"
@@ -59,7 +61,7 @@ scoped_ptr<net::ClientCertStore> ResourceContext::CreateClientCertStore() {
}
void ResourceContext::CreateKeygenHandler(
- uint32 key_size_in_bits,
+ uint32_t key_size_in_bits,
const std::string& challenge_string,
const GURL& url,
const base::Callback<void(scoped_ptr<net::KeygenHandler>)>& callback) {
diff --git a/content/browser/safe_util_win.cc b/content/browser/safe_util_win.cc
index 2a1f18c..820aab5 100644
--- a/content/browser/safe_util_win.cc
+++ b/content/browser/safe_util_win.cc
@@ -9,6 +9,7 @@
#include "base/files/file_path.h"
#include "base/logging.h"
+#include "base/macros.h"
#include "base/strings/string_util.h"
#include "base/strings/utf_string_conversions.h"
#include "base/win/scoped_comptr.h"
diff --git a/content/browser/screen_orientation/screen_orientation_browsertest.cc b/content/browser/screen_orientation/screen_orientation_browsertest.cc
index 2d7445c..6760b23 100644
--- a/content/browser/screen_orientation/screen_orientation_browsertest.cc
+++ b/content/browser/screen_orientation/screen_orientation_browsertest.cc
@@ -5,6 +5,8 @@
#include <stdlib.h>
#include "base/command_line.h"
+#include "base/macros.h"
+#include "build/build_config.h"
#include "content/browser/renderer_host/render_widget_host_impl.h"
#include "content/common/view_messages.h"
#include "content/public/browser/render_widget_host.h"
diff --git a/content/browser/screen_orientation/screen_orientation_dispatcher_host_impl.h b/content/browser/screen_orientation/screen_orientation_dispatcher_host_impl.h
index 1b90f77..972a42d 100644
--- a/content/browser/screen_orientation/screen_orientation_dispatcher_host_impl.h
+++ b/content/browser/screen_orientation/screen_orientation_dispatcher_host_impl.h
@@ -5,6 +5,7 @@
#ifndef CONTENT_BROWSER_SCREEN_ORIENTATION_SCREEN_ORIENTATION_DISPATCHER_HOST_IMPL_H_
#define CONTENT_BROWSER_SCREEN_ORIENTATION_SCREEN_ORIENTATION_DISPATCHER_HOST_IMPL_H_
+#include "base/macros.h"
#include "content/public/browser/screen_orientation_dispatcher_host.h"
#include "content/public/browser/web_contents_observer.h"
#include "third_party/WebKit/public/platform/modules/screen_orientation/WebLockOrientationError.h"
diff --git a/content/browser/screen_orientation/screen_orientation_message_filter_android.h b/content/browser/screen_orientation/screen_orientation_message_filter_android.h
index 9d85fe6..be506f3 100644
--- a/content/browser/screen_orientation/screen_orientation_message_filter_android.h
+++ b/content/browser/screen_orientation/screen_orientation_message_filter_android.h
@@ -5,6 +5,7 @@
#ifndef CONTENT_BROWSER_SCREEN_ORIENTATION_SCREEN_ORIENTATION_MESSAGE_FILTER_ANDROID_H_
#define CONTENT_BROWSER_SCREEN_ORIENTATION_SCREEN_ORIENTATION_MESSAGE_FILTER_ANDROID_H_
+#include "base/macros.h"
#include "content/public/browser/browser_message_filter.h"
namespace content {
diff --git a/content/browser/security_exploit_browsertest.cc b/content/browser/security_exploit_browsertest.cc
index c39bfa2..c515609 100644
--- a/content/browser/security_exploit_browsertest.cc
+++ b/content/browser/security_exploit_browsertest.cc
@@ -2,9 +2,13 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include <stdint.h>
+
#include "base/command_line.h"
#include "base/containers/hash_tables.h"
+#include "base/macros.h"
#include "base/strings/utf_string_conversions.h"
+#include "build/build_config.h"
#include "content/browser/dom_storage/dom_storage_context_wrapper.h"
#include "content/browser/dom_storage/session_storage_namespace_impl.h"
#include "content/browser/frame_host/navigator.h"
diff --git a/content/browser/shared_worker/shared_worker_host.h b/content/browser/shared_worker/shared_worker_host.h
index a73cb18..9fb9ca3 100644
--- a/content/browser/shared_worker/shared_worker_host.h
+++ b/content/browser/shared_worker/shared_worker_host.h
@@ -8,6 +8,7 @@
#include <list>
#include <vector>
+#include "base/macros.h"
#include "base/memory/scoped_ptr.h"
#include "base/memory/weak_ptr.h"
#include "base/strings/string16.h"
diff --git a/content/browser/shared_worker/shared_worker_instance.h b/content/browser/shared_worker/shared_worker_instance.h
index f3b3be6..025da9b 100644
--- a/content/browser/shared_worker/shared_worker_instance.h
+++ b/content/browser/shared_worker/shared_worker_instance.h
@@ -7,7 +7,6 @@
#include <string>
-#include "base/basictypes.h"
#include "content/browser/shared_worker/worker_storage_partition.h"
#include "content/common/content_export.h"
#include "third_party/WebKit/public/web/WebContentSecurityPolicy.h"
diff --git a/content/browser/shared_worker/shared_worker_instance_unittest.cc b/content/browser/shared_worker/shared_worker_instance_unittest.cc
index 8991b05..c78cb1f 100644
--- a/content/browser/shared_worker/shared_worker_instance_unittest.cc
+++ b/content/browser/shared_worker/shared_worker_instance_unittest.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "base/basictypes.h"
+#include "base/macros.h"
#include "base/memory/scoped_ptr.h"
#include "base/strings/string16.h"
#include "base/strings/utf_string_conversions.h"
diff --git a/content/browser/shared_worker/shared_worker_message_filter.cc b/content/browser/shared_worker/shared_worker_message_filter.cc
index ebf79ff..53f04ba 100644
--- a/content/browser/shared_worker/shared_worker_message_filter.cc
+++ b/content/browser/shared_worker/shared_worker_message_filter.cc
@@ -4,6 +4,9 @@
#include "content/browser/shared_worker/shared_worker_message_filter.h"
+#include <stdint.h>
+
+#include "base/macros.h"
#include "content/browser/message_port_message_filter.h"
#include "content/browser/shared_worker/shared_worker_service_impl.h"
#include "content/common/devtools_messages.h"
@@ -13,9 +16,8 @@
namespace content {
namespace {
-const uint32 kFilteredMessageClasses[] = {
- ViewMsgStart,
- WorkerMsgStart,
+const uint32_t kFilteredMessageClasses[] = {
+ ViewMsgStart, WorkerMsgStart,
};
} // namespace
diff --git a/content/browser/shared_worker/shared_worker_message_filter.h b/content/browser/shared_worker/shared_worker_message_filter.h
index b5f54e5..da0d32c 100644
--- a/content/browser/shared_worker/shared_worker_message_filter.h
+++ b/content/browser/shared_worker/shared_worker_message_filter.h
@@ -5,6 +5,7 @@
#ifndef CONTENT_BROWSER_SHARED_WORKER_SHARED_WORKER_MESSAGE_FILTER_H_
#define CONTENT_BROWSER_SHARED_WORKER_SHARED_WORKER_MESSAGE_FILTER_H_
+#include "base/macros.h"
#include "content/browser/shared_worker/worker_storage_partition.h"
#include "content/common/content_export.h"
#include "content/public/browser/browser_message_filter.h"
diff --git a/content/browser/shared_worker/shared_worker_service_impl.cc b/content/browser/shared_worker/shared_worker_service_impl.cc
index 91579b4..400541a 100644
--- a/content/browser/shared_worker/shared_worker_service_impl.cc
+++ b/content/browser/shared_worker/shared_worker_service_impl.cc
@@ -4,12 +4,15 @@
#include "content/browser/shared_worker/shared_worker_service_impl.h"
+#include <stddef.h>
+
#include <algorithm>
#include <iterator>
#include <set>
#include <vector>
#include "base/callback.h"
+#include "base/macros.h"
#include "base/memory/ref_counted.h"
#include "content/browser/devtools/shared_worker_devtools_manager.h"
#include "content/browser/renderer_host/render_process_host_impl.h"
diff --git a/content/browser/shared_worker/shared_worker_service_impl.h b/content/browser/shared_worker/shared_worker_service_impl.h
index aae153d..7b6bf85 100644
--- a/content/browser/shared_worker/shared_worker_service_impl.h
+++ b/content/browser/shared_worker/shared_worker_service_impl.h
@@ -9,6 +9,7 @@
#include "base/compiler_specific.h"
#include "base/containers/scoped_ptr_hash_map.h"
+#include "base/macros.h"
#include "base/memory/singleton.h"
#include "base/observer_list.h"
#include "content/public/browser/notification_observer.h"
diff --git a/content/browser/shared_worker/shared_worker_service_impl_unittest.cc b/content/browser/shared_worker/shared_worker_service_impl_unittest.cc
index 332490a..f2f3015 100644
--- a/content/browser/shared_worker/shared_worker_service_impl_unittest.cc
+++ b/content/browser/shared_worker/shared_worker_service_impl_unittest.cc
@@ -2,12 +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 <map>
#include <set>
#include <vector>
#include "base/atomic_sequence_num.h"
-#include "base/basictypes.h"
+#include "base/macros.h"
#include "base/memory/scoped_ptr.h"
#include "base/memory/scoped_vector.h"
#include "base/strings/string16.h"
diff --git a/content/browser/shared_worker/worker_browsertest.cc b/content/browser/shared_worker/worker_browsertest.cc
index c88be69..553d129 100644
--- a/content/browser/shared_worker/worker_browsertest.cc
+++ b/content/browser/shared_worker/worker_browsertest.cc
@@ -10,6 +10,7 @@
#include "base/strings/utf_string_conversions.h"
#include "base/sys_info.h"
#include "base/test/test_timeouts.h"
+#include "build/build_config.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/client_certificate_delegate.h"
#include "content/public/common/content_paths.h"
diff --git a/content/browser/shared_worker/worker_document_set.h b/content/browser/shared_worker/worker_document_set.h
index 54ae9e9..e7ed277 100644
--- a/content/browser/shared_worker/worker_document_set.h
+++ b/content/browser/shared_worker/worker_document_set.h
@@ -7,7 +7,6 @@
#include <set>
-#include "base/basictypes.h"
#include "base/memory/ref_counted.h"
namespace content {
diff --git a/content/browser/signed_certificate_timestamp_store_impl.h b/content/browser/signed_certificate_timestamp_store_impl.h
index 3b66970..099cf7a 100644
--- a/content/browser/signed_certificate_timestamp_store_impl.h
+++ b/content/browser/signed_certificate_timestamp_store_impl.h
@@ -5,6 +5,7 @@
#ifndef CONTENT_BROWSER_SIGNED_CERTIFICATE_TIMESTAMP_STORE_IMPL_H_
#define CONTENT_BROWSER_SIGNED_CERTIFICATE_TIMESTAMP_STORE_IMPL_H_
+#include "base/macros.h"
#include "content/browser/renderer_data_memoizing_store.h"
#include "content/public/browser/signed_certificate_timestamp_store.h"
#include "net/cert/signed_certificate_timestamp.h"
diff --git a/content/browser/site_instance_impl.cc b/content/browser/site_instance_impl.cc
index 46751c2..7f659c3 100644
--- a/content/browser/site_instance_impl.cc
+++ b/content/browser/site_instance_impl.cc
@@ -20,7 +20,7 @@ namespace content {
const RenderProcessHostFactory*
SiteInstanceImpl::g_render_process_host_factory_ = NULL;
-int32 SiteInstanceImpl::next_site_instance_id_ = 1;
+int32_t SiteInstanceImpl::next_site_instance_id_ = 1;
SiteInstanceImpl::SiteInstanceImpl(BrowsingInstance* browsing_instance)
: id_(next_site_instance_id_++),
@@ -45,7 +45,7 @@ SiteInstanceImpl::~SiteInstanceImpl() {
static_cast<SiteInstance*>(this));
}
-int32 SiteInstanceImpl::GetId() {
+int32_t SiteInstanceImpl::GetId() {
return id_;
}
diff --git a/content/browser/site_instance_impl.h b/content/browser/site_instance_impl.h
index 152c3f1..6a60e93 100644
--- a/content/browser/site_instance_impl.h
+++ b/content/browser/site_instance_impl.h
@@ -5,6 +5,10 @@
#ifndef CONTENT_BROWSER_SITE_INSTANCE_IMPL_H_
#define CONTENT_BROWSER_SITE_INSTANCE_IMPL_H_
+#include <stddef.h>
+#include <stdint.h>
+
+#include "base/macros.h"
#include "content/browser/renderer_host/render_process_host_impl.h"
#include "content/common/content_export.h"
#include "content/public/browser/render_process_host_observer.h"
@@ -19,7 +23,7 @@ class CONTENT_EXPORT SiteInstanceImpl : public SiteInstance,
public RenderProcessHostObserver {
public:
// SiteInstance interface overrides.
- int32 GetId() override;
+ int32_t GetId() override;
bool HasProcess() const override;
RenderProcessHost* GetProcess() override;
BrowserContext* GetBrowserContext() const override;
@@ -117,10 +121,10 @@ class CONTENT_EXPORT SiteInstanceImpl : public SiteInstance,
static const RenderProcessHostFactory* g_render_process_host_factory_;
// The next available SiteInstance ID.
- static int32 next_site_instance_id_;
+ static int32_t next_site_instance_id_;
// A unique ID for this SiteInstance.
- int32 id_;
+ int32_t id_;
// The number of active frames in this SiteInstance.
size_t active_frame_count_;
diff --git a/content/browser/site_instance_impl_unittest.cc b/content/browser/site_instance_impl_unittest.cc
index e37b410..b632d74 100644
--- a/content/browser/site_instance_impl_unittest.cc
+++ b/content/browser/site_instance_impl_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/compiler_specific.h"
#include "base/memory/scoped_vector.h"
diff --git a/content/browser/site_per_process_browsertest.cc b/content/browser/site_per_process_browsertest.cc
index 7a2ab8a..9d2a95b 100644
--- a/content/browser/site_per_process_browsertest.cc
+++ b/content/browser/site_per_process_browsertest.cc
@@ -4,17 +4,22 @@
#include "content/browser/site_per_process_browsertest.h"
+#include <stddef.h>
+#include <stdint.h>
+
#include <algorithm>
#include <vector>
#include "base/command_line.h"
#include "base/location.h"
+#include "base/macros.h"
#include "base/single_thread_task_runner.h"
#include "base/strings/pattern.h"
#include "base/strings/stringprintf.h"
#include "base/strings/utf_string_conversions.h"
#include "base/test/test_timeouts.h"
#include "base/thread_task_runner_handle.h"
+#include "build/build_config.h"
#include "content/browser/frame_host/cross_process_frame_connector.h"
#include "content/browser/frame_host/frame_tree.h"
#include "content/browser/frame_host/navigator.h"
@@ -451,9 +456,9 @@ class ConsoleObserverDelegate : public WebContentsDelegate {
~ConsoleObserverDelegate() override {}
bool AddMessageToConsole(WebContents* source,
- int32 level,
+ int32_t level,
const base::string16& message,
- int32 line_no,
+ int32_t line_no,
const base::string16& source_id) override;
std::string message() { return message_; }
@@ -477,9 +482,9 @@ void ConsoleObserverDelegate::Wait() {
bool ConsoleObserverDelegate::AddMessageToConsole(
WebContents* source,
- int32 level,
+ int32_t level,
const base::string16& message,
- int32 line_no,
+ int32_t line_no,
const base::string16& source_id) {
DCHECK(source == web_contents_);
diff --git a/content/browser/speech/audio_buffer.cc b/content/browser/speech/audio_buffer.cc
index 823fff5..1038ac9 100644
--- a/content/browser/speech/audio_buffer.cc
+++ b/content/browser/speech/audio_buffer.cc
@@ -17,7 +17,7 @@ AudioChunk::AudioChunk(size_t length, int bytes_per_sample)
DCHECK_EQ(length % bytes_per_sample, 0U);
}
-AudioChunk::AudioChunk(const uint8* data, size_t length, int bytes_per_sample)
+AudioChunk::AudioChunk(const uint8_t* data, size_t length, int bytes_per_sample)
: data_string_(reinterpret_cast<const char*>(data), length),
bytes_per_sample_(bytes_per_sample) {
DCHECK_EQ(length % bytes_per_sample, 0U);
@@ -35,13 +35,13 @@ const std::string& AudioChunk::AsString() const {
return data_string_;
}
-int16 AudioChunk::GetSample16(size_t index) const {
- DCHECK(index < (data_string_.size() / sizeof(int16)));
+int16_t AudioChunk::GetSample16(size_t index) const {
+ DCHECK(index < (data_string_.size() / sizeof(int16_t)));
return SamplesData16()[index];
}
-const int16* AudioChunk::SamplesData16() const {
- return reinterpret_cast<const int16*>(data_string_.data());
+const int16_t* AudioChunk::SamplesData16() const {
+ return reinterpret_cast<const int16_t*>(data_string_.data());
}
AudioBuffer::AudioBuffer(int bytes_per_sample)
@@ -55,7 +55,7 @@ AudioBuffer::~AudioBuffer() {
Clear();
}
-void AudioBuffer::Enqueue(const uint8* data, size_t length) {
+void AudioBuffer::Enqueue(const uint8_t* data, size_t length) {
chunks_.push_back(new AudioChunk(data, length, bytes_per_sample_));
}
@@ -76,7 +76,7 @@ scoped_refptr<AudioChunk> AudioBuffer::DequeueAll() {
}
scoped_refptr<AudioChunk> chunk(
new AudioChunk(resulting_length, bytes_per_sample_));
- uint8* dest = chunk->writable_data();
+ uint8_t* dest = chunk->writable_data();
for (it = chunks_.begin(); it != chunks_.end(); ++it) {
memcpy(dest, (*it)->AsString().data(), (*it)->AsString().length());
dest += (*it)->AsString().length();
diff --git a/content/browser/speech/audio_buffer.h b/content/browser/speech/audio_buffer.h
index 7b0fd7e..d941543 100644
--- a/content/browser/speech/audio_buffer.h
+++ b/content/browser/speech/audio_buffer.h
@@ -5,10 +5,13 @@
#ifndef CONTENT_BROWSER_SPEECH_AUDIO_BUFFER_H_
#define CONTENT_BROWSER_SPEECH_AUDIO_BUFFER_H_
+#include <stddef.h>
+#include <stdint.h>
+
#include <deque>
#include <string>
-#include "base/basictypes.h"
+#include "base/macros.h"
#include "base/memory/ref_counted.h"
#include "content/common/content_export.h"
@@ -21,15 +24,17 @@ class CONTENT_EXPORT AudioChunk :
explicit AudioChunk(int bytes_per_sample);
// Creates a chunk of |length| bytes, initialized to zeros.
AudioChunk(size_t length, int bytes_per_sample);
- AudioChunk(const uint8* data, size_t length, int bytes_per_sample);
+ AudioChunk(const uint8_t* data, size_t length, int bytes_per_sample);
bool IsEmpty() const;
int bytes_per_sample() const { return bytes_per_sample_; }
size_t NumSamples() const;
const std::string& AsString() const;
- int16 GetSample16(size_t index) const;
- const int16* SamplesData16() const;
- uint8* writable_data() { return reinterpret_cast<uint8*>(&data_string_[0]); }
+ int16_t GetSample16(size_t index) const;
+ const int16_t* SamplesData16() const;
+ uint8_t* writable_data() {
+ return reinterpret_cast<uint8_t*>(&data_string_[0]);
+ }
private:
friend class base::RefCountedThreadSafe<AudioChunk>;
@@ -49,7 +54,7 @@ class AudioBuffer {
~AudioBuffer();
// Enqueues a copy of |length| bytes of |data| buffer.
- void Enqueue(const uint8* data, size_t length);
+ void Enqueue(const uint8_t* data, size_t length);
// Dequeues, in FIFO order, a single chunk respecting the length of the
// corresponding Enqueue call (in a nutshell: multiple Enqueue calls followed
diff --git a/content/browser/speech/audio_encoder.cc b/content/browser/speech/audio_encoder.cc
index eccd671..e4473a0 100644
--- a/content/browser/speech/audio_encoder.cc
+++ b/content/browser/speech/audio_encoder.cc
@@ -4,6 +4,8 @@
#include "content/browser/speech/audio_encoder.h"
+#include <stddef.h>
+
#include "base/logging.h"
#include "base/memory/scoped_ptr.h"
#include "base/strings/string_number_conversions.h"
diff --git a/content/browser/speech/chunked_byte_buffer.cc b/content/browser/speech/chunked_byte_buffer.cc
index 5fcf5d1..7ae9f46 100644
--- a/content/browser/speech/chunked_byte_buffer.cc
+++ b/content/browser/speech/chunked_byte_buffer.cc
@@ -6,22 +6,21 @@
#include <algorithm>
-#include "base/basictypes.h"
#include "base/lazy_instance.h"
#include "base/logging.h"
namespace {
-static const size_t kHeaderLength = sizeof(uint32);
+static const size_t kHeaderLength = sizeof(uint32_t);
static_assert(sizeof(size_t) >= kHeaderLength,
"chunked byte buffer not supported on this architecture");
-uint32 ReadBigEndian32(const uint8* buffer) {
- return (static_cast<uint32>(buffer[3])) |
- (static_cast<uint32>(buffer[2]) << 8) |
- (static_cast<uint32>(buffer[1]) << 16) |
- (static_cast<uint32>(buffer[0]) << 24);
+uint32_t ReadBigEndian32(const uint8_t* buffer) {
+ return (static_cast<uint32_t>(buffer[3])) |
+ (static_cast<uint32_t>(buffer[2]) << 8) |
+ (static_cast<uint32_t>(buffer[1]) << 16) |
+ (static_cast<uint32_t>(buffer[0]) << 24);
}
} // namespace
@@ -37,16 +36,16 @@ ChunkedByteBuffer::~ChunkedByteBuffer() {
Clear();
}
-void ChunkedByteBuffer::Append(const uint8* start, size_t length) {
+void ChunkedByteBuffer::Append(const uint8_t* start, size_t length) {
size_t remaining_bytes = length;
- const uint8* next_data = start;
+ const uint8_t* next_data = start;
while (remaining_bytes > 0) {
DCHECK(partial_chunk_ != NULL);
size_t insert_length = 0;
bool header_completed = false;
bool content_completed = false;
- std::vector<uint8>* insert_target;
+ std::vector<uint8_t>* insert_target;
if (partial_chunk_->header.size() < kHeaderLength) {
const size_t bytes_to_complete_header =
@@ -96,16 +95,16 @@ void ChunkedByteBuffer::Append(const uint8* start, size_t length) {
}
void ChunkedByteBuffer::Append(const std::string& string) {
- Append(reinterpret_cast<const uint8*>(string.data()), string.size());
+ Append(reinterpret_cast<const uint8_t*>(string.data()), string.size());
}
bool ChunkedByteBuffer::HasChunks() const {
return !chunks_.empty();
}
-scoped_ptr< std::vector<uint8> > ChunkedByteBuffer::PopChunk() {
+scoped_ptr<std::vector<uint8_t>> ChunkedByteBuffer::PopChunk() {
if (chunks_.empty())
- return scoped_ptr< std::vector<uint8> >();
+ return scoped_ptr<std::vector<uint8_t>>();
scoped_ptr<Chunk> chunk(*chunks_.begin());
chunks_.weak_erase(chunks_.begin());
DCHECK_EQ(chunk->header.size(), kHeaderLength);
@@ -121,9 +120,7 @@ void ChunkedByteBuffer::Clear() {
total_bytes_stored_ = 0;
}
-ChunkedByteBuffer::Chunk::Chunk()
- : content(new std::vector<uint8>()) {
-}
+ChunkedByteBuffer::Chunk::Chunk() : content(new std::vector<uint8_t>()) {}
ChunkedByteBuffer::Chunk::~Chunk() {
}
diff --git a/content/browser/speech/chunked_byte_buffer.h b/content/browser/speech/chunked_byte_buffer.h
index 8b9d237..82e576c 100644
--- a/content/browser/speech/chunked_byte_buffer.h
+++ b/content/browser/speech/chunked_byte_buffer.h
@@ -5,10 +5,13 @@
#ifndef CONTENT_BROWSER_SPEECH_CHUNKED_BYTE_BUFFER_H_
#define CONTENT_BROWSER_SPEECH_CHUNKED_BYTE_BUFFER_H_
+#include <stddef.h>
+#include <stdint.h>
+
#include <string>
#include <vector>
-#include "base/basictypes.h"
+#include "base/macros.h"
#include "base/memory/scoped_ptr.h"
#include "base/memory/scoped_vector.h"
#include "content/common/content_export.h"
@@ -31,7 +34,7 @@ class CONTENT_EXPORT ChunkedByteBuffer {
~ChunkedByteBuffer();
// Appends |length| bytes starting from |start| to the buffer.
- void Append(const uint8* start, size_t length);
+ void Append(const uint8_t* start, size_t length);
// Appends bytes contained in the |string| to the buffer.
void Append(const std::string& string);
@@ -41,7 +44,7 @@ class CONTENT_EXPORT ChunkedByteBuffer {
// If enough data is available, reads and removes the first complete chunk
// from the buffer. Returns a NULL pointer if no complete chunk is available.
- scoped_ptr< std::vector<uint8> > PopChunk();
+ scoped_ptr<std::vector<uint8_t>> PopChunk();
// Clears all the content of the buffer.
void Clear();
@@ -54,8 +57,8 @@ class CONTENT_EXPORT ChunkedByteBuffer {
Chunk();
~Chunk();
- std::vector<uint8> header;
- scoped_ptr< std::vector<uint8> > content;
+ std::vector<uint8_t> header;
+ scoped_ptr<std::vector<uint8_t>> content;
size_t ExpectedContentLength() const;
private:
diff --git a/content/browser/speech/chunked_byte_buffer_unittest.cc b/content/browser/speech/chunked_byte_buffer_unittest.cc
index 57fdf4c..5691975 100644
--- a/content/browser/speech/chunked_byte_buffer_unittest.cc
+++ b/content/browser/speech/chunked_byte_buffer_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 <string>
#include <vector>
@@ -10,15 +12,15 @@
namespace content {
-typedef std::vector<uint8> ByteVector;
+typedef std::vector<uint8_t> ByteVector;
TEST(ChunkedByteBufferTest, BasicTest) {
ChunkedByteBuffer buffer;
- const uint8 kChunks[] = {
+ const uint8_t kChunks[] = {
0x00, 0x00, 0x00, 0x04, 0x01, 0x02, 0x03, 0x04, // Chunk 1: 4 bytes
- 0x00, 0x00, 0x00, 0x02, 0x05, 0x06, // Chunk 2: 2 bytes
- 0x00, 0x00, 0x00, 0x01, 0x07 // Chunk 3: 1 bytes
+ 0x00, 0x00, 0x00, 0x02, 0x05, 0x06, // Chunk 2: 2 bytes
+ 0x00, 0x00, 0x00, 0x01, 0x07 // Chunk 3: 1 bytes
};
EXPECT_EQ(0U, buffer.GetTotalLength());
@@ -44,9 +46,8 @@ TEST(ChunkedByteBufferTest, BasicTest) {
chunk = buffer.PopChunk();
EXPECT_TRUE(chunk != NULL);
EXPECT_EQ(4U, chunk->size());
- EXPECT_EQ(0, std::char_traits<uint8>::compare(kChunks + 4,
- &(*chunk)[0],
- chunk->size()));
+ EXPECT_EQ(0, std::char_traits<uint8_t>::compare(kChunks + 4, &(*chunk)[0],
+ chunk->size()));
EXPECT_EQ(6U, buffer.GetTotalLength());
EXPECT_TRUE(buffer.HasChunks());
@@ -54,9 +55,8 @@ TEST(ChunkedByteBufferTest, BasicTest) {
chunk = buffer.PopChunk();
EXPECT_TRUE(chunk != NULL);
EXPECT_EQ(2U, chunk->size());
- EXPECT_EQ(0, std::char_traits<uint8>::compare(kChunks + 12,
- &(*chunk)[0],
- chunk->size()));
+ EXPECT_EQ(0, std::char_traits<uint8_t>::compare(kChunks + 12, &(*chunk)[0],
+ chunk->size()));
EXPECT_EQ(0U, buffer.GetTotalLength());
EXPECT_FALSE(buffer.HasChunks());
diff --git a/content/browser/speech/endpointer/endpointer.cc b/content/browser/speech/endpointer/endpointer.cc
index 5ed48ca..1758970 100644
--- a/content/browser/speech/endpointer/endpointer.cc
+++ b/content/browser/speech/endpointer/endpointer.cc
@@ -26,9 +26,9 @@ Endpointer::Endpointer(int sample_rate)
frame_size_ = static_cast<int>(sample_rate / static_cast<float>(kFrameRate));
speech_input_minimum_length_us_ =
- static_cast<int64>(1.7 * Time::kMicrosecondsPerSecond);
+ static_cast<int64_t>(1.7 * Time::kMicrosecondsPerSecond);
speech_input_complete_silence_length_us_ =
- static_cast<int64>(0.5 * Time::kMicrosecondsPerSecond);
+ static_cast<int64_t>(0.5 * Time::kMicrosecondsPerSecond);
long_speech_input_complete_silence_length_us_ = -1;
long_speech_length_us_ = -1;
speech_input_possibly_complete_silence_length_us_ =
@@ -85,12 +85,12 @@ void Endpointer::SetUserInputMode() {
energy_endpointer_.SetUserInputMode();
}
-EpStatus Endpointer::Status(int64 *time) {
+EpStatus Endpointer::Status(int64_t* time) {
return energy_endpointer_.Status(time);
}
EpStatus Endpointer::ProcessAudio(const AudioChunk& raw_audio, float* rms_out) {
- const int16* audio_data = raw_audio.SamplesData16();
+ const int16_t* audio_data = raw_audio.SamplesData16();
const int num_samples = raw_audio.NumSamples();
EpStatus ep_status = EP_PRE_SPEECH;
@@ -109,7 +109,7 @@ EpStatus Endpointer::ProcessAudio(const AudioChunk& raw_audio, float* rms_out) {
sample_rate_;
// Get the status of the endpointer.
- int64 ep_time;
+ int64_t ep_time;
ep_status = energy_endpointer_.Status(&ep_time);
// Handle state changes.
@@ -144,7 +144,7 @@ EpStatus Endpointer::ProcessAudio(const AudioChunk& raw_audio, float* rms_out) {
bool has_stepped_silence =
(long_speech_length_us_ > 0) &&
(long_speech_input_complete_silence_length_us_ > 0);
- int64 requested_silence_length;
+ int64_t requested_silence_length;
if (has_stepped_silence &&
(ep_time - speech_start_time_us_) > long_speech_length_us_) {
requested_silence_length =
diff --git a/content/browser/speech/endpointer/endpointer.h b/content/browser/speech/endpointer/endpointer.h
index 6688ee6..5790672 100644
--- a/content/browser/speech/endpointer/endpointer.h
+++ b/content/browser/speech/endpointer/endpointer.h
@@ -5,7 +5,8 @@
#ifndef CONTENT_BROWSER_SPEECH_ENDPOINTER_ENDPOINTER_H_
#define CONTENT_BROWSER_SPEECH_ENDPOINTER_ENDPOINTER_H_
-#include "base/basictypes.h"
+#include <stdint.h>
+
#include "content/browser/speech/endpointer/energy_endpointer.h"
#include "content/common/content_export.h"
@@ -66,7 +67,7 @@ class CONTENT_EXPORT Endpointer {
EpStatus ProcessAudio(const AudioChunk& raw_audio, float* rms_out);
// Get the status of the endpointer.
- EpStatus Status(int64 *time_us);
+ EpStatus Status(int64_t* time_us);
// Returns true if the endpointer detected reasonable audio levels above
// background noise which could be user speech, false if not.
@@ -78,19 +79,19 @@ class CONTENT_EXPORT Endpointer {
return energy_endpointer_.estimating_environment();
}
- void set_speech_input_complete_silence_length(int64 time_us) {
+ void set_speech_input_complete_silence_length(int64_t time_us) {
speech_input_complete_silence_length_us_ = time_us;
}
- void set_long_speech_input_complete_silence_length(int64 time_us) {
+ void set_long_speech_input_complete_silence_length(int64_t time_us) {
long_speech_input_complete_silence_length_us_ = time_us;
}
- void set_speech_input_possibly_complete_silence_length(int64 time_us) {
+ void set_speech_input_possibly_complete_silence_length(int64_t time_us) {
speech_input_possibly_complete_silence_length_us_ = time_us;
}
- void set_long_speech_length(int64 time_us) {
+ void set_long_speech_length(int64_t time_us) {
long_speech_length_us_ = time_us;
}
@@ -107,37 +108,37 @@ class CONTENT_EXPORT Endpointer {
void Reset();
// Minimum allowable length of speech input.
- int64 speech_input_minimum_length_us_;
+ int64_t speech_input_minimum_length_us_;
// The speechInputPossiblyComplete event signals that silence/noise has been
// detected for a *short* amount of time after some speech has been detected.
// This proporty specifies the time period.
- int64 speech_input_possibly_complete_silence_length_us_;
+ int64_t speech_input_possibly_complete_silence_length_us_;
// The speechInputComplete event signals that silence/noise has been
// detected for a *long* amount of time after some speech has been detected.
// This property specifies the time period.
- int64 speech_input_complete_silence_length_us_;
+ int64_t speech_input_complete_silence_length_us_;
// Same as above, this specifies the required silence period after speech
// detection. This period is used instead of
// speech_input_complete_silence_length_ when the utterance is longer than
// long_speech_length_. This parameter is optional.
- int64 long_speech_input_complete_silence_length_us_;
+ int64_t long_speech_input_complete_silence_length_us_;
// The period of time after which the endpointer should consider
// long_speech_input_complete_silence_length_ as a valid silence period
// instead of speech_input_complete_silence_length_. This parameter is
// optional.
- int64 long_speech_length_us_;
+ int64_t long_speech_length_us_;
// First speech onset time, used in determination of speech complete timeout.
- int64 speech_start_time_us_;
+ int64_t speech_start_time_us_;
// Most recent end time, used in determination of speech complete timeout.
- int64 speech_end_time_us_;
+ int64_t speech_end_time_us_;
- int64 audio_frame_time_us_;
+ int64_t audio_frame_time_us_;
EpStatus old_ep_status_;
bool waiting_for_speech_possibly_complete_timeout_;
bool waiting_for_speech_complete_timeout_;
@@ -145,7 +146,7 @@ class CONTENT_EXPORT Endpointer {
bool speech_input_complete_;
EnergyEndpointer energy_endpointer_;
int sample_rate_;
- int32 frame_size_;
+ int32_t frame_size_;
};
} // namespace content
diff --git a/content/browser/speech/endpointer/endpointer_unittest.cc b/content/browser/speech/endpointer/endpointer_unittest.cc
index c65a7c9..53ec4d1 100644
--- a/content/browser/speech/endpointer/endpointer_unittest.cc
+++ b/content/browser/speech/endpointer/endpointer_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 "content/browser/speech/audio_buffer.h"
#include "content/browser/speech/endpointer/endpointer.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -21,11 +23,13 @@ namespace content {
class FrameProcessor {
public:
// Process a single frame of test audio samples.
- virtual EpStatus ProcessFrame(int64 time, int16* samples, int frame_size) = 0;
+ virtual EpStatus ProcessFrame(int64_t time,
+ int16_t* samples,
+ int frame_size) = 0;
};
void RunEndpointerEventsTest(FrameProcessor* processor) {
- int16 samples[kFrameSize];
+ int16_t samples[kFrameSize];
// We will create a white noise signal of 150 frames. The frames from 50 to
// 100 will have more power, and the endpointer should fire on those frames.
@@ -34,7 +38,7 @@ void RunEndpointerEventsTest(FrameProcessor* processor) {
// Create a random sequence of samples.
srand(1);
float gain = 0.0;
- int64 time = 0;
+ int64_t time = 0;
for (int frame_count = 0; frame_count < kNumFrames; ++frame_count) {
// The frames from 50 to 100 will have more power, and the endpointer
// should detect those frames as speech.
@@ -47,11 +51,11 @@ void RunEndpointerEventsTest(FrameProcessor* processor) {
for (int i = 0; i < kFrameSize; ++i) {
float randNum = static_cast<float>(rand() - (RAND_MAX / 2)) /
static_cast<float>(RAND_MAX);
- samples[i] = static_cast<int16>(gain * randNum);
+ samples[i] = static_cast<int16_t>(gain * randNum);
}
EpStatus ep_status = processor->ProcessFrame(time, samples, kFrameSize);
- time += static_cast<int64>(kFrameSize * (1e6 / kSampleRate));
+ time += static_cast<int64_t>(kFrameSize * (1e6 / kSampleRate));
// Log the status.
if (20 == frame_count)
@@ -73,9 +77,11 @@ class EnergyEndpointerFrameProcessor : public FrameProcessor {
explicit EnergyEndpointerFrameProcessor(EnergyEndpointer* endpointer)
: endpointer_(endpointer) {}
- EpStatus ProcessFrame(int64 time, int16* samples, int frame_size) override {
+ EpStatus ProcessFrame(int64_t time,
+ int16_t* samples,
+ int frame_size) override {
endpointer_->ProcessAudioFrame(time, samples, kFrameSize, NULL);
- int64 ep_time;
+ int64_t ep_time;
return endpointer_->Status(&ep_time);
}
@@ -116,11 +122,13 @@ class EndpointerFrameProcessor : public FrameProcessor {
explicit EndpointerFrameProcessor(Endpointer* endpointer)
: endpointer_(endpointer) {}
- EpStatus ProcessFrame(int64 time, int16* samples, int frame_size) override {
+ EpStatus ProcessFrame(int64_t time,
+ int16_t* samples,
+ int frame_size) override {
scoped_refptr<AudioChunk> frame(
- new AudioChunk(reinterpret_cast<uint8*>(samples), kFrameSize * 2, 2));
+ new AudioChunk(reinterpret_cast<uint8_t*>(samples), kFrameSize * 2, 2));
endpointer_->ProcessAudio(*frame.get(), NULL);
- int64 ep_time;
+ int64_t ep_time;
return endpointer_->Status(&ep_time);
}
@@ -132,10 +140,10 @@ TEST(EndpointerTest, TestEmbeddedEndpointerEvents) {
const int kSampleRate = 8000; // 8 k samples per second for AMR encoding.
Endpointer endpointer(kSampleRate);
- const int64 kMillisecondsPerMicrosecond = 1000;
- const int64 short_timeout = 300 * kMillisecondsPerMicrosecond;
+ const int64_t kMillisecondsPerMicrosecond = 1000;
+ const int64_t short_timeout = 300 * kMillisecondsPerMicrosecond;
endpointer.set_speech_input_possibly_complete_silence_length(short_timeout);
- const int64 long_timeout = 500 * kMillisecondsPerMicrosecond;
+ const int64_t long_timeout = 500 * kMillisecondsPerMicrosecond;
endpointer.set_speech_input_complete_silence_length(long_timeout);
endpointer.StartSession();
diff --git a/content/browser/speech/endpointer/energy_endpointer.cc b/content/browser/speech/endpointer/energy_endpointer.cc
index 30f3770..a554465 100644
--- a/content/browser/speech/endpointer/energy_endpointer.cc
+++ b/content/browser/speech/endpointer/energy_endpointer.cc
@@ -9,15 +9,17 @@
#include "content/browser/speech/endpointer/energy_endpointer.h"
#include <math.h>
+#include <stddef.h>
#include "base/logging.h"
+#include "base/macros.h"
namespace {
// Returns the RMS (quadratic mean) of the input signal.
-float RMS(const int16* samples, int num_samples) {
- int64 ssq_int64 = 0;
- int64 sum_int64 = 0;
+float RMS(const int16_t* samples, int num_samples) {
+ int64_t ssq_int64 = 0;
+ int64_t sum_int64 = 0;
for (int i = 0; i < num_samples; ++i) {
sum_int64 += samples[i];
ssq_int64 += samples[i] * samples[i];
@@ -29,8 +31,8 @@ float RMS(const int16* samples, int num_samples) {
return static_cast<float>(sqrt((ssq / num_samples) - (sum * sum)));
}
-int64 Secs2Usecs(float seconds) {
- return static_cast<int64>(0.5 + (1.0e6 * seconds));
+int64_t Secs2Usecs(float seconds) {
+ return static_cast<int64_t>(0.5 + (1.0e6 * seconds));
}
float GetDecibel(float value) {
@@ -53,10 +55,10 @@ class EnergyEndpointer::HistoryRing {
void SetRing(int size, bool initial_state);
// Inserts a new entry into the ring and drops the oldest entry.
- void Insert(int64 time_us, bool decision);
+ void Insert(int64_t time_us, bool decision);
// Returns the time in microseconds of the most recently added entry.
- int64 EndTime() const;
+ int64_t EndTime() const;
// Returns the sum of all intervals during which 'decision' is true within
// the time in seconds specified by 'duration'. The returned interval is
@@ -65,7 +67,7 @@ class EnergyEndpointer::HistoryRing {
private:
struct DecisionPoint {
- int64 time_us;
+ int64_t time_us;
bool decision;
};
@@ -82,13 +84,13 @@ void EnergyEndpointer::HistoryRing::SetRing(int size, bool initial_state) {
decision_points_.resize(size, init);
}
-void EnergyEndpointer::HistoryRing::Insert(int64 time_us, bool decision) {
+void EnergyEndpointer::HistoryRing::Insert(int64_t time_us, bool decision) {
decision_points_[insertion_index_].time_us = time_us;
decision_points_[insertion_index_].decision = decision;
insertion_index_ = (insertion_index_ + 1) % decision_points_.size();
}
-int64 EnergyEndpointer::HistoryRing::EndTime() const {
+int64_t EnergyEndpointer::HistoryRing::EndTime() const {
int ind = insertion_index_ - 1;
if (ind < 0)
ind = decision_points_.size() - 1;
@@ -99,13 +101,14 @@ float EnergyEndpointer::HistoryRing::RingSum(float duration_sec) {
if (!decision_points_.size())
return 0.0;
- int64 sum_us = 0;
+ int64_t sum_us = 0;
int ind = insertion_index_ - 1;
if (ind < 0)
ind = decision_points_.size() - 1;
- int64 end_us = decision_points_[ind].time_us;
+ int64_t end_us = decision_points_[ind].time_us;
bool is_on = decision_points_[ind].decision;
- int64 start_us = end_us - static_cast<int64>(0.5 + (1.0e6 * duration_sec));
+ int64_t start_us =
+ end_us - static_cast<int64_t>(0.5 + (1.0e6 * duration_sec));
if (start_us < 0)
start_us = 0;
size_t n_summed = 1; // n points ==> (n-1) intervals
@@ -146,7 +149,7 @@ EnergyEndpointer::~EnergyEndpointer() {
}
int EnergyEndpointer::TimeToFrame(float time) const {
- return static_cast<int32>(0.5 + (time / params_.frame_period()));
+ return static_cast<int32_t>(0.5 + (time / params_.frame_period()));
}
void EnergyEndpointer::Restart(bool reset_threshold) {
@@ -200,7 +203,7 @@ void EnergyEndpointer::Init(const EnergyEndpointerParams& params) {
// The level of the first frame will overwrite these values.
noise_level_ = params_.decision_threshold() / 2.0f;
fast_update_frames_ =
- static_cast<int64>(params_.fast_update_dur() / params_.frame_period());
+ static_cast<int64_t>(params_.fast_update_dur() / params_.frame_period());
frame_counter_ = 0; // Used for rapid initial update of levels.
@@ -229,8 +232,8 @@ void EnergyEndpointer::SetUserInputMode() {
user_input_start_time_us_ = endpointer_time_us_;
}
-void EnergyEndpointer::ProcessAudioFrame(int64 time_us,
- const int16* samples,
+void EnergyEndpointer::ProcessAudioFrame(int64_t time_us,
+ const int16_t* samples,
int num_samples,
float* rms_out) {
endpointer_time_us_ = time_us;
@@ -368,7 +371,7 @@ void EnergyEndpointer::UpdateLevels(float rms) {
}
}
-EpStatus EnergyEndpointer::Status(int64* status_time) const {
+EpStatus EnergyEndpointer::Status(int64_t* status_time) const {
*status_time = history_->EndTime();
return status_;
}
diff --git a/content/browser/speech/endpointer/energy_endpointer.h b/content/browser/speech/endpointer/energy_endpointer.h
index 0aa421f..27837bb 100644
--- a/content/browser/speech/endpointer/energy_endpointer.h
+++ b/content/browser/speech/endpointer/energy_endpointer.h
@@ -37,9 +37,11 @@
#ifndef CONTENT_BROWSER_SPEECH_ENDPOINTER_ENERGY_ENDPOINTER_H_
#define CONTENT_BROWSER_SPEECH_ENDPOINTER_ENERGY_ENDPOINTER_H_
+#include <stdint.h>
+
#include <vector>
-#include "base/basictypes.h"
+#include "base/macros.h"
#include "base/memory/scoped_ptr.h"
#include "content/browser/speech/endpointer/energy_endpointer_params.h"
#include "content/common/content_export.h"
@@ -80,13 +82,14 @@ class CONTENT_EXPORT EnergyEndpointer {
// Computes the next input frame and modifies EnergyEndpointer status as
// appropriate based on the computation.
- void ProcessAudioFrame(int64 time_us,
- const int16* samples, int num_samples,
+ void ProcessAudioFrame(int64_t time_us,
+ const int16_t* samples,
+ int num_samples,
float* rms_out);
// Returns the current state of the EnergyEndpointer and the time
// corresponding to the most recently computed frame.
- EpStatus Status(int64* status_time_us) const;
+ EpStatus Status(int64_t* status_time_us) const;
bool estimating_environment() const {
return estimating_environment_;
@@ -112,9 +115,12 @@ class CONTENT_EXPORT EnergyEndpointer {
EpStatus status_; // The current state of this instance.
float offset_confirm_dur_sec_; // max on time allowed to confirm POST_SPEECH
- int64 endpointer_time_us_; // Time of the most recently received audio frame.
- int64 fast_update_frames_; // Number of frames for initial level adaptation.
- int64 frame_counter_; // Number of frames seen. Used for initial adaptation.
+ int64_t
+ endpointer_time_us_; // Time of the most recently received audio frame.
+ int64_t
+ fast_update_frames_; // Number of frames for initial level adaptation.
+ int64_t
+ frame_counter_; // Number of frames seen. Used for initial adaptation.
float max_window_dur_; // Largest search window size (seconds)
float sample_rate_; // Sampling rate.
@@ -145,7 +151,7 @@ class CONTENT_EXPORT EnergyEndpointer {
// Time when mode switched from environment estimation to user input. This
// is used to time forced rejection of audio feedback contamination.
- int64 user_input_start_time_us_;
+ int64_t user_input_start_time_us_;
DISALLOW_COPY_AND_ASSIGN(EnergyEndpointer);
};
diff --git a/content/browser/speech/endpointer/energy_endpointer_params.h b/content/browser/speech/endpointer/energy_endpointer_params.h
index 436adce..1510435 100644
--- a/content/browser/speech/endpointer/energy_endpointer_params.h
+++ b/content/browser/speech/endpointer/energy_endpointer_params.h
@@ -5,7 +5,6 @@
#ifndef CONTENT_BROWSER_SPEECH_ENDPOINTER_ENERGY_ENDPOINTER_PARAMS_H_
#define CONTENT_BROWSER_SPEECH_ENDPOINTER_ENERGY_ENDPOINTER_PARAMS_H_
-#include "base/basictypes.h"
#include "content/common/content_export.h"
namespace content {
diff --git a/content/browser/speech/google_one_shot_remote_engine.cc b/content/browser/speech/google_one_shot_remote_engine.cc
index cdd6b10..97743c9 100644
--- a/content/browser/speech/google_one_shot_remote_engine.cc
+++ b/content/browser/speech/google_one_shot_remote_engine.cc
@@ -4,6 +4,9 @@
#include "content/browser/speech/google_one_shot_remote_engine.h"
+#include <stddef.h>
+#include <stdint.h>
+
#include <vector>
#include "base/json/json_reader.h"
@@ -247,7 +250,7 @@ void GoogleOneShotRemoteEngine::AudioChunksEnded() {
size_t sample_count =
config_.audio_sample_rate * kAudioPacketIntervalMs / 1000;
scoped_refptr<AudioChunk> dummy_chunk(new AudioChunk(
- sample_count * sizeof(int16), encoder_->GetBitsPerSample() / 8));
+ sample_count * sizeof(int16_t), encoder_->GetBitsPerSample() / 8));
encoder_->Encode(*dummy_chunk.get());
encoder_->Flush();
scoped_refptr<AudioChunk> encoded_dummy_data(
diff --git a/content/browser/speech/google_one_shot_remote_engine.h b/content/browser/speech/google_one_shot_remote_engine.h
index 0e5b09f..22063d2 100644
--- a/content/browser/speech/google_one_shot_remote_engine.h
+++ b/content/browser/speech/google_one_shot_remote_engine.h
@@ -7,7 +7,7 @@
#include <string>
-#include "base/basictypes.h"
+#include "base/macros.h"
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
#include "content/browser/speech/audio_encoder.h"
diff --git a/content/browser/speech/google_streaming_remote_engine.cc b/content/browser/speech/google_streaming_remote_engine.cc
index 3e0129f..2f7e365 100644
--- a/content/browser/speech/google_streaming_remote_engine.cc
+++ b/content/browser/speech/google_streaming_remote_engine.cc
@@ -38,7 +38,7 @@ const char kDownstreamUrl[] = "/down?";
const char kUpstreamUrl[] = "/up?";
// This matches the maximum maxAlternatives value supported by the server.
-const uint32 kMaxMaxAlternatives = 30;
+const uint32_t kMaxMaxAlternatives = 30;
// TODO(hans): Remove this and other logging when we don't need it anymore.
void DumpResponse(const std::string& response) {
@@ -121,7 +121,9 @@ void GoogleStreamingRemoteEngine::OnURLFetchComplete(const URLFetcher* source) {
}
void GoogleStreamingRemoteEngine::OnURLFetchDownloadProgress(
- const URLFetcher* source, int64 current, int64 total) {
+ const URLFetcher* source,
+ int64_t current,
+ int64_t total) {
const bool kPartialResponse = false;
DispatchHTTPResponse(source, kPartialResponse);
}
@@ -341,7 +343,7 @@ GoogleStreamingRemoteEngine::ConnectBothStreams(const FSMEventArgs&) {
upstream_args.push_back(
config_.filter_profanities ? "pFilter=2" : "pFilter=0");
if (config_.max_hypotheses > 0U) {
- uint32 max_alternatives =
+ uint32_t max_alternatives =
std::min(kMaxMaxAlternatives, config_.max_hypotheses);
upstream_args.push_back("maxAlternatives=" +
base::UintToString(max_alternatives));
@@ -398,9 +400,8 @@ GoogleStreamingRemoteEngine::ConnectBothStreams(const FSMEventArgs&) {
if (preamble_encoder_) {
// Encode and send preamble right away.
scoped_refptr<AudioChunk> chunk = new AudioChunk(
- reinterpret_cast<const uint8*>(config_.preamble->sample_data.data()),
- config_.preamble->sample_data.size(),
- config_.preamble->sample_depth);
+ reinterpret_cast<const uint8_t*>(config_.preamble->sample_data.data()),
+ config_.preamble->sample_data.size(), config_.preamble->sample_depth);
preamble_encoder_->Encode(*chunk);
preamble_encoder_->Flush();
scoped_refptr<AudioChunk> encoded_data(
@@ -519,7 +520,7 @@ GoogleStreamingRemoteEngine::CloseUpstreamAndWaitForResults(
size_t sample_count =
config_.audio_sample_rate * kAudioPacketIntervalMs / 1000;
scoped_refptr<AudioChunk> dummy_chunk = new AudioChunk(
- sample_count * sizeof(int16), encoder_->GetBitsPerSample() / 8);
+ sample_count * sizeof(int16_t), encoder_->GetBitsPerSample() / 8);
encoder_->Encode(*dummy_chunk.get());
encoder_->Flush();
scoped_refptr<AudioChunk> encoded_dummy_data =
@@ -607,13 +608,13 @@ std::string GoogleStreamingRemoteEngine::GetAcceptedLanguages() const {
// TODO(primiano): Is there any utility in the codebase that already does this?
std::string GoogleStreamingRemoteEngine::GenerateRequestKey() const {
- const int64 kKeepLowBytes = 0x00000000FFFFFFFFLL;
- const int64 kKeepHighBytes = 0xFFFFFFFF00000000LL;
+ const int64_t kKeepLowBytes = 0x00000000FFFFFFFFLL;
+ const int64_t kKeepHighBytes = 0xFFFFFFFF00000000LL;
// Just keep the least significant bits of timestamp, in order to reduce
// probability of collisions.
- int64 key = (base::Time::Now().ToInternalValue() & kKeepLowBytes) |
- (base::RandUint64() & kKeepHighBytes);
+ int64_t key = (base::Time::Now().ToInternalValue() & kKeepLowBytes) |
+ (base::RandUint64() & kKeepHighBytes);
return base::HexEncode(reinterpret_cast<void*>(&key), sizeof(key));
}
diff --git a/content/browser/speech/google_streaming_remote_engine.h b/content/browser/speech/google_streaming_remote_engine.h
index 15b866b..27abe2f 100644
--- a/content/browser/speech/google_streaming_remote_engine.h
+++ b/content/browser/speech/google_streaming_remote_engine.h
@@ -5,10 +5,13 @@
#ifndef CONTENT_BROWSER_SPEECH_GOOGLE_STREAMING_REMOTE_ENGINE_H_
#define CONTENT_BROWSER_SPEECH_GOOGLE_STREAMING_REMOTE_ENGINE_H_
+#include <stddef.h>
+#include <stdint.h>
+
#include <string>
#include <vector>
-#include "base/basictypes.h"
+#include "base/macros.h"
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
#include "base/threading/non_thread_safe.h"
@@ -71,8 +74,8 @@ class CONTENT_EXPORT GoogleStreamingRemoteEngine
// net::URLFetcherDelegate methods.
void OnURLFetchComplete(const net::URLFetcher* source) override;
void OnURLFetchDownloadProgress(const net::URLFetcher* source,
- int64 current,
- int64 total) override;
+ int64_t current,
+ int64_t total) override;
private:
// Response status codes from the speech recognition webservice.
@@ -116,7 +119,7 @@ class CONTENT_EXPORT GoogleStreamingRemoteEngine
scoped_refptr<const AudioChunk> audio_data;
// In case of EVENT_DOWNSTREAM_RESPONSE, hold the current chunk bytes.
- scoped_ptr<std::vector<uint8> > response;
+ scoped_ptr<std::vector<uint8_t>> response;
private:
DISALLOW_COPY_AND_ASSIGN(FSMEventArgs);
diff --git a/content/browser/speech/google_streaming_remote_engine_unittest.cc b/content/browser/speech/google_streaming_remote_engine_unittest.cc
index adc54aa..62631e1 100644
--- a/content/browser/speech/google_streaming_remote_engine_unittest.cc
+++ b/content/browser/speech/google_streaming_remote_engine_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 <queue>
#include "base/big_endian.h"
@@ -593,7 +596,7 @@ std::string GoogleStreamingRemoteEngineTest::SerializeProtobufResponse(
// Prepend 4 byte prefix length indication to the protobuf message as
// envisaged by the google streaming recognition webservice protocol.
- uint32 prefix = HostToNet32(checked_cast<uint32>(msg_string.size()));
+ uint32_t prefix = HostToNet32(checked_cast<uint32_t>(msg_string.size()));
msg_string.insert(0, reinterpret_cast<char*>(&prefix), sizeof(prefix));
return msg_string;
diff --git a/content/browser/speech/speech_recognition_browsertest.cc b/content/browser/speech/speech_recognition_browsertest.cc
index 1d0073f..3de34305 100644
--- a/content/browser/speech/speech_recognition_browsertest.cc
+++ b/content/browser/speech/speech_recognition_browsertest.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 <list>
#include "base/bind.h"
@@ -137,11 +140,11 @@ class SpeechRecognitionBrowserTest :
bool fill_with_noise) {
DCHECK(controller.get());
const media::AudioParameters& audio_params = controller->audio_parameters();
- scoped_ptr<uint8[]> audio_buffer(new uint8[buffer_size]);
+ scoped_ptr<uint8_t[]> audio_buffer(new uint8_t[buffer_size]);
if (fill_with_noise) {
for (size_t i = 0; i < buffer_size; ++i)
- audio_buffer[i] = static_cast<uint8>(127 * sin(i * 3.14F /
- (16 * buffer_size)));
+ audio_buffer[i] =
+ static_cast<uint8_t>(127 * sin(i * 3.14F / (16 * buffer_size)));
} else {
memset(audio_buffer.get(), 0, buffer_size);
}
diff --git a/content/browser/speech/speech_recognition_dispatcher_host.h b/content/browser/speech/speech_recognition_dispatcher_host.h
index 34b3332..a7a433b 100644
--- a/content/browser/speech/speech_recognition_dispatcher_host.h
+++ b/content/browser/speech/speech_recognition_dispatcher_host.h
@@ -5,6 +5,7 @@
#ifndef CONTENT_BROWSER_SPEECH_SPEECH_RECOGNITION_DISPATCHER_HOST_H_
#define CONTENT_BROWSER_SPEECH_SPEECH_RECOGNITION_DISPATCHER_HOST_H_
+#include "base/macros.h"
#include "base/memory/scoped_ptr.h"
#include "base/memory/weak_ptr.h"
#include "content/common/content_export.h"
diff --git a/content/browser/speech/speech_recognition_engine.cc b/content/browser/speech/speech_recognition_engine.cc
index 53f0e91..e3b236b 100644
--- a/content/browser/speech/speech_recognition_engine.cc
+++ b/content/browser/speech/speech_recognition_engine.cc
@@ -7,7 +7,7 @@
namespace {
const int kDefaultConfigSampleRate = 8000;
const int kDefaultConfigBitsPerSample = 16;
-const uint32 kDefaultMaxHypotheses = 1;
+const uint32_t kDefaultMaxHypotheses = 1;
} // namespace
namespace content {
diff --git a/content/browser/speech/speech_recognition_engine.h b/content/browser/speech/speech_recognition_engine.h
index 239cabf..c25fd19 100644
--- a/content/browser/speech/speech_recognition_engine.h
+++ b/content/browser/speech/speech_recognition_engine.h
@@ -5,9 +5,10 @@
#ifndef CONTENT_BROWSER_SPEECH_SPEECH_RECOGNITION_ENGINE_H_
#define CONTENT_BROWSER_SPEECH_SPEECH_RECOGNITION_ENGINE_H_
+#include <stdint.h>
+
#include <string>
-#include "base/basictypes.h"
#include "content/common/content_export.h"
#include "content/public/browser/speech_recognition_session_preamble.h"
#include "content/public/common/speech_recognition_grammar.h"
@@ -56,7 +57,7 @@ class SpeechRecognitionEngine {
bool filter_profanities;
bool continuous;
bool interim_results;
- uint32 max_hypotheses;
+ uint32_t max_hypotheses;
std::string hardware_info;
std::string origin_url;
int audio_sample_rate;
diff --git a/content/browser/speech/speech_recognition_manager_impl.cc b/content/browser/speech/speech_recognition_manager_impl.cc
index 5488e4c..c535e53 100644
--- a/content/browser/speech/speech_recognition_manager_impl.cc
+++ b/content/browser/speech/speech_recognition_manager_impl.cc
@@ -8,6 +8,7 @@
#include "base/location.h"
#include "base/single_thread_task_runner.h"
#include "base/thread_task_runner_handle.h"
+#include "build/build_config.h"
#include "content/browser/browser_main_loop.h"
#include "content/browser/renderer_host/media/media_stream_manager.h"
#include "content/browser/renderer_host/media/media_stream_ui_proxy.h"
diff --git a/content/browser/speech/speech_recognition_manager_impl.h b/content/browser/speech/speech_recognition_manager_impl.h
index 634cd79..93e9fd8 100644
--- a/content/browser/speech/speech_recognition_manager_impl.h
+++ b/content/browser/speech/speech_recognition_manager_impl.h
@@ -9,7 +9,6 @@
#include <memory>
#include <string>
-#include "base/basictypes.h"
#include "base/callback.h"
#include "base/compiler_specific.h"
#include "base/memory/weak_ptr.h"
diff --git a/content/browser/speech/speech_recognizer.h b/content/browser/speech/speech_recognizer.h
index 92feebb..64c8965 100644
--- a/content/browser/speech/speech_recognizer.h
+++ b/content/browser/speech/speech_recognizer.h
@@ -6,6 +6,7 @@
#define CONTENT_BROWSER_SPEECH_SPEECH_RECOGNIZER_H_
#include "base/logging.h"
+#include "base/macros.h"
#include "base/memory/ref_counted.h"
#include "content/common/content_export.h"
diff --git a/content/browser/speech/speech_recognizer_impl.cc b/content/browser/speech/speech_recognizer_impl.cc
index 305dcaa..273187d 100644
--- a/content/browser/speech/speech_recognizer_impl.cc
+++ b/content/browser/speech/speech_recognizer_impl.cc
@@ -4,9 +4,12 @@
#include "content/browser/speech/speech_recognizer_impl.h"
-#include "base/basictypes.h"
+#include <stdint.h>
+
#include "base/bind.h"
+#include "base/macros.h"
#include "base/time/time.h"
+#include "build/build_config.h"
#include "content/browser/browser_main_loop.h"
#include "content/browser/media/media_internals.h"
#include "content/browser/speech/audio_buffer.h"
@@ -69,9 +72,10 @@ namespace {
const float kUpSmoothingFactor = 1.0f;
// Multiplier used when new volume is lesser than previous level.
const float kDownSmoothingFactor = 0.7f;
-// RMS dB value of a maximum (unclipped) sine wave for int16 samples.
+// RMS dB value of a maximum (unclipped) sine wave for int16_t samples.
const float kAudioMeterMaxDb = 90.31f;
-// This value corresponds to RMS dB for int16 with 6 most-significant-bits = 0.
+// This value corresponds to RMS dB for int16_t with 6 most-significant-bits =
+// 0.
// Values lower than this will display as empty level-meter.
const float kAudioMeterMinDb = 30.0f;
const float kAudioMeterDbRange = kAudioMeterMaxDb - kAudioMeterMinDb;
@@ -82,7 +86,7 @@ const float kAudioMeterRangeMaxUnclipped = 47.0f / 48.0f;
// Returns true if more than 5% of the samples are at min or max value.
bool DetectClipping(const AudioChunk& chunk) {
const int num_samples = chunk.NumSamples();
- const int16* samples = chunk.SamplesData16();
+ const int16_t* samples = chunk.SamplesData16();
const int kThreshold = num_samples / 20;
int clipping_samples = 0;
@@ -196,7 +200,7 @@ SpeechRecognizerImpl::SpeechRecognizerImpl(
} else {
// In continuous recognition, the session is automatically ended after 15
// seconds of silence.
- const int64 cont_timeout_us = base::Time::kMicrosecondsPerSecond * 15;
+ const int64_t cont_timeout_us = base::Time::kMicrosecondsPerSecond * 15;
endpointer_.set_speech_input_complete_silence_length(cont_timeout_us);
endpointer_.set_long_speech_length(0); // Use only a single timeout.
}
diff --git a/content/browser/speech/speech_recognizer_impl.h b/content/browser/speech/speech_recognizer_impl.h
index f60802d..ff2484b 100644
--- a/content/browser/speech/speech_recognizer_impl.h
+++ b/content/browser/speech/speech_recognizer_impl.h
@@ -5,7 +5,7 @@
#ifndef CONTENT_BROWSER_SPEECH_SPEECH_RECOGNIZER_IMPL_H_
#define CONTENT_BROWSER_SPEECH_SPEECH_RECOGNIZER_IMPL_H_
-#include "base/basictypes.h"
+#include "base/macros.h"
#include "base/memory/scoped_ptr.h"
#include "content/browser/speech/endpointer/endpointer.h"
#include "content/browser/speech/speech_recognition_engine.h"
diff --git a/content/browser/speech/speech_recognizer_impl_android.cc b/content/browser/speech/speech_recognizer_impl_android.cc
index 52b5087..5337da1 100644
--- a/content/browser/speech/speech_recognizer_impl_android.cc
+++ b/content/browser/speech/speech_recognizer_impl_android.cc
@@ -4,6 +4,8 @@
#include "content/browser/speech/speech_recognizer_impl_android.h"
+#include <stddef.h>
+
#include "base/android/context_utils.h"
#include "base/android/jni_android.h"
#include "base/android/jni_array.h"
diff --git a/content/browser/speech/speech_recognizer_impl_android.h b/content/browser/speech/speech_recognizer_impl_android.h
index 878e7ae..e51a9e4 100644
--- a/content/browser/speech/speech_recognizer_impl_android.h
+++ b/content/browser/speech/speech_recognizer_impl_android.h
@@ -8,6 +8,7 @@
#include <jni.h>
#include "base/android/scoped_java_ref.h"
+#include "base/macros.h"
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
#include "content/browser/speech/speech_recognizer.h"
diff --git a/content/browser/speech/speech_recognizer_impl_unittest.cc b/content/browser/speech/speech_recognizer_impl_unittest.cc
index 320ca81..300e405 100644
--- a/content/browser/speech/speech_recognizer_impl_unittest.cc
+++ b/content/browser/speech/speech_recognizer_impl_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 <vector>
#include "content/browser/browser_thread_impl.h"
@@ -164,7 +167,7 @@ class SpeechRecognizerImplTest : public SpeechRecognitionEventListener,
void FillPacketWithTestWaveform() {
// Fill the input with a simple pattern, a 125Hz sawtooth waveform.
for (size_t i = 0; i < audio_packet_.size(); ++i)
- audio_packet_[i] = static_cast<uint8>(i);
+ audio_packet_[i] = static_cast<uint8_t>(i);
CopyPacketToAudioBus();
}
@@ -193,7 +196,7 @@ class SpeechRecognizerImplTest : public SpeechRecognitionEventListener,
SpeechRecognitionErrorCode error_;
net::TestURLFetcherFactory url_fetcher_factory_;
TestAudioInputControllerFactory audio_input_controller_factory_;
- std::vector<uint8> audio_packet_;
+ std::vector<uint8_t> audio_packet_;
scoped_ptr<media::AudioBus> audio_bus_;
int bytes_per_sample_;
float volume_;
diff --git a/content/browser/ssl/ssl_cert_error_handler.h b/content/browser/ssl/ssl_cert_error_handler.h
index 11174ed..e5d098b 100644
--- a/content/browser/ssl/ssl_cert_error_handler.h
+++ b/content/browser/ssl/ssl_cert_error_handler.h
@@ -7,6 +7,7 @@
#include <string>
+#include "base/macros.h"
#include "base/memory/weak_ptr.h"
#include "content/browser/ssl/ssl_error_handler.h"
#include "net/ssl/ssl_info.h"
diff --git a/content/browser/ssl/ssl_client_auth_handler.cc b/content/browser/ssl/ssl_client_auth_handler.cc
index e528643..7bfb8b5 100644
--- a/content/browser/ssl/ssl_client_auth_handler.cc
+++ b/content/browser/ssl/ssl_client_auth_handler.cc
@@ -6,6 +6,7 @@
#include "base/bind.h"
#include "base/logging.h"
+#include "base/macros.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/client_certificate_delegate.h"
#include "content/public/browser/content_browser_client.h"
diff --git a/content/browser/ssl/ssl_client_auth_handler.h b/content/browser/ssl/ssl_client_auth_handler.h
index b9c2447..72c6cbd 100644
--- a/content/browser/ssl/ssl_client_auth_handler.h
+++ b/content/browser/ssl/ssl_client_auth_handler.h
@@ -5,7 +5,6 @@
#ifndef CONTENT_BROWSER_SSL_SSL_CLIENT_AUTH_HANDLER_H_
#define CONTENT_BROWSER_SSL_SSL_CLIENT_AUTH_HANDLER_H_
-#include "base/basictypes.h"
#include "base/callback.h"
#include "base/macros.h"
#include "base/memory/ref_counted.h"
diff --git a/content/browser/ssl/ssl_error_handler.h b/content/browser/ssl/ssl_error_handler.h
index 3596d47..658ec01 100644
--- a/content/browser/ssl/ssl_error_handler.h
+++ b/content/browser/ssl/ssl_error_handler.h
@@ -7,7 +7,7 @@
#include <string>
-#include "base/basictypes.h"
+#include "base/macros.h"
#include "base/memory/ref_counted.h"
#include "base/memory/weak_ptr.h"
#include "content/common/content_export.h"
diff --git a/content/browser/ssl/ssl_manager.cc b/content/browser/ssl/ssl_manager.cc
index c1b42f0..5ba1033 100644
--- a/content/browser/ssl/ssl_manager.cc
+++ b/content/browser/ssl/ssl_manager.cc
@@ -7,6 +7,7 @@
#include <set>
#include "base/bind.h"
+#include "base/macros.h"
#include "base/strings/utf_string_conversions.h"
#include "base/supports_user_data.h"
#include "content/browser/frame_host/navigation_entry_impl.h"
diff --git a/content/browser/ssl/ssl_manager.h b/content/browser/ssl/ssl_manager.h
index fb31a25..6a83775 100644
--- a/content/browser/ssl/ssl_manager.h
+++ b/content/browser/ssl/ssl_manager.h
@@ -7,7 +7,7 @@
#include <string>
-#include "base/basictypes.h"
+#include "base/macros.h"
#include "base/memory/scoped_ptr.h"
#include "base/memory/weak_ptr.h"
#include "content/browser/ssl/ssl_error_handler.h"
diff --git a/content/browser/ssl/ssl_policy.h b/content/browser/ssl/ssl_policy.h
index c002bfc..624d8bb 100644
--- a/content/browser/ssl/ssl_policy.h
+++ b/content/browser/ssl/ssl_policy.h
@@ -7,6 +7,7 @@
#include <string>
+#include "base/macros.h"
#include "base/memory/ref_counted.h"
#include "content/public/common/resource_type.h"
#include "content/public/common/security_style.h"
diff --git a/content/browser/ssl/ssl_policy_backend.h b/content/browser/ssl/ssl_policy_backend.h
index 15c514a..3de3462 100644
--- a/content/browser/ssl/ssl_policy_backend.h
+++ b/content/browser/ssl/ssl_policy_backend.h
@@ -8,7 +8,7 @@
#include <string>
#include <vector>
-#include "base/basictypes.h"
+#include "base/macros.h"
#include "base/strings/string16.h"
#include "content/public/browser/ssl_host_state_delegate.h"
#include "net/cert/cert_status_flags.h"
diff --git a/content/browser/ssl/ssl_request_info.h b/content/browser/ssl/ssl_request_info.h
index 9f50448..b354d51 100644
--- a/content/browser/ssl/ssl_request_info.h
+++ b/content/browser/ssl/ssl_request_info.h
@@ -7,6 +7,7 @@
#include <string>
+#include "base/macros.h"
#include "base/memory/ref_counted.h"
#include "content/public/common/resource_type.h"
#include "net/cert/cert_status_flags.h"
diff --git a/content/browser/startup_task_runner.h b/content/browser/startup_task_runner.h
index 80e5627..8f70ed21 100644
--- a/content/browser/startup_task_runner.h
+++ b/content/browser/startup_task_runner.h
@@ -8,6 +8,7 @@
#include <list>
#include "base/callback.h"
+#include "base/macros.h"
#include "base/single_thread_task_runner.h"
#include "build/build_config.h"
diff --git a/content/browser/storage_partition_impl.cc b/content/browser/storage_partition_impl.cc
index 7bcd5cf..0afff15 100644
--- a/content/browser/storage_partition_impl.cc
+++ b/content/browser/storage_partition_impl.cc
@@ -4,6 +4,8 @@
#include "content/browser/storage_partition_impl.h"
+#include <stddef.h>
+
#include <set>
#include <vector>
@@ -201,7 +203,7 @@ void ClearSessionStorageOnUIThread(
} // namespace
// Static.
-int StoragePartitionImpl::GenerateQuotaClientMask(uint32 remove_mask) {
+int StoragePartitionImpl::GenerateQuotaClientMask(uint32_t remove_mask) {
int quota_client_mask = 0;
if (remove_mask & StoragePartition::REMOVE_DATA_MASK_FILE_SYSTEMS)
@@ -224,16 +226,15 @@ int StoragePartitionImpl::GenerateQuotaClientMask(uint32 remove_mask) {
//
// Most of the operations in this class are done on IO thread.
struct StoragePartitionImpl::QuotaManagedDataDeletionHelper {
- QuotaManagedDataDeletionHelper(uint32 remove_mask,
- uint32 quota_storage_remove_mask,
+ QuotaManagedDataDeletionHelper(uint32_t remove_mask,
+ uint32_t quota_storage_remove_mask,
const GURL& storage_origin,
const base::Closure& callback)
: remove_mask(remove_mask),
quota_storage_remove_mask(quota_storage_remove_mask),
storage_origin(storage_origin),
callback(callback),
- task_count(0) {
- }
+ task_count(0) {}
void IncrementTaskCountOnIO();
void DecrementTaskCountOnIO();
@@ -255,8 +256,8 @@ struct StoragePartitionImpl::QuotaManagedDataDeletionHelper {
storage::StorageType quota_storage_type);
// All of these data are accessed on IO thread.
- uint32 remove_mask;
- uint32 quota_storage_remove_mask;
+ uint32_t remove_mask;
+ uint32_t quota_storage_remove_mask;
GURL storage_origin;
const base::Closure callback;
int task_count;
@@ -273,14 +274,13 @@ struct StoragePartitionImpl::QuotaManagedDataDeletionHelper {
// forwarded and updated on each (sub) deletion's callback. The instance is
// finally destroyed when deletion completes (and |callback| is invoked).
struct StoragePartitionImpl::DataDeletionHelper {
- DataDeletionHelper(uint32 remove_mask,
- uint32 quota_storage_remove_mask,
+ DataDeletionHelper(uint32_t remove_mask,
+ uint32_t quota_storage_remove_mask,
const base::Closure& callback)
- : remove_mask(remove_mask),
- quota_storage_remove_mask(quota_storage_remove_mask),
- callback(callback),
- task_count(0) {
- }
+ : remove_mask(remove_mask),
+ quota_storage_remove_mask(quota_storage_remove_mask),
+ callback(callback),
+ task_count(0) {}
void IncrementTaskCountOnUI();
void DecrementTaskCountOnUI();
@@ -306,8 +306,8 @@ struct StoragePartitionImpl::DataDeletionHelper {
const StoragePartition::OriginMatcherFunction& origin_matcher,
const base::Closure& callback);
- uint32 remove_mask;
- uint32 quota_storage_remove_mask;
+ uint32_t remove_mask;
+ uint32_t quota_storage_remove_mask;
// Accessed on UI thread.
const base::Closure callback;
@@ -592,8 +592,8 @@ BackgroundSyncContextImpl* StoragePartitionImpl::GetBackgroundSyncContext() {
}
void StoragePartitionImpl::ClearDataImpl(
- uint32 remove_mask,
- uint32 quota_storage_remove_mask,
+ uint32_t remove_mask,
+ uint32_t quota_storage_remove_mask,
const GURL& storage_origin,
const OriginMatcherFunction& origin_matcher,
net::URLRequestContextGetter* rq_context,
@@ -850,8 +850,8 @@ void StoragePartitionImpl::DataDeletionHelper::ClearDataOnUIThread(
}
void StoragePartitionImpl::ClearDataForOrigin(
- uint32 remove_mask,
- uint32 quota_storage_remove_mask,
+ uint32_t remove_mask,
+ uint32_t quota_storage_remove_mask,
const GURL& storage_origin,
net::URLRequestContextGetter* request_context_getter,
const base::Closure& callback) {
@@ -867,8 +867,8 @@ void StoragePartitionImpl::ClearDataForOrigin(
}
void StoragePartitionImpl::ClearData(
- uint32 remove_mask,
- uint32 quota_storage_remove_mask,
+ uint32_t remove_mask,
+ uint32_t quota_storage_remove_mask,
const GURL& storage_origin,
const OriginMatcherFunction& origin_matcher,
const base::Time begin,
diff --git a/content/browser/storage_partition_impl.h b/content/browser/storage_partition_impl.h
index 2c08a7e..9d9e6ee 100644
--- a/content/browser/storage_partition_impl.h
+++ b/content/browser/storage_partition_impl.h
@@ -5,9 +5,12 @@
#ifndef CONTENT_BROWSER_STORAGE_PARTITION_IMPL_H_
#define CONTENT_BROWSER_STORAGE_PARTITION_IMPL_H_
+#include <stdint.h>
+
#include "base/compiler_specific.h"
#include "base/files/file_path.h"
#include "base/gtest_prod_util.h"
+#include "base/macros.h"
#include "base/memory/ref_counted.h"
#include "content/browser/appcache/chrome_appcache_service.h"
#include "content/browser/background_sync/background_sync_context_impl.h"
@@ -31,7 +34,7 @@ class StoragePartitionImpl : public StoragePartition {
// Quota managed data uses a different bitmask for types than
// StoragePartition uses. This method generates that mask.
- CONTENT_EXPORT static int GenerateQuotaClientMask(uint32 remove_mask);
+ CONTENT_EXPORT static int GenerateQuotaClientMask(uint32_t remove_mask);
CONTENT_EXPORT void OverrideQuotaManagerForTesting(
storage::QuotaManager* quota_manager);
@@ -58,13 +61,13 @@ class StoragePartitionImpl : public StoragePartition {
PlatformNotificationContextImpl* GetPlatformNotificationContext() override;
BackgroundSyncContextImpl* GetBackgroundSyncContext() override;
- void ClearDataForOrigin(uint32 remove_mask,
- uint32 quota_storage_remove_mask,
+ void ClearDataForOrigin(uint32_t remove_mask,
+ uint32_t quota_storage_remove_mask,
const GURL& storage_origin,
net::URLRequestContextGetter* request_context_getter,
const base::Closure& callback) override;
- void ClearData(uint32 remove_mask,
- uint32 quota_storage_remove_mask,
+ void ClearData(uint32_t remove_mask,
+ uint32_t quota_storage_remove_mask,
const GURL& storage_origin,
const OriginMatcherFunction& origin_matcher,
const base::Time begin,
@@ -145,8 +148,8 @@ class StoragePartitionImpl : public StoragePartition {
PlatformNotificationContextImpl* platform_notification_context,
BackgroundSyncContextImpl* background_sync_context);
- void ClearDataImpl(uint32 remove_mask,
- uint32 quota_storage_remove_mask,
+ void ClearDataImpl(uint32_t remove_mask,
+ uint32_t quota_storage_remove_mask,
const GURL& remove_origin,
const OriginMatcherFunction& origin_matcher,
net::URLRequestContextGetter* rq_context,
diff --git a/content/browser/storage_partition_impl_map.cc b/content/browser/storage_partition_impl_map.cc
index f96d2d1..828a1ed 100644
--- a/content/browser/storage_partition_impl_map.cc
+++ b/content/browser/storage_partition_impl_map.cc
@@ -11,6 +11,7 @@
#include "base/files/file_path.h"
#include "base/files/file_util.h"
#include "base/location.h"
+#include "base/macros.h"
#include "base/single_thread_task_runner.h"
#include "base/stl_util.h"
#include "base/strings/string_number_conversions.h"
@@ -18,6 +19,7 @@
#include "base/strings/stringprintf.h"
#include "base/thread_task_runner_handle.h"
#include "base/threading/sequenced_worker_pool.h"
+#include "build/build_config.h"
#include "content/browser/appcache/appcache_interceptor.h"
#include "content/browser/appcache/chrome_appcache_service.h"
#include "content/browser/fileapi/browser_file_system_helper.h"
diff --git a/content/browser/storage_partition_impl_unittest.cc b/content/browser/storage_partition_impl_unittest.cc
index 937b339..e4b79096 100644
--- a/content/browser/storage_partition_impl_unittest.cc
+++ b/content/browser/storage_partition_impl_unittest.cc
@@ -2,8 +2,12 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include <stddef.h>
+#include <stdint.h>
+
#include "base/files/file_util.h"
#include "base/location.h"
+#include "base/macros.h"
#include "base/run_loop.h"
#include "base/single_thread_task_runner.h"
#include "base/thread_task_runner_handle.h"
@@ -56,7 +60,7 @@ const storage::StorageType kPersistent = storage::kStorageTypePersistent;
const storage::QuotaClient::ID kClientFile = storage::QuotaClient::kFileSystem;
-const uint32 kAllQuotaRemoveMask =
+const uint32_t kAllQuotaRemoveMask =
StoragePartition::REMOVE_DATA_MASK_APPCACHE |
StoragePartition::REMOVE_DATA_MASK_FILE_SYSTEMS |
StoragePartition::REMOVE_DATA_MASK_INDEXEDDB |
@@ -294,7 +298,7 @@ void ClearCookies(content::StoragePartition* partition,
delete_begin, delete_end, run_loop->QuitClosure());
}
-void ClearStuff(uint32 remove_mask,
+void ClearStuff(uint32_t remove_mask,
content::StoragePartition* partition,
const base::Time delete_begin,
const base::Time delete_end,
diff --git a/content/browser/streams/stream.h b/content/browser/streams/stream.h
index 27788b3..3f3d06a 100644
--- a/content/browser/streams/stream.h
+++ b/content/browser/streams/stream.h
@@ -5,7 +5,9 @@
#ifndef CONTENT_BROWSER_STREAMS_STREAM_H_
#define CONTENT_BROWSER_STREAMS_STREAM_H_
-#include "base/basictypes.h"
+#include <stddef.h>
+
+#include "base/macros.h"
#include "base/memory/ref_counted.h"
#include "base/memory/weak_ptr.h"
#include "content/browser/byte_stream.h"
diff --git a/content/browser/streams/stream_handle_impl.cc b/content/browser/streams/stream_handle_impl.cc
index ba4dee2..7e2d771 100644
--- a/content/browser/streams/stream_handle_impl.cc
+++ b/content/browser/streams/stream_handle_impl.cc
@@ -4,6 +4,8 @@
#include "content/browser/streams/stream_handle_impl.h"
+#include <stddef.h>
+
#include "base/bind.h"
#include "base/location.h"
#include "base/thread_task_runner_handle.h"
diff --git a/content/browser/streams/stream_registry.h b/content/browser/streams/stream_registry.h
index 05c5310..c7b31ab 100644
--- a/content/browser/streams/stream_registry.h
+++ b/content/browser/streams/stream_registry.h
@@ -5,10 +5,12 @@
#ifndef CONTENT_BROWSER_STREAMS_STREAM_REGISTRY_H_
#define CONTENT_BROWSER_STREAMS_STREAM_REGISTRY_H_
+#include <stddef.h>
+
#include <map>
#include <set>
-#include "base/basictypes.h"
+#include "base/macros.h"
#include "base/memory/ref_counted.h"
#include "base/threading/non_thread_safe.h"
#include "content/browser/streams/stream_register_observer.h"
diff --git a/content/browser/streams/stream_unittest.cc b/content/browser/streams/stream_unittest.cc
index eb83357..af2b003 100644
--- a/content/browser/streams/stream_unittest.cc
+++ b/content/browser/streams/stream_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/message_loop/message_loop.h"
#include "base/test/test_simple_task_runner.h"
#include "content/browser/streams/stream.h"
diff --git a/content/browser/streams/stream_url_request_job.h b/content/browser/streams/stream_url_request_job.h
index f22311d..ded5fa7 100644
--- a/content/browser/streams/stream_url_request_job.h
+++ b/content/browser/streams/stream_url_request_job.h
@@ -5,10 +5,11 @@
#ifndef CONTENT_BROWSER_STREAMS_STREAM_URL_REQUEST_JOB_H_
#define CONTENT_BROWSER_STREAMS_STREAM_URL_REQUEST_JOB_H_
-#include "net/http/http_status_code.h"
-#include "net/url_request/url_request_job.h"
+#include "base/macros.h"
#include "content/browser/streams/stream_read_observer.h"
#include "content/common/content_export.h"
+#include "net/http/http_status_code.h"
+#include "net/url_request/url_request_job.h"
namespace content {
diff --git a/content/browser/system_message_window_win.cc b/content/browser/system_message_window_win.cc
index 36cc177..0316fc7 100644
--- a/content/browser/system_message_window_win.cc
+++ b/content/browser/system_message_window_win.cc
@@ -5,8 +5,10 @@
#include "content/browser/system_message_window_win.h"
#include <dbt.h>
+#include <stddef.h>
#include "base/logging.h"
+#include "base/macros.h"
#include "base/system_monitor/system_monitor.h"
#include "base/win/wrapped_window_proc.h"
#include "media/audio/win/core_audio_util_win.h"
diff --git a/content/browser/system_message_window_win.h b/content/browser/system_message_window_win.h
index b29bad5..061db54 100644
--- a/content/browser/system_message_window_win.h
+++ b/content/browser/system_message_window_win.h
@@ -7,7 +7,7 @@
#include <windows.h>
-#include "base/basictypes.h"
+#include "base/macros.h"
#include "base/memory/scoped_ptr.h"
#include "content/common/content_export.h"
diff --git a/content/browser/theme_helper_mac.h b/content/browser/theme_helper_mac.h
index 265d0d6..be507d9 100644
--- a/content/browser/theme_helper_mac.h
+++ b/content/browser/theme_helper_mac.h
@@ -5,6 +5,7 @@
#ifndef CONTENT_BROWSER_THEME_HELPER_MAC_H_
#define CONTENT_BROWSER_THEME_HELPER_MAC_H_
+#include "base/macros.h"
#include "base/memory/singleton.h"
#include "content/public/browser/notification_observer.h"
#include "content/public/browser/notification_registrar.h"
diff --git a/content/browser/time_zone_monitor.cc b/content/browser/time_zone_monitor.cc
index f414e97..1eb72c6 100644
--- a/content/browser/time_zone_monitor.cc
+++ b/content/browser/time_zone_monitor.cc
@@ -5,6 +5,7 @@
#include "content/browser/time_zone_monitor.h"
#include "base/logging.h"
+#include "build/build_config.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/render_process_host.h"
#include "third_party/icu/source/common/unicode/unistr.h"
diff --git a/content/browser/time_zone_monitor.h b/content/browser/time_zone_monitor.h
index fed177f..6fff155 100644
--- a/content/browser/time_zone_monitor.h
+++ b/content/browser/time_zone_monitor.h
@@ -5,7 +5,7 @@
#ifndef CONTENT_BROWSER_TIME_ZONE_MONITOR_H_
#define CONTENT_BROWSER_TIME_ZONE_MONITOR_H_
-#include "base/basictypes.h"
+#include "base/macros.h"
#include "base/memory/scoped_ptr.h"
namespace content {
diff --git a/content/browser/time_zone_monitor_android.h b/content/browser/time_zone_monitor_android.h
index 7714111..530445c 100644
--- a/content/browser/time_zone_monitor_android.h
+++ b/content/browser/time_zone_monitor_android.h
@@ -10,7 +10,7 @@
#include <jni.h>
#include "base/android/scoped_java_ref.h"
-#include "base/basictypes.h"
+#include "base/macros.h"
namespace content {
diff --git a/content/browser/time_zone_monitor_chromeos.cc b/content/browser/time_zone_monitor_chromeos.cc
index 7ad8178..c3a509a 100644
--- a/content/browser/time_zone_monitor_chromeos.cc
+++ b/content/browser/time_zone_monitor_chromeos.cc
@@ -4,6 +4,7 @@
#include "content/browser/time_zone_monitor.h"
+#include "base/macros.h"
#include "chromeos/settings/timezone_settings.h"
namespace content {
diff --git a/content/browser/time_zone_monitor_linux.cc b/content/browser/time_zone_monitor_linux.cc
index dd0a26f..ded57a4 100644
--- a/content/browser/time_zone_monitor_linux.cc
+++ b/content/browser/time_zone_monitor_linux.cc
@@ -4,16 +4,18 @@
#include "content/browser/time_zone_monitor.h"
+#include <stddef.h>
#include <stdlib.h>
#include <vector>
-#include "base/basictypes.h"
#include "base/bind.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/stl_util.h"
+#include "build/build_config.h"
#include "content/public/browser/browser_thread.h"
#if !defined(OS_CHROMEOS)
diff --git a/content/browser/time_zone_monitor_mac.mm b/content/browser/time_zone_monitor_mac.mm
index 700c17e..5a381d8 100644
--- a/content/browser/time_zone_monitor_mac.mm
+++ b/content/browser/time_zone_monitor_mac.mm
@@ -2,10 +2,11 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "content/browser/time_zone_monitor.h"
-
#import <Foundation/Foundation.h>
+#include "base/macros.h"
+#include "content/browser/time_zone_monitor.h"
+
namespace content {
class TimeZoneMonitorMac : public TimeZoneMonitor {
diff --git a/content/browser/time_zone_monitor_win.cc b/content/browser/time_zone_monitor_win.cc
index abeaaff..e8b84fd 100644
--- a/content/browser/time_zone_monitor_win.cc
+++ b/content/browser/time_zone_monitor_win.cc
@@ -6,9 +6,9 @@
#include <windows.h>
-#include "base/basictypes.h"
#include "base/bind.h"
#include "base/bind_helpers.h"
+#include "base/macros.h"
#include "base/memory/scoped_ptr.h"
#include "ui/gfx/win/singleton_hwnd_observer.h"
diff --git a/content/browser/tracing/background_tracing_config_impl.h b/content/browser/tracing/background_tracing_config_impl.h
index 7176960..841a047 100644
--- a/content/browser/tracing/background_tracing_config_impl.h
+++ b/content/browser/tracing/background_tracing_config_impl.h
@@ -6,6 +6,7 @@
#define CONTENT_BROWSER_TRACING_BACKGROUND_TRACING_CONFIG_IMPL_H_
#include "base/gtest_prod_util.h"
+#include "base/macros.h"
#include "base/memory/scoped_vector.h"
#include "content/common/content_export.h"
#include "content/public/browser/background_tracing_config.h"
diff --git a/content/browser/tracing/background_tracing_manager_browsertest.cc b/content/browser/tracing/background_tracing_manager_browsertest.cc
index 320ce6b..b387b62 100644
--- a/content/browser/tracing/background_tracing_manager_browsertest.cc
+++ b/content/browser/tracing/background_tracing_manager_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/bind.h"
#include "base/command_line.h"
+#include "base/macros.h"
#include "base/metrics/histogram_macros.h"
#include "base/strings/pattern.h"
#include "base/trace_event/trace_event.h"
diff --git a/content/browser/tracing/background_tracing_manager_impl.h b/content/browser/tracing/background_tracing_manager_impl.h
index 0ce491a..f1d88f2 100644
--- a/content/browser/tracing/background_tracing_manager_impl.h
+++ b/content/browser/tracing/background_tracing_manager_impl.h
@@ -6,6 +6,7 @@
#define CONTENT_BROWSER_TRACING_BACKGROUND_TRACING_MANAGER_IMPL_H_
#include "base/lazy_instance.h"
+#include "base/macros.h"
#include "base/memory/ref_counted_memory.h"
#include "base/memory/scoped_ptr.h"
#include "base/memory/weak_ptr.h"
diff --git a/content/browser/tracing/background_tracing_rule.h b/content/browser/tracing/background_tracing_rule.h
index 6e85836..3277716 100644
--- a/content/browser/tracing/background_tracing_rule.h
+++ b/content/browser/tracing/background_tracing_rule.h
@@ -5,6 +5,7 @@
#ifndef CONTENT_BROWSER_TRACING_BACKGROUND_TRACING_RULE_H_
#define CONTENT_BROWSER_TRACING_BACKGROUND_TRACING_RULE_H_
+#include "base/macros.h"
#include "content/browser/tracing/background_tracing_config_impl.h"
#include "content/common/content_export.h"
diff --git a/content/browser/tracing/etw_system_event_consumer_win.cc b/content/browser/tracing/etw_system_event_consumer_win.cc
index d1a12cc..07dfd4d 100644
--- a/content/browser/tracing/etw_system_event_consumer_win.cc
+++ b/content/browser/tracing/etw_system_event_consumer_win.cc
@@ -4,6 +4,8 @@
#include "content/browser/tracing/etw_system_event_consumer_win.h"
+#include <stdint.h>
+
#include "base/base64.h"
#include "base/json/json_string_value_serializer.h"
#include "base/lazy_instance.h"
@@ -90,10 +92,9 @@ void EtwSystemEventConsumer::OnStopSystemTracingDone(
bool EtwSystemEventConsumer::StartKernelSessionTracing() {
// Enabled flags (tracing facilities).
- uint32 enabled_flags = EVENT_TRACE_FLAG_IMAGE_LOAD |
- EVENT_TRACE_FLAG_PROCESS |
- EVENT_TRACE_FLAG_THREAD |
- EVENT_TRACE_FLAG_CSWITCH;
+ uint32_t enabled_flags = EVENT_TRACE_FLAG_IMAGE_LOAD |
+ EVENT_TRACE_FLAG_PROCESS | EVENT_TRACE_FLAG_THREAD |
+ EVENT_TRACE_FLAG_CSWITCH;
EVENT_TRACE_PROPERTIES& p = *properties_.get();
p.LogFileMode = EVENT_TRACE_REAL_TIME_MODE;
diff --git a/content/browser/tracing/etw_system_event_consumer_win.h b/content/browser/tracing/etw_system_event_consumer_win.h
index 8ab7c8a..4327365 100644
--- a/content/browser/tracing/etw_system_event_consumer_win.h
+++ b/content/browser/tracing/etw_system_event_consumer_win.h
@@ -6,6 +6,7 @@
#define CONTENT_BROWSER_TRACING_ETW_SYSTEM_EVENT_CONSUMER_WIN_H_
#include "base/bind.h"
+#include "base/macros.h"
#include "base/memory/ref_counted_memory.h"
#include "base/threading/thread.h"
#include "base/trace_event/tracing_agent.h"
diff --git a/content/browser/tracing/memory_tracing_browsertest.cc b/content/browser/tracing/memory_tracing_browsertest.cc
index a268610..13b0923 100644
--- a/content/browser/tracing/memory_tracing_browsertest.cc
+++ b/content/browser/tracing/memory_tracing_browsertest.cc
@@ -2,6 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include <stdint.h>
+
#include "base/bind.h"
#include "base/command_line.h"
#include "base/run_loop.h"
@@ -47,7 +49,7 @@ class MemoryTracingTest : public ContentBrowserTest {
void OnGlobalMemoryDumpDone(
scoped_refptr<base::SingleThreadTaskRunner> task_runner,
base::Closure closure,
- uint64 dump_guid,
+ uint64_t dump_guid,
bool success) {
// Make sure we run the RunLoop closure on the same thread that originated
// the run loop (which is the IN_PROC_BROWSER_TEST_F main thread).
@@ -125,8 +127,8 @@ class MemoryTracingTest : public ContentBrowserTest {
base::Closure on_memory_dump_complete_closure_;
scoped_ptr<MockDumpProvider> mock_dump_provider_;
- uint32 callback_call_count_;
- uint64 last_callback_dump_guid_;
+ uint32_t callback_call_count_;
+ uint64_t last_callback_dump_guid_;
bool last_callback_success_;
};
diff --git a/content/browser/tracing/power_tracing_agent.h b/content/browser/tracing/power_tracing_agent.h
index e690faf..58c6a87 100644
--- a/content/browser/tracing/power_tracing_agent.h
+++ b/content/browser/tracing/power_tracing_agent.h
@@ -5,6 +5,7 @@
#ifndef CONTENT_BROWSER_TRACING_POWER_TRACING_AGENT_H_
#define CONTENT_BROWSER_TRACING_POWER_TRACING_AGENT_H_
+#include "base/macros.h"
#include "base/memory/ref_counted_memory.h"
#include "base/threading/thread.h"
#include "base/trace_event/tracing_agent.h"
diff --git a/content/browser/tracing/trace_message_filter.cc b/content/browser/tracing/trace_message_filter.cc
index ffc129c..45cb702 100644
--- a/content/browser/tracing/trace_message_filter.cc
+++ b/content/browser/tracing/trace_message_filter.cc
@@ -132,7 +132,7 @@ void TraceMessageFilter::SendProcessMemoryDumpRequest(
}
// Called by TracingControllerImpl, which handles the multiprocess coordination.
-void TraceMessageFilter::SendGlobalMemoryDumpResponse(uint64 dump_guid,
+void TraceMessageFilter::SendGlobalMemoryDumpResponse(uint64_t dump_guid,
bool success) {
Send(new TracingMsg_GlobalMemoryDumpResponse(dump_guid, success));
}
@@ -202,7 +202,7 @@ void TraceMessageFilter::OnGlobalMemoryDumpRequest(
base::Bind(&TraceMessageFilter::SendGlobalMemoryDumpResponse, this));
}
-void TraceMessageFilter::OnProcessMemoryDumpResponse(uint64 dump_guid,
+void TraceMessageFilter::OnProcessMemoryDumpResponse(uint64_t dump_guid,
bool success) {
TracingControllerImpl::GetInstance()->OnProcessMemoryDumpResponse(
this, dump_guid, success);
diff --git a/content/browser/tracing/trace_message_filter.h b/content/browser/tracing/trace_message_filter.h
index 63a5129..22d91d9 100644
--- a/content/browser/tracing/trace_message_filter.h
+++ b/content/browser/tracing/trace_message_filter.h
@@ -5,9 +5,12 @@
#ifndef CONTENT_BROWSER_TRACING_TRACE_MESSAGE_FILTER_H_
#define CONTENT_BROWSER_TRACING_TRACE_MESSAGE_FILTER_H_
+#include <stdint.h>
+
#include <string>
#include <vector>
+#include "base/macros.h"
#include "base/trace_event/memory_dump_request_args.h"
#include "base/trace_event/trace_event.h"
#include "content/public/browser/browser_message_filter.h"
@@ -54,9 +57,9 @@ class TraceMessageFilter : public BrowserMessageFilter {
void OnMonitoringTraceDataCollected(const std::string& data);
void OnGlobalMemoryDumpRequest(
const base::trace_event::MemoryDumpRequestArgs& args);
- void OnProcessMemoryDumpResponse(uint64 dump_guid, bool success);
+ void OnProcessMemoryDumpResponse(uint64_t dump_guid, bool success);
- void SendGlobalMemoryDumpResponse(uint64 dump_guid, bool success);
+ void SendGlobalMemoryDumpResponse(uint64_t dump_guid, bool success);
void OnTriggerBackgroundTrace(const std::string& histogram_name);
void OnAbortBackgroundTrace();
@@ -64,7 +67,7 @@ class TraceMessageFilter : public BrowserMessageFilter {
bool has_child_;
// Hash of id of the child process.
- uint64 tracing_process_id_;
+ uint64_t tracing_process_id_;
// Awaiting ack for previously sent SendEndTracing
bool is_awaiting_end_ack_;
diff --git a/content/browser/tracing/tracing_controller_browsertest.cc b/content/browser/tracing/tracing_controller_browsertest.cc
index 6ab44ca..3bc7a96 100644
--- a/content/browser/tracing/tracing_controller_browsertest.cc
+++ b/content/browser/tracing/tracing_controller_browsertest.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 <stdint.h>
+
#include "base/files/file_util.h"
#include "base/memory/ref_counted_memory.h"
#include "base/run_loop.h"
#include "base/strings/pattern.h"
+#include "build/build_config.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/tracing_controller.h"
#include "content/public/test/browser_test_utils.h"
@@ -132,7 +135,7 @@ class TracingControllerTest : public ContentBrowserTest {
const base::FilePath& file_path) {
disable_recording_done_callback_count_++;
EXPECT_TRUE(PathExists(file_path));
- int64 file_size;
+ int64_t file_size;
base::GetFileSize(file_path, &file_size);
EXPECT_TRUE(file_size > 0);
quit_callback.Run();
@@ -153,7 +156,7 @@ class TracingControllerTest : public ContentBrowserTest {
base::Closure quit_callback, const base::FilePath& file_path) {
capture_monitoring_snapshot_done_callback_count_++;
EXPECT_TRUE(PathExists(file_path));
- int64 file_size;
+ int64_t file_size;
base::GetFileSize(file_path, &file_size);
EXPECT_TRUE(file_size > 0);
quit_callback.Run();
diff --git a/content/browser/tracing/tracing_controller_impl.cc b/content/browser/tracing/tracing_controller_impl.cc
index b119b01..d8db0d6 100644
--- a/content/browser/tracing/tracing_controller_impl.cc
+++ b/content/browser/tracing/tracing_controller_impl.cc
@@ -11,6 +11,7 @@
#include "base/strings/string_number_conversions.h"
#include "base/sys_info.h"
#include "base/trace_event/trace_event.h"
+#include "build/build_config.h"
#include "content/browser/tracing/file_tracing_provider_impl.h"
#include "content/browser/tracing/power_tracing_agent.h"
#include "content/browser/tracing/trace_message_filter.h"
@@ -1034,7 +1035,7 @@ void TracingControllerImpl::RequestGlobalMemoryDump(
tmf->SendProcessMemoryDumpRequest(args);
}
-uint64 TracingControllerImpl::GetTracingProcessId() const {
+uint64_t TracingControllerImpl::GetTracingProcessId() const {
return ChildProcessHost::kBrowserTracingProcessId;
}
@@ -1058,7 +1059,7 @@ void TracingControllerImpl::RemoveTraceMessageFilterObserver(
void TracingControllerImpl::OnProcessMemoryDumpResponse(
TraceMessageFilter* trace_message_filter,
- uint64 dump_guid,
+ uint64_t dump_guid,
bool success) {
if (!BrowserThread::CurrentlyOn(BrowserThread::UI)) {
BrowserThread::PostTask(
@@ -1090,7 +1091,7 @@ void TracingControllerImpl::OnProcessMemoryDumpResponse(
FinalizeGlobalMemoryDumpIfAllProcessesReplied();
}
-void TracingControllerImpl::OnBrowserProcessMemoryDumpDone(uint64 dump_guid,
+void TracingControllerImpl::OnBrowserProcessMemoryDumpDone(uint64_t dump_guid,
bool success) {
DCHECK_GT(pending_memory_dump_ack_count_, 0);
--pending_memory_dump_ack_count_;
diff --git a/content/browser/tracing/tracing_controller_impl.h b/content/browser/tracing/tracing_controller_impl.h
index 92ff739..90dcc40 100644
--- a/content/browser/tracing/tracing_controller_impl.h
+++ b/content/browser/tracing/tracing_controller_impl.h
@@ -5,11 +5,15 @@
#ifndef CONTENT_BROWSER_TRACING_TRACING_CONTROLLER_IMPL_H_
#define CONTENT_BROWSER_TRACING_TRACING_CONTROLLER_IMPL_H_
+#include <stddef.h>
+#include <stdint.h>
+
#include <set>
#include <string>
#include <vector>
#include "base/lazy_instance.h"
+#include "base/macros.h"
#include "base/time/time.h"
#include "base/trace_event/memory_dump_manager.h"
#include "base/trace_event/tracing_agent.h"
@@ -73,7 +77,7 @@ class TracingControllerImpl
void RequestGlobalMemoryDump(
const base::trace_event::MemoryDumpRequestArgs& args,
const base::trace_event::MemoryDumpCallback& callback) override;
- uint64 GetTracingProcessId() const override;
+ uint64_t GetTracingProcessId() const override;
class TraceMessageFilterObserver {
public:
@@ -147,11 +151,11 @@ class TracingControllerImpl
void OnTraceLogStatusReply(TraceMessageFilter* trace_message_filter,
const base::trace_event::TraceLogStatus& status);
void OnProcessMemoryDumpResponse(TraceMessageFilter* trace_message_filter,
- uint64 dump_guid,
+ uint64_t dump_guid,
bool success);
// Callback of MemoryDumpManager::CreateProcessDump().
- void OnBrowserProcessMemoryDumpDone(uint64 dump_guid, bool success);
+ void OnBrowserProcessMemoryDumpDone(uint64_t dump_guid, bool success);
void FinalizeGlobalMemoryDumpIfAllProcessesReplied();
@@ -203,7 +207,7 @@ class TracingControllerImpl
int pending_memory_dump_ack_count_;
int failed_memory_dump_count_;
TraceMessageFilterSet pending_memory_dump_filters_;
- uint64 pending_memory_dump_guid_;
+ uint64_t pending_memory_dump_guid_;
base::trace_event::MemoryDumpCallback pending_memory_dump_callback_;
StartTracingDoneCallback start_tracing_done_callback_;
diff --git a/content/browser/tracing/tracing_controller_impl_data_sinks.cc b/content/browser/tracing/tracing_controller_impl_data_sinks.cc
index e5215ce6..de7dc94 100644
--- a/content/browser/tracing/tracing_controller_impl_data_sinks.cc
+++ b/content/browser/tracing/tracing_controller_impl_data_sinks.cc
@@ -6,6 +6,7 @@
#include "base/bind.h"
#include "base/files/file_util.h"
#include "base/json/json_writer.h"
+#include "base/macros.h"
#include "base/strings/pattern.h"
#include "content/public/browser/browser_thread.h"
#include "third_party/zlib/zlib.h"
diff --git a/content/browser/tracing/tracing_ui.cc b/content/browser/tracing/tracing_ui.cc
index 638d935..392caab 100644
--- a/content/browser/tracing/tracing_ui.cc
+++ b/content/browser/tracing/tracing_ui.cc
@@ -4,6 +4,8 @@
#include "content/browser/tracing/tracing_ui.h"
+#include <stddef.h>
+
#include <set>
#include <string>
#include <vector>
@@ -376,7 +378,7 @@ void TracingUI::DoUploadInternal(const std::string& file_contents,
// TODO(mmandlis): Add support for stopping the upload in progress.
}
-void TracingUI::OnTraceUploadProgress(int64 current, int64 total) {
+void TracingUI::OnTraceUploadProgress(int64_t current, int64_t total) {
DCHECK(current <= total);
int percent = (current / total) * 100;
web_ui()->CallJavascriptFunction(
diff --git a/content/browser/tracing/tracing_ui.h b/content/browser/tracing/tracing_ui.h
index db7b594..22e8616 100644
--- a/content/browser/tracing/tracing_ui.h
+++ b/content/browser/tracing/tracing_ui.h
@@ -5,9 +5,12 @@
#ifndef CONTENT_BROWSER_TRACING_TRACING_UI_H_
#define CONTENT_BROWSER_TRACING_TRACING_UI_H_
+#include <stdint.h>
+
#include <map>
#include <string>
+#include "base/macros.h"
#include "base/memory/weak_ptr.h"
#include "content/public/browser/trace_uploader.h"
#include "content/public/browser/web_ui_controller.h"
@@ -22,7 +25,7 @@ class CONTENT_EXPORT TracingUI : public WebUIController {
explicit TracingUI(WebUI* web_ui);
~TracingUI() override;
void OnMonitoringStateChanged(bool is_monitoring);
- void OnTraceUploadProgress(int64 current, int64 total);
+ void OnTraceUploadProgress(int64_t current, int64_t total);
void OnTraceUploadComplete(bool success, const std::string& feedback);
private:
diff --git a/content/browser/udev_linux.cc b/content/browser/udev_linux.cc
index dfcb52b..1890523 100644
--- a/content/browser/udev_linux.cc
+++ b/content/browser/udev_linux.cc
@@ -4,6 +4,8 @@
#include "content/browser/udev_linux.h"
+#include <stddef.h>
+
#include "base/message_loop/message_loop.h"
namespace content {
diff --git a/content/browser/udev_linux.h b/content/browser/udev_linux.h
index 0160fd3..3e4ac44 100644
--- a/content/browser/udev_linux.h
+++ b/content/browser/udev_linux.h
@@ -38,9 +38,9 @@
#include <vector>
-#include "base/basictypes.h"
#include "base/callback.h"
#include "base/compiler_specific.h"
+#include "base/macros.h"
#include "base/message_loop/message_pump_libevent.h"
#include "device/udev_linux/scoped_udev.h"
diff --git a/content/browser/utility_process_host_impl.cc b/content/browser/utility_process_host_impl.cc
index 4cd0cd1..3b7891f 100644
--- a/content/browser/utility_process_host_impl.cc
+++ b/content/browser/utility_process_host_impl.cc
@@ -12,6 +12,7 @@
#include "base/command_line.h"
#include "base/files/file_path.h"
#include "base/lazy_instance.h"
+#include "base/macros.h"
#include "base/message_loop/message_loop.h"
#include "base/process/process_handle.h"
#include "base/run_loop.h"
@@ -19,6 +20,7 @@
#include "base/strings/utf_string_conversions.h"
#include "base/synchronization/lock.h"
#include "base/synchronization/waitable_event.h"
+#include "build/build_config.h"
#include "content/browser/browser_child_process_host_impl.h"
#include "content/browser/mojo/mojo_application_host.h"
#include "content/browser/renderer_host/render_process_host_impl.h"
diff --git a/content/browser/utility_process_host_impl.h b/content/browser/utility_process_host_impl.h
index 2b54d3d..ea8572f 100644
--- a/content/browser/utility_process_host_impl.h
+++ b/content/browser/utility_process_host_impl.h
@@ -8,12 +8,13 @@
#include <string>
#include <vector>
-#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/memory/weak_ptr.h"
+#include "build/build_config.h"
#include "content/public/browser/browser_child_process_host_delegate.h"
#include "content/public/browser/utility_process_host.h"
diff --git a/content/browser/vibration_manager_integration_browsertest.cc b/content/browser/vibration_manager_integration_browsertest.cc
index 2f8b212..5623761 100644
--- a/content/browser/vibration_manager_integration_browsertest.cc
+++ b/content/browser/vibration_manager_integration_browsertest.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 <stdint.h>
+
+#include "base/macros.h"
+#include "build/build_config.h"
#include "content/public/browser/content_browser_client.h"
#include "content/public/common/service_registry.h"
#include "content/public/test/content_browser_test.h"
@@ -21,7 +25,7 @@ namespace content {
namespace {
// Global, record milliseconds when Vibrate() got called.
-int64 g_vibrate_milliseconds;
+int64_t g_vibrate_milliseconds;
// Global, record whether Cancel() got called.
bool g_cancelled;
// Global, wait for end of execution for VibrationManager API Vibrate().
@@ -48,7 +52,7 @@ class FakeVibrationManager : public device::VibrationManager {
: binding_(this, request.Pass()) {}
~FakeVibrationManager() override {}
- void Vibrate(int64 milliseconds) override {
+ void Vibrate(int64_t milliseconds) override {
g_vibrate_milliseconds = milliseconds;
g_wait_vibrate_runner->Quit();
}
diff --git a/content/browser/vr/android/cardboard/cardboard_vr_device.h b/content/browser/vr/android/cardboard/cardboard_vr_device.h
index 769fd9a..66f8287 100644
--- a/content/browser/vr/android/cardboard/cardboard_vr_device.h
+++ b/content/browser/vr/android/cardboard/cardboard_vr_device.h
@@ -8,7 +8,7 @@
#include <jni.h>
#include "base/android/jni_android.h"
-#include "base/basictypes.h"
+#include "base/macros.h"
#include "content/browser/vr/vr_device.h"
namespace content {
diff --git a/content/browser/vr/android/cardboard/cardboard_vr_device_provider.h b/content/browser/vr/android/cardboard/cardboard_vr_device_provider.h
index 2b3f87c..b041316 100644
--- a/content/browser/vr/android/cardboard/cardboard_vr_device_provider.h
+++ b/content/browser/vr/android/cardboard/cardboard_vr_device_provider.h
@@ -7,7 +7,7 @@
#include <map>
-#include "base/basictypes.h"
+#include "base/macros.h"
#include "base/memory/scoped_ptr.h"
#include "content/browser/vr/vr_device.h"
#include "content/browser/vr/vr_device_provider.h"
diff --git a/content/browser/vr/test/fake_vr_device.h b/content/browser/vr/test/fake_vr_device.h
index 2cb7384..b58ac93 100644
--- a/content/browser/vr/test/fake_vr_device.h
+++ b/content/browser/vr/test/fake_vr_device.h
@@ -5,6 +5,7 @@
#ifndef CONTENT_BROWSER_VR_TEST_FAKE_VR_DEVICE_H_
#define CONTENT_BROWSER_VR_TEST_FAKE_VR_DEVICE_H_
+#include "base/macros.h"
#include "content/browser/vr/vr_device.h"
#include "content/browser/vr/vr_device_provider.h"
diff --git a/content/browser/vr/vr_device_manager.cc b/content/browser/vr/vr_device_manager.cc
index 07e420d..e013358 100644
--- a/content/browser/vr/vr_device_manager.cc
+++ b/content/browser/vr/vr_device_manager.cc
@@ -6,6 +6,7 @@
#include "base/bind.h"
#include "base/memory/singleton.h"
+#include "build/build_config.h"
#include "third_party/WebKit/public/platform/modules/vr/WebVR.h"
#if defined(OS_ANDROID)
diff --git a/content/browser/vr/vr_device_manager.h b/content/browser/vr/vr_device_manager.h
index 58789f7..4eb39ea 100644
--- a/content/browser/vr/vr_device_manager.h
+++ b/content/browser/vr/vr_device_manager.h
@@ -5,10 +5,12 @@
#ifndef CONTENT_BROWSER_VR_VR_DEVICE_MANAGER_H
#define CONTENT_BROWSER_VR_VR_DEVICE_MANAGER_H
+#include <stdint.h>
+
#include <map>
#include <vector>
-#include "base/basictypes.h"
+#include "base/macros.h"
#include "base/memory/linked_ptr.h"
#include "base/memory/scoped_ptr.h"
#include "base/threading/thread_checker.h"
diff --git a/content/browser/vr/vr_device_manager_unittest.cc b/content/browser/vr/vr_device_manager_unittest.cc
index 873a296..001d440 100644
--- a/content/browser/vr/vr_device_manager_unittest.cc
+++ b/content/browser/vr/vr_device_manager_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/linked_ptr.h"
#include "base/memory/scoped_ptr.h"
#include "content/browser/vr/test/fake_vr_device.h"
diff --git a/content/browser/wake_lock/wake_lock_service_context.cc b/content/browser/wake_lock/wake_lock_service_context.cc
index 8143dc4..48dcb3c 100644
--- a/content/browser/wake_lock/wake_lock_service_context.cc
+++ b/content/browser/wake_lock/wake_lock_service_context.cc
@@ -5,6 +5,7 @@
#include "content/browser/wake_lock/wake_lock_service_context.h"
#include "base/bind.h"
+#include "build/build_config.h"
#include "content/browser/power_save_blocker_impl.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/power_save_blocker.h"
diff --git a/content/browser/web_contents/aura/gesture_nav_simple.cc b/content/browser/web_contents/aura/gesture_nav_simple.cc
index c8569b9..58a030c 100644
--- a/content/browser/web_contents/aura/gesture_nav_simple.cc
+++ b/content/browser/web_contents/aura/gesture_nav_simple.cc
@@ -4,6 +4,7 @@
#include "content/browser/web_contents/aura/gesture_nav_simple.h"
+#include "base/macros.h"
#include "cc/layers/layer.h"
#include "content/browser/frame_host/navigation_controller_impl.h"
#include "content/browser/renderer_host/overscroll_controller.h"
diff --git a/content/browser/web_contents/aura/gesture_nav_simple.h b/content/browser/web_contents/aura/gesture_nav_simple.h
index 46da909..999ef26 100644
--- a/content/browser/web_contents/aura/gesture_nav_simple.h
+++ b/content/browser/web_contents/aura/gesture_nav_simple.h
@@ -5,6 +5,7 @@
#ifndef CONTENT_BROWSER_WEB_CONTENTS_AURA_GESTURE_NAV_SIMPLE_H_
#define CONTENT_BROWSER_WEB_CONTENTS_AURA_GESTURE_NAV_SIMPLE_H_
+#include "base/macros.h"
#include "base/memory/scoped_ptr.h"
#include "content/browser/renderer_host/overscroll_controller_delegate.h"
diff --git a/content/browser/web_contents/aura/overscroll_navigation_overlay.cc b/content/browser/web_contents/aura/overscroll_navigation_overlay.cc
index 14b2375..ef3ee2f 100644
--- a/content/browser/web_contents/aura/overscroll_navigation_overlay.cc
+++ b/content/browser/web_contents/aura/overscroll_navigation_overlay.cc
@@ -7,6 +7,7 @@
#include <vector>
#include "base/i18n/rtl.h"
+#include "base/macros.h"
#include "base/metrics/histogram_macros.h"
#include "content/browser/frame_host/navigation_entry_impl.h"
#include "content/browser/renderer_host/render_view_host_impl.h"
diff --git a/content/browser/web_contents/aura/overscroll_navigation_overlay_unittest.cc b/content/browser/web_contents/aura/overscroll_navigation_overlay_unittest.cc
index 401de93..7aa8b94 100644
--- a/content/browser/web_contents/aura/overscroll_navigation_overlay_unittest.cc
+++ b/content/browser/web_contents/aura/overscroll_navigation_overlay_unittest.cc
@@ -6,6 +6,7 @@
#include <vector>
+#include "base/macros.h"
#include "content/browser/frame_host/navigation_entry_impl.h"
#include "content/browser/web_contents/web_contents_view.h"
#include "content/common/frame_messages.h"
diff --git a/content/browser/web_contents/aura/overscroll_window_animation.h b/content/browser/web_contents/aura/overscroll_window_animation.h
index 4e49365..7de03fd 100644
--- a/content/browser/web_contents/aura/overscroll_window_animation.h
+++ b/content/browser/web_contents/aura/overscroll_window_animation.h
@@ -5,6 +5,7 @@
#ifndef CONTENT_BROWSER_WEB_CONTENTS_AURA_OVERSCROLL_WINDOW_ANIMATION_H_
#define CONTENT_BROWSER_WEB_CONTENTS_AURA_OVERSCROLL_WINDOW_ANIMATION_H_
+#include "base/macros.h"
#include "content/browser/renderer_host/overscroll_controller_delegate.h"
#include "content/common/content_export.h"
#include "ui/compositor/layer_animation_observer.h"
diff --git a/content/browser/web_contents/aura/overscroll_window_animation_unittest.cc b/content/browser/web_contents/aura/overscroll_window_animation_unittest.cc
index cb07726..5f09797 100644
--- a/content/browser/web_contents/aura/overscroll_window_animation_unittest.cc
+++ b/content/browser/web_contents/aura/overscroll_window_animation_unittest.cc
@@ -4,6 +4,7 @@
#include "content/browser/web_contents/aura/overscroll_window_animation.h"
+#include "base/macros.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "ui/aura/test/aura_test_base.h"
#include "ui/aura/window.h"
diff --git a/content/browser/web_contents/aura/overscroll_window_delegate.h b/content/browser/web_contents/aura/overscroll_window_delegate.h
index db590f7..1abde58 100644
--- a/content/browser/web_contents/aura/overscroll_window_delegate.h
+++ b/content/browser/web_contents/aura/overscroll_window_delegate.h
@@ -6,6 +6,7 @@
#define CONTENT_BROWSER_WEB_CONTENTS_AURA_OVERSCROLL_WINDOW_DELEGATE_H_
#include "base/gtest_prod_util.h"
+#include "base/macros.h"
#include "content/browser/renderer_host/overscroll_controller.h"
#include "content/browser/web_contents/aura/overscroll_navigation_overlay.h"
#include "content/browser/web_contents/web_contents_impl.h"
diff --git a/content/browser/web_contents/aura/overscroll_window_delegate_unittest.cc b/content/browser/web_contents/aura/overscroll_window_delegate_unittest.cc
index 15c9f88..6b1b546 100644
--- a/content/browser/web_contents/aura/overscroll_window_delegate_unittest.cc
+++ b/content/browser/web_contents/aura/overscroll_window_delegate_unittest.cc
@@ -4,6 +4,7 @@
#include "content/browser/web_contents/aura/overscroll_window_delegate.h"
+#include "base/macros.h"
#include "content/browser/renderer_host/overscroll_controller_delegate.h"
#include "content/public/browser/overscroll_configuration.h"
#include "testing/gtest/include/gtest/gtest.h"
diff --git a/content/browser/web_contents/aura/shadow_layer_delegate.cc b/content/browser/web_contents/aura/shadow_layer_delegate.cc
index 74be3d0..067a147 100644
--- a/content/browser/web_contents/aura/shadow_layer_delegate.cc
+++ b/content/browser/web_contents/aura/shadow_layer_delegate.cc
@@ -5,6 +5,7 @@
#include "content/browser/web_contents/aura/shadow_layer_delegate.h"
#include "base/bind.h"
+#include "base/macros.h"
#include "third_party/skia/include/effects/SkGradientShader.h"
#include "ui/aura/window.h"
#include "ui/compositor/layer.h"
diff --git a/content/browser/web_contents/aura/shadow_layer_delegate.h b/content/browser/web_contents/aura/shadow_layer_delegate.h
index c9a0b7e..3f47759 100644
--- a/content/browser/web_contents/aura/shadow_layer_delegate.h
+++ b/content/browser/web_contents/aura/shadow_layer_delegate.h
@@ -6,6 +6,7 @@
#define CONTENT_BROWSER_WEB_CONTENTS_AURA_SHADOW_LAYER_DELEGATE_H_
#include "base/compiler_specific.h"
+#include "base/macros.h"
#include "base/memory/scoped_ptr.h"
#include "ui/compositor/layer_delegate.h"
diff --git a/content/browser/web_contents/opened_by_dom_browsertest.cc b/content/browser/web_contents/opened_by_dom_browsertest.cc
index afc7851..44a184c 100644
--- a/content/browser/web_contents/opened_by_dom_browsertest.cc
+++ b/content/browser/web_contents/opened_by_dom_browsertest.cc
@@ -3,6 +3,7 @@
// found in the LICENSE file.
#include "base/command_line.h"
+#include "base/macros.h"
#include "base/strings/stringprintf.h"
#include "content/public/browser/web_contents.h"
#include "content/public/browser/web_contents_delegate.h"
diff --git a/content/browser/web_contents/web_contents_android.cc b/content/browser/web_contents/web_contents_android.cc
index 6475c87..347fa7b 100644
--- a/content/browser/web_contents/web_contents_android.cc
+++ b/content/browser/web_contents/web_contents_android.cc
@@ -4,6 +4,8 @@
#include "content/browser/web_contents/web_contents_android.h"
+#include <stdint.h>
+
#include "base/android/jni_android.h"
#include "base/android/jni_array.h"
#include "base/android/jni_string.h"
@@ -83,10 +85,10 @@ struct AccessibilitySnapshotParams {
// The current text selection within this tree, if any, expressed as the
// node ID and character offset of the anchor (selection start) and focus
// (selection end).
- int32 sel_anchor_object_id;
- int32 sel_anchor_offset;
- int32 sel_focus_object_id;
- int32 sel_focus_offset;
+ int32_t sel_anchor_object_id;
+ int32_t sel_anchor_offset;
+ int32_t sel_focus_object_id;
+ int32_t sel_focus_offset;
// if the flag is true, mark the leaf node as selected.
bool should_select_leaf_nodes;
};
@@ -143,7 +145,7 @@ ScopedJavaLocalRef<jobject> WalkAXTreeDepthFirst(
env, j_node.obj(), start_selection, end_selection);
}
- for(uint32 i = 0; i < node->PlatformChildCount(); i++) {
+ for (uint32_t i = 0; i < node->PlatformChildCount(); i++) {
BrowserAccessibilityAndroid* child =
static_cast<BrowserAccessibilityAndroid*>(
node->PlatformGetChild(i));
diff --git a/content/browser/web_contents/web_contents_android.h b/content/browser/web_contents/web_contents_android.h
index 3676270..9453d52 100644
--- a/content/browser/web_contents/web_contents_android.h
+++ b/content/browser/web_contents/web_contents_android.h
@@ -9,8 +9,8 @@
#include "base/android/jni_android.h"
#include "base/android/scoped_java_ref.h"
-#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/supports_user_data.h"
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index 9568313..eadd9c1 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -4,12 +4,15 @@
#include "content/browser/web_contents/web_contents_impl.h"
+#include <stddef.h>
+
#include <utility>
#include "base/command_line.h"
#include "base/lazy_instance.h"
#include "base/location.h"
#include "base/logging.h"
+#include "base/macros.h"
#include "base/metrics/histogram.h"
#include "base/process/process.h"
#include "base/profiler/scoped_tracker.h"
@@ -21,6 +24,7 @@
#include "base/thread_task_runner_handle.h"
#include "base/time/time.h"
#include "base/trace_event/trace_event.h"
+#include "build/build_config.h"
#include "components/mime_util/mime_util.h"
#include "components/url_formatter/url_formatter.h"
#include "content/browser/accessibility/accessibility_mode_helper.h"
@@ -978,11 +982,11 @@ const base::string16& WebContentsImpl::GetTitle() const {
return page_title_when_no_navigation_entry_;
}
-int32 WebContentsImpl::GetMaxPageID() {
+int32_t WebContentsImpl::GetMaxPageID() {
return GetMaxPageIDForSiteInstance(GetSiteInstance());
}
-int32 WebContentsImpl::GetMaxPageIDForSiteInstance(
+int32_t WebContentsImpl::GetMaxPageIDForSiteInstance(
SiteInstance* site_instance) {
if (max_page_ids_.find(site_instance->GetId()) == max_page_ids_.end())
max_page_ids_[site_instance->GetId()] = -1;
@@ -990,12 +994,13 @@ int32 WebContentsImpl::GetMaxPageIDForSiteInstance(
return max_page_ids_[site_instance->GetId()];
}
-void WebContentsImpl::UpdateMaxPageID(int32 page_id) {
+void WebContentsImpl::UpdateMaxPageID(int32_t page_id) {
UpdateMaxPageIDForSiteInstance(GetSiteInstance(), page_id);
}
void WebContentsImpl::UpdateMaxPageIDForSiteInstance(
- SiteInstance* site_instance, int32 page_id) {
+ SiteInstance* site_instance,
+ int32_t page_id) {
if (GetMaxPageIDForSiteInstance(site_instance) < page_id)
max_page_ids_[site_instance->GetId()] = page_id;
}
@@ -1037,11 +1042,11 @@ const base::string16& WebContentsImpl::GetLoadStateHost() const {
return load_state_host_;
}
-uint64 WebContentsImpl::GetUploadSize() const {
+uint64_t WebContentsImpl::GetUploadSize() const {
return upload_size_;
}
-uint64 WebContentsImpl::GetUploadPosition() const {
+uint64_t WebContentsImpl::GetUploadPosition() const {
return upload_position_;
}
@@ -1905,19 +1910,19 @@ void WebContentsImpl::CreateNewWindow(
}
}
-void WebContentsImpl::CreateNewWidget(int32 render_process_id,
- int32 route_id,
+void WebContentsImpl::CreateNewWidget(int32_t render_process_id,
+ int32_t route_id,
blink::WebPopupType popup_type) {
CreateNewWidget(render_process_id, route_id, false, popup_type);
}
-void WebContentsImpl::CreateNewFullscreenWidget(int32 render_process_id,
- int32 route_id) {
+void WebContentsImpl::CreateNewFullscreenWidget(int32_t render_process_id,
+ int32_t route_id) {
CreateNewWidget(render_process_id, route_id, true, blink::WebPopupTypeNone);
}
-void WebContentsImpl::CreateNewWidget(int32 render_process_id,
- int32 route_id,
+void WebContentsImpl::CreateNewWidget(int32_t render_process_id,
+ int32_t route_id,
bool is_fullscreen,
blink::WebPopupType popup_type) {
RenderProcessHost* process = GetRenderProcessHost();
@@ -2561,7 +2566,7 @@ void WebContentsImpl::SaveFrameWithHeaders(const GURL& url,
BrowserContext::GetDownloadManager(GetBrowserContext());
if (!dlm)
return;
- int64 post_id = -1;
+ int64_t post_id = -1;
if (is_main_frame) {
const NavigationEntry* entry = controller_.GetLastCommittedEntry();
if (entry)
@@ -2592,7 +2597,7 @@ void WebContentsImpl::SaveFrameWithHeaders(const GURL& url,
void WebContentsImpl::GenerateMHTML(
const base::FilePath& file,
- const base::Callback<void(int64)>& callback) {
+ const base::Callback<void(int64_t)>& callback) {
MHTMLGenerationManager::GetInstance()->SaveMHTML(this, file, callback);
}
@@ -3940,7 +3945,7 @@ void WebContentsImpl::RenderViewDeleted(RenderViewHost* rvh) {
}
void WebContentsImpl::UpdateState(RenderViewHost* rvh,
- int32 page_id,
+ int32_t page_id,
const PageState& page_state) {
DCHECK(!SiteIsolationPolicy::UseSubframeNavigationEntries());
@@ -4166,7 +4171,7 @@ void WebContentsImpl::UpdateStateForFrame(RenderFrameHost* render_frame_host,
}
void WebContentsImpl::UpdateTitle(RenderFrameHost* render_frame_host,
- int32 page_id,
+ int32_t page_id,
const base::string16& title,
base::i18n::TextDirection title_direction) {
// If we have a title, that's a pretty good indication that we've started
@@ -4263,9 +4268,9 @@ void WebContentsImpl::EnsureOpenerProxiesExist(RenderFrameHost* source_rfh) {
}
}
-bool WebContentsImpl::AddMessageToConsole(int32 level,
+bool WebContentsImpl::AddMessageToConsole(int32_t level,
const base::string16& message,
- int32 line_no,
+ int32_t line_no,
const base::string16& source_id) {
if (!delegate_)
return false;
@@ -4366,8 +4371,8 @@ void WebContentsImpl::RendererResponsive(
void WebContentsImpl::LoadStateChanged(
const GURL& url,
const net::LoadStateWithParam& load_state,
- uint64 upload_position,
- uint64 upload_size) {
+ uint64_t upload_position,
+ uint64_t upload_size) {
// TODO(erikchen): Remove ScopedTracker below once http://crbug.com/466285
// is fixed.
tracked_objects::ScopedTracker tracking_profile1(
@@ -4497,7 +4502,7 @@ bool WebContentsImpl::CreateRenderViewForRenderManager(
// Make sure we use the correct starting page_id in the new RenderView.
UpdateMaxPageIDIfNecessary(render_view_host);
- int32 max_page_id =
+ int32_t max_page_id =
GetMaxPageIDForSiteInstance(render_view_host->GetSiteInstance());
if (!static_cast<RenderViewHostImpl*>(render_view_host)
diff --git a/content/browser/web_contents/web_contents_impl.h b/content/browser/web_contents/web_contents_impl.h
index 2b867cc..ceb900e 100644
--- a/content/browser/web_contents/web_contents_impl.h
+++ b/content/browser/web_contents/web_contents_impl.h
@@ -5,6 +5,8 @@
#ifndef CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_
#define CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_
+#include <stdint.h>
+
#include <map>
#include <set>
#include <string>
@@ -12,10 +14,12 @@
#include "base/compiler_specific.h"
#include "base/containers/scoped_ptr_hash_map.h"
#include "base/gtest_prod_util.h"
+#include "base/macros.h"
#include "base/memory/scoped_ptr.h"
#include "base/observer_list.h"
#include "base/process/process.h"
#include "base/values.h"
+#include "build/build_config.h"
#include "content/browser/frame_host/frame_tree.h"
#include "content/browser/frame_host/navigation_controller_delegate.h"
#include "content/browser/frame_host/navigation_controller_impl.h"
@@ -260,8 +264,8 @@ class CONTENT_EXPORT WebContentsImpl
#endif
const PageImportanceSignals& GetPageImportanceSignals() const override;
const base::string16& GetTitle() const override;
- int32 GetMaxPageID() override;
- int32 GetMaxPageIDForSiteInstance(SiteInstance* site_instance) override;
+ int32_t GetMaxPageID() override;
+ int32_t GetMaxPageIDForSiteInstance(SiteInstance* site_instance) override;
SiteInstanceImpl* GetSiteInstance() const override;
SiteInstanceImpl* GetPendingSiteInstance() const override;
bool IsLoading() const override;
@@ -269,8 +273,8 @@ class CONTENT_EXPORT WebContentsImpl
bool IsWaitingForResponse() const override;
const net::LoadStateWithParam& GetLoadState() const override;
const base::string16& GetLoadStateHost() const override;
- uint64 GetUploadSize() const override;
- uint64 GetUploadPosition() const override;
+ uint64_t GetUploadSize() const override;
+ uint64_t GetUploadPosition() const override;
const std::string& GetEncoding() const override;
bool DisplayedInsecureContent() const override;
void IncrementCapturerCount(const gfx::Size& capture_size) override;
@@ -335,7 +339,7 @@ class CONTENT_EXPORT WebContentsImpl
const Referrer& referrer,
const std::string& headers) override;
void GenerateMHTML(const base::FilePath& file,
- const base::Callback<void(int64)>& callback) override;
+ const base::Callback<void(int64_t)>& callback) override;
const std::string& GetContentsMimeType() const override;
bool WillNotifyDisconnection() const override;
void SetOverrideEncoding(const std::string& encoding) override;
@@ -419,7 +423,7 @@ class CONTENT_EXPORT WebContentsImpl
void UpdateStateForFrame(RenderFrameHost* render_frame_host,
const PageState& page_state) override;
void UpdateTitle(RenderFrameHost* render_frame_host,
- int32 page_id,
+ int32_t page_id,
const base::string16& title,
base::i18n::TextDirection title_direction) override;
void UpdateEncoding(RenderFrameHost* render_frame_host,
@@ -459,7 +463,7 @@ class CONTENT_EXPORT WebContentsImpl
int error_code) override;
void RenderViewDeleted(RenderViewHost* render_view_host) override;
void UpdateState(RenderViewHost* render_view_host,
- int32 page_id,
+ int32_t page_id,
const PageState& page_state) override;
void UpdateTargetURL(RenderViewHost* render_view_host,
const GURL& url) override;
@@ -468,9 +472,9 @@ class CONTENT_EXPORT WebContentsImpl
void DidCancelLoading() override;
void DocumentAvailableInMainFrame(RenderViewHost* render_view_host) override;
void RouteCloseEvent(RenderViewHost* rvh) override;
- bool AddMessageToConsole(int32 level,
+ bool AddMessageToConsole(int32_t level,
const base::string16& message,
- int32 line_no,
+ int32_t line_no,
const base::string16& source_id) override;
RendererPreferences GetRendererPrefs(
BrowserContext* browser_context) const override;
@@ -478,8 +482,8 @@ class CONTENT_EXPORT WebContentsImpl
void OnIgnoredUIEvent() override;
void LoadStateChanged(const GURL& url,
const net::LoadStateWithParam& load_state,
- uint64 upload_position,
- uint64 upload_size) override;
+ uint64_t upload_position,
+ uint64_t upload_size) override;
void Activate() override;
void RunFileChooser(RenderViewHost* render_view_host,
const FileChooserParams& params) override;
@@ -491,11 +495,11 @@ class CONTENT_EXPORT WebContentsImpl
int32_t main_frame_widget_route_id,
const ViewHostMsg_CreateWindow_Params& params,
SessionStorageNamespace* session_storage_namespace) override;
- void CreateNewWidget(int32 render_process_id,
- int32 route_id,
+ void CreateNewWidget(int32_t render_process_id,
+ int32_t route_id,
blink::WebPopupType popup_type) override;
- void CreateNewFullscreenWidget(int32 render_process_id,
- int32 route_id) override;
+ void CreateNewFullscreenWidget(int32_t render_process_id,
+ int32_t route_id) override;
void ShowCreatedWindow(int route_id,
WindowOpenDisposition disposition,
const gfx::Rect& initial_rect,
@@ -670,12 +674,12 @@ class CONTENT_EXPORT WebContentsImpl
// Updates the max page ID for the current SiteInstance in this
// WebContentsImpl to be at least |page_id|.
- void UpdateMaxPageID(int32 page_id) override;
+ void UpdateMaxPageID(int32_t page_id) override;
// Updates the max page ID for the given SiteInstance in this WebContentsImpl
// to be at least |page_id|.
void UpdateMaxPageIDForSiteInstance(SiteInstance* site_instance,
- int32 page_id) override;
+ int32_t page_id) override;
// Copy the current map of SiteInstance ID to max page ID from another tab.
// This is necessary when this tab adopts the NavigationEntries from
@@ -943,8 +947,8 @@ class CONTENT_EXPORT WebContentsImpl
const base::string16& title);
// Helper for CreateNewWidget/CreateNewFullscreenWidget.
- void CreateNewWidget(int32 render_process_id,
- int32 route_id,
+ void CreateNewWidget(int32_t render_process_id,
+ int32_t route_id,
bool is_fullscreen,
blink::WebPopupType popup_type);
@@ -1084,7 +1088,7 @@ class CONTENT_EXPORT WebContentsImpl
// Map of SiteInstance ID to max page ID for this tab. A page ID is specific
// to a given tab and SiteInstance, and must be valid for the lifetime of the
// WebContentsImpl.
- std::map<int32, int32> max_page_ids_;
+ std::map<int32_t, int32_t> max_page_ids_;
// The current load state and the URL associated with it.
net::LoadStateWithParam load_state_;
@@ -1094,8 +1098,8 @@ class CONTENT_EXPORT WebContentsImpl
// Upload progress, for displaying in the status bar.
// Set to zero when there is no significant upload happening.
- uint64 upload_size_;
- uint64 upload_position_;
+ uint64_t upload_size_;
+ uint64_t upload_position_;
// Tracks that this WebContents needs to unblock requests to the renderer.
// See ResumeLoadingCreatedWebContents.
diff --git a/content/browser/web_contents/web_contents_impl_browsertest.cc b/content/browser/web_contents/web_contents_impl_browsertest.cc
index 21bd98b..a0a9c40 100644
--- a/content/browser/web_contents/web_contents_impl_browsertest.cc
+++ b/content/browser/web_contents/web_contents_impl_browsertest.cc
@@ -2,8 +2,10 @@
// 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/strings/utf_string_conversions.h"
#include "base/values.h"
+#include "build/build_config.h"
#include "content/browser/frame_host/navigation_entry_impl.h"
#include "content/browser/renderer_host/render_widget_host_impl.h"
#include "content/browser/web_contents/web_contents_impl.h"
diff --git a/content/browser/web_contents/web_contents_impl_unittest.cc b/content/browser/web_contents/web_contents_impl_unittest.cc
index b52447c..eab029b 100644
--- a/content/browser/web_contents/web_contents_impl_unittest.cc
+++ b/content/browser/web_contents/web_contents_impl_unittest.cc
@@ -2,9 +2,13 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include <stdint.h>
+
#include "base/command_line.h"
#include "base/logging.h"
+#include "base/macros.h"
#include "base/strings/utf_string_conversions.h"
+#include "build/build_config.h"
#include "content/browser/frame_host/cross_site_transferring_request.h"
#include "content/browser/frame_host/interstitial_page_impl.h"
#include "content/browser/frame_host/navigation_entry_impl.h"
@@ -1490,7 +1494,7 @@ TEST_F(WebContentsImplTest, NavigationEntryContentStateNewWindow) {
NavigationEntryImpl* entry_impl =
NavigationEntryImpl::FromNavigationEntry(entry);
EXPECT_FALSE(entry_impl->site_instance()->HasSite());
- int32 site_instance_id = entry_impl->site_instance()->GetId();
+ int32_t site_instance_id = entry_impl->site_instance()->GetId();
// Navigating to a normal page should not cause a process swap.
const GURL new_url("http://www.google.com");
@@ -3189,7 +3193,8 @@ TEST_F(WebContentsImplTest, NoEarlyStop) {
}
TEST_F(WebContentsImplTest, MediaPowerSaveBlocking) {
- // PlayerIDs are actually pointers cast to int64, so verify that both negative
+ // PlayerIDs are actually pointers cast to int64_t, so verify that both
+ // negative
// and positive player ids don't blow up.
const int kPlayerAudioVideoId = 15;
const int kPlayerAudioOnlyId = -15;
diff --git a/content/browser/web_contents/web_contents_view.h b/content/browser/web_contents/web_contents_view.h
index 439dda4..cbca384 100644
--- a/content/browser/web_contents/web_contents_view.h
+++ b/content/browser/web_contents/web_contents_view.h
@@ -7,8 +7,8 @@
#include <string>
-#include "base/basictypes.h"
#include "base/strings/string16.h"
+#include "build/build_config.h"
#include "content/common/content_export.h"
#include "ui/gfx/geometry/rect.h"
#include "ui/gfx/geometry/size.h"
diff --git a/content/browser/web_contents/web_contents_view_android.h b/content/browser/web_contents/web_contents_view_android.h
index 9f7216f..6b135dc 100644
--- a/content/browser/web_contents/web_contents_view_android.h
+++ b/content/browser/web_contents/web_contents_view_android.h
@@ -5,6 +5,7 @@
#ifndef CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_VIEW_ANDROID_H_
#define CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_VIEW_ANDROID_H_
+#include "base/macros.h"
#include "base/memory/scoped_ptr.h"
#include "content/browser/renderer_host/render_view_host_delegate_view.h"
#include "content/browser/web_contents/web_contents_view.h"
diff --git a/content/browser/web_contents/web_contents_view_aura.cc b/content/browser/web_contents/web_contents_view_aura.cc
index 2201cd0..41ef84f 100644
--- a/content/browser/web_contents/web_contents_view_aura.cc
+++ b/content/browser/web_contents/web_contents_view_aura.cc
@@ -4,10 +4,15 @@
#include "content/browser/web_contents/web_contents_view_aura.h"
+#include <stddef.h>
+#include <stdint.h>
+
#include "base/auto_reset.h"
#include "base/command_line.h"
#include "base/files/file_util.h"
+#include "base/macros.h"
#include "base/strings/utf_string_conversions.h"
+#include "build/build_config.h"
#include "content/browser/browser_plugin/browser_plugin_guest.h"
#include "content/browser/download/drag_download_util.h"
#include "content/browser/frame_host/interstitial_page_impl.h"
@@ -251,7 +256,7 @@ bool ReadFileSystemFilesFromPickle(
for (size_t i = 0; i < num_files; ++i) {
std::string url_string;
- int64 size = 0;
+ int64_t size = 0;
if (!iter.ReadString(&url_string) || !iter.ReadInt64(&size))
return false;
diff --git a/content/browser/web_contents/web_contents_view_aura.h b/content/browser/web_contents/web_contents_view_aura.h
index 0d84b5a..70c29b0 100644
--- a/content/browser/web_contents/web_contents_view_aura.h
+++ b/content/browser/web_contents/web_contents_view_aura.h
@@ -8,6 +8,7 @@
#include <vector>
#include "base/gtest_prod_util.h"
+#include "base/macros.h"
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
#include "content/browser/renderer_host/overscroll_controller_delegate.h"
diff --git a/content/browser/web_contents/web_contents_view_aura_browsertest.cc b/content/browser/web_contents/web_contents_view_aura_browsertest.cc
index 4140e35..8d08134 100644
--- a/content/browser/web_contents/web_contents_view_aura_browsertest.cc
+++ b/content/browser/web_contents/web_contents_view_aura_browsertest.cc
@@ -4,17 +4,18 @@
#include "content/browser/web_contents/web_contents_view_aura.h"
+#include <stddef.h>
+
#include "base/command_line.h"
#include "base/location.h"
+#include "base/macros.h"
#include "base/run_loop.h"
#include "base/single_thread_task_runner.h"
#include "base/strings/utf_string_conversions.h"
#include "base/test/test_timeouts.h"
#include "base/thread_task_runner_handle.h"
#include "base/values.h"
-#if defined(OS_WIN)
-#include "base/win/windows_version.h"
-#endif
+#include "build/build_config.h"
#include "content/browser/frame_host/navigation_controller_impl.h"
#include "content/browser/frame_host/navigation_entry_impl.h"
#include "content/browser/frame_host/navigation_entry_screenshot_manager.h"
@@ -45,6 +46,10 @@
#include "ui/events/event_utils.h"
#include "ui/events/test/event_generator.h"
+#if defined(OS_WIN)
+#include "base/win/windows_version.h"
+#endif
+
namespace {
// TODO(tdresser): Find a way to avoid sleeping like this. See crbug.com/405282
diff --git a/content/browser/web_contents/web_contents_view_guest.h b/content/browser/web_contents/web_contents_view_guest.h
index 3a4983b..7f2df7f 100644
--- a/content/browser/web_contents/web_contents_view_guest.h
+++ b/content/browser/web_contents/web_contents_view_guest.h
@@ -7,7 +7,9 @@
#include <vector>
+#include "base/macros.h"
#include "base/memory/scoped_ptr.h"
+#include "build/build_config.h"
#include "content/browser/renderer_host/render_view_host_delegate_view.h"
#include "content/browser/web_contents/web_contents_view.h"
#include "content/common/content_export.h"
diff --git a/content/browser/web_contents/web_contents_view_mac.h b/content/browser/web_contents/web_contents_view_mac.h
index 46427c5..62a8b34 100644
--- a/content/browser/web_contents/web_contents_view_mac.h
+++ b/content/browser/web_contents/web_contents_view_mac.h
@@ -11,6 +11,7 @@
#include <vector>
#include "base/mac/scoped_nsobject.h"
+#include "base/macros.h"
#include "base/memory/scoped_ptr.h"
#include "content/browser/renderer_host/render_view_host_delegate_view.h"
#include "content/browser/web_contents/web_contents_view.h"
diff --git a/content/browser/web_contents/web_contents_view_mus.h b/content/browser/web_contents/web_contents_view_mus.h
index 4e5952c..05d51d1 100644
--- a/content/browser/web_contents/web_contents_view_mus.h
+++ b/content/browser/web_contents/web_contents_view_mus.h
@@ -9,6 +9,7 @@
#include "base/macros.h"
#include "base/memory/scoped_ptr.h"
+#include "build/build_config.h"
#include "components/mus/public/cpp/scoped_window_ptr.h"
#include "components/mus/public/cpp/window.h"
#include "content/browser/renderer_host/render_view_host_delegate_view.h"
diff --git a/content/browser/webui/content_web_ui_controller_factory.cc b/content/browser/webui/content_web_ui_controller_factory.cc
index f4bf627..196da55 100644
--- a/content/browser/webui/content_web_ui_controller_factory.cc
+++ b/content/browser/webui/content_web_ui_controller_factory.cc
@@ -4,6 +4,7 @@
#include "content/browser/webui/content_web_ui_controller_factory.h"
+#include "build/build_config.h"
#include "content/browser/accessibility/accessibility_ui.h"
#include "content/browser/appcache/appcache_internals_ui.h"
#include "content/browser/gpu/gpu_internals_ui.h"
diff --git a/content/browser/webui/content_web_ui_controller_factory.h b/content/browser/webui/content_web_ui_controller_factory.h
index 63023f3..15f782c 100644
--- a/content/browser/webui/content_web_ui_controller_factory.h
+++ b/content/browser/webui/content_web_ui_controller_factory.h
@@ -5,7 +5,7 @@
#ifndef CONTENT_BROWSER_WEBUI_CONTENT_WEB_UI_CONTROLLER_FACTORY_H_
#define CONTENT_BROWSER_WEBUI_CONTENT_WEB_UI_CONTROLLER_FACTORY_H_
-#include "base/basictypes.h"
+#include "base/macros.h"
#include "base/memory/singleton.h"
#include "content/public/browser/web_ui.h"
#include "content/public/browser/web_ui_controller_factory.h"
diff --git a/content/browser/webui/shared_resources_data_source.cc b/content/browser/webui/shared_resources_data_source.cc
index 32dc6c6..3c7c01b 100644
--- a/content/browser/webui/shared_resources_data_source.cc
+++ b/content/browser/webui/shared_resources_data_source.cc
@@ -4,6 +4,8 @@
#include "content/browser/webui/shared_resources_data_source.h"
+#include <stddef.h>
+
#include "base/containers/hash_tables.h"
#include "base/logging.h"
#include "base/memory/ref_counted_memory.h"
diff --git a/content/browser/webui/shared_resources_data_source.h b/content/browser/webui/shared_resources_data_source.h
index 5c300ef..53bf513 100644
--- a/content/browser/webui/shared_resources_data_source.h
+++ b/content/browser/webui/shared_resources_data_source.h
@@ -5,8 +5,8 @@
#ifndef CONTENT_BROWSER_WEBUI_SHARED_RESOURCES_DATA_SOURCE_H_
#define CONTENT_BROWSER_WEBUI_SHARED_RESOURCES_DATA_SOURCE_H_
-#include "base/basictypes.h"
#include "base/compiler_specific.h"
+#include "base/macros.h"
#include "content/public/browser/url_data_source.h"
namespace content {
diff --git a/content/browser/webui/url_data_manager.cc b/content/browser/webui/url_data_manager.cc
index ffd992e..a9ec107 100644
--- a/content/browser/webui/url_data_manager.cc
+++ b/content/browser/webui/url_data_manager.cc
@@ -4,6 +4,8 @@
#include "content/browser/webui/url_data_manager.h"
+#include <stddef.h>
+
#include <vector>
#include "base/bind.h"
diff --git a/content/browser/webui/url_data_manager.h b/content/browser/webui/url_data_manager.h
index 8a318b7..8eca18c 100644
--- a/content/browser/webui/url_data_manager.h
+++ b/content/browser/webui/url_data_manager.h
@@ -8,6 +8,7 @@
#include <string>
#include <vector>
+#include "base/macros.h"
#include "base/memory/ref_counted.h"
#include "base/supports_user_data.h"
#include "content/common/content_export.h"
diff --git a/content/browser/webui/url_data_manager_backend.cc b/content/browser/webui/url_data_manager_backend.cc
index 911ff96..69f0861 100644
--- a/content/browser/webui/url_data_manager_backend.cc
+++ b/content/browser/webui/url_data_manager_backend.cc
@@ -6,13 +6,13 @@
#include <set>
-#include "base/basictypes.h"
#include "base/bind.h"
#include "base/command_line.h"
#include "base/compiler_specific.h"
#include "base/debug/alias.h"
#include "base/lazy_instance.h"
#include "base/location.h"
+#include "base/macros.h"
#include "base/memory/ref_counted.h"
#include "base/memory/ref_counted_memory.h"
#include "base/memory/weak_ptr.h"
diff --git a/content/browser/webui/url_data_manager_backend.h b/content/browser/webui/url_data_manager_backend.h
index 6a326a0..46048ae 100644
--- a/content/browser/webui/url_data_manager_backend.h
+++ b/content/browser/webui/url_data_manager_backend.h
@@ -9,8 +9,8 @@
#include <string>
#include <vector>
-#include "base/basictypes.h"
#include "base/compiler_specific.h"
+#include "base/macros.h"
#include "base/memory/scoped_ptr.h"
#include "base/supports_user_data.h"
#include "content/browser/webui/url_data_manager.h"
diff --git a/content/browser/webui/url_data_manager_backend_unittest.cc b/content/browser/webui/url_data_manager_backend_unittest.cc
index 6bc644a..41b9239 100644
--- a/content/browser/webui/url_data_manager_backend_unittest.cc
+++ b/content/browser/webui/url_data_manager_backend_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/run_loop.h"
#include "content/browser/webui/url_data_manager_backend.h"
diff --git a/content/browser/webui/web_ui_controller_factory_registry.cc b/content/browser/webui/web_ui_controller_factory_registry.cc
index 8626646..240c4db 100644
--- a/content/browser/webui/web_ui_controller_factory_registry.cc
+++ b/content/browser/webui/web_ui_controller_factory_registry.cc
@@ -4,6 +4,8 @@
#include "content/browser/webui/web_ui_controller_factory_registry.h"
+#include <stddef.h>
+
#include "base/lazy_instance.h"
#include "content/browser/frame_host/debug_urls.h"
#include "content/public/common/url_constants.h"
diff --git a/content/browser/webui/web_ui_controller_factory_registry.h b/content/browser/webui/web_ui_controller_factory_registry.h
index af7fb3d..11020c2 100644
--- a/content/browser/webui/web_ui_controller_factory_registry.h
+++ b/content/browser/webui/web_ui_controller_factory_registry.h
@@ -5,6 +5,7 @@
#ifndef CONTENT_BROWSER_WEBUI_WEB_UI_CONTROLLER_FACTORY_REGISTRY_H_
#define CONTENT_BROWSER_WEBUI_WEB_UI_CONTROLLER_FACTORY_REGISTRY_H_
+#include "base/macros.h"
#include "base/memory/singleton.h"
#include "content/public/browser/web_ui_controller_factory.h"
diff --git a/content/browser/webui/web_ui_data_source_impl.cc b/content/browser/webui/web_ui_data_source_impl.cc
index ce6b7af..06a4c89 100644
--- a/content/browser/webui/web_ui_data_source_impl.cc
+++ b/content/browser/webui/web_ui_data_source_impl.cc
@@ -4,9 +4,12 @@
#include "content/browser/webui/web_ui_data_source_impl.h"
+#include <stddef.h>
+
#include <string>
#include "base/bind.h"
+#include "base/macros.h"
#include "base/memory/ref_counted_memory.h"
#include "base/strings/string_util.h"
#include "content/grit/content_resources.h"
diff --git a/content/browser/webui/web_ui_data_source_impl.h b/content/browser/webui/web_ui_data_source_impl.h
index 48db032..7d899a9 100644
--- a/content/browser/webui/web_ui_data_source_impl.h
+++ b/content/browser/webui/web_ui_data_source_impl.h
@@ -8,9 +8,9 @@
#include <map>
#include <string>
-#include "base/basictypes.h"
#include "base/callback.h"
#include "base/compiler_specific.h"
+#include "base/macros.h"
#include "base/values.h"
#include "content/browser/webui/url_data_manager.h"
#include "content/browser/webui/url_data_source_impl.h"
diff --git a/content/browser/webui/web_ui_data_source_unittest.cc b/content/browser/webui/web_ui_data_source_unittest.cc
index 2b5d854..791ccb7 100644
--- a/content/browser/webui/web_ui_data_source_unittest.cc
+++ b/content/browser/webui/web_ui_data_source_unittest.cc
@@ -3,6 +3,7 @@
// found in the LICENSE file.
#include "base/bind.h"
+#include "base/macros.h"
#include "base/memory/ref_counted_memory.h"
#include "base/strings/utf_string_conversions.h"
#include "content/browser/webui/web_ui_data_source_impl.h"
diff --git a/content/browser/webui/web_ui_impl.cc b/content/browser/webui/web_ui_impl.cc
index 969000f..a7b7614 100644
--- a/content/browser/webui/web_ui_impl.cc
+++ b/content/browser/webui/web_ui_impl.cc
@@ -4,6 +4,8 @@
#include "content/browser/webui/web_ui_impl.h"
+#include <stddef.h>
+
#include "base/debug/dump_without_crashing.h"
#include "base/json/json_writer.h"
#include "base/strings/utf_string_conversions.h"
diff --git a/content/browser/webui/web_ui_impl.h b/content/browser/webui/web_ui_impl.h
index a59b4a5..26c051d 100644
--- a/content/browser/webui/web_ui_impl.h
+++ b/content/browser/webui/web_ui_impl.h
@@ -9,6 +9,7 @@
#include <set>
#include "base/compiler_specific.h"
+#include "base/macros.h"
#include "base/memory/scoped_vector.h"
#include "base/memory/weak_ptr.h"
#include "content/public/browser/web_ui.h"
diff --git a/content/browser/webui/web_ui_mojo_browsertest.cc b/content/browser/webui/web_ui_mojo_browsertest.cc
index 2bed1ab..9785997 100644
--- a/content/browser/webui/web_ui_mojo_browsertest.cc
+++ b/content/browser/webui/web_ui_mojo_browsertest.cc
@@ -7,6 +7,7 @@
#include "base/command_line.h"
#include "base/files/file_path.h"
#include "base/files/file_util.h"
+#include "base/macros.h"
#include "base/path_service.h"
#include "base/run_loop.h"
#include "base/strings/string_util.h"
diff --git a/content/browser/zygote_host/zygote_host_impl_linux.cc b/content/browser/zygote_host/zygote_host_impl_linux.cc
index 3b82e2a..9c68a3f 100644
--- a/content/browser/zygote_host/zygote_host_impl_linux.cc
+++ b/content/browser/zygote_host/zygote_host_impl_linux.cc
@@ -19,6 +19,7 @@
#include "base/files/scoped_file.h"
#include "base/linux_util.h"
#include "base/logging.h"
+#include "base/macros.h"
#include "base/memory/linked_ptr.h"
#include "base/memory/scoped_ptr.h"
#include "base/metrics/histogram.h"
@@ -33,6 +34,7 @@
#include "base/strings/string_util.h"
#include "base/strings/utf_string_conversions.h"
#include "base/time/time.h"
+#include "build/build_config.h"
#include "content/browser/renderer_host/render_sandbox_host_linux.h"
#include "content/common/child_process_sandbox_support_impl_linux.h"
#include "content/common/zygote_commands_linux.h"
diff --git a/content/browser/zygote_host/zygote_host_impl_linux.h b/content/browser/zygote_host/zygote_host_impl_linux.h
index 1c0e0b7..6793f73 100644
--- a/content/browser/zygote_host/zygote_host_impl_linux.h
+++ b/content/browser/zygote_host/zygote_host_impl_linux.h
@@ -5,6 +5,8 @@
#ifndef CONTENT_BROWSER_ZYGOTE_HOST_ZYGOTE_HOST_IMPL_LINUX_H_
#define CONTENT_BROWSER_ZYGOTE_HOST_ZYGOTE_HOST_IMPL_LINUX_H_
+#include <stddef.h>
+
#include <set>
#include <string>
#include <vector>