summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrsleevi@chromium.org <rsleevi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-06-11 16:46:36 +0000
committerrsleevi@chromium.org <rsleevi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-06-11 16:46:36 +0000
commitcadac62e5c2b9f5fef59ce0326bb2cd79ffbe622 (patch)
tree7b95f103fce509de887c8c5e643604855b57c0ba
parent9f6e673c7f43f6ee414f72a74585dad8ebaceec3 (diff)
downloadchromium_src-cadac62e5c2b9f5fef59ce0326bb2cd79ffbe622.zip
chromium_src-cadac62e5c2b9f5fef59ce0326bb2cd79ffbe622.tar.gz
chromium_src-cadac62e5c2b9f5fef59ce0326bb2cd79ffbe622.tar.bz2
Call scoped_refptr<T>::get() rather than relying on implicit "operator T*"
This upates calls to bound temporary objects to also use get(). While it has the same semantic equivalence to the existing code, this generally represents a dangerous pattern - indeed, part of the whole motivation for this change is to make this anti-pattern very visible to authors. This change simply updates all of the call sites, to allow the "operator T*" to be removed and preventing new instances. The existing instances will then be reviewed for "suspicious" changes and updated to use/pass scoped_refptr<T> rather than T*, as appropriate. BUG=110610 TBR=darin Review URL: https://codereview.chromium.org/15984016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@205560 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--apps/app_restore_service.cc4
-rw-r--r--apps/shell_window_geometry_cache_unittest.cc5
-rw-r--r--base/files/file_path_watcher_linux.cc2
-rw-r--r--base/files/important_file_writer_unittest.cc12
-rw-r--r--base/prefs/json_pref_store_unittest.cc22
-rw-r--r--base/prefs/pref_service_builder.cc27
-rw-r--r--base/prefs/testing_pref_service.cc34
-rw-r--r--base/prefs/testing_pref_service.h4
-rw-r--r--base/task_runner_util_unittest.cc8
-rw-r--r--cc/base/worker_pool.cc2
-rw-r--r--cc/resources/image_raster_worker_pool.cc8
-rw-r--r--cc/resources/pixel_buffer_raster_worker_pool.cc24
-rw-r--r--cc/resources/raster_worker_pool.cc2
-rw-r--r--cc/resources/raster_worker_pool.h2
-rw-r--r--cc/resources/raster_worker_pool_unittest.cc21
-rw-r--r--cc/trees/layer_tree_host_unittest_scroll.cc8
-rw-r--r--chrome/browser/autocomplete/extension_app_provider.cc2
-rw-r--r--chrome/browser/automation/automation_provider.cc2
-rw-r--r--chrome/browser/automation/automation_provider_observers.cc5
-rw-r--r--chrome/browser/automation/testing_automation_provider.cc39
-rw-r--r--chrome/browser/background/background_application_list_model.cc4
-rw-r--r--chrome/browser/background/background_application_list_model_unittest.cc4
-rw-r--r--chrome/browser/background/background_contents_service.cc2
-rw-r--r--chrome/browser/browsing_data/browsing_data_quota_helper_impl.cc4
-rw-r--r--chrome/browser/browsing_data/browsing_data_quota_helper_unittest.cc11
-rw-r--r--chrome/browser/browsing_data/browsing_data_remover.cc4
-rw-r--r--chrome/browser/browsing_data/browsing_data_remover_unittest.cc4
-rw-r--r--chrome/browser/browsing_data/cookies_tree_model_unittest.cc2
-rw-r--r--chrome/browser/browsing_data/mock_browsing_data_quota_helper.cc2
-rw-r--r--chrome/browser/chrome_content_browser_client.cc4
-rw-r--r--chrome/browser/chrome_plugin_browsertest.cc2
-rw-r--r--chrome/browser/component_updater/component_updater_service.cc6
-rw-r--r--chrome/browser/content_settings/content_settings_browsertest.cc12
-rw-r--r--chrome/browser/content_settings/content_settings_internal_extension_provider.cc4
-rw-r--r--chrome/browser/content_settings/cookie_settings_unittest.cc23
-rw-r--r--chrome/browser/content_settings/host_content_settings_map_unittest.cc2
-rw-r--r--chrome/browser/devtools/devtools_adb_bridge.cc5
-rw-r--r--chrome/browser/devtools/devtools_sanity_browsertest.cc6
-rw-r--r--chrome/browser/devtools/devtools_window.cc8
-rw-r--r--chrome/browser/extensions/active_tab_permission_granter.cc2
-rw-r--r--chrome/browser/extensions/activity_log/activity_log_unittest.cc2
-rw-r--r--chrome/browser/extensions/api/content_settings/content_settings_api.cc4
-rw-r--r--chrome/browser/extensions/api/content_settings/content_settings_apitest.cc2
-rw-r--r--chrome/browser/extensions/api/debugger/debugger_api.cc2
-rw-r--r--chrome/browser/extensions/api/developer_private/developer_private_api.cc4
-rw-r--r--chrome/browser/extensions/api/dial/dial_api.cc2
-rw-r--r--chrome/browser/extensions/api/downloads/downloads_api_unittest.cc2
-rw-r--r--chrome/browser/extensions/api/identity/identity_apitest.cc6
-rw-r--r--chrome/browser/extensions/api/management/management_api.cc8
-rw-r--r--chrome/browser/extensions/api/media_galleries_private/media_galleries_private_api.cc2
-rw-r--r--chrome/browser/extensions/api/page_capture/page_capture_api.cc6
-rw-r--r--chrome/browser/extensions/api/permissions/permissions_api.cc2
-rw-r--r--chrome/browser/extensions/api/preference/preference_helpers.cc6
-rw-r--r--chrome/browser/extensions/api/storage/managed_value_store_cache.cc2
-rw-r--r--chrome/browser/extensions/api/web_request/web_request_api.cc2
-rw-r--r--chrome/browser/extensions/api/web_request/web_request_api_unittest.cc16
-rw-r--r--chrome/browser/extensions/app_sync_bundle.cc2
-rw-r--r--chrome/browser/extensions/blacklist.cc5
-rw-r--r--chrome/browser/extensions/blacklist_unittest.cc8
-rw-r--r--chrome/browser/extensions/convert_web_app_unittest.cc4
-rw-r--r--chrome/browser/extensions/crx_installer.cc4
-rw-r--r--chrome/browser/extensions/crx_installer.h2
-rw-r--r--chrome/browser/extensions/event_router_forwarder_unittest.cc5
-rw-r--r--chrome/browser/extensions/extension_apitest.cc2
-rw-r--r--chrome/browser/extensions/extension_browsertest.cc2
-rw-r--r--chrome/browser/extensions/extension_context_menu_browsertest.cc2
-rw-r--r--chrome/browser/extensions/extension_disabled_ui_browsertest.cc2
-rw-r--r--chrome/browser/extensions/extension_keybinding_registry.cc4
-rw-r--r--chrome/browser/extensions/extension_prefs_unittest.cc3
-rw-r--r--chrome/browser/extensions/extension_process_manager.cc2
-rw-r--r--chrome/browser/extensions/extension_protocols_unittest.cc2
-rw-r--r--chrome/browser/extensions/extension_service.cc25
-rw-r--r--chrome/browser/extensions/extension_service_unittest.cc13
-rw-r--r--chrome/browser/extensions/extension_special_storage_policy_unittest.cc2
-rw-r--r--chrome/browser/extensions/extension_startup_browsertest.cc4
-rw-r--r--chrome/browser/extensions/extension_sync_bundle.cc2
-rw-r--r--chrome/browser/extensions/extension_toolbar_model.cc2
-rw-r--r--chrome/browser/extensions/installed_loader.cc15
-rw-r--r--chrome/browser/extensions/menu_manager_unittest.cc12
-rw-r--r--chrome/browser/extensions/page_action_controller.cc3
-rw-r--r--chrome/browser/extensions/permissions_updater.cc2
-rw-r--r--chrome/browser/extensions/permissions_updater_unittest.cc9
-rw-r--r--chrome/browser/extensions/sandboxed_unpacker_unittest.cc14
-rw-r--r--chrome/browser/extensions/standard_management_policy_provider_unittest.cc5
-rw-r--r--chrome/browser/extensions/tab_helper.cc2
-rw-r--r--chrome/browser/extensions/unpacked_installer.cc32
-rw-r--r--chrome/browser/extensions/updater/extension_updater.cc2
-rw-r--r--chrome/browser/extensions/updater/extension_updater_unittest.cc4
-rw-r--r--chrome/browser/extensions/updater/safe_manifest_parser.cc3
-rw-r--r--chrome/browser/extensions/user_script_listener.cc4
-rw-r--r--chrome/browser/extensions/webstore_install_helper.cc5
-rw-r--r--chrome/browser/favicon/favicon_service.cc2
-rw-r--r--chrome/browser/history/history_service.cc44
-rw-r--r--chrome/browser/history/shortcuts_backend_unittest.cc3
-rw-r--r--chrome/browser/history/top_sites_backend.cc8
-rw-r--r--chrome/browser/importer/external_process_importer_client.cc7
-rw-r--r--chrome/browser/importer/firefox_importer_browsertest.cc6
-rw-r--r--chrome/browser/managed_mode/managed_user_service.cc2
-rw-r--r--chrome/browser/memory_purger.cc2
-rw-r--r--chrome/browser/metrics/metrics_log.cc2
-rw-r--r--chrome/browser/nacl_host/nacl_browser.cc3
-rw-r--r--chrome/browser/nacl_host/nacl_process_host.cc2
-rw-r--r--chrome/browser/nacl_host/pnacl_translation_cache.cc6
-rw-r--r--chrome/browser/net/chrome_network_delegate_unittest.cc6
-rw-r--r--chrome/browser/net/proxy_service_factory.cc2
-rw-r--r--chrome/browser/net/transport_security_persister.cc3
-rw-r--r--chrome/browser/notifications/message_center_settings_controller.cc4
-rw-r--r--chrome/browser/password_manager/password_form_manager.cc8
-rw-r--r--chrome/browser/policy/policy_browsertest.cc9
-rw-r--r--chrome/browser/prefs/chrome_pref_service_unittest.cc3
-rw-r--r--chrome/browser/prefs/pref_service_syncable.cc2
-rw-r--r--chrome/browser/prefs/pref_service_syncable_builder.cc15
-rw-r--r--chrome/browser/printing/cloud_print/test/cloud_print_proxy_process_browsertest.cc14
-rw-r--r--chrome/browser/printing/print_dialog_gtk.cc6
-rw-r--r--chrome/browser/process_singleton_linux_unittest.cc9
-rw-r--r--chrome/browser/profiles/off_the_record_profile_impl.cc12
-rw-r--r--chrome/browser/profiles/profile_impl.cc24
-rw-r--r--chrome/browser/profiles/profile_impl_io_data.cc9
-rw-r--r--chrome/browser/safe_browsing/safe_browsing_service_browsertest.cc2
-rw-r--r--chrome/browser/safe_browsing/sandboxed_zip_analyzer.cc4
-rw-r--r--chrome/browser/safe_browsing/two_phase_uploader_unittest.cc10
-rw-r--r--chrome/browser/safe_json_parser.cc3
-rw-r--r--chrome/browser/service/service_process_control.cc6
-rw-r--r--chrome/browser/signin/chrome_signin_manager_delegate.cc2
-rw-r--r--chrome/browser/speech/extension_api/tts_engine_extension_api.cc2
-rw-r--r--chrome/browser/sync/glue/autofill_data_type_controller.cc2
-rw-r--r--chrome/browser/sync/test/integration/passwords_helper.cc4
-rw-r--r--chrome/browser/sync_file_system/drive_file_sync_service.cc10
-rw-r--r--chrome/browser/sync_file_system/drive_file_sync_service_mock_unittest.cc2
-rw-r--r--chrome/browser/sync_file_system/drive_file_sync_service_sync_unittest.cc6
-rw-r--r--chrome/browser/sync_file_system/drive_file_sync_service_unittest.cc3
-rw-r--r--chrome/browser/sync_file_system/drive_metadata_store.cc12
-rw-r--r--chrome/browser/sync_file_system/local_file_sync_service.cc5
-rw-r--r--chrome/browser/thumbnails/content_based_thumbnailing_algorithm.cc10
-rw-r--r--chrome/browser/thumbnails/content_based_thumbnailing_algorithm_unittest.cc4
-rw-r--r--chrome/browser/thumbnails/simple_thumbnail_crop.cc2
-rw-r--r--chrome/browser/ui/browser_browsertest.cc2
-rw-r--r--chrome/browser/ui/content_settings/content_setting_bubble_model.cc2
-rw-r--r--chrome/browser/ui/gtk/collected_cookies_gtk.cc2
-rw-r--r--chrome/browser/ui/pdf/pdf_unsupported_feature.cc2
-rw-r--r--chrome/browser/ui/sync/one_click_signin_helper_unittest.cc11
-rw-r--r--chrome/browser/ui/sync/profile_signin_confirmation_helper_unittest.cc5
-rw-r--r--chrome/browser/ui/tabs/tab_utils.cc3
-rw-r--r--chrome/browser/ui/toolbar/action_box_button_controller.cc2
-rw-r--r--chrome/browser/ui/webui/extensions/command_handler.cc10
-rw-r--r--chrome/browser/ui/webui/extensions/extension_icon_source.cc4
-rw-r--r--chrome/browser/ui/webui/extensions/extension_settings_handler.cc12
-rw-r--r--chrome/browser/ui/webui/flash_ui.cc2
-rw-r--r--chrome/browser/ui/webui/nacl_ui.cc2
-rw-r--r--chrome/browser/ui/webui/net_internals/net_internals_ui.cc2
-rw-r--r--chrome/browser/ui/webui/options/certificate_manager_handler.cc16
-rw-r--r--chrome/browser/ui/webui/options/content_settings_handler.cc2
-rw-r--r--chrome/browser/ui/webui/options/password_manager_handler.cc2
-rw-r--r--chrome/browser/ui/webui/plugins_ui.cc4
-rw-r--r--chrome/browser/ui/webui/uber/uber_ui.cc2
-rw-r--r--chrome/browser/ui/webui/version_handler.cc2
-rw-r--r--chrome/browser/web_resource/json_asynchronous_unpacker.cc2
-rw-r--r--chrome/common/cancelable_task_tracker.cc4
-rw-r--r--chrome/common/cancelable_task_tracker_unittest.cc35
-rw-r--r--chrome/common/extensions/extension_set.h3
-rw-r--r--chrome/common/extensions/manifest_tests/extension_manifests_launch_unittest.cc18
-rw-r--r--chrome/common/extensions/manifest_tests/extension_manifests_validapp_unittest.cc4
-rw-r--r--chrome/common/extensions/sync_type_unittest.cc26
-rw-r--r--chrome/common/service_process_util_unittest.cc4
-rw-r--r--chrome/nacl/nacl_ipc_adapter_unittest.cc2
-rw-r--r--chrome/nacl/nacl_listener.cc6
-rw-r--r--chrome/renderer/chrome_content_renderer_client_unittest.cc113
-rw-r--r--chrome/service/cloud_print/cloud_print_auth.cc5
-rw-r--r--chrome/service/cloud_print/cloud_print_url_fetcher_unittest.cc2
-rw-r--r--chrome/service/net/service_url_request_context.cc7
-rw-r--r--chrome/service/service_ipc_server.cc9
-rw-r--r--chrome/service/service_process.cc7
-rw-r--r--chrome/service/service_process_prefs_unittest.cc2
-rw-r--r--chrome/test/automation/automation_proxy.cc7
-rw-r--r--chrome/test/base/testing_pref_service_syncable.cc2
-rw-r--r--chrome/test/base/testing_profile.cc2
-rw-r--r--chrome/test/chromedriver/chrome/adb_impl.cc2
-rw-r--r--chrome/test/chromedriver/net/sync_websocket_impl_unittest.cc2
-rw-r--r--chrome/test/reliability/automated_ui_test_base.cc2
-rw-r--r--chrome/test/reliability/automated_ui_tests.cc2
-rw-r--r--chrome/test/reliability/page_load_test.cc2
-rw-r--r--chrome/utility/profile_import_handler.cc5
-rw-r--r--components/webdata/common/web_data_service_base.cc4
-rw-r--r--content/browser/appcache/chrome_appcache_service.cc5
-rw-r--r--content/browser/appcache/chrome_appcache_service_unittest.cc8
-rw-r--r--content/browser/devtools/devtools_http_handler_impl.cc2
-rw-r--r--content/browser/devtools/devtools_manager_unittest.cc3
-rw-r--r--content/browser/dom_storage/dom_storage_context_impl.cc11
-rw-r--r--content/browser/fileapi/file_system_browsertest.cc5
-rw-r--r--content/browser/geolocation/fake_access_token_store.cc2
-rw-r--r--content/browser/gpu/shader_disk_cache.cc2
-rw-r--r--content/browser/in_process_webkit/indexed_db_browsertest.cc9
-rw-r--r--content/browser/indexed_db/indexed_db_backing_store.cc6
-rw-r--r--content/browser/indexed_db/indexed_db_backing_store_unittest.cc4
-rw-r--r--content/browser/indexed_db/indexed_db_database.cc18
-rw-r--r--content/browser/indexed_db/indexed_db_database_unittest.cc2
-rw-r--r--content/browser/indexed_db/indexed_db_factory.cc12
-rw-r--r--content/browser/indexed_db/indexed_db_quota_client_unittest.cc12
-rw-r--r--content/browser/indexed_db/indexed_db_transaction.cc2
-rw-r--r--content/browser/indexed_db/webidbdatabase_impl.cc32
-rw-r--r--content/browser/loader/redirect_to_file_resource_handler.cc15
-rw-r--r--content/browser/loader/resource_dispatcher_host_impl.cc3
-rw-r--r--content/browser/plugin_loader_posix.cc2
-rw-r--r--content/browser/ppapi_plugin_process_host.cc2
-rw-r--r--content/browser/renderer_host/media/audio_input_device_manager_unittest.cc2
-rw-r--r--content/browser/renderer_host/media/audio_renderer_host_unittest.cc2
-rw-r--r--content/browser/renderer_host/media/media_stream_manager.cc7
-rw-r--r--content/browser/renderer_host/media/video_capture_manager_unittest.cc2
-rw-r--r--content/browser/renderer_host/pepper/browser_ppapi_host_impl.cc2
-rw-r--r--content/browser/renderer_host/render_process_host_impl.cc22
-rw-r--r--content/browser/speech/speech_recognition_manager_impl.cc2
-rw-r--r--content/browser/speech/speech_recognizer_impl_unittest.cc2
-rw-r--r--content/browser/storage_partition_impl.cc26
-rw-r--r--content/browser/storage_partition_impl_map.cc7
-rw-r--r--content/browser/streams/stream_handle_impl.cc3
-rw-r--r--content/browser/web_contents/navigation_controller_impl_unittest.cc16
-rw-r--r--content/browser/web_contents/web_contents_screenshot_manager.cc12
-rw-r--r--content/child/child_process.h2
-rw-r--r--content/child/child_thread.cc4
-rw-r--r--content/common/gpu/client/gpu_channel_host.cc2
-rw-r--r--content/renderer/gpu/input_event_filter.cc2
-rw-r--r--content/renderer/media/media_stream_dependency_factory.cc6
-rw-r--r--content/renderer/media/rtc_peer_connection_handler.cc2
-rw-r--r--content/renderer/pepper/pepper_file_io_host.cc28
-rw-r--r--content/renderer/pepper/pepper_platform_audio_input_impl.cc3
-rw-r--r--content/renderer/pepper/pepper_platform_audio_output_impl.cc5
-rw-r--r--content/renderer/pepper/pepper_plugin_delegate_impl.cc6
-rw-r--r--content/renderer/render_thread_impl.cc13
-rw-r--r--content/renderer/render_widget.cc6
-rw-r--r--content/renderer/renderer_webkitplatformsupport_impl.cc2
-rw-r--r--content/shell/shell_devtools_frontend.cc4
-rw-r--r--content/shell/shell_url_request_context_getter.cc6
-rw-r--r--content/test/webrtc_audio_device_test.cc4
-rw-r--r--gpu/command_buffer/service/async_pixel_transfer_manager.cc2
-rw-r--r--gpu/command_buffer/service/async_pixel_transfer_manager_egl.cc2
-rw-r--r--gpu/command_buffer/service/async_pixel_transfer_manager_share_group.cc2
-rw-r--r--gpu/command_buffer/service/buffer_manager.cc5
-rw-r--r--gpu/command_buffer/service/gles2_cmd_decoder.cc6
-rw-r--r--gpu/command_buffer/service/gles2_cmd_decoder_unittest.cc4
-rw-r--r--gpu/command_buffer/service/texture_manager_unittest.cc12
-rw-r--r--ipc/ipc_channel_unittest.cc2
-rw-r--r--ipc/ipc_sync_channel_unittest.cc43
-rw-r--r--ipc/ipc_sync_message_filter.cc4
-rw-r--r--ipc/unix_domain_socket_util_unittest.cc2
-rw-r--r--media/audio/audio_manager_base.cc2
-rw-r--r--media/filters/ffmpeg_demuxer.cc26
-rw-r--r--media/filters/video_renderer_base_unittest.cc14
-rw-r--r--media/tools/shader_bench/shader_bench.cc6
-rw-r--r--net/base/upload_data_stream_unittest.cc74
-rw-r--r--net/base/upload_file_element_reader_unittest.cc36
-rw-r--r--net/disk_cache/backend_unittest.cc83
-rw-r--r--net/disk_cache/disk_cache_perftest.cc26
-rw-r--r--net/disk_cache/disk_cache_test_base.cc8
-rw-r--r--net/disk_cache/disk_cache_test_util.cc2
-rw-r--r--net/disk_cache/entry_unittest.cc22
-rw-r--r--net/disk_cache/simple/simple_backend_impl.cc11
-rw-r--r--net/disk_cache/simple/simple_index_unittest.cc2
-rw-r--r--net/disk_cache/stress_cache.cc5
-rw-r--r--net/http/http_network_transaction_spdy2_unittest.cc21
-rw-r--r--net/http/http_network_transaction_spdy3_unittest.cc21
-rw-r--r--net/http/http_stream_factory_impl_job.cc4
-rw-r--r--net/http/http_stream_parser_unittest.cc8
-rw-r--r--net/proxy/network_delegate_error_observer_unittest.cc29
-rw-r--r--net/proxy/proxy_config_service_linux_unittest.cc4
-rw-r--r--net/proxy/proxy_service_v8.cc5
-rw-r--r--net/quic/quic_http_stream_test.cc8
-rw-r--r--net/quic/quic_stream_factory.cc6
-rw-r--r--net/socket/ssl_client_socket_nss.cc4
-rw-r--r--net/spdy/spdy_network_transaction_spdy2_unittest.cc18
-rw-r--r--net/spdy/spdy_network_transaction_spdy3_unittest.cc18
-rw-r--r--net/tools/crash_cache/crash_cache.cc6
-rw-r--r--net/tools/dump_cache/simple_cache_dumper.cc12
-rw-r--r--net/tools/net_watcher/net_watcher.cc3
-rw-r--r--net/url_request/url_fetcher_impl_unittest.cc37
-rw-r--r--net/url_request/url_request_context_builder.cc12
-rw-r--r--net/url_request/url_request_unittest.cc14
-rw-r--r--ppapi/proxy/ppapi_proxy_test.cc2
-rw-r--r--remoting/client/client_context.cc4
-rw-r--r--remoting/host/chromoting_host_context_unittest.cc14
-rw-r--r--remoting/host/remoting_me2me_host.cc8
-rw-r--r--ui/compositor/layer.cc8
-rw-r--r--webkit/browser/appcache/appcache_storage_impl_unittest.cc13
-rw-r--r--webkit/browser/blob/blob_storage_context.cc2
-rw-r--r--webkit/browser/blob/blob_url_request_job_unittest.cc2
-rw-r--r--webkit/browser/blob/mock_blob_url_request_context.cc2
-rw-r--r--webkit/browser/database/database_quota_client_unittest.cc20
-rw-r--r--webkit/browser/database/database_tracker_unittest.cc4
-rw-r--r--webkit/browser/dom_storage/dom_storage_area_unittest.cc40
-rw-r--r--webkit/browser/dom_storage/dom_storage_context_unittest.cc4
-rw-r--r--webkit/browser/fileapi/copy_or_move_operation_delegate_unittest.cc13
-rw-r--r--webkit/browser/fileapi/file_system_context_unittest.cc4
-rw-r--r--webkit/browser/fileapi/file_system_usage_cache_unittest.cc2
-rw-r--r--webkit/browser/fileapi/local_file_system_operation_unittest.cc14
-rw-r--r--webkit/browser/fileapi/local_file_system_operation_write_unittest.cc11
-rw-r--r--webkit/browser/fileapi/mock_file_change_observer.cc2
-rw-r--r--webkit/browser/fileapi/mock_file_system_context.cc7
-rw-r--r--webkit/browser/fileapi/obfuscated_file_util.cc2
-rw-r--r--webkit/browser/fileapi/obfuscated_file_util_unittest.cc11
-rw-r--r--webkit/browser/fileapi/sandbox_mount_point_provider_unittest.cc11
-rw-r--r--webkit/browser/fileapi/syncable/canned_syncable_file_system.cc2
-rw-r--r--webkit/browser/fileapi/syncable/local_file_change_tracker_unittest.cc9
-rw-r--r--webkit/browser/fileapi/syncable/syncable_file_operation_runner_unittest.cc25
-rw-r--r--webkit/browser/fileapi/syncable/syncable_file_system_unittest.cc9
-rw-r--r--webkit/browser/fileapi/syncable/syncable_file_system_util_unittest.cc8
-rw-r--r--webkit/browser/quota/mock_quota_manager_unittest.cc4
-rw-r--r--webkit/browser/quota/quota_manager_unittest.cc4
-rw-r--r--webkit/common/blob/scoped_file.cc2
-rw-r--r--webkit/glue/resource_request_body_unittest.cc18
-rw-r--r--webkit/plugins/ppapi/host_globals.cc2
-rw-r--r--webkit/plugins/ppapi/ppapi_plugin_instance.cc2
-rw-r--r--webkit/plugins/ppapi/quota_file_io.cc17
-rw-r--r--webkit/renderer/media/webmediaplayer_impl.cc2
-rw-r--r--webkit/renderer/media/webmediaplayer_params.cc2
-rw-r--r--webkit/support/simple_appcache_system.cc4
-rw-r--r--webkit/support/simple_resource_loader_bridge.cc7
-rw-r--r--webkit/support/test_shell_request_context.cc8
316 files changed, 1438 insertions, 1166 deletions
diff --git a/apps/app_restore_service.cc b/apps/app_restore_service.cc
index 37a463b..f5cf21c 100644
--- a/apps/app_restore_service.cc
+++ b/apps/app_restore_service.cc
@@ -69,14 +69,14 @@ void AppRestoreService::HandleStartup(bool should_restore_apps) {
for (ExtensionSet::const_iterator it = extensions->begin();
it != extensions->end(); ++it) {
- const Extension* extension = *it;
+ const Extension* extension = it->get();
if (extension_prefs->IsExtensionRunning(extension->id())) {
RecordAppStop(extension->id());
// If we are not restoring apps (e.g., because it is a clean restart), and
// the app does not have retain permission, explicitly clear the retained
// entries queue.
if (should_restore_apps) {
- RestoreApp(*it);
+ RestoreApp(it->get());
} else {
SavedFilesService::Get(profile_)->ClearQueueIfNoRetainPermission(
extension);
diff --git a/apps/shell_window_geometry_cache_unittest.cc b/apps/shell_window_geometry_cache_unittest.cc
index 456c165..8566b4c 100644
--- a/apps/shell_window_geometry_cache_unittest.cc
+++ b/apps/shell_window_geometry_cache_unittest.cc
@@ -30,9 +30,8 @@ class ShellWindowGeometryCacheTest : public testing::Test {
ShellWindowGeometryCacheTest() :
ui_thread_(BrowserThread::UI, &ui_message_loop_) {
prefs_.reset(new extensions::TestExtensionPrefs(
- ui_message_loop_.message_loop_proxy()));
- cache_.reset(
- new ShellWindowGeometryCache(&profile_, prefs_->prefs()));
+ ui_message_loop_.message_loop_proxy().get()));
+ cache_.reset(new ShellWindowGeometryCache(&profile_, prefs_->prefs()));
cache_->SetSyncDelayForTests(0);
}
diff --git a/base/files/file_path_watcher_linux.cc b/base/files/file_path_watcher_linux.cc
index 84dce88..b715d69 100644
--- a/base/files/file_path_watcher_linux.cc
+++ b/base/files/file_path_watcher_linux.cc
@@ -370,7 +370,7 @@ bool FilePathWatcherImpl::Watch(const FilePath& path,
return false;
}
- set_message_loop(base::MessageLoopProxy::current());
+ set_message_loop(base::MessageLoopProxy::current().get());
callback_ = callback;
target_ = path;
MessageLoop::current()->AddDestructionObserver(this);
diff --git a/base/files/important_file_writer_unittest.cc b/base/files/important_file_writer_unittest.cc
index 8133782..56a5fa6 100644
--- a/base/files/important_file_writer_unittest.cc
+++ b/base/files/important_file_writer_unittest.cc
@@ -60,8 +60,7 @@ class ImportantFileWriterTest : public testing::Test {
};
TEST_F(ImportantFileWriterTest, Basic) {
- ImportantFileWriter writer(file_,
- MessageLoopProxy::current());
+ ImportantFileWriter writer(file_, MessageLoopProxy::current().get());
EXPECT_FALSE(file_util::PathExists(writer.path()));
writer.WriteNow("foo");
RunLoop().RunUntilIdle();
@@ -71,8 +70,7 @@ TEST_F(ImportantFileWriterTest, Basic) {
}
TEST_F(ImportantFileWriterTest, ScheduleWrite) {
- ImportantFileWriter writer(file_,
- MessageLoopProxy::current());
+ ImportantFileWriter writer(file_, MessageLoopProxy::current().get());
writer.set_commit_interval(TimeDelta::FromMilliseconds(25));
EXPECT_FALSE(writer.HasPendingWrite());
DataSerializer serializer("foo");
@@ -89,8 +87,7 @@ TEST_F(ImportantFileWriterTest, ScheduleWrite) {
}
TEST_F(ImportantFileWriterTest, DoScheduledWrite) {
- ImportantFileWriter writer(file_,
- MessageLoopProxy::current());
+ ImportantFileWriter writer(file_, MessageLoopProxy::current().get());
EXPECT_FALSE(writer.HasPendingWrite());
DataSerializer serializer("foo");
writer.ScheduleWrite(&serializer);
@@ -107,8 +104,7 @@ TEST_F(ImportantFileWriterTest, DoScheduledWrite) {
}
TEST_F(ImportantFileWriterTest, BatchingWrites) {
- ImportantFileWriter writer(file_,
- MessageLoopProxy::current());
+ ImportantFileWriter writer(file_, MessageLoopProxy::current().get());
writer.set_commit_interval(TimeDelta::FromMilliseconds(25));
DataSerializer foo("foo"), bar("bar"), baz("baz");
writer.ScheduleWrite(&foo);
diff --git a/base/prefs/json_pref_store_unittest.cc b/base/prefs/json_pref_store_unittest.cc
index 72b9ba4..63b9e02 100644
--- a/base/prefs/json_pref_store_unittest.cc
+++ b/base/prefs/json_pref_store_unittest.cc
@@ -59,9 +59,8 @@ class JsonPrefStoreTest : public testing::Test {
TEST_F(JsonPrefStoreTest, NonExistentFile) {
base::FilePath bogus_input_file = data_dir_.AppendASCII("read.txt");
ASSERT_FALSE(file_util::PathExists(bogus_input_file));
- scoped_refptr<JsonPrefStore> pref_store =
- new JsonPrefStore(
- bogus_input_file, message_loop_.message_loop_proxy());
+ scoped_refptr<JsonPrefStore> pref_store = new JsonPrefStore(
+ bogus_input_file, message_loop_.message_loop_proxy().get());
EXPECT_EQ(PersistentPrefStore::PREF_READ_ERROR_NO_FILE,
pref_store->ReadPrefs());
EXPECT_FALSE(pref_store->ReadOnly());
@@ -73,8 +72,7 @@ TEST_F(JsonPrefStoreTest, InvalidFile) {
base::FilePath invalid_file = temp_dir_.path().AppendASCII("invalid.json");
ASSERT_TRUE(file_util::CopyFile(invalid_file_original, invalid_file));
scoped_refptr<JsonPrefStore> pref_store =
- new JsonPrefStore(
- invalid_file, message_loop_.message_loop_proxy());
+ new JsonPrefStore(invalid_file, message_loop_.message_loop_proxy().get());
EXPECT_EQ(PersistentPrefStore::PREF_READ_ERROR_JSON_PARSE,
pref_store->ReadPrefs());
EXPECT_FALSE(pref_store->ReadOnly());
@@ -161,8 +159,7 @@ TEST_F(JsonPrefStoreTest, Basic) {
base::FilePath input_file = temp_dir_.path().AppendASCII("write.json");
ASSERT_TRUE(file_util::PathExists(input_file));
scoped_refptr<JsonPrefStore> pref_store =
- new JsonPrefStore(
- input_file, message_loop_.message_loop_proxy());
+ new JsonPrefStore(input_file, message_loop_.message_loop_proxy().get());
ASSERT_EQ(PersistentPrefStore::PREF_READ_ERROR_NONE, pref_store->ReadPrefs());
ASSERT_FALSE(pref_store->ReadOnly());
@@ -188,8 +185,7 @@ TEST_F(JsonPrefStoreTest, BasicAsync) {
base::FilePath input_file = temp_dir_.path().AppendASCII("write.json");
ASSERT_TRUE(file_util::PathExists(input_file));
scoped_refptr<JsonPrefStore> pref_store =
- new JsonPrefStore(
- input_file, message_loop_.message_loop_proxy());
+ new JsonPrefStore(input_file, message_loop_.message_loop_proxy().get());
{
MockPrefStoreObserver mock_observer;
@@ -225,9 +221,8 @@ TEST_F(JsonPrefStoreTest, BasicAsync) {
TEST_F(JsonPrefStoreTest, AsyncNonExistingFile) {
base::FilePath bogus_input_file = data_dir_.AppendASCII("read.txt");
ASSERT_FALSE(file_util::PathExists(bogus_input_file));
- scoped_refptr<JsonPrefStore> pref_store =
- new JsonPrefStore(
- bogus_input_file, message_loop_.message_loop_proxy());
+ scoped_refptr<JsonPrefStore> pref_store = new JsonPrefStore(
+ bogus_input_file, message_loop_.message_loop_proxy().get());
MockPrefStoreObserver mock_observer;
pref_store->AddObserver(&mock_observer);
@@ -253,8 +248,7 @@ TEST_F(JsonPrefStoreTest, NeedsEmptyValue) {
// Test that the persistent value can be loaded.
ASSERT_TRUE(file_util::PathExists(pref_file));
scoped_refptr<JsonPrefStore> pref_store =
- new JsonPrefStore(
- pref_file, message_loop_.message_loop_proxy());
+ new JsonPrefStore(pref_file, message_loop_.message_loop_proxy().get());
ASSERT_EQ(PersistentPrefStore::PREF_READ_ERROR_NONE, pref_store->ReadPrefs());
ASSERT_FALSE(pref_store->ReadOnly());
diff --git a/base/prefs/pref_service_builder.cc b/base/prefs/pref_service_builder.cc
index 71d2d5b..b3d3533 100644
--- a/base/prefs/pref_service_builder.cc
+++ b/base/prefs/pref_service_builder.cc
@@ -74,20 +74,19 @@ PrefServiceBuilder& PrefServiceBuilder::WithAsync(bool async) {
PrefService* PrefServiceBuilder::Create(PrefRegistry* pref_registry) {
PrefNotifierImpl* pref_notifier = new PrefNotifierImpl();
- PrefService* pref_service = new PrefService(
- pref_notifier,
- new PrefValueStore(
- managed_prefs_.get(),
- extension_prefs_.get(),
- command_line_prefs_.get(),
- user_prefs_.get(),
- recommended_prefs_.get(),
- pref_registry->defaults(),
- pref_notifier),
- user_prefs_.get(),
- pref_registry,
- read_error_callback_,
- async_);
+ PrefService* pref_service =
+ new PrefService(pref_notifier,
+ new PrefValueStore(managed_prefs_.get(),
+ extension_prefs_.get(),
+ command_line_prefs_.get(),
+ user_prefs_.get(),
+ recommended_prefs_.get(),
+ pref_registry->defaults().get(),
+ pref_notifier),
+ user_prefs_.get(),
+ pref_registry,
+ read_error_callback_,
+ async_);
ResetDefaultState();
return pref_service;
}
diff --git a/base/prefs/testing_pref_service.cc b/base/prefs/testing_pref_service.cc
index 22755da..b96268a 100644
--- a/base/prefs/testing_pref_service.cc
+++ b/base/prefs/testing_pref_service.cc
@@ -12,32 +12,30 @@
#include "base/prefs/pref_value_store.h"
#include "testing/gtest/include/gtest/gtest.h"
-template<>
+template <>
TestingPrefServiceBase<PrefService, PrefRegistry>::TestingPrefServiceBase(
TestingPrefStore* managed_prefs,
TestingPrefStore* user_prefs,
TestingPrefStore* recommended_prefs,
PrefRegistry* pref_registry,
PrefNotifierImpl* pref_notifier)
- : PrefService(pref_notifier,
- new PrefValueStore(
- managed_prefs,
- NULL,
- NULL,
- user_prefs,
- recommended_prefs,
- pref_registry->defaults(),
- pref_notifier),
- user_prefs,
- pref_registry,
- base::Bind(
- &TestingPrefServiceBase<
- PrefService, PrefRegistry>::HandleReadError),
- false),
+ : PrefService(
+ pref_notifier,
+ new PrefValueStore(managed_prefs,
+ NULL,
+ NULL,
+ user_prefs,
+ recommended_prefs,
+ pref_registry->defaults().get(),
+ pref_notifier),
+ user_prefs,
+ pref_registry,
+ base::Bind(&TestingPrefServiceBase<PrefService,
+ PrefRegistry>::HandleReadError),
+ false),
managed_prefs_(managed_prefs),
user_prefs_(user_prefs),
- recommended_prefs_(recommended_prefs) {
-}
+ recommended_prefs_(recommended_prefs) {}
TestingPrefServiceSimple::TestingPrefServiceSimple()
: TestingPrefServiceBase<PrefService, PrefRegistry>(
diff --git a/base/prefs/testing_pref_service.h b/base/prefs/testing_pref_service.h
index fee1981..ff15c4d 100644
--- a/base/prefs/testing_pref_service.h
+++ b/base/prefs/testing_pref_service.h
@@ -112,7 +112,7 @@ template<class SuperPrefService, class ConstructionPrefRegistry>
const Value* TestingPrefServiceBase<
SuperPrefService, ConstructionPrefRegistry>::GetManagedPref(
const char* path) const {
- return GetPref(managed_prefs_, path);
+ return GetPref(managed_prefs_.get(), path);
}
template<class SuperPrefService, class ConstructionPrefRegistry>
@@ -133,7 +133,7 @@ template<class SuperPrefService, class ConstructionPrefRegistry>
const Value* TestingPrefServiceBase<
SuperPrefService, ConstructionPrefRegistry>::GetUserPref(
const char* path) const {
- return GetPref(user_prefs_, path);
+ return GetPref(user_prefs_.get(), path);
}
template<class SuperPrefService, class ConstructionPrefRegistry>
diff --git a/base/task_runner_util_unittest.cc b/base/task_runner_util_unittest.cc
index f02a388..ef158f3 100644
--- a/base/task_runner_util_unittest.cc
+++ b/base/task_runner_util_unittest.cc
@@ -69,7 +69,7 @@ TEST(TaskRunnerHelpersTest, PostTaskAndReplyWithResult) {
int result = 0;
MessageLoop message_loop;
- PostTaskAndReplyWithResult(message_loop.message_loop_proxy(),
+ PostTaskAndReplyWithResult(message_loop.message_loop_proxy().get(),
FROM_HERE,
Bind(&ReturnFourtyTwo),
Bind(&StoreValue, &result));
@@ -83,7 +83,7 @@ TEST(TaskRunnerHelpersTest, PostTaskAndReplyWithResultImplicitConvert) {
double result = 0;
MessageLoop message_loop;
- PostTaskAndReplyWithResult(message_loop.message_loop_proxy(),
+ PostTaskAndReplyWithResult(message_loop.message_loop_proxy().get(),
FROM_HERE,
Bind(&ReturnFourtyTwo),
Bind(&StoreDoubleValue, &result));
@@ -98,7 +98,7 @@ TEST(TaskRunnerHelpersTest, PostTaskAndReplyWithResultPassed) {
g_foo_free_count = 0;
MessageLoop message_loop;
- PostTaskAndReplyWithResult(message_loop.message_loop_proxy(),
+ PostTaskAndReplyWithResult(message_loop.message_loop_proxy().get(),
FROM_HERE,
Bind(&CreateFoo),
Bind(&ExpectFoo));
@@ -114,7 +114,7 @@ TEST(TaskRunnerHelpersTest, PostTaskAndReplyWithResultPassedFreeProc) {
g_foo_free_count = 0;
MessageLoop message_loop;
- PostTaskAndReplyWithResult(message_loop.message_loop_proxy(),
+ PostTaskAndReplyWithResult(message_loop.message_loop_proxy().get(),
FROM_HERE,
Bind(&CreateScopedFoo),
Bind(&ExpectScopedFoo));
diff --git a/cc/base/worker_pool.cc b/cc/base/worker_pool.cc
index 2c2c034..b22ed53 100644
--- a/cc/base/worker_pool.cc
+++ b/cc/base/worker_pool.cc
@@ -493,7 +493,7 @@ void WorkerPool::DispatchCompletionCallbacks(TaskDeque* completed_tasks) {
in_dispatch_completion_callbacks_ = true;
while (!completed_tasks->empty()) {
- internal::WorkerPoolTask* task = completed_tasks->front();
+ internal::WorkerPoolTask* task = completed_tasks->front().get();
task->DidComplete();
task->DispatchCompletionCallback();
diff --git a/cc/resources/image_raster_worker_pool.cc b/cc/resources/image_raster_worker_pool.cc
index 5800ce1..c3b8ed8 100644
--- a/cc/resources/image_raster_worker_pool.cc
+++ b/cc/resources/image_raster_worker_pool.cc
@@ -81,11 +81,11 @@ void ImageRasterWorkerPool::ScheduleTasks(RasterTask::Queue* queue) {
for (RasterTask::Queue::TaskVector::const_iterator it =
raster_tasks().begin();
it != raster_tasks().end(); ++it) {
- internal::RasterWorkerPoolTask* task = *it;
+ internal::RasterWorkerPoolTask* task = it->get();
TaskMap::iterator image_it = image_tasks_.find(task);
if (image_it != image_tasks_.end()) {
- internal::WorkerPoolTask* image_task = image_it->second;
+ internal::WorkerPoolTask* image_task = image_it->second.get();
tasks.push_back(image_task);
continue;
}
@@ -128,7 +128,7 @@ void ImageRasterWorkerPool::OnRasterTaskCompleted(
TRACE_EVENT1("cc", "ImageRasterWorkerPool::OnRasterTaskCompleted",
"was_canceled", was_canceled);
- DCHECK(image_tasks_.find(task) != image_tasks_.end());
+ DCHECK(image_tasks_.find(task.get()) != image_tasks_.end());
// Balanced with MapImage() call in ScheduleTasks().
resource_provider()->UnmapImage(task->resource()->id());
@@ -142,7 +142,7 @@ void ImageRasterWorkerPool::OnRasterTaskCompleted(
task->DidComplete();
task->DispatchCompletionCallback();
- image_tasks_.erase(task);
+ image_tasks_.erase(task.get());
}
} // namespace cc
diff --git a/cc/resources/pixel_buffer_raster_worker_pool.cc b/cc/resources/pixel_buffer_raster_worker_pool.cc
index b1b5932..e9fed7d 100644
--- a/cc/resources/pixel_buffer_raster_worker_pool.cc
+++ b/cc/resources/pixel_buffer_raster_worker_pool.cc
@@ -105,7 +105,7 @@ void PixelBufferRasterWorkerPool::Shutdown() {
for (TaskMap::iterator it = pixel_buffer_tasks_.begin();
it != pixel_buffer_tasks_.end(); ++it) {
internal::RasterWorkerPoolTask* task = it->first;
- internal::WorkerPoolTask* pixel_buffer_task = it->second;
+ internal::WorkerPoolTask* pixel_buffer_task = it->second.get();
// All inactive tasks needs to be canceled.
if (!pixel_buffer_task)
@@ -125,7 +125,7 @@ void PixelBufferRasterWorkerPool::ScheduleTasks(RasterTask::Queue* queue) {
for (RasterTask::Queue::TaskVector::const_iterator it =
raster_tasks().begin();
it != raster_tasks().end(); ++it) {
- internal::RasterWorkerPoolTask* task = *it;
+ internal::RasterWorkerPoolTask* task = it->get();
DCHECK(new_pixel_buffer_tasks.find(task) == new_pixel_buffer_tasks.end());
DCHECK(!task->HasCompleted());
@@ -145,7 +145,7 @@ void PixelBufferRasterWorkerPool::ScheduleTasks(RasterTask::Queue* queue) {
for (TaskMap::iterator it = pixel_buffer_tasks_.begin();
it != pixel_buffer_tasks_.end(); ++it) {
internal::RasterWorkerPoolTask* task = it->first;
- internal::WorkerPoolTask* pixel_buffer_task = it->second;
+ internal::WorkerPoolTask* pixel_buffer_task = it->second.get();
// Move task to |new_pixel_buffer_tasks|
new_pixel_buffer_tasks[task] = pixel_buffer_task;
@@ -166,7 +166,7 @@ void PixelBufferRasterWorkerPool::CheckForCompletedTasks() {
CheckForCompletedRasterTasks();
while (!completed_tasks_.empty()) {
- internal::RasterWorkerPoolTask* task = completed_tasks_.front();
+ internal::RasterWorkerPoolTask* task = completed_tasks_.front().get();
DCHECK(pixel_buffer_tasks_.find(task) != pixel_buffer_tasks_.end());
pixel_buffer_tasks_.erase(task);
@@ -182,8 +182,8 @@ bool PixelBufferRasterWorkerPool::ForceUploadToComplete(
const RasterTask& raster_task) {
for (TaskDeque::iterator it = tasks_with_pending_upload_.begin();
it != tasks_with_pending_upload_.end(); ++it) {
- internal::RasterWorkerPoolTask* task = *it;
- if (task == raster_task.internal_) {
+ internal::RasterWorkerPoolTask* task = it->get();
+ if (task == raster_task.internal_.get()) {
resource_provider()->ForceSetPixelsToComplete(task->resource()->id());
return true;
}
@@ -221,7 +221,8 @@ void PixelBufferRasterWorkerPool::CheckForCompletedRasterTasks() {
}
while (!tasks_with_pending_upload_.empty()) {
- internal::RasterWorkerPoolTask* task = tasks_with_pending_upload_.front();
+ internal::RasterWorkerPoolTask* task =
+ tasks_with_pending_upload_.front().get();
DCHECK(pixel_buffer_tasks_.find(task) != pixel_buffer_tasks_.end());
// Uploads complete in the order they are issued.
@@ -253,7 +254,7 @@ void PixelBufferRasterWorkerPool::ScheduleMoreTasks() {
for (RasterTask::Queue::TaskVector::const_iterator it =
raster_tasks().begin();
it != raster_tasks().end(); ++it) {
- internal::RasterWorkerPoolTask* task = *it;
+ internal::RasterWorkerPoolTask* task = it->get();
TaskMap::iterator pixel_buffer_it = pixel_buffer_tasks_.find(task);
if (pixel_buffer_it == pixel_buffer_tasks_.end())
@@ -261,7 +262,7 @@ void PixelBufferRasterWorkerPool::ScheduleMoreTasks() {
scoped_refptr<internal::WorkerPoolTask> pixel_buffer_task(
pixel_buffer_it->second);
- if (pixel_buffer_task) {
+ if (pixel_buffer_task.get()) {
if (!pixel_buffer_task->HasCompleted())
tasks.push_back(pixel_buffer_task);
continue;
@@ -341,7 +342,7 @@ void PixelBufferRasterWorkerPool::OnRasterTaskCompleted(
"was_canceled", was_canceled,
"needs_upload", needs_upload);
- DCHECK(pixel_buffer_tasks_.find(task) != pixel_buffer_tasks_.end());
+ DCHECK(pixel_buffer_tasks_.find(task.get()) != pixel_buffer_tasks_.end());
// Balanced with MapPixelBuffer() call in ScheduleMoreTasks().
resource_provider()->UnmapPixelBuffer(task->resource()->id());
@@ -365,7 +366,8 @@ void PixelBufferRasterWorkerPool::OnRasterTaskCompleted(
void PixelBufferRasterWorkerPool::AbortPendingUploads() {
while (!tasks_with_pending_upload_.empty()) {
- internal::RasterWorkerPoolTask* task = tasks_with_pending_upload_.front();
+ internal::RasterWorkerPoolTask* task =
+ tasks_with_pending_upload_.front().get();
DCHECK(pixel_buffer_tasks_.find(task) != pixel_buffer_tasks_.end());
resource_provider()->AbortSetPixels(task->resource()->id());
diff --git a/cc/resources/raster_worker_pool.cc b/cc/resources/raster_worker_pool.cc
index 091f0ee8..f914ab5 100644
--- a/cc/resources/raster_worker_pool.cc
+++ b/cc/resources/raster_worker_pool.cc
@@ -219,7 +219,7 @@ void RasterWorkerPool::SetRasterTasks(RasterTask::Queue* queue) {
}
void RasterWorkerPool::ScheduleRasterTasks(const RootTask& root) {
- WorkerPool::ScheduleTasks(root.internal_);
+ WorkerPool::ScheduleTasks(root.internal_.get());
}
} // namespace cc
diff --git a/cc/resources/raster_worker_pool.h b/cc/resources/raster_worker_pool.h
index acdfd77..ade8432 100644
--- a/cc/resources/raster_worker_pool.h
+++ b/cc/resources/raster_worker_pool.h
@@ -137,7 +137,7 @@ class CC_EXPORT RasterWorkerPool : public WorkerPool {
~RasterTask();
// Returns true if Task is null (doesn't refer to anything).
- bool is_null() const { return !internal_; }
+ bool is_null() const { return !internal_.get(); }
// Returns the Task into an uninitialized state.
void Reset();
diff --git a/cc/resources/raster_worker_pool_unittest.cc b/cc/resources/raster_worker_pool_unittest.cc
index d3fdaed..b8fdb66 100644
--- a/cc/resources/raster_worker_pool_unittest.cc
+++ b/cc/resources/raster_worker_pool_unittest.cc
@@ -162,17 +162,16 @@ class BasicRasterWorkerPoolTest : public RasterWorkerPoolTest {
const Resource* const_resource = resource.get();
RasterWorkerPool::Task::Set empty;
- tasks_.push_back(
- RasterWorkerPool::RasterTask(
- picture_pile_impl,
- const_resource,
- base::Bind(&BasicRasterWorkerPoolTest::RunRasterTask,
- base::Unretained(this)),
- base::Bind(&BasicRasterWorkerPoolTest::OnTaskCompleted,
- base::Unretained(this),
- base::Passed(&resource),
- id),
- &empty));
+ tasks_.push_back(RasterWorkerPool::RasterTask(
+ picture_pile_impl.get(),
+ const_resource,
+ base::Bind(&BasicRasterWorkerPoolTest::RunRasterTask,
+ base::Unretained(this)),
+ base::Bind(&BasicRasterWorkerPoolTest::OnTaskCompleted,
+ base::Unretained(this),
+ base::Passed(&resource),
+ id),
+ &empty));
}
void ScheduleTasks() {
diff --git a/cc/trees/layer_tree_host_unittest_scroll.cc b/cc/trees/layer_tree_host_unittest_scroll.cc
index febf23f..cd7868e 100644
--- a/cc/trees/layer_tree_host_unittest_scroll.cc
+++ b/cc/trees/layer_tree_host_unittest_scroll.cc
@@ -762,9 +762,9 @@ class LayerTreeHostScrollTestLayerStructureChange
scoped_refptr<Layer> root_layer = Layer::Create();
root_layer->SetBounds(gfx::Size(10, 10));
- Layer* root_scroll_layer = CreateScrollLayer(root_layer,
- &root_scroll_layer_client_);
- CreateScrollLayer(root_layer, &sibling_scroll_layer_client_);
+ Layer* root_scroll_layer =
+ CreateScrollLayer(root_layer.get(), &root_scroll_layer_client_);
+ CreateScrollLayer(root_layer.get(), &sibling_scroll_layer_client_);
CreateScrollLayer(root_scroll_layer, &child_scroll_layer_client_);
layer_tree_host()->SetRootLayer(root_layer);
@@ -822,7 +822,7 @@ class LayerTreeHostScrollTestLayerStructureChange
scroll_layer->SetMaxScrollOffset(gfx::Vector2d(100, 100));
scroll_layer->set_layer_scroll_client(client);
client->owner_ = this;
- client->layer_ = scroll_layer;
+ client->layer_ = scroll_layer.get();
parent->AddChild(scroll_layer);
return scroll_layer.get();
}
diff --git a/chrome/browser/autocomplete/extension_app_provider.cc b/chrome/browser/autocomplete/extension_app_provider.cc
index a004ed9..be923c8 100644
--- a/chrome/browser/autocomplete/extension_app_provider.cc
+++ b/chrome/browser/autocomplete/extension_app_provider.cc
@@ -155,7 +155,7 @@ void ExtensionAppProvider::RefreshAppList() {
extension_apps_.clear();
for (ExtensionSet::const_iterator iter = extensions->begin();
iter != extensions->end(); ++iter) {
- const extensions::Extension* app = *iter;
+ const extensions::Extension* app = iter->get();
if (!app->ShouldDisplayInAppLauncher())
continue;
// Note: Apps that appear in the NTP only are not added here since this
diff --git a/chrome/browser/automation/automation_provider.cc b/chrome/browser/automation/automation_provider.cc
index bbce096..ef43b5c 100644
--- a/chrome/browser/automation/automation_provider.cc
+++ b/chrome/browser/automation/automation_provider.cc
@@ -210,7 +210,7 @@ bool AutomationProvider::InitializeChannel(const std::string& channel_id) {
effective_channel_id,
GetChannelMode(use_named_interface),
this,
- BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO)));
+ BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO).get()));
channel_->AddFilter(automation_resource_message_filter_.get());
#if defined(OS_CHROMEOS)
diff --git a/chrome/browser/automation/automation_provider_observers.cc b/chrome/browser/automation/automation_provider_observers.cc
index f31c2dd..7a7823d 100644
--- a/chrome/browser/automation/automation_provider_observers.cc
+++ b/chrome/browser/automation/automation_provider_observers.cc
@@ -1765,8 +1765,9 @@ std::vector<DictionaryValue*>* GetAppInfoFromExtensions(
// Only return information about extensions that are actually apps.
if ((*ext)->is_app()) {
DictionaryValue* app_info = new DictionaryValue();
- AppLauncherHandler::CreateAppInfo(*ext, ext_service, app_info);
- app_info->SetBoolean("is_component_extension",
+ AppLauncherHandler::CreateAppInfo(ext->get(), ext_service, app_info);
+ app_info->SetBoolean(
+ "is_component_extension",
(*ext)->location() == extensions::Manifest::COMPONENT);
// Convert the launch_type integer into a more descriptive string.
diff --git a/chrome/browser/automation/testing_automation_provider.cc b/chrome/browser/automation/testing_automation_provider.cc
index e44edb8..bc3f676 100644
--- a/chrome/browser/automation/testing_automation_provider.cc
+++ b/chrome/browser/automation/testing_automation_provider.cc
@@ -1286,7 +1286,7 @@ void TestingAutomationProvider::GetBookmarksAsJSON(
scoped_refptr<BookmarkStorage> storage(
new BookmarkStorage(browser->profile(),
bookmark_model,
- browser->profile()->GetIOTaskRunner()));
+ browser->profile()->GetIOTaskRunner().get()));
if (!storage->SerializeData(&bookmarks_as_json)) {
reply.SendError("Failed to serialize bookmarks");
return;
@@ -3109,7 +3109,8 @@ void TestingAutomationProvider::GetPluginsInfoCallback(
DictionaryValue* args,
IPC::Message* reply_message,
const std::vector<webkit::WebPluginInfo>& plugins) {
- PluginPrefs* plugin_prefs = PluginPrefs::GetForProfile(browser->profile());
+ PluginPrefs* plugin_prefs =
+ PluginPrefs::GetForProfile(browser->profile()).get();
ListValue* items = new ListValue;
for (std::vector<webkit::WebPluginInfo>::const_iterator it =
plugins.begin();
@@ -3162,10 +3163,16 @@ void TestingAutomationProvider::EnablePlugin(Browser* browser,
AutomationJSONReply(this, reply_message).SendError("path not specified.");
return;
}
- PluginPrefs* plugin_prefs = PluginPrefs::GetForProfile(browser->profile());
- plugin_prefs->EnablePlugin(true, base::FilePath(path),
- base::Bind(&DidEnablePlugin, AsWeakPtr(), reply_message,
- path, "Could not enable plugin for path %s."));
+ PluginPrefs* plugin_prefs =
+ PluginPrefs::GetForProfile(browser->profile()).get();
+ plugin_prefs->EnablePlugin(
+ true,
+ base::FilePath(path),
+ base::Bind(&DidEnablePlugin,
+ AsWeakPtr(),
+ reply_message,
+ path,
+ "Could not enable plugin for path %s."));
}
// Sample json input:
@@ -3179,10 +3186,16 @@ void TestingAutomationProvider::DisablePlugin(Browser* browser,
AutomationJSONReply(this, reply_message).SendError("path not specified.");
return;
}
- PluginPrefs* plugin_prefs = PluginPrefs::GetForProfile(browser->profile());
- plugin_prefs->EnablePlugin(false, base::FilePath(path),
- base::Bind(&DidEnablePlugin, AsWeakPtr(), reply_message,
- path, "Could not disable plugin for path %s."));
+ PluginPrefs* plugin_prefs =
+ PluginPrefs::GetForProfile(browser->profile()).get();
+ plugin_prefs->EnablePlugin(
+ false,
+ base::FilePath(path),
+ base::Bind(&DidEnablePlugin,
+ AsWeakPtr(),
+ reply_message,
+ path,
+ "Could not disable plugin for path %s."));
}
// Sample json input:
@@ -3361,7 +3374,7 @@ void TestingAutomationProvider::AddSavedPassword(
// Use IMPLICIT_ACCESS since new passwords aren't added in incognito mode.
PasswordStore* password_store = PasswordStoreFactory::GetForProfile(
- browser->profile(), Profile::IMPLICIT_ACCESS);
+ browser->profile(), Profile::IMPLICIT_ACCESS).get();
// The password store does not exist for an incognito window.
if (password_store == NULL) {
@@ -3407,7 +3420,7 @@ void TestingAutomationProvider::RemoveSavedPassword(
// Use EXPLICIT_ACCESS since passwords can be removed in incognito mode.
PasswordStore* password_store = PasswordStoreFactory::GetForProfile(
- browser->profile(), Profile::EXPLICIT_ACCESS);
+ browser->profile(), Profile::EXPLICIT_ACCESS).get();
if (password_store == NULL) {
AutomationJSONReply(this, reply_message).SendError(
"Unable to get password store.");
@@ -3433,7 +3446,7 @@ void TestingAutomationProvider::GetSavedPasswords(
// Use EXPLICIT_ACCESS since saved passwords can be retrieved in
// incognito mode.
PasswordStore* password_store = PasswordStoreFactory::GetForProfile(
- browser->profile(), Profile::EXPLICIT_ACCESS);
+ browser->profile(), Profile::EXPLICIT_ACCESS).get();
if (password_store == NULL) {
AutomationJSONReply reply(this, reply_message);
diff --git a/chrome/browser/background/background_application_list_model.cc b/chrome/browser/background/background_application_list_model.cc
index 0b6b07a..ffd372a 100644
--- a/chrome/browser/background/background_application_list_model.cc
+++ b/chrome/browser/background/background_application_list_model.cc
@@ -90,7 +90,7 @@ void GetServiceApplications(ExtensionService* service,
for (ExtensionSet::const_iterator cursor = extensions->begin();
cursor != extensions->end();
++cursor) {
- const Extension* extension = *cursor;
+ const Extension* extension = cursor->get();
if (BackgroundApplicationListModel::IsBackgroundApp(*extension,
service->profile())) {
applications_result->push_back(extension);
@@ -103,7 +103,7 @@ void GetServiceApplications(ExtensionService* service,
for (ExtensionSet::const_iterator cursor = extensions->begin();
cursor != extensions->end();
++cursor) {
- const Extension* extension = *cursor;
+ const Extension* extension = cursor->get();
if (BackgroundApplicationListModel::IsBackgroundApp(*extension,
service->profile())) {
applications_result->push_back(extension);
diff --git a/chrome/browser/background/background_application_list_model_unittest.cc b/chrome/browser/background/background_application_list_model_unittest.cc
index a40f27d..de09c28 100644
--- a/chrome/browser/background/background_application_list_model_unittest.cc
+++ b/chrome/browser/background/background_application_list_model_unittest.cc
@@ -112,8 +112,8 @@ void RemoveBackgroundPermission(ExtensionService* service,
service->profile())) {
return;
}
- extensions::PermissionsUpdater(service->profile()).RemovePermissions(
- extension, extension->GetActivePermissions());
+ extensions::PermissionsUpdater(service->profile())
+ .RemovePermissions(extension, extension->GetActivePermissions().get());
}
} // namespace
diff --git a/chrome/browser/background/background_contents_service.cc b/chrome/browser/background/background_contents_service.cc
index baee3e3..9113a3b 100644
--- a/chrome/browser/background/background_contents_service.cc
+++ b/chrome/browser/background/background_contents_service.cc
@@ -517,7 +517,7 @@ void BackgroundContentsService::LoadBackgroundContentsFromManifests(
extension_service()->extensions();
ExtensionSet::const_iterator iter = extensions->begin();
for (; iter != extensions->end(); ++iter) {
- const Extension* extension = *iter;
+ const Extension* extension = iter->get();
if (extension->is_hosted_app() &&
BackgroundInfo::HasBackgroundPage(extension)) {
LoadBackgroundContents(profile,
diff --git a/chrome/browser/browsing_data/browsing_data_quota_helper_impl.cc b/chrome/browser/browsing_data/browsing_data_quota_helper_impl.cc
index de2017c..13c065d 100644
--- a/chrome/browser/browsing_data/browsing_data_quota_helper_impl.cc
+++ b/chrome/browser/browsing_data/browsing_data_quota_helper_impl.cc
@@ -23,8 +23,8 @@ using content::BrowserContext;
// static
BrowsingDataQuotaHelper* BrowsingDataQuotaHelper::Create(Profile* profile) {
return new BrowsingDataQuotaHelperImpl(
- BrowserThread::GetMessageLoopProxyForThread(BrowserThread::UI),
- BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO),
+ BrowserThread::GetMessageLoopProxyForThread(BrowserThread::UI).get(),
+ BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO).get(),
BrowserContext::GetDefaultStoragePartition(profile)->GetQuotaManager());
}
diff --git a/chrome/browser/browsing_data/browsing_data_quota_helper_unittest.cc b/chrome/browser/browsing_data/browsing_data_quota_helper_unittest.cc
index 0c9827d..ce0b511 100644
--- a/chrome/browser/browsing_data/browsing_data_quota_helper_unittest.cc
+++ b/chrome/browser/browsing_data/browsing_data_quota_helper_unittest.cc
@@ -35,13 +35,14 @@ class BrowsingDataQuotaHelperTest : public testing::Test {
virtual void SetUp() OVERRIDE {
EXPECT_TRUE(dir_.CreateUniqueTempDir());
quota_manager_ = new quota::QuotaManager(
- false, dir_.path(),
- BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO),
- BrowserThread::GetMessageLoopProxyForThread(BrowserThread::DB),
+ false,
+ dir_.path(),
+ BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO).get(),
+ BrowserThread::GetMessageLoopProxyForThread(BrowserThread::DB).get(),
NULL);
helper_ = new BrowsingDataQuotaHelperImpl(
- BrowserThread::GetMessageLoopProxyForThread(BrowserThread::UI),
- BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO),
+ BrowserThread::GetMessageLoopProxyForThread(BrowserThread::UI).get(),
+ BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO).get(),
quota_manager_.get());
}
diff --git a/chrome/browser/browsing_data/browsing_data_remover.cc b/chrome/browser/browsing_data/browsing_data_remover.cc
index 3e880f7..1b74264 100644
--- a/chrome/browser/browsing_data/browsing_data_remover.cc
+++ b/chrome/browser/browsing_data/browsing_data_remover.cc
@@ -454,7 +454,7 @@ void BrowsingDataRemover::RemoveImpl(int remove_mask,
if (remove_mask & REMOVE_PASSWORDS) {
content::RecordAction(UserMetricsAction("ClearBrowsingData_Passwords"));
PasswordStore* password_store = PasswordStoreFactory::GetForProfile(
- profile_, Profile::EXPLICIT_ACCESS);
+ profile_, Profile::EXPLICIT_ACCESS).get();
if (password_store)
password_store->RemoveLoginsCreatedBetween(delete_begin_, delete_end_);
@@ -689,7 +689,7 @@ void BrowsingDataRemover::ClearLoggedInPredictor() {
return;
predictors::LoggedInPredictorTable* logged_in_table =
- predictor_db->logged_in_table();
+ predictor_db->logged_in_table().get();
if (!logged_in_table)
return;
diff --git a/chrome/browser/browsing_data/browsing_data_remover_unittest.cc b/chrome/browser/browsing_data/browsing_data_remover_unittest.cc
index 314fd0b..24b6f3a 100644
--- a/chrome/browser/browsing_data/browsing_data_remover_unittest.cc
+++ b/chrome/browser/browsing_data/browsing_data_remover_unittest.cc
@@ -627,8 +627,8 @@ class BrowsingDataRemoverTest : public testing::Test,
quota_manager_ = new quota::MockQuotaManager(
profile_->IsOffTheRecord(),
profile_->GetPath(),
- BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO),
- BrowserThread::GetMessageLoopProxyForThread(BrowserThread::DB),
+ BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO).get(),
+ BrowserThread::GetMessageLoopProxyForThread(BrowserThread::DB).get(),
profile_->GetExtensionSpecialStoragePolicy());
}
return quota_manager_.get();
diff --git a/chrome/browser/browsing_data/cookies_tree_model_unittest.cc b/chrome/browser/browsing_data/cookies_tree_model_unittest.cc
index 825b99f..07fd27b 100644
--- a/chrome/browser/browsing_data/cookies_tree_model_unittest.cc
+++ b/chrome/browser/browsing_data/cookies_tree_model_unittest.cc
@@ -1111,7 +1111,7 @@ TEST_F(CookiesTreeModelTest, ContentSettings) {
HostContentSettingsMap* content_settings =
profile.GetHostContentSettingsMap();
CookieSettings* cookie_settings =
- CookieSettings::Factory::GetForProfile(&profile);
+ CookieSettings::Factory::GetForProfile(&profile).get();
MockSettingsObserver observer;
CookieTreeRootNode* root =
diff --git a/chrome/browser/browsing_data/mock_browsing_data_quota_helper.cc b/chrome/browser/browsing_data/mock_browsing_data_quota_helper.cc
index 5d7f014..d026f5e 100644
--- a/chrome/browser/browsing_data/mock_browsing_data_quota_helper.cc
+++ b/chrome/browser/browsing_data/mock_browsing_data_quota_helper.cc
@@ -10,7 +10,7 @@ using content::BrowserThread;
MockBrowsingDataQuotaHelper::MockBrowsingDataQuotaHelper(Profile* profile)
: BrowsingDataQuotaHelper(BrowserThread::GetMessageLoopProxyForThread(
- BrowserThread::IO)) {}
+ BrowserThread::IO).get()) {}
MockBrowsingDataQuotaHelper::~MockBrowsingDataQuotaHelper() {}
diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/chrome_content_browser_client.cc
index d545ba3..017a818 100644
--- a/chrome/browser/chrome_content_browser_client.cc
+++ b/chrome/browser/chrome_content_browser_client.cc
@@ -1685,7 +1685,7 @@ void ChromeContentBrowserClient::RequestDesktopNotificationPermission(
for (ExtensionSet::const_iterator iter = extensions.begin();
iter != extensions.end(); ++iter) {
if (notification_service->IsExtensionEnabled((*iter)->id())) {
- extension = *iter;
+ extension = iter->get();
break;
}
}
@@ -1978,7 +1978,7 @@ void ChromeContentBrowserClient::OverrideWebkitPrefs(
#else
// The user stylesheet watcher may not exist in a testing profile.
UserStyleSheetWatcher* user_style_sheet_watcher =
- UserStyleSheetWatcherFactory::GetForProfile(profile);
+ UserStyleSheetWatcherFactory::GetForProfile(profile).get();
if (user_style_sheet_watcher) {
web_prefs->user_style_sheet_enabled = true;
web_prefs->user_style_sheet_location =
diff --git a/chrome/browser/chrome_plugin_browsertest.cc b/chrome/browser/chrome_plugin_browsertest.cc
index 70aa4e4..fd6af37 100644
--- a/chrome/browser/chrome_plugin_browsertest.cc
+++ b/chrome/browser/chrome_plugin_browsertest.cc
@@ -129,7 +129,7 @@ class ChromePluginTest : public InProcessBrowserTest {
GetFlashPath(&paths);
ASSERT_FALSE(paths.empty());
- PluginPrefs* plugin_prefs = PluginPrefs::GetForProfile(profile);
+ PluginPrefs* plugin_prefs = PluginPrefs::GetForProfile(profile).get();
scoped_refptr<content::MessageLoopRunner> runner =
new content::MessageLoopRunner;
scoped_refptr<CallbackBarrier> callback_barrier(
diff --git a/chrome/browser/component_updater/component_updater_service.cc b/chrome/browser/component_updater/component_updater_service.cc
index d7e2ff2..f3eee77 100644
--- a/chrome/browser/component_updater/component_updater_service.cc
+++ b/chrome/browser/component_updater/component_updater_service.cc
@@ -706,9 +706,9 @@ void CrxUpdateService::ParseManifest(const std::string& xml) {
CrxUpdateService::OnParseUpdateManifestSucceeded(manifest.results());
}
} else {
- UtilityProcessHost* host = UtilityProcessHost::Create(
- new ManifestParserBridge(this),
- base::MessageLoopProxy::current());
+ UtilityProcessHost* host =
+ UtilityProcessHost::Create(new ManifestParserBridge(this),
+ base::MessageLoopProxy::current().get());
host->EnableZygote();
host->Send(new ChromeUtilityMsg_ParseUpdateManifest(xml));
}
diff --git a/chrome/browser/content_settings/content_settings_browsertest.cc b/chrome/browser/content_settings/content_settings_browsertest.cc
index 38fbc00..3bb6c42 100644
--- a/chrome/browser/content_settings/content_settings_browsertest.cc
+++ b/chrome/browser/content_settings/content_settings_browsertest.cc
@@ -157,7 +157,7 @@ IN_PROC_BROWSER_TEST_F(ContentSettingsTest, AllowCookiesUsingExceptions) {
ASSERT_TRUE(test_server()->Start());
GURL url = test_server()->GetURL("files/setcookie.html");
CookieSettings* settings =
- CookieSettings::Factory::GetForProfile(browser()->profile());
+ CookieSettings::Factory::GetForProfile(browser()->profile()).get();
settings->SetDefaultCookieSetting(CONTENT_SETTING_BLOCK);
ui_test_utils::NavigateToURL(browser(), url);
@@ -176,10 +176,10 @@ IN_PROC_BROWSER_TEST_F(ContentSettingsTest, BlockCookiesUsingExceptions) {
ASSERT_TRUE(test_server()->Start());
GURL url = test_server()->GetURL("files/setcookie.html");
CookieSettings* settings =
- CookieSettings::Factory::GetForProfile(browser()->profile());
- settings->SetCookieSetting(
- ContentSettingsPattern::FromURL(url),
- ContentSettingsPattern::Wildcard(), CONTENT_SETTING_BLOCK);
+ CookieSettings::Factory::GetForProfile(browser()->profile()).get();
+ settings->SetCookieSetting(ContentSettingsPattern::FromURL(url),
+ ContentSettingsPattern::Wildcard(),
+ CONTENT_SETTING_BLOCK);
ui_test_utils::NavigateToURL(browser(), url);
ASSERT_TRUE(GetCookies(browser()->profile(), url).empty());
@@ -204,7 +204,7 @@ IN_PROC_BROWSER_TEST_F(ContentSettingsTest,
GURL url = URLRequestMockHTTPJob::GetMockUrl(
base::FilePath(FILE_PATH_LITERAL("setcookie.html")));
CookieSettings* settings =
- CookieSettings::Factory::GetForProfile(browser()->profile());
+ CookieSettings::Factory::GetForProfile(browser()->profile()).get();
settings->SetDefaultCookieSetting(CONTENT_SETTING_BLOCK);
ui_test_utils::NavigateToURL(browser(), url);
diff --git a/chrome/browser/content_settings/content_settings_internal_extension_provider.cc b/chrome/browser/content_settings/content_settings_internal_extension_provider.cc
index 56dd993..c6527c1 100644
--- a/chrome/browser/content_settings/content_settings_internal_extension_provider.cc
+++ b/chrome/browser/content_settings/content_settings_internal_extension_provider.cc
@@ -29,8 +29,8 @@ InternalExtensionProvider::InternalExtensionProvider(
const ExtensionSet* extensions = extension_service->extensions();
for (ExtensionSet::const_iterator it = extensions->begin();
it != extensions->end(); ++it) {
- if (extensions::PluginInfo::HasPlugins(*it))
- SetContentSettingForExtension(*it, CONTENT_SETTING_ALLOW);
+ if (extensions::PluginInfo::HasPlugins(it->get()))
+ SetContentSettingForExtension(it->get(), CONTENT_SETTING_ALLOW);
}
Profile* profile = extension_service->profile();
registrar_->Add(this, chrome::NOTIFICATION_EXTENSION_HOST_CREATED,
diff --git a/chrome/browser/content_settings/cookie_settings_unittest.cc b/chrome/browser/content_settings/cookie_settings_unittest.cc
index 59d2d55..59f4570 100644
--- a/chrome/browser/content_settings/cookie_settings_unittest.cc
+++ b/chrome/browser/content_settings/cookie_settings_unittest.cc
@@ -22,17 +22,18 @@ namespace {
class CookieSettingsTest : public testing::Test {
public:
- CookieSettingsTest() :
- ui_thread_(BrowserThread::UI, &message_loop_),
- cookie_settings_(CookieSettings::Factory::GetForProfile(&profile_)),
- kBlockedSite("http://ads.thirdparty.com"),
- kAllowedSite("http://good.allays.com"),
- kFirstPartySite("http://cool.things.com"),
- kBlockedFirstPartySite("http://no.thirdparties.com"),
- kExtensionURL("chrome-extension://deadbeef"),
- kHttpsSite("https://example.com"),
- kAllHttpsSitesPattern(ContentSettingsPattern::FromString("https://*")) {
-}
+ CookieSettingsTest()
+ : ui_thread_(BrowserThread::UI, &message_loop_),
+ cookie_settings_(CookieSettings::Factory::GetForProfile(&profile_)
+ .get()),
+ kBlockedSite("http://ads.thirdparty.com"),
+ kAllowedSite("http://good.allays.com"),
+ kFirstPartySite("http://cool.things.com"),
+ kBlockedFirstPartySite("http://no.thirdparties.com"),
+ kExtensionURL("chrome-extension://deadbeef"),
+ kHttpsSite("https://example.com"),
+ kAllHttpsSitesPattern(ContentSettingsPattern::FromString("https://*")) {
+ }
protected:
base::MessageLoop message_loop_;
diff --git a/chrome/browser/content_settings/host_content_settings_map_unittest.cc b/chrome/browser/content_settings/host_content_settings_map_unittest.cc
index ed4f55d..78f5a39 100644
--- a/chrome/browser/content_settings/host_content_settings_map_unittest.cc
+++ b/chrome/browser/content_settings/host_content_settings_map_unittest.cc
@@ -395,7 +395,7 @@ TEST_F(HostContentSettingsMapTest, HostTrimEndingDotCheck) {
HostContentSettingsMap* host_content_settings_map =
profile.GetHostContentSettingsMap();
CookieSettings* cookie_settings =
- CookieSettings::Factory::GetForProfile(&profile);
+ CookieSettings::Factory::GetForProfile(&profile).get();
ContentSettingsPattern pattern =
ContentSettingsPattern::FromString("[*.]example.com");
diff --git a/chrome/browser/devtools/devtools_adb_bridge.cc b/chrome/browser/devtools/devtools_adb_bridge.cc
index 39b5ecc..fb006f1 100644
--- a/chrome/browser/devtools/devtools_adb_bridge.cc
+++ b/chrome/browser/devtools/devtools_adb_bridge.cc
@@ -524,9 +524,8 @@ class AdbAttachCommand : public base::RefCounted<AdbAttachCommand> {
else
delegate = new AgentHostDelegate(id, serial_, bridge->adb_thread_,
socket);
- DevToolsWindow::OpenExternalFrontend(bridge->profile_,
- frontend_url_,
- delegate->GetAgentHost());
+ DevToolsWindow::OpenExternalFrontend(
+ bridge->profile_, frontend_url_, delegate->GetAgentHost().get());
}
base::WeakPtr<DevToolsAdbBridge> bridge_;
diff --git a/chrome/browser/devtools/devtools_sanity_browsertest.cc b/chrome/browser/devtools/devtools_sanity_browsertest.cc
index c9107e3..7fe12e8 100644
--- a/chrome/browser/devtools/devtools_sanity_browsertest.cc
+++ b/chrome/browser/devtools/devtools_sanity_browsertest.cc
@@ -622,14 +622,14 @@ IN_PROC_BROWSER_TEST_F(DevToolsAgentHostTest, TestAgentHostReleased) {
ui_test_utils::NavigateToURL(browser(), GURL("about:blank"));
RenderViewHost* rvh = browser()->tab_strip_model()->GetWebContentsAt(0)->
GetRenderViewHost();
- DevToolsAgentHost* agent_raw = DevToolsAgentHost::GetOrCreateFor(rvh);
+ DevToolsAgentHost* agent_raw = DevToolsAgentHost::GetOrCreateFor(rvh).get();
const std::string agent_id = agent_raw->GetId();
ASSERT_EQ(agent_raw, DevToolsAgentHost::GetForId(agent_id)) <<
"DevToolsAgentHost cannot be found by id";
browser()->tab_strip_model()->
CloseWebContentsAt(0, TabStripModel::CLOSE_NONE);
- ASSERT_FALSE(DevToolsAgentHost::GetForId(agent_id)) <<
- "DevToolsAgentHost is not released when the tab is closed";
+ ASSERT_FALSE(DevToolsAgentHost::GetForId(agent_id).get())
+ << "DevToolsAgentHost is not released when the tab is closed";
}
class RemoteDebuggingTest: public ExtensionApiTest {
diff --git a/chrome/browser/devtools/devtools_window.cc b/chrome/browser/devtools/devtools_window.cc
index 98a2e25..78005c0 100644
--- a/chrome/browser/devtools/devtools_window.cc
+++ b/chrome/browser/devtools/devtools_window.cc
@@ -595,11 +595,13 @@ void DevToolsWindow::AddDevToolsExtensionsToClient() {
for (ExtensionSet::const_iterator extension = extensions->begin();
extension != extensions->end(); ++extension) {
- if (extensions::ManifestURL::GetDevToolsPage(*extension).is_empty())
+ if (extensions::ManifestURL::GetDevToolsPage(extension->get()).is_empty())
continue;
DictionaryValue* extension_info = new DictionaryValue();
- extension_info->Set("startPage", new StringValue(
- extensions::ManifestURL::GetDevToolsPage(*extension).spec()));
+ extension_info->Set(
+ "startPage",
+ new StringValue(
+ extensions::ManifestURL::GetDevToolsPage(extension->get()).spec()));
extension_info->Set("name", new StringValue((*extension)->name()));
bool allow_experimental = (*extension)->HasAPIPermission(
extensions::APIPermission::kExperimental);
diff --git a/chrome/browser/extensions/active_tab_permission_granter.cc b/chrome/browser/extensions/active_tab_permission_granter.cc
index a11d8af..8a766d7 100644
--- a/chrome/browser/extensions/active_tab_permission_granter.cc
+++ b/chrome/browser/extensions/active_tab_permission_granter.cc
@@ -107,7 +107,7 @@ void ActiveTabPermissionGranter::ClearActiveExtensionsAndNotify() {
for (ExtensionSet::const_iterator it = granted_extensions_.begin();
it != granted_extensions_.end(); ++it) {
- PermissionsData::ClearTabSpecificPermissions(*it, tab_id_);
+ PermissionsData::ClearTabSpecificPermissions(it->get(), tab_id_);
extension_ids.push_back((*it)->id());
}
diff --git a/chrome/browser/extensions/activity_log/activity_log_unittest.cc b/chrome/browser/extensions/activity_log/activity_log_unittest.cc
index 265e866..3c7dadc 100644
--- a/chrome/browser/extensions/activity_log/activity_log_unittest.cc
+++ b/chrome/browser/extensions/activity_log/activity_log_unittest.cc
@@ -237,7 +237,7 @@ TEST_F(RenderViewActivityLogTest, LogPrerender) {
.Set("version", "1.0.0")
.Set("manifest_version", 2))
.Build();
- extension_service_->AddExtension(extension);
+ extension_service_->AddExtension(extension.get());
ActivityLog* activity_log = ActivityLog::GetInstance(profile());
ASSERT_TRUE(activity_log->IsLogEnabled());
GURL url("http://www.google.com");
diff --git a/chrome/browser/extensions/api/content_settings/content_settings_api.cc b/chrome/browser/extensions/api/content_settings/content_settings_api.cc
index 3f993a7..1f07c04 100644
--- a/chrome/browser/extensions/api/content_settings/content_settings_api.cc
+++ b/chrome/browser/extensions/api/content_settings/content_settings_api.cc
@@ -143,10 +143,10 @@ bool ContentSettingsContentSettingGetFunction::RunImpl() {
}
map = profile()->GetOffTheRecordProfile()->GetHostContentSettingsMap();
cookie_settings = CookieSettings::Factory::GetForProfile(
- profile()->GetOffTheRecordProfile());
+ profile()->GetOffTheRecordProfile()).get();
} else {
map = profile()->GetHostContentSettingsMap();
- cookie_settings = CookieSettings::Factory::GetForProfile(profile());
+ cookie_settings = CookieSettings::Factory::GetForProfile(profile()).get();
}
ContentSetting setting;
diff --git a/chrome/browser/extensions/api/content_settings/content_settings_apitest.cc b/chrome/browser/extensions/api/content_settings/content_settings_apitest.cc
index 034bb23..b142e36 100644
--- a/chrome/browser/extensions/api/content_settings/content_settings_apitest.cc
+++ b/chrome/browser/extensions/api/content_settings/content_settings_apitest.cc
@@ -25,7 +25,7 @@ IN_PROC_BROWSER_TEST_F(ExtensionApiTest, ContentSettings) {
HostContentSettingsMap* map =
browser()->profile()->GetHostContentSettingsMap();
CookieSettings* cookie_settings =
- CookieSettings::Factory::GetForProfile(browser()->profile());
+ CookieSettings::Factory::GetForProfile(browser()->profile()).get();
// Check default content settings by using an unknown URL.
GURL example_url("http://www.example.com");
diff --git a/chrome/browser/extensions/api/debugger/debugger_api.cc b/chrome/browser/extensions/api/debugger/debugger_api.cc
index 25aecca..d111843 100644
--- a/chrome/browser/extensions/api/debugger/debugger_api.cc
+++ b/chrome/browser/extensions/api/debugger/debugger_api.cc
@@ -277,7 +277,7 @@ base::Value* SerializePageInfo(RenderViewHost* rvh) {
if (!web_contents)
return NULL;
- DevToolsAgentHost* agent_host = DevToolsAgentHost::GetOrCreateFor(rvh);
+ DevToolsAgentHost* agent_host = DevToolsAgentHost::GetOrCreateFor(rvh).get();
base::DictionaryValue* dictionary = new base::DictionaryValue();
diff --git a/chrome/browser/extensions/api/developer_private/developer_private_api.cc b/chrome/browser/extensions/api/developer_private/developer_private_api.cc
index 1642e47..4b7f549 100644
--- a/chrome/browser/extensions/api/developer_private/developer_private_api.cc
+++ b/chrome/browser/extensions/api/developer_private/developer_private_api.cc
@@ -98,7 +98,7 @@ const Extension* GetExtensionByPath(const ExtensionSet* extensions,
for (ExtensionSet::const_iterator iter = extensions->begin();
iter != extensions->end(); ++iter) {
if ((*iter)->path() == extension_path)
- return *iter;
+ return iter->get();
}
return NULL;
}
@@ -383,7 +383,7 @@ bool DeveloperPrivateGetItemsInfoFunction::RunImpl() {
for (ExtensionSet::const_iterator iter = items.begin();
iter != items.end(); ++iter) {
- const Extension& item = **iter;
+ const Extension& item = *iter->get();
// Don't show component extensions because they are only extensions as an
// implementation detail of Chrome.
diff --git a/chrome/browser/extensions/api/dial/dial_api.cc b/chrome/browser/extensions/api/dial/dial_api.cc
index 5bb271c..5f6b779 100644
--- a/chrome/browser/extensions/api/dial/dial_api.cc
+++ b/chrome/browser/extensions/api/dial/dial_api.cc
@@ -152,7 +152,7 @@ DialDiscoverNowFunction::DialDiscoverNowFunction()
bool DialDiscoverNowFunction::Prepare() {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
DCHECK(profile());
- dial_ = DialAPIFactory::GetInstance()->GetForProfile(profile());
+ dial_ = DialAPIFactory::GetInstance()->GetForProfile(profile()).get();
return true;
}
diff --git a/chrome/browser/extensions/api/downloads/downloads_api_unittest.cc b/chrome/browser/extensions/api/downloads/downloads_api_unittest.cc
index 9db5cb9..8eacf45 100644
--- a/chrome/browser/extensions/api/downloads/downloads_api_unittest.cc
+++ b/chrome/browser/extensions/api/downloads/downloads_api_unittest.cc
@@ -701,7 +701,7 @@ class TestProtocolHandler : public net::URLRequestJobFactory::ProtocolHandler {
network_delegate,
blob_storage_controller_->GetBlobDataFromUrl(request->url()),
file_system_context_,
- base::MessageLoopProxy::current());
+ base::MessageLoopProxy::current().get());
}
private:
diff --git a/chrome/browser/extensions/api/identity/identity_apitest.cc b/chrome/browser/extensions/api/identity/identity_apitest.cc
index 1540db0..468a1e99 100644
--- a/chrome/browser/extensions/api/identity/identity_apitest.cc
+++ b/chrome/browser/extensions/api/identity/identity_apitest.cc
@@ -927,7 +927,7 @@ class RemoveCachedAuthTokenFunctionTest : public ExtensionBrowserTest {
bool InvalidateDefaultToken() {
scoped_refptr<IdentityRemoveCachedAuthTokenFunction> func(
new IdentityRemoveCachedAuthTokenFunction);
- func->set_extension(utils::CreateEmptyExtension(kExtensionId));
+ func->set_extension(utils::CreateEmptyExtension(kExtensionId).get());
return utils::RunFunction(
func.get(),
std::string("[{\"token\": \"") + kAccessToken + "\"}]",
@@ -1061,8 +1061,8 @@ IN_PROC_BROWSER_TEST_F(LaunchWebAuthFlowFunctionTest, LoadFailed) {
std::string args = "[{\"interactive\": true, \"url\": \"" +
auth_url.spec() + "\"}]";
- std::string error = utils::RunFunctionAndReturnError(function, args,
- browser());
+ std::string error =
+ utils::RunFunctionAndReturnError(function.get(), args, browser());
EXPECT_EQ(std::string(errors::kPageLoadFailure), error);
}
diff --git a/chrome/browser/extensions/api/management/management_api.cc b/chrome/browser/extensions/api/management/management_api.cc
index 4ad1ee6..c855b83 100644
--- a/chrome/browser/extensions/api/management/management_api.cc
+++ b/chrome/browser/extensions/api/management/management_api.cc
@@ -207,7 +207,7 @@ void AddExtensionInfo(const ExtensionSet& extensions,
ExtensionInfoList* extension_list) {
for (ExtensionSet::const_iterator iter = extensions.begin();
iter != extensions.end(); ++iter) {
- const Extension& extension = **iter;
+ const Extension& extension = *iter->get();
if (extension.location() == Manifest::COMPONENT)
continue; // Skip built-in extensions.
@@ -297,10 +297,8 @@ class SafeManifestJSONParser : public UtilityProcessHostClient {
void StartWorkOnIOThread() {
CHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
- UtilityProcessHost* host =
- UtilityProcessHost::Create(
- this,
- base::MessageLoopProxy::current());
+ UtilityProcessHost* host = UtilityProcessHost::Create(
+ this, base::MessageLoopProxy::current().get());
host->EnableZygote();
host->Send(new ChromeUtilityMsg_ParseJSON(manifest_));
}
diff --git a/chrome/browser/extensions/api/media_galleries_private/media_galleries_private_api.cc b/chrome/browser/extensions/api/media_galleries_private/media_galleries_private_api.cc
index 6d0f68d..fa1246b 100644
--- a/chrome/browser/extensions/api/media_galleries_private/media_galleries_private_api.cc
+++ b/chrome/browser/extensions/api/media_galleries_private/media_galleries_private_api.cc
@@ -440,7 +440,7 @@ bool MediaGalleriesPrivateGetHandlersFunction::RunImpl() {
for (ExtensionSet::const_iterator iter = service->extensions()->begin();
iter != service->extensions()->end();
++iter) {
- const Extension* extension = *iter;
+ const Extension* extension = iter->get();
if (profile_->IsOffTheRecord() &&
!service->IsIncognitoEnabled(extension->id()))
continue;
diff --git a/chrome/browser/extensions/api/page_capture/page_capture_api.cc b/chrome/browser/extensions/api/page_capture/page_capture_api.cc
index 2d53b2c..62a800e 100644
--- a/chrome/browser/extensions/api/page_capture/page_capture_api.cc
+++ b/chrome/browser/extensions/api/page_capture/page_capture_api.cc
@@ -103,8 +103,10 @@ void PageCaptureSaveAsMHTMLFunction::TemporaryFileCreated(bool success) {
// Setup a ShareableFileReference so the temporary file gets deleted
// once it is no longer used.
mhtml_file_ = ShareableFileReference::GetOrCreate(
- mhtml_path_, ShareableFileReference::DELETE_ON_FINAL_RELEASE,
- BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE));
+ mhtml_path_,
+ ShareableFileReference::DELETE_ON_FINAL_RELEASE,
+ BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE)
+ .get());
}
BrowserThread::PostTask(
BrowserThread::UI, FROM_HERE,
diff --git a/chrome/browser/extensions/api/permissions/permissions_api.cc b/chrome/browser/extensions/api/permissions/permissions_api.cc
index f227114..c758578 100644
--- a/chrome/browser/extensions/api/permissions/permissions_api.cc
+++ b/chrome/browser/extensions/api/permissions/permissions_api.cc
@@ -68,7 +68,7 @@ bool PermissionsContainsFunction::RunImpl() {
bool PermissionsGetAllFunction::RunImpl() {
scoped_ptr<Permissions> permissions =
- helpers::PackPermissionSet(GetExtension()->GetActivePermissions());
+ helpers::PackPermissionSet(GetExtension()->GetActivePermissions().get());
results_ = GetAll::Results::Create(*permissions);
return true;
}
diff --git a/chrome/browser/extensions/api/preference/preference_helpers.cc b/chrome/browser/extensions/api/preference/preference_helpers.cc
index 55297dd..7b18e78 100644
--- a/chrome/browser/extensions/api/preference/preference_helpers.cc
+++ b/chrome/browser/extensions/api/preference/preference_helpers.cc
@@ -99,8 +99,8 @@ void DispatchEventToExtensions(
// TODO(bauerb): Only iterate over registered event listeners.
if (router->ExtensionHasEventListener(extension_id, event_name) &&
(*it)->HasAPIPermission(permission) &&
- (!incognito || IncognitoInfo::IsSplitMode(*it) ||
- extension_service->CanCrossIncognito(*it))) {
+ (!incognito || IncognitoInfo::IsSplitMode(it->get()) ||
+ extension_service->CanCrossIncognito(it->get()))) {
// Inject level of control key-value.
DictionaryValue* dict;
bool rv = args->GetDictionary(0, &dict);
@@ -115,7 +115,7 @@ void DispatchEventToExtensions(
// incognito pref has not alredy been set
Profile* restrict_to_profile = NULL;
bool from_incognito = false;
- if (IncognitoInfo::IsSplitMode(*it)) {
+ if (IncognitoInfo::IsSplitMode(it->get())) {
if (incognito && extension_service->IsIncognitoEnabled(extension_id)) {
restrict_to_profile = profile->GetOffTheRecordProfile();
} else if (!incognito &&
diff --git a/chrome/browser/extensions/api/storage/managed_value_store_cache.cc b/chrome/browser/extensions/api/storage/managed_value_store_cache.cc
index 4458538..5106e3b 100644
--- a/chrome/browser/extensions/api/storage/managed_value_store_cache.cc
+++ b/chrome/browser/extensions/api/storage/managed_value_store_cache.cc
@@ -144,7 +144,7 @@ void ManagedValueStoreCache::ExtensionTracker::LoadSchemas(
// and is valid.
std::string error;
scoped_ptr<policy::PolicySchema> schema =
- StorageSchemaManifestHandler::GetSchema(*it, &error);
+ StorageSchemaManifestHandler::GetSchema(it->get(), &error);
CHECK(schema) << error;
descriptor->RegisterComponent((*it)->id(), schema.Pass());
}
diff --git a/chrome/browser/extensions/api/web_request/web_request_api.cc b/chrome/browser/extensions/api/web_request/web_request_api.cc
index 80f67aa..df7109f 100644
--- a/chrome/browser/extensions/api/web_request/web_request_api.cc
+++ b/chrome/browser/extensions/api/web_request/web_request_api.cc
@@ -2251,7 +2251,7 @@ void SendExtensionWebRequestStatusToHost(content::RenderProcessHost* host) {
profile->GetExtensionService()->extensions();
for (ExtensionSet::const_iterator it = extensions->begin();
it != extensions->end(); ++it) {
- if (profile->GetExtensionService()->HasUsedWebRequest(*it)) {
+ if (profile->GetExtensionService()->HasUsedWebRequest(it->get())) {
if ((*it)->name().find("Adblock Plus") != std::string::npos) {
adblock_plus = true;
} else if ((*it)->name().find("AdBlock") != std::string::npos) {
diff --git a/chrome/browser/extensions/api/web_request/web_request_api_unittest.cc b/chrome/browser/extensions/api/web_request/web_request_api_unittest.cc
index f52752f..0e58bdc 100644
--- a/chrome/browser/extensions/api/web_request/web_request_api_unittest.cc
+++ b/chrome/browser/extensions/api/web_request/web_request_api_unittest.cc
@@ -186,7 +186,7 @@ class ExtensionWebRequestTest : public testing::Test {
new ChromeNetworkDelegate(event_router_.get(), &enable_referrers_));
network_delegate_->set_profile(&profile_);
network_delegate_->set_cookie_settings(
- CookieSettings::Factory::GetForProfile(&profile_));
+ CookieSettings::Factory::GetForProfile(&profile_).get());
context_.reset(new net::TestURLRequestContext(true));
context_->set_network_delegate(network_delegate_.get());
context_->Init();
@@ -504,10 +504,14 @@ void ExtensionWebRequestTest::FireURLRequestWithData(
ScopedVector<net::UploadElementReader> element_readers;
element_readers.push_back(new net::UploadBytesElementReader(
&(bytes_1[0]), bytes_1.size()));
- element_readers.push_back(new net::UploadFileElementReader(
- base::MessageLoopProxy::current(), base::FilePath(), 0, 0, base::Time()));
- element_readers.push_back(new net::UploadBytesElementReader(
- &(bytes_2[0]), bytes_2.size()));
+ element_readers.push_back(
+ new net::UploadFileElementReader(base::MessageLoopProxy::current().get(),
+ base::FilePath(),
+ 0,
+ 0,
+ base::Time()));
+ element_readers.push_back(
+ new net::UploadBytesElementReader(&(bytes_2[0]), bytes_2.size()));
request.set_upload(make_scoped_ptr(
new net::UploadDataStream(&element_readers, 0)));
ipc_sender_.PushTask(base::Bind(&base::DoNothing));
@@ -778,7 +782,7 @@ class ExtensionWebRequestHeaderModificationTest
new ChromeNetworkDelegate(event_router_.get(), &enable_referrers_));
network_delegate_->set_profile(&profile_);
network_delegate_->set_cookie_settings(
- CookieSettings::Factory::GetForProfile(&profile_));
+ CookieSettings::Factory::GetForProfile(&profile_).get());
context_.reset(new net::TestURLRequestContext(true));
host_resolver_.reset(new net::MockHostResolver());
host_resolver_->rules()->AddSimulatedFailure("doesnotexist");
diff --git a/chrome/browser/extensions/app_sync_bundle.cc b/chrome/browser/extensions/app_sync_bundle.cc
index 1f5f312..e9a03ba 100644
--- a/chrome/browser/extensions/app_sync_bundle.cc
+++ b/chrome/browser/extensions/app_sync_bundle.cc
@@ -141,7 +141,7 @@ void AppSyncBundle::GetAppSyncDataListHelper(
std::vector<AppSyncData>* sync_data_list) const {
for (ExtensionSet::const_iterator it = extensions.begin();
it != extensions.end(); ++it) {
- const Extension& extension = **it;
+ const Extension& extension = *it->get();
// If we have pending app data for this app, then this
// version is out of date. We'll sync back the version we got from
// sync.
diff --git a/chrome/browser/extensions/blacklist.cc b/chrome/browser/extensions/blacklist.cc
index e6bea2a..9e1ef1b 100644
--- a/chrome/browser/extensions/blacklist.cc
+++ b/chrome/browser/extensions/blacklist.cc
@@ -180,10 +180,9 @@ void Blacklist::GetBlacklistedIDs(const std::set<std::string>& ids,
pref_blacklisted_ids.insert(*it);
}
- if (!g_database_manager.Get().get()) {
+ if (!g_database_manager.Get().get().get()) {
base::MessageLoopProxy::current()->PostTask(
- FROM_HERE,
- base::Bind(callback, pref_blacklisted_ids));
+ FROM_HERE, base::Bind(callback, pref_blacklisted_ids));
return;
}
diff --git a/chrome/browser/extensions/blacklist_unittest.cc b/chrome/browser/extensions/blacklist_unittest.cc
index 953f9a1..ad52f41 100644
--- a/chrome/browser/extensions/blacklist_unittest.cc
+++ b/chrome/browser/extensions/blacklist_unittest.cc
@@ -19,14 +19,12 @@ namespace {
class BlacklistTest : public testing::Test {
public:
BlacklistTest()
- : prefs_(message_loop_.message_loop_proxy()),
+ : prefs_(message_loop_.message_loop_proxy().get()),
ui_thread_(content::BrowserThread::UI, &message_loop_),
io_thread_(content::BrowserThread::IO, &message_loop_),
- safe_browsing_database_manager_(
- new FakeSafeBrowsingDatabaseManager()),
+ safe_browsing_database_manager_(new FakeSafeBrowsingDatabaseManager()),
scoped_blacklist_database_manager_(safe_browsing_database_manager_),
- blacklist_(prefs_.prefs()) {
- }
+ blacklist_(prefs_.prefs()) {}
bool IsBlacklisted(const Extension* extension) {
return TestBlacklist(&blacklist_).IsBlacklisted(extension->id());
diff --git a/chrome/browser/extensions/convert_web_app_unittest.cc b/chrome/browser/extensions/convert_web_app_unittest.cc
index 7d21876..c6805be 100644
--- a/chrome/browser/extensions/convert_web_app_unittest.cc
+++ b/chrome/browser/extensions/convert_web_app_unittest.cc
@@ -131,7 +131,7 @@ TEST(ExtensionFromWebApp, Basic) {
EXPECT_EQ("1978.12.11.0", extension->version()->GetString());
EXPECT_EQ(UTF16ToUTF8(web_app.title), extension->name());
EXPECT_EQ(UTF16ToUTF8(web_app.description), extension->description());
- EXPECT_EQ(web_app.app_url, AppLaunchInfo::GetFullLaunchURL(extension));
+ EXPECT_EQ(web_app.app_url, AppLaunchInfo::GetFullLaunchURL(extension.get()));
EXPECT_EQ(2u, extension->GetActivePermissions()->apis().size());
EXPECT_TRUE(extension->HasAPIPermission("geolocation"));
EXPECT_TRUE(extension->HasAPIPermission("notifications"));
@@ -181,7 +181,7 @@ TEST(ExtensionFromWebApp, Minimal) {
EXPECT_EQ("1978.12.11.0", extension->version()->GetString());
EXPECT_EQ(UTF16ToUTF8(web_app.title), extension->name());
EXPECT_EQ("", extension->description());
- EXPECT_EQ(web_app.app_url, AppLaunchInfo::GetFullLaunchURL(extension));
+ EXPECT_EQ(web_app.app_url, AppLaunchInfo::GetFullLaunchURL(extension.get()));
EXPECT_EQ(0u, IconsInfo::GetIcons(extension.get()).map().size());
EXPECT_EQ(0u, extension->GetActivePermissions()->apis().size());
ASSERT_EQ(1u, extension->web_extent().patterns().size());
diff --git a/chrome/browser/extensions/crx_installer.cc b/chrome/browser/extensions/crx_installer.cc
index 3796e5e..424ef62 100644
--- a/chrome/browser/extensions/crx_installer.cc
+++ b/chrome/browser/extensions/crx_installer.cc
@@ -386,7 +386,7 @@ void CrxInstaller::OnUnpackSuccess(const base::FilePath& temp_dir,
}
if (client_) {
- IconsInfo::DecodeIcon(installer_.extension(),
+ IconsInfo::DecodeIcon(installer_.extension().get(),
extension_misc::EXTENSION_ICON_LARGE,
ExtensionIconSet::MATCH_BIGGER,
&install_icon_);
@@ -595,7 +595,7 @@ void CrxInstaller::CompleteInstall() {
version_dir,
install_source_,
extension()->creation_flags() | Extension::REQUIRE_KEY,
- &error));
+ &error).get());
if (extension()) {
ReportSuccessFromFileThread();
diff --git a/chrome/browser/extensions/crx_installer.h b/chrome/browser/extensions/crx_installer.h
index 8a95f54..5de41a9 100644
--- a/chrome/browser/extensions/crx_installer.h
+++ b/chrome/browser/extensions/crx_installer.h
@@ -194,7 +194,7 @@ class CrxInstaller
Profile* profile() { return installer_.profile(); }
- const Extension* extension() { return installer_.extension(); }
+ const Extension* extension() { return installer_.extension().get(); }
private:
friend class ::ExtensionServiceTest;
diff --git a/chrome/browser/extensions/event_router_forwarder_unittest.cc b/chrome/browser/extensions/event_router_forwarder_unittest.cc
index 495c419..ee2bf3e 100644
--- a/chrome/browser/extensions/event_router_forwarder_unittest.cc
+++ b/chrome/browser/extensions/event_router_forwarder_unittest.cc
@@ -167,9 +167,8 @@ TEST_F(EventRouterForwarderTest, BroadcastRendererIO) {
kEventName, url));
// Wait for IO thread's message loop to be processed
- scoped_refptr<base::ThreadTestHelper> helper(
- new base::ThreadTestHelper(
- BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO)));
+ scoped_refptr<base::ThreadTestHelper> helper(new base::ThreadTestHelper(
+ BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO).get()));
ASSERT_TRUE(helper->Run());
base::MessageLoop::current()->RunUntilIdle();
diff --git a/chrome/browser/extensions/extension_apitest.cc b/chrome/browser/extensions/extension_apitest.cc
index 1155f1d..af45c6c 100644
--- a/chrome/browser/extensions/extension_apitest.cc
+++ b/chrome/browser/extensions/extension_apitest.cc
@@ -281,7 +281,7 @@ const extensions::Extension* ExtensionApiTest::GetSingleLoadedExtension() {
return NULL;
}
- extension = *it;
+ extension = it->get();
}
if (!extension) {
diff --git a/chrome/browser/extensions/extension_browsertest.cc b/chrome/browser/extensions/extension_browsertest.cc
index 0391286..c2ec75b 100644
--- a/chrome/browser/extensions/extension_browsertest.cc
+++ b/chrome/browser/extensions/extension_browsertest.cc
@@ -88,7 +88,7 @@ const Extension* ExtensionBrowserTest::GetExtensionByPath(
for (ExtensionSet::const_iterator iter = extensions->begin();
iter != extensions->end(); ++iter) {
if ((*iter)->path() == extension_path) {
- return *iter;
+ return iter->get();
}
}
return NULL;
diff --git a/chrome/browser/extensions/extension_context_menu_browsertest.cc b/chrome/browser/extensions/extension_context_menu_browsertest.cc
index c1e7a2a..d48f953 100644
--- a/chrome/browser/extensions/extension_context_menu_browsertest.cc
+++ b/chrome/browser/extensions/extension_context_menu_browsertest.cc
@@ -128,7 +128,7 @@ class ExtensionContextMenuBrowserTest : public ExtensionBrowserTest {
ExtensionSet::const_iterator i;
for (i = extensions->begin(); i != extensions->end(); ++i) {
if ((*i)->name() == name) {
- return *i;
+ return i->get();
}
}
return NULL;
diff --git a/chrome/browser/extensions/extension_disabled_ui_browsertest.cc b/chrome/browser/extensions/extension_disabled_ui_browsertest.cc
index ba71d48..8eb5228 100644
--- a/chrome/browser/extensions/extension_disabled_ui_browsertest.cc
+++ b/chrome/browser/extensions/extension_disabled_ui_browsertest.cc
@@ -87,7 +87,7 @@ class ExtensionDisabledGlobalErrorTest : public ExtensionBrowserTest {
if (service_->disabled_extensions()->size() != 1u)
return NULL;
- return *service_->disabled_extensions()->begin();
+ return service_->disabled_extensions()->begin()->get();
}
// Helper function to install an extension and upgrade it to a version
diff --git a/chrome/browser/extensions/extension_keybinding_registry.cc b/chrome/browser/extensions/extension_keybinding_registry.cc
index b2a3c84..e5cf544 100644
--- a/chrome/browser/extensions/extension_keybinding_registry.cc
+++ b/chrome/browser/extensions/extension_keybinding_registry.cc
@@ -43,8 +43,8 @@ void ExtensionKeybindingRegistry::Init() {
const ExtensionSet* extensions = service->extensions();
ExtensionSet::const_iterator iter = extensions->begin();
for (; iter != extensions->end(); ++iter)
- if (ExtensionMatchesFilter(*iter))
- AddExtensionKeybinding(*iter, std::string());
+ if (ExtensionMatchesFilter(iter->get()))
+ AddExtensionKeybinding(iter->get(), std::string());
}
bool ExtensionKeybindingRegistry::ShouldIgnoreCommand(
diff --git a/chrome/browser/extensions/extension_prefs_unittest.cc b/chrome/browser/extensions/extension_prefs_unittest.cc
index 4e9f194..e307ff7 100644
--- a/chrome/browser/extensions/extension_prefs_unittest.cc
+++ b/chrome/browser/extensions/extension_prefs_unittest.cc
@@ -55,8 +55,7 @@ static void AddPattern(URLPatternSet* extent, const std::string& pattern) {
ExtensionPrefsTest::ExtensionPrefsTest()
: ui_thread_(BrowserThread::UI, &message_loop_),
- prefs_(message_loop_.message_loop_proxy()) {
-}
+ prefs_(message_loop_.message_loop_proxy().get()) {}
ExtensionPrefsTest::~ExtensionPrefsTest() {
}
diff --git a/chrome/browser/extensions/extension_process_manager.cc b/chrome/browser/extensions/extension_process_manager.cc
index 8d67d77..4ef475d 100644
--- a/chrome/browser/extensions/extension_process_manager.cc
+++ b/chrome/browser/extensions/extension_process_manager.cc
@@ -702,7 +702,7 @@ void ExtensionProcessManager::CreateBackgroundHostsForProfileStartup() {
ExtensionService* service = GetProfile()->GetExtensionService();
for (ExtensionSet::const_iterator extension = service->extensions()->begin();
extension != service->extensions()->end(); ++extension) {
- CreateBackgroundHostForExtensionLoad(this, *extension);
+ CreateBackgroundHostForExtensionLoad(this, extension->get());
extensions::RuntimeEventRouter::DispatchOnStartupEvent(
GetProfile(), (*extension)->id());
diff --git a/chrome/browser/extensions/extension_protocols_unittest.cc b/chrome/browser/extensions/extension_protocols_unittest.cc
index bd1c210..acffeeb 100644
--- a/chrome/browser/extensions/extension_protocols_unittest.cc
+++ b/chrome/browser/extensions/extension_protocols_unittest.cc
@@ -237,7 +237,7 @@ TEST_F(ExtensionProtocolTest, ResourceRequestResponseHeaders) {
SetProtocolHandler(false);
scoped_refptr<Extension> extension = CreateTestResponseHeaderExtension();
- extension_info_map_->AddExtension(extension, base::Time::Now(), false);
+ extension_info_map_->AddExtension(extension.get(), base::Time::Now(), false);
{
net::URLRequest request(extension->GetResourceURL("test.dat"),
diff --git a/chrome/browser/extensions/extension_service.cc b/chrome/browser/extensions/extension_service.cc
index 1f7bde7..57b690c 100644
--- a/chrome/browser/extensions/extension_service.cc
+++ b/chrome/browser/extensions/extension_service.cc
@@ -792,7 +792,7 @@ bool ExtensionService::UninstallExtension(
}
GURL launch_web_url_origin(
- extensions::AppLaunchInfo::GetLaunchWebURL(extension).GetOrigin());
+ extensions::AppLaunchInfo::GetLaunchWebURL(extension.get()).GetOrigin());
bool is_storage_isolated =
extensions::AppIsolationInfo::HasIsolatedStorage(extension.get());
@@ -1156,7 +1156,7 @@ void ExtensionService::CheckManagementPolicy() {
// Loop through extensions list, unload installed extensions.
for (ExtensionSet::const_iterator iter = extensions_.begin();
iter != extensions_.end(); ++iter) {
- const Extension* extension = (*iter);
+ const Extension* extension = (iter->get());
if (!system_->management_policy()->UserMayLoad(extension, NULL))
to_be_removed.push_back(extension->id());
}
@@ -1694,7 +1694,7 @@ bool ExtensionService::PopulateExtensionErrorUI(
for (ExtensionSet::const_iterator iter = extensions_.begin();
iter != extensions_.end(); ++iter) {
- const Extension* e = *iter;
+ const Extension* e = iter->get();
// Extensions disabled by policy. Note: this no longer includes blacklisted
// extensions, though we still show the same UI.
@@ -1754,7 +1754,7 @@ void ExtensionService::UpdateExternalExtensionAlert() {
const Extension* extension = NULL;
for (ExtensionSet::const_iterator iter = disabled_extensions_.begin();
iter != disabled_extensions_.end(); ++iter) {
- const Extension* e = *iter;
+ const Extension* e = iter->get();
if (IsUnacknowledgedExternalExtension(e)) {
extension = e;
break;
@@ -2118,9 +2118,8 @@ void ExtensionService::CheckPermissionsIncrease(const Extension* extension,
// that requires the user's approval. This could occur because the browser
// upgraded and recognized additional privileges, or an extension upgrades
// to a version that requires additional privileges.
- is_privilege_increase =
- granted_permissions->HasLessPrivilegesThan(
- extension->GetActivePermissions());
+ is_privilege_increase = granted_permissions->HasLessPrivilegesThan(
+ extension->GetActivePermissions().get());
}
if (is_extension_upgrade) {
@@ -2168,7 +2167,7 @@ void ExtensionService::UpdateActiveExtensionsInCrashReporter() {
std::set<std::string> extension_ids;
for (ExtensionSet::const_iterator iter = extensions_.begin();
iter != extensions_.end(); ++iter) {
- const Extension* extension = *iter;
+ const Extension* extension = iter->get();
if (!extension->is_theme() && extension->location() != Manifest::COMPONENT)
extension_ids.insert(extension->id());
}
@@ -2583,7 +2582,7 @@ void ExtensionService::Observe(int type,
iter != extensions_.end(); ++iter) {
// Renderers don't need to know about themes.
if (!(*iter)->is_theme())
- loaded_extensions.push_back(ExtensionMsg_Loaded_Params(*iter));
+ loaded_extensions.push_back(ExtensionMsg_Loaded_Params(iter->get()));
}
process->Send(new ExtensionMsg_Loaded(loaded_extensions));
break;
@@ -2790,11 +2789,9 @@ void ExtensionService::GarbageCollectIsolatedStorage() {
new base::hash_set<base::FilePath>());
for (ExtensionSet::const_iterator it = extensions_.begin();
it != extensions_.end(); ++it) {
- if (extensions::AppIsolationInfo::HasIsolatedStorage(*it)) {
- active_paths->insert(
- BrowserContext::GetStoragePartitionForSite(
- profile_,
- GetSiteForExtensionId((*it)->id()))->GetPath());
+ if (extensions::AppIsolationInfo::HasIsolatedStorage(it->get())) {
+ active_paths->insert(BrowserContext::GetStoragePartitionForSite(
+ profile_, GetSiteForExtensionId((*it)->id()))->GetPath());
}
}
diff --git a/chrome/browser/extensions/extension_service_unittest.cc b/chrome/browser/extensions/extension_service_unittest.cc
index add357a..477f36a 100644
--- a/chrome/browser/extensions/extension_service_unittest.cc
+++ b/chrome/browser/extensions/extension_service_unittest.cc
@@ -456,8 +456,7 @@ void ExtensionServiceTestBase::InitializeExtensionService(
TestingProfile::Builder profile_builder;
// Create a PrefService that only contains user defined preference values.
PrefServiceMockBuilder builder;
- builder.WithUserFilePrefs(
- params.pref_file, loop_.message_loop_proxy());
+ builder.WithUserFilePrefs(params.pref_file, loop_.message_loop_proxy().get());
scoped_refptr<user_prefs::PrefRegistrySyncable> registry(
new user_prefs::PrefRegistrySyncable);
scoped_ptr<PrefServiceSyncable> prefs(builder.CreateSyncable(registry.get()));
@@ -479,7 +478,7 @@ void ExtensionServiceTestBase::InitializeExtensionService(
CommandLine::ForCurrentProcess(),
params.extensions_install_dir,
params.autoupdate_enabled);
- service_->SetFileTaskRunnerForTesting(loop_.message_loop_proxy());
+ service_->SetFileTaskRunnerForTesting(loop_.message_loop_proxy().get());
service_->set_extensions_enabled(true);
service_->set_show_extensions_prompts(false);
service_->set_install_updates_when_idle_for_test(false);
@@ -1880,7 +1879,7 @@ TEST_F(ExtensionServiceTest, GrantedAPIAndHostPermissions) {
service_->ReloadExtensions();
EXPECT_EQ(1u, service_->disabled_extensions()->size());
- extension = *service_->disabled_extensions()->begin();
+ extension = service_->disabled_extensions()->begin()->get();
ASSERT_TRUE(prefs->IsExtensionDisabled(extension_id));
ASSERT_FALSE(service_->IsExtensionEnabled(extension_id));
@@ -1923,7 +1922,7 @@ TEST_F(ExtensionServiceTest, GrantedAPIAndHostPermissions) {
service_->ReloadExtensions();
EXPECT_EQ(1u, service_->disabled_extensions()->size());
- extension = *service_->disabled_extensions()->begin();
+ extension = service_->disabled_extensions()->begin()->get();
ASSERT_TRUE(prefs->IsExtensionDisabled(extension_id));
ASSERT_FALSE(service_->IsExtensionEnabled(extension_id));
@@ -2198,7 +2197,7 @@ TEST_F(ExtensionServiceTest, LoadLocalizedTheme) {
EXPECT_EQ(0u, GetErrors().size());
ASSERT_EQ(1u, loaded_.size());
EXPECT_EQ(1u, service_->extensions()->size());
- const Extension* theme = *service_->extensions()->begin();
+ const Extension* theme = service_->extensions()->begin()->get();
EXPECT_EQ("name", theme->name());
EXPECT_EQ("description", theme->description());
@@ -3394,7 +3393,7 @@ TEST_F(ExtensionServiceTest, ManagementPolicyProhibitsLoadFromPrefs) {
extensions::InstalledLoader(service_).Load(extension_info, false);
EXPECT_EQ(1u, service_->extensions()->size());
- const Extension* extension = *(service_->extensions()->begin());
+ const Extension* extension = (service_->extensions()->begin())->get();
EXPECT_TRUE(service_->UninstallExtension(extension->id(), false, NULL));
EXPECT_EQ(0u, service_->extensions()->size());
diff --git a/chrome/browser/extensions/extension_special_storage_policy_unittest.cc b/chrome/browser/extensions/extension_special_storage_policy_unittest.cc
index 8e7ae0c..3ae4143 100644
--- a/chrome/browser/extensions/extension_special_storage_policy_unittest.cc
+++ b/chrome/browser/extensions/extension_special_storage_policy_unittest.cc
@@ -316,7 +316,7 @@ TEST_F(ExtensionSpecialStoragePolicyTest, HasSessionOnlyOrigins) {
TestingProfile profile;
CookieSettings* cookie_settings =
- CookieSettings::Factory::GetForProfile(&profile);
+ CookieSettings::Factory::GetForProfile(&profile).get();
policy_ = new ExtensionSpecialStoragePolicy(cookie_settings);
EXPECT_FALSE(policy_->HasSessionOnlyOrigins());
diff --git a/chrome/browser/extensions/extension_startup_browsertest.cc b/chrome/browser/extensions/extension_startup_browsertest.cc
index e45e865..ada7f89 100644
--- a/chrome/browser/extensions/extension_startup_browsertest.cc
+++ b/chrome/browser/extensions/extension_startup_browsertest.cc
@@ -189,8 +189,8 @@ IN_PROC_BROWSER_TEST_F(ExtensionsStartupTest, MAYBE_NoFileAccess) {
it != service->extensions()->end(); ++it) {
if ((*it)->location() == extensions::Manifest::COMPONENT)
continue;
- if (service->AllowFileAccess(*it))
- extension_list.push_back(*it);
+ if (service->AllowFileAccess(it->get()))
+ extension_list.push_back(it->get());
}
for (size_t i = 0; i < extension_list.size(); ++i) {
diff --git a/chrome/browser/extensions/extension_sync_bundle.cc b/chrome/browser/extensions/extension_sync_bundle.cc
index 0725a6c..9cf2faf 100644
--- a/chrome/browser/extensions/extension_sync_bundle.cc
+++ b/chrome/browser/extensions/extension_sync_bundle.cc
@@ -144,7 +144,7 @@ void ExtensionSyncBundle::GetExtensionSyncDataListHelper(
std::vector<ExtensionSyncData>* sync_data_list) const {
for (ExtensionSet::const_iterator it = extensions.begin();
it != extensions.end(); ++it) {
- const Extension& extension = **it;
+ const Extension& extension = *it->get();
// If we have pending extension data for this extension, then this
// version is out of date. We'll sync back the version we got from
// sync.
diff --git a/chrome/browser/extensions/extension_toolbar_model.cc b/chrome/browser/extensions/extension_toolbar_model.cc
index a387e05..7805832 100644
--- a/chrome/browser/extensions/extension_toolbar_model.cc
+++ b/chrome/browser/extensions/extension_toolbar_model.cc
@@ -334,7 +334,7 @@ void ExtensionToolbarModel::Populate(
// Create the lists.
for (ExtensionSet::const_iterator it = service_->extensions()->begin();
it != service_->extensions()->end(); ++it) {
- const Extension* extension = *it;
+ const Extension* extension = it->get();
if (!extension_action_manager->GetBrowserAction(*extension))
continue;
if (!extensions::ExtensionActionAPI::GetBrowserActionVisibility(
diff --git a/chrome/browser/extensions/installed_loader.cc b/chrome/browser/extensions/installed_loader.cc
index 01e21372..2fc4b46 100644
--- a/chrome/browser/extensions/installed_loader.cc
+++ b/chrome/browser/extensions/installed_loader.cc
@@ -302,9 +302,10 @@ void InstalledLoader::LoadAllExtensions() {
(*ex)->manifest_version(), 10);
if (type == Manifest::TYPE_EXTENSION) {
- BackgroundPageType background_page_type = GetBackgroundPageType(*ex);
- UMA_HISTOGRAM_ENUMERATION("Extensions.BackgroundPageType",
- background_page_type, 10);
+ BackgroundPageType background_page_type =
+ GetBackgroundPageType(ex->get());
+ UMA_HISTOGRAM_ENUMERATION(
+ "Extensions.BackgroundPageType", background_page_type, 10);
}
// Using an enumeration shows us the total installed ratio across all users.
@@ -355,16 +356,16 @@ void InstalledLoader::LoadAllExtensions() {
++item_user_count;
ExtensionActionManager* extension_action_manager =
ExtensionActionManager::Get(extension_service_->profile());
- if (extension_action_manager->GetPageAction(**ex))
+ if (extension_action_manager->GetPageAction(*ex->get()))
++page_action_count;
- if (extension_action_manager->GetBrowserAction(**ex))
+ if (extension_action_manager->GetBrowserAction(*ex->get()))
++browser_action_count;
- if (extensions::ManagedModeInfo::IsContentPack(*ex))
+ if (extensions::ManagedModeInfo::IsContentPack(ex->get()))
++content_pack_count;
extension_service_->RecordPermissionMessagesHistogram(
- *ex, "Extensions.Permissions_Load");
+ ex->get(), "Extensions.Permissions_Load");
}
const ExtensionSet* disabled_extensions =
extension_service_->disabled_extensions();
diff --git a/chrome/browser/extensions/menu_manager_unittest.cc b/chrome/browser/extensions/menu_manager_unittest.cc
index 56e24653..f9adbd9 100644
--- a/chrome/browser/extensions/menu_manager_unittest.cc
+++ b/chrome/browser/extensions/menu_manager_unittest.cc
@@ -43,12 +43,12 @@ namespace extensions {
// Base class for tests.
class MenuManagerTest : public testing::Test {
public:
- MenuManagerTest() : ui_thread_(BrowserThread::UI, &message_loop_),
- file_thread_(BrowserThread::FILE, &message_loop_),
- manager_(&profile_),
- prefs_(message_loop_.message_loop_proxy()),
- next_id_(1) {
- }
+ MenuManagerTest()
+ : ui_thread_(BrowserThread::UI, &message_loop_),
+ file_thread_(BrowserThread::FILE, &message_loop_),
+ manager_(&profile_),
+ prefs_(message_loop_.message_loop_proxy().get()),
+ next_id_(1) {}
virtual void TearDown() OVERRIDE {
prefs_.pref_service()->CommitPendingWrite();
diff --git a/chrome/browser/extensions/page_action_controller.cc b/chrome/browser/extensions/page_action_controller.cc
index b486e82..979518b 100644
--- a/chrome/browser/extensions/page_action_controller.cc
+++ b/chrome/browser/extensions/page_action_controller.cc
@@ -41,7 +41,8 @@ std::vector<ExtensionAction*> PageActionController::GetCurrentActions() const {
for (ExtensionSet::const_iterator i = service->extensions()->begin();
i != service->extensions()->end(); ++i) {
- ExtensionAction* action = extension_action_manager->GetPageAction(**i);
+ ExtensionAction* action =
+ extension_action_manager->GetPageAction(*i->get());
if (action)
current_actions.push_back(action);
}
diff --git a/chrome/browser/extensions/permissions_updater.cc b/chrome/browser/extensions/permissions_updater.cc
index 02c1208..46bb60f 100644
--- a/chrome/browser/extensions/permissions_updater.cc
+++ b/chrome/browser/extensions/permissions_updater.cc
@@ -83,7 +83,7 @@ void PermissionsUpdater::GrantActivePermissions(const Extension* extension) {
return;
ExtensionPrefs::Get(profile_)->AddGrantedPermissions(
- extension->id(), extension->GetActivePermissions());
+ extension->id(), extension->GetActivePermissions().get());
}
void PermissionsUpdater::UpdateActivePermissions(
diff --git a/chrome/browser/extensions/permissions_updater_unittest.cc b/chrome/browser/extensions/permissions_updater_unittest.cc
index b138886..cf55dc7 100644
--- a/chrome/browser/extensions/permissions_updater_unittest.cc
+++ b/chrome/browser/extensions/permissions_updater_unittest.cc
@@ -127,7 +127,8 @@ TEST_F(PermissionsUpdaterTest, AddAndRemovePermissions) {
// Make sure it loaded properly.
scoped_refptr<const PermissionSet> permissions =
extension->GetActivePermissions();
- ASSERT_EQ(*default_permissions.get(), *extension->GetActivePermissions());
+ ASSERT_EQ(*default_permissions.get(),
+ *extension->GetActivePermissions().get());
// Add a few permissions.
APIPermissionSet apis;
@@ -154,7 +155,8 @@ TEST_F(PermissionsUpdaterTest, AddAndRemovePermissions) {
// Make sure the extension's active permissions reflect the change.
scoped_refptr<PermissionSet> active_permissions =
PermissionSet::CreateUnion(default_permissions.get(), delta.get());
- ASSERT_EQ(*active_permissions.get(), *extension->GetActivePermissions());
+ ASSERT_EQ(*active_permissions.get(),
+ *extension->GetActivePermissions().get());
// Verify that the new granted and active permissions were also stored
// in the extension preferences. In this case, the granted permissions should
@@ -188,7 +190,8 @@ TEST_F(PermissionsUpdaterTest, AddAndRemovePermissions) {
// Make sure the extension's active permissions reflect the change.
active_permissions =
PermissionSet::CreateDifference(active_permissions.get(), delta.get());
- ASSERT_EQ(*active_permissions.get(), *extension->GetActivePermissions());
+ ASSERT_EQ(*active_permissions.get(),
+ *extension->GetActivePermissions().get());
// Verify that the extension prefs hold the new active permissions and the
// same granted permissions.
diff --git a/chrome/browser/extensions/sandboxed_unpacker_unittest.cc b/chrome/browser/extensions/sandboxed_unpacker_unittest.cc
index 7a8fbf2..092f8f49 100644
--- a/chrome/browser/extensions/sandboxed_unpacker_unittest.cc
+++ b/chrome/browser/extensions/sandboxed_unpacker_unittest.cc
@@ -100,12 +100,14 @@ class SandboxedUnpackerTest : public testing::Test {
temp_dir_.path().AppendASCII("sandboxed_unpacker_test_Temp");
ASSERT_TRUE(file_util::CreateDirectory(temp_path_));
- sandboxed_unpacker_ =
- new SandboxedUnpacker(
- crx_path, false, Manifest::INTERNAL, Extension::NO_FLAGS,
- extensions_dir_.path(),
- BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE),
- client_);
+ sandboxed_unpacker_ = new SandboxedUnpacker(
+ crx_path,
+ false,
+ Manifest::INTERNAL,
+ Extension::NO_FLAGS,
+ extensions_dir_.path(),
+ BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE).get(),
+ client_);
EXPECT_TRUE(PrepareUnpackerEnv());
}
diff --git a/chrome/browser/extensions/standard_management_policy_provider_unittest.cc b/chrome/browser/extensions/standard_management_policy_provider_unittest.cc
index 05a00a0..d4f9605 100644
--- a/chrome/browser/extensions/standard_management_policy_provider_unittest.cc
+++ b/chrome/browser/extensions/standard_management_policy_provider_unittest.cc
@@ -20,9 +20,8 @@ class StandardManagementPolicyProviderTest : public testing::Test {
StandardManagementPolicyProviderTest()
: ui_thread_(content::BrowserThread::UI, &message_loop_),
file_thread_(content::BrowserThread::FILE, &message_loop_),
- prefs_(message_loop_.message_loop_proxy()),
- provider_(prefs()) {
- }
+ prefs_(message_loop_.message_loop_proxy().get()),
+ provider_(prefs()) {}
protected:
ExtensionPrefs* prefs() {
diff --git a/chrome/browser/extensions/tab_helper.cc b/chrome/browser/extensions/tab_helper.cc
index 5c16906..059ccc9 100644
--- a/chrome/browser/extensions/tab_helper.cc
+++ b/chrome/browser/extensions/tab_helper.cc
@@ -212,7 +212,7 @@ void TabHelper::DidNavigateMainFrame(
for (ExtensionSet::const_iterator it = service->extensions()->begin();
it != service->extensions()->end(); ++it) {
ExtensionAction* browser_action =
- extension_action_manager->GetBrowserAction(**it);
+ extension_action_manager->GetBrowserAction(*it->get());
if (browser_action) {
browser_action->ClearAllValuesForTab(SessionID::IdForTab(web_contents()));
content::NotificationService::current()->Notify(
diff --git a/chrome/browser/extensions/unpacked_installer.cc b/chrome/browser/extensions/unpacked_installer.cc
index 0cc8be4..b394f00 100644
--- a/chrome/browser/extensions/unpacked_installer.cc
+++ b/chrome/browser/extensions/unpacked_installer.cc
@@ -133,12 +133,9 @@ bool UnpackedInstaller::LoadFromCommandLine(const base::FilePath& path_in,
std::string error;
installer_.set_extension(extension_file_util::LoadExtension(
- extension_path_,
- Manifest::COMMAND_LINE,
- GetFlags(),
- &error));
+ extension_path_, Manifest::COMMAND_LINE, GetFlags(), &error).get());
- if (!installer_.extension()) {
+ if (!installer_.extension().get()) {
ReportExtensionLoadError(error);
return false;
}
@@ -156,12 +153,11 @@ void UnpackedInstaller::ShowInstallPrompt() {
const ExtensionSet* disabled_extensions =
service_weak_->disabled_extensions();
- if (service_weak_->show_extensions_prompts() &&
- prompt_for_plugins_ &&
- PluginInfo::HasPlugins(installer_.extension()) &&
+ if (service_weak_->show_extensions_prompts() && prompt_for_plugins_ &&
+ PluginInfo::HasPlugins(installer_.extension().get()) &&
!disabled_extensions->Contains(installer_.extension()->id())) {
SimpleExtensionLoadPrompt* prompt = new SimpleExtensionLoadPrompt(
- installer_.extension(),
+ installer_.extension().get(),
installer_.profile(),
base::Bind(&UnpackedInstaller::CallCheckRequirements, this));
prompt->ShowPrompt();
@@ -244,12 +240,9 @@ void UnpackedInstaller::LoadWithFileAccess(int flags) {
std::string error;
installer_.set_extension(extension_file_util::LoadExtension(
- extension_path_,
- Manifest::UNPACKED,
- flags,
- &error));
+ extension_path_, Manifest::UNPACKED, flags, &error).get());
- if (!installer_.extension()) {
+ if (!installer_.extension().get()) {
BrowserThread::PostTask(
BrowserThread::UI,
FROM_HERE,
@@ -279,13 +272,12 @@ void UnpackedInstaller::ConfirmInstall() {
}
PermissionsUpdater perms_updater(service_weak_->profile());
- perms_updater.GrantActivePermissions(installer_.extension());
+ perms_updater.GrantActivePermissions(installer_.extension().get());
- service_weak_->OnExtensionInstalled(
- installer_.extension(),
- syncer::StringOrdinal(),
- false /* no requirement errors */,
- false /* don't wait for idle */);
+ service_weak_->OnExtensionInstalled(installer_.extension().get(),
+ syncer::StringOrdinal(),
+ false /* no requirement errors */,
+ false /* don't wait for idle */);
}
} // namespace extensions
diff --git a/chrome/browser/extensions/updater/extension_updater.cc b/chrome/browser/extensions/updater/extension_updater.cc
index f983b98..1a861ae 100644
--- a/chrome/browser/extensions/updater/extension_updater.cc
+++ b/chrome/browser/extensions/updater/extension_updater.cc
@@ -302,7 +302,7 @@ void ExtensionUpdater::AddToDownloader(
InProgressCheck& request = requests_in_progress_[request_id];
for (ExtensionSet::const_iterator extension_iter = extensions->begin();
extension_iter != extensions->end(); ++extension_iter) {
- const Extension& extension = **extension_iter;
+ const Extension& extension = *extension_iter->get();
if (!Manifest::IsAutoUpdateableLocation(extension.location())) {
VLOG(2) << "Extension " << extension.id() << " is not auto updateable";
continue;
diff --git a/chrome/browser/extensions/updater/extension_updater_unittest.cc b/chrome/browser/extensions/updater/extension_updater_unittest.cc
index c22bcdf..f0e4330 100644
--- a/chrome/browser/extensions/updater/extension_updater_unittest.cc
+++ b/chrome/browser/extensions/updater/extension_updater_unittest.cc
@@ -478,7 +478,7 @@ class ExtensionUpdaterTest : public testing::Test {
}
virtual void SetUp() OVERRIDE {
- prefs_.reset(new TestExtensionPrefs(loop_.message_loop_proxy()));
+ prefs_.reset(new TestExtensionPrefs(loop_.message_loop_proxy().get()));
}
virtual void TearDown() OVERRIDE {
@@ -1308,7 +1308,7 @@ class ExtensionUpdaterTest : public testing::Test {
// Set up 2 mock extensions, one with a google.com update url and one
// without.
- prefs_.reset(new TestExtensionPrefs(loop_.message_loop_proxy()));
+ prefs_.reset(new TestExtensionPrefs(loop_.message_loop_proxy().get()));
ServiceForManifestTests service(prefs_.get());
ExtensionList tmp;
GURL url1("http://clients2.google.com/service/update2/crx");
diff --git a/chrome/browser/extensions/updater/safe_manifest_parser.cc b/chrome/browser/extensions/updater/safe_manifest_parser.cc
index 920a2ff..ae571c7 100644
--- a/chrome/browser/extensions/updater/safe_manifest_parser.cc
+++ b/chrome/browser/extensions/updater/safe_manifest_parser.cc
@@ -51,7 +51,8 @@ void SafeManifestParser::ParseInSandbox() {
!CommandLine::ForCurrentProcess()->HasSwitch(switches::kSingleProcess);
if (use_utility_process) {
content::UtilityProcessHost* host = content::UtilityProcessHost::Create(
- this, BrowserThread::GetMessageLoopProxyForThread(BrowserThread::UI));
+ this,
+ BrowserThread::GetMessageLoopProxyForThread(BrowserThread::UI).get());
host->EnableZygote();
host->Send(new ChromeUtilityMsg_ParseUpdateManifest(xml_));
} else {
diff --git a/chrome/browser/extensions/user_script_listener.cc b/chrome/browser/extensions/user_script_listener.cc
index 3fffc6e..229aa40 100644
--- a/chrome/browser/extensions/user_script_listener.cc
+++ b/chrome/browser/extensions/user_script_listener.cc
@@ -231,8 +231,8 @@ void UserScriptListener::Observe(int type,
ExtensionService* service = profile->GetExtensionService();
for (ExtensionSet::const_iterator it = service->extensions()->begin();
it != service->extensions()->end(); ++it) {
- if (*it != unloaded_extension)
- CollectURLPatterns(*it, &new_patterns);
+ if (it->get() != unloaded_extension)
+ CollectURLPatterns(it->get(), &new_patterns);
}
BrowserThread::PostTask(BrowserThread::IO, FROM_HERE, base::Bind(
&UserScriptListener::ReplaceURLPatterns, this,
diff --git a/chrome/browser/extensions/webstore_install_helper.cc b/chrome/browser/extensions/webstore_install_helper.cc
index 68b6049..67bbbf1 100644
--- a/chrome/browser/extensions/webstore_install_helper.cc
+++ b/chrome/browser/extensions/webstore_install_helper.cc
@@ -73,9 +73,8 @@ void WebstoreInstallHelper::Start() {
void WebstoreInstallHelper::StartWorkOnIOThread() {
CHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
- utility_host_ =
- UtilityProcessHost::Create(
- this, base::MessageLoopProxy::current())->AsWeakPtr();
+ utility_host_ = UtilityProcessHost::Create(
+ this, base::MessageLoopProxy::current().get())->AsWeakPtr();
utility_host_->EnableZygote();
utility_host_->StartBatchMode();
diff --git a/chrome/browser/favicon/favicon_service.cc b/chrome/browser/favicon/favicon_service.cc
index 65facfe..37d691a 100644
--- a/chrome/browser/favicon/favicon_service.cc
+++ b/chrome/browser/favicon/favicon_service.cc
@@ -40,7 +40,7 @@ CancelableTaskTracker::TaskId RunWithEmptyResultAsync(
const FaviconService::FaviconResultsCallback& callback,
CancelableTaskTracker* tracker) {
return tracker->PostTask(
- base::MessageLoopProxy::current(),
+ base::MessageLoopProxy::current().get(),
FROM_HERE,
Bind(callback, std::vector<chrome::FaviconBitmapResult>()));
}
diff --git a/chrome/browser/history/history_service.cc b/chrome/browser/history/history_service.cc
index a2021b5..1e4361a 100644
--- a/chrome/browser/history/history_service.cc
+++ b/chrome/browser/history/history_service.cc
@@ -629,11 +629,15 @@ CancelableTaskTracker::TaskId HistoryService::GetFavicons(
std::vector<chrome::FaviconBitmapResult>* results =
new std::vector<chrome::FaviconBitmapResult>();
return tracker->PostTaskAndReply(
- thread_->message_loop_proxy(),
+ thread_->message_loop_proxy().get(),
FROM_HERE,
base::Bind(&HistoryBackend::GetFavicons,
- history_backend_.get(), icon_urls, icon_types,
- desired_size_in_dip, desired_scale_factors, results),
+ history_backend_.get(),
+ icon_urls,
+ icon_types,
+ desired_size_in_dip,
+ desired_scale_factors,
+ results),
base::Bind(&RunWithFaviconResults, callback, base::Owned(results)));
}
@@ -650,11 +654,15 @@ CancelableTaskTracker::TaskId HistoryService::GetFaviconsForURL(
std::vector<chrome::FaviconBitmapResult>* results =
new std::vector<chrome::FaviconBitmapResult>();
return tracker->PostTaskAndReply(
- thread_->message_loop_proxy(),
+ thread_->message_loop_proxy().get(),
FROM_HERE,
base::Bind(&HistoryBackend::GetFaviconsForURL,
- history_backend_.get(), page_url, icon_types,
- desired_size_in_dip, desired_scale_factors, results),
+ history_backend_.get(),
+ page_url,
+ icon_types,
+ desired_size_in_dip,
+ desired_scale_factors,
+ results),
base::Bind(&RunWithFaviconResults, callback, base::Owned(results)));
}
@@ -670,11 +678,14 @@ CancelableTaskTracker::TaskId HistoryService::GetFaviconForID(
std::vector<chrome::FaviconBitmapResult>* results =
new std::vector<chrome::FaviconBitmapResult>();
return tracker->PostTaskAndReply(
- thread_->message_loop_proxy(),
+ thread_->message_loop_proxy().get(),
FROM_HERE,
base::Bind(&HistoryBackend::GetFaviconForID,
- history_backend_.get(), favicon_id,
- desired_size_in_dip, desired_scale_factor, results),
+ history_backend_.get(),
+ favicon_id,
+ desired_size_in_dip,
+ desired_scale_factor,
+ results),
base::Bind(&RunWithFaviconResults, callback, base::Owned(results)));
}
@@ -692,11 +703,16 @@ CancelableTaskTracker::TaskId HistoryService::UpdateFaviconMappingsAndFetch(
std::vector<chrome::FaviconBitmapResult>* results =
new std::vector<chrome::FaviconBitmapResult>();
return tracker->PostTaskAndReply(
- thread_->message_loop_proxy(),
+ thread_->message_loop_proxy().get(),
FROM_HERE,
base::Bind(&HistoryBackend::UpdateFaviconMappingsAndFetch,
- history_backend_.get(), page_url, icon_urls, icon_types,
- desired_size_in_dip, desired_scale_factors, results),
+ history_backend_.get(),
+ page_url,
+ icon_urls,
+ icon_types,
+ desired_size_in_dip,
+ desired_scale_factors,
+ results),
base::Bind(&RunWithFaviconResults, callback, base::Owned(results)));
}
@@ -1110,7 +1126,7 @@ void HistoryService::ExpireHistoryBetween(
DCHECK(thread_);
DCHECK(thread_checker_.CalledOnValidThread());
DCHECK(history_backend_.get());
- tracker->PostTaskAndReply(thread_->message_loop_proxy(),
+ tracker->PostTaskAndReply(thread_->message_loop_proxy().get(),
FROM_HERE,
base::Bind(&HistoryBackend::ExpireHistoryBetween,
history_backend_,
@@ -1128,7 +1144,7 @@ void HistoryService::ExpireHistory(
DCHECK(thread_checker_.CalledOnValidThread());
DCHECK(history_backend_.get());
tracker->PostTaskAndReply(
- thread_->message_loop_proxy(),
+ thread_->message_loop_proxy().get(),
FROM_HERE,
base::Bind(&HistoryBackend::ExpireHistory, history_backend_, expire_list),
callback);
diff --git a/chrome/browser/history/shortcuts_backend_unittest.cc b/chrome/browser/history/shortcuts_backend_unittest.cc
index 60e7bd9..dbc4e83 100644
--- a/chrome/browser/history/shortcuts_backend_unittest.cc
+++ b/chrome/browser/history/shortcuts_backend_unittest.cc
@@ -74,7 +74,8 @@ void ShortcutsBackendTest::OnShortcutsChanged() {
}
void ShortcutsBackendTest::InitBackend() {
- ShortcutsBackend* backend = ShortcutsBackendFactory::GetForProfile(&profile_);
+ ShortcutsBackend* backend =
+ ShortcutsBackendFactory::GetForProfile(&profile_).get();
ASSERT_TRUE(backend);
ASSERT_FALSE(load_notified_);
ASSERT_FALSE(backend_->initialized());
diff --git a/chrome/browser/history/top_sites_backend.cc b/chrome/browser/history/top_sites_backend.cc
index e900cb5..bdf589c 100644
--- a/chrome/browser/history/top_sites_backend.cc
+++ b/chrome/browser/history/top_sites_backend.cc
@@ -41,10 +41,12 @@ void TopSitesBackend::GetMostVisitedThumbnails(
bool* need_history_migration = new bool(false);
tracker->PostTaskAndReply(
- BrowserThread::GetMessageLoopProxyForThread(BrowserThread::DB),
+ BrowserThread::GetMessageLoopProxyForThread(BrowserThread::DB).get(),
FROM_HERE,
base::Bind(&TopSitesBackend::GetMostVisitedThumbnailsOnDBThread,
- this, thumbnails, need_history_migration),
+ this,
+ thumbnails,
+ need_history_migration),
base::Bind(callback, thumbnails, base::Owned(need_history_migration)));
}
@@ -72,7 +74,7 @@ void TopSitesBackend::ResetDatabase() {
void TopSitesBackend::DoEmptyRequest(const base::Closure& reply,
CancelableTaskTracker* tracker) {
tracker->PostTaskAndReply(
- BrowserThread::GetMessageLoopProxyForThread(BrowserThread::DB),
+ BrowserThread::GetMessageLoopProxyForThread(BrowserThread::DB).get(),
FROM_HERE,
base::Bind(&base::DoNothing),
reply);
diff --git a/chrome/browser/importer/external_process_importer_client.cc b/chrome/browser/importer/external_process_importer_client.cc
index d946cfe..56ee2e6 100644
--- a/chrome/browser/importer/external_process_importer_client.cc
+++ b/chrome/browser/importer/external_process_importer_client.cc
@@ -261,10 +261,9 @@ void ExternalProcessImporterClient::NotifyItemFinishedOnIOThread(
void ExternalProcessImporterClient::StartProcessOnIOThread(
BrowserThread::ID thread_id) {
- utility_process_host_ =
- UtilityProcessHost::Create(
- this,
- BrowserThread::GetMessageLoopProxyForThread(thread_id))->AsWeakPtr();
+ utility_process_host_ = UtilityProcessHost::Create(
+ this, BrowserThread::GetMessageLoopProxyForThread(thread_id).get())
+ ->AsWeakPtr();
utility_process_host_->DisableSandbox();
#if defined(OS_MACOSX)
diff --git a/chrome/browser/importer/firefox_importer_browsertest.cc b/chrome/browser/importer/firefox_importer_browsertest.cc
index 0a9290a..4042f35 100644
--- a/chrome/browser/importer/firefox_importer_browsertest.cc
+++ b/chrome/browser/importer/firefox_importer_browsertest.cc
@@ -276,8 +276,10 @@ class FirefoxProfileImporterBrowserTest : public InProcessBrowserTest {
host = new ImporterHost;
#endif
host->SetObserver(observer);
- host->StartImportSettings(source_profile, browser()->profile(),
- items, make_scoped_refptr(writer));
+ host->StartImportSettings(source_profile,
+ browser()->profile(),
+ items,
+ make_scoped_refptr(writer).get());
base::MessageLoop::current()->Run();
}
diff --git a/chrome/browser/managed_mode/managed_user_service.cc b/chrome/browser/managed_mode/managed_user_service.cc
index 8a06b7e..d407d6e 100644
--- a/chrome/browser/managed_mode/managed_user_service.cc
+++ b/chrome/browser/managed_mode/managed_user_service.cc
@@ -318,7 +318,7 @@ ScopedVector<ManagedModeSiteList> ManagedUserService::GetActiveSiteLists() {
const ExtensionSet* extensions = extension_service->extensions();
for (ExtensionSet::const_iterator it = extensions->begin();
it != extensions->end(); ++it) {
- const extensions::Extension* extension = *it;
+ const extensions::Extension* extension = it->get();
if (!extension_service->IsExtensionEnabled(extension->id()))
continue;
diff --git a/chrome/browser/memory_purger.cc b/chrome/browser/memory_purger.cc
index 98ab301..44a04dd 100644
--- a/chrome/browser/memory_purger.cc
+++ b/chrome/browser/memory_purger.cc
@@ -120,7 +120,7 @@ void MemoryPurger::PurgeBrowser() {
WebDataServiceWrapper* wds_wrapper =
WebDataServiceFactory::GetForProfileIfExists(
profiles[i], Profile::EXPLICIT_ACCESS);
- if (wds_wrapper && wds_wrapper->GetWebData())
+ if (wds_wrapper && wds_wrapper->GetWebData().get())
wds_wrapper->GetWebData()->UnloadDatabase();
BrowserContext::PurgeMemory(profiles[i]);
diff --git a/chrome/browser/metrics/metrics_log.cc b/chrome/browser/metrics/metrics_log.cc
index ff05220..75c68f1 100644
--- a/chrome/browser/metrics/metrics_log.cc
+++ b/chrome/browser/metrics/metrics_log.cc
@@ -192,7 +192,7 @@ PluginPrefs* GetPluginPrefs() {
if (profiles.empty())
return NULL;
- return PluginPrefs::GetForProfile(profiles.front());
+ return PluginPrefs::GetForProfile(profiles.front()).get();
}
// Fills |plugin| with the info contained in |plugin_info| and |plugin_prefs|.
diff --git a/chrome/browser/nacl_host/nacl_browser.cc b/chrome/browser/nacl_host/nacl_browser.cc
index c7be0f4..e6811d3 100644
--- a/chrome/browser/nacl_host/nacl_browser.cc
+++ b/chrome/browser/nacl_host/nacl_browser.cc
@@ -229,7 +229,8 @@ void NaClBrowser::EnsureIrtAvailable() {
// TODO(ncbray) use blocking pool.
if (!base::FileUtilProxy::CreateOrOpen(
content::BrowserThread::GetMessageLoopProxyForThread(
- content::BrowserThread::FILE),
+ content::BrowserThread::FILE)
+ .get(),
irt_filepath_,
base::PLATFORM_FILE_OPEN | base::PLATFORM_FILE_READ,
base::Bind(&NaClBrowser::OnIrtOpened,
diff --git a/chrome/browser/nacl_host/nacl_process_host.cc b/chrome/browser/nacl_host/nacl_process_host.cc
index dccd4d9f..21f8ea7 100644
--- a/chrome/browser/nacl_host/nacl_process_host.cc
+++ b/chrome/browser/nacl_host/nacl_process_host.cc
@@ -827,7 +827,7 @@ void NaClProcessHost::OnPpapiChannelCreated(
new IPC::ChannelProxy(channel_handle,
IPC::Channel::MODE_CLIENT,
&ipc_plugin_listener_,
- base::MessageLoopProxy::current()));
+ base::MessageLoopProxy::current().get()));
// Create the browser ppapi host and enable PPAPI message dispatching to the
// browser process.
ppapi_host_.reset(content::BrowserPpapiHost::CreateExternalPluginProcess(
diff --git a/chrome/browser/nacl_host/pnacl_translation_cache.cc b/chrome/browser/nacl_host/pnacl_translation_cache.cc
index e725e0b..f9a2c1a 100644
--- a/chrome/browser/nacl_host/pnacl_translation_cache.cc
+++ b/chrome/browser/nacl_host/pnacl_translation_cache.cc
@@ -163,7 +163,7 @@ void PNaClTranslationCacheEntry::WriteEntry(int offset, int len) {
int rv = entry_->WriteData(
1,
offset,
- io_buf,
+ io_buf.get(),
len,
base::Bind(&PNaClTranslationCacheEntry::DispatchNext, this),
false);
@@ -176,7 +176,7 @@ void PNaClTranslationCacheEntry::ReadEntry(int offset, int len) {
int rv = entry_->ReadData(
1,
offset,
- read_buf_,
+ read_buf_.get(),
len,
base::Bind(&PNaClTranslationCacheEntry::DispatchNext, this));
if (rv != net::ERR_IO_PENDING)
@@ -315,7 +315,7 @@ int PNaClTranslationCache::Init(net::CacheType cache_type,
cache_dir,
cache_size,
true /* force_initialize */,
- BrowserThread::GetMessageLoopProxyForThread(BrowserThread::CACHE),
+ BrowserThread::GetMessageLoopProxyForThread(BrowserThread::CACHE).get(),
NULL, /* dummy net log */
&disk_cache_,
base::Bind(&PNaClTranslationCache::OnCreateBackendComplete, AsWeakPtr()));
diff --git a/chrome/browser/net/chrome_network_delegate_unittest.cc b/chrome/browser/net/chrome_network_delegate_unittest.cc
index 356b62f..b0f2ccb 100644
--- a/chrome/browser/net/chrome_network_delegate_unittest.cc
+++ b/chrome/browser/net/chrome_network_delegate_unittest.cc
@@ -285,12 +285,12 @@ class ChromeNetworkDelegatePrivacyModeTest : public testing::Test {
ChromeNetworkDelegatePrivacyModeTest()
: thread_bundle_(content::TestBrowserThreadBundle::IO_MAINLOOP),
forwarder_(new extensions::EventRouterForwarder()),
- cookie_settings_(CookieSettings::Factory::GetForProfile(&profile_)),
+ cookie_settings_(CookieSettings::Factory::GetForProfile(&profile_)
+ .get()),
kBlockedSite("http://ads.thirdparty.com"),
kAllowedSite("http://good.allays.com"),
kFirstPartySite("http://cool.things.com"),
- kBlockedFirstPartySite("http://no.thirdparties.com") {
- }
+ kBlockedFirstPartySite("http://no.thirdparties.com") {}
virtual void SetUp() OVERRIDE {
ChromeNetworkDelegate::InitializePrefsOnUIThread(
diff --git a/chrome/browser/net/proxy_service_factory.cc b/chrome/browser/net/proxy_service_factory.cc
index 8943104..9d30b1e 100644
--- a/chrome/browser/net/proxy_service_factory.cc
+++ b/chrome/browser/net/proxy_service_factory.cc
@@ -47,7 +47,7 @@ ChromeProxyConfigService* ProxyServiceFactory::CreateProxyConfigService() {
// that code be moved to chrome/browser instead of being in net, so that it
// can use BrowserThread instead of raw MessageLoop pointers? See bug 25354.
base_service = net::ProxyService::CreateSystemProxyConfigService(
- BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO),
+ BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO).get(),
BrowserThread::UnsafeGetMessageLoopForThread(BrowserThread::FILE));
#endif // !defined(OS_CHROMEOS)
diff --git a/chrome/browser/net/transport_security_persister.cc b/chrome/browser/net/transport_security_persister.cc
index a0b513d..5c0097b 100644
--- a/chrome/browser/net/transport_security_persister.cc
+++ b/chrome/browser/net/transport_security_persister.cc
@@ -123,7 +123,8 @@ TransportSecurityPersister::TransportSecurityPersister(
bool readonly)
: transport_security_state_(state),
writer_(profile_path.AppendASCII("TransportSecurity"),
- BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE)),
+ BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE)
+ .get()),
readonly_(readonly),
weak_ptr_factory_(this) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
diff --git a/chrome/browser/notifications/message_center_settings_controller.cc b/chrome/browser/notifications/message_center_settings_controller.cc
index ea52be7..924c669 100644
--- a/chrome/browser/notifications/message_center_settings_controller.cc
+++ b/chrome/browser/notifications/message_center_settings_controller.cc
@@ -88,9 +88,9 @@ void MessageCenterSettingsController::GetNotifierList(
profile, extension_misc::EXTENSION_ICON_SMALL, this));
for (ExtensionSet::const_iterator iter = extension_set->begin();
iter != extension_set->end(); ++iter) {
- const extensions::Extension* extension = *iter;
+ const extensions::Extension* extension = iter->get();
if (!extension->HasAPIPermission(
- extensions::APIPermission::kNotification)) {
+ extensions::APIPermission::kNotification)) {
continue;
}
diff --git a/chrome/browser/password_manager/password_form_manager.cc b/chrome/browser/password_manager/password_form_manager.cc
index 0389792..eac88b2 100644
--- a/chrome/browser/password_manager/password_form_manager.cc
+++ b/chrome/browser/password_manager/password_form_manager.cc
@@ -127,7 +127,7 @@ void PasswordFormManager::PermanentlyBlacklist() {
if (!best_matches_.empty()) {
PasswordFormMap::const_iterator iter;
PasswordStore* password_store = PasswordStoreFactory::GetForProfile(
- profile_, Profile::EXPLICIT_ACCESS);
+ profile_, Profile::EXPLICIT_ACCESS).get();
if (!password_store) {
NOTREACHED();
return;
@@ -240,7 +240,7 @@ void PasswordFormManager::FetchMatchingLoginsFromPasswordStore() {
DCHECK_EQ(state_, PRE_MATCHING_PHASE);
state_ = MATCHING_PHASE;
PasswordStore* password_store = PasswordStoreFactory::GetForProfile(
- profile_, Profile::EXPLICIT_ACCESS);
+ profile_, Profile::EXPLICIT_ACCESS).get();
if (!password_store) {
NOTREACHED();
return;
@@ -398,7 +398,7 @@ void PasswordFormManager::SaveAsNewLogin(bool reset_preferred_login) {
DCHECK(!profile_->IsOffTheRecord());
PasswordStore* password_store = PasswordStoreFactory::GetForProfile(
- profile_, Profile::IMPLICIT_ACCESS);
+ profile_, Profile::IMPLICIT_ACCESS).get();
if (!password_store) {
NOTREACHED();
return;
@@ -456,7 +456,7 @@ void PasswordFormManager::UpdateLogin() {
DCHECK(!profile_->IsOffTheRecord());
PasswordStore* password_store = PasswordStoreFactory::GetForProfile(
- profile_, Profile::IMPLICIT_ACCESS);
+ profile_, Profile::IMPLICIT_ACCESS).get();
if (!password_store) {
NOTREACHED();
return;
diff --git a/chrome/browser/policy/policy_browsertest.cc b/chrome/browser/policy/policy_browsertest.cc
index df1716b..1cf089c 100644
--- a/chrome/browser/policy/policy_browsertest.cc
+++ b/chrome/browser/policy/policy_browsertest.cc
@@ -1018,7 +1018,8 @@ IN_PROC_BROWSER_TEST_F(PolicyTest, DisabledPlugins) {
const webkit::WebPluginInfo* flash = GetFlashPlugin(plugins);
if (!flash)
return;
- PluginPrefs* plugin_prefs = PluginPrefs::GetForProfile(browser()->profile());
+ PluginPrefs* plugin_prefs =
+ PluginPrefs::GetForProfile(browser()->profile()).get();
EXPECT_TRUE(plugin_prefs->IsPluginEnabled(*flash));
EXPECT_TRUE(SetPluginEnabled(plugin_prefs, flash, false));
EXPECT_FALSE(plugin_prefs->IsPluginEnabled(*flash));
@@ -1048,7 +1049,8 @@ IN_PROC_BROWSER_TEST_F(PolicyTest, DisabledPluginsExceptions) {
const webkit::WebPluginInfo* flash = GetFlashPlugin(plugins);
if (!flash)
return;
- PluginPrefs* plugin_prefs = PluginPrefs::GetForProfile(browser()->profile());
+ PluginPrefs* plugin_prefs =
+ PluginPrefs::GetForProfile(browser()->profile()).get();
EXPECT_TRUE(plugin_prefs->IsPluginEnabled(*flash));
// Disable all plugins.
@@ -1086,7 +1088,8 @@ IN_PROC_BROWSER_TEST_F(PolicyTest, EnabledPlugins) {
const webkit::WebPluginInfo* flash = GetFlashPlugin(plugins);
if (!flash)
return;
- PluginPrefs* plugin_prefs = PluginPrefs::GetForProfile(browser()->profile());
+ PluginPrefs* plugin_prefs =
+ PluginPrefs::GetForProfile(browser()->profile()).get();
EXPECT_TRUE(plugin_prefs->IsPluginEnabled(*flash));
// The user disables it and then a policy forces it to be enabled.
diff --git a/chrome/browser/prefs/chrome_pref_service_unittest.cc b/chrome/browser/prefs/chrome_pref_service_unittest.cc
index 3afa38d..226c6cf 100644
--- a/chrome/browser/prefs/chrome_pref_service_unittest.cc
+++ b/chrome/browser/prefs/chrome_pref_service_unittest.cc
@@ -98,7 +98,8 @@ TEST_F(ChromePrefServiceUserFilePrefsTest, PreserveEmptyValue) {
pref_file));
PrefServiceMockBuilder builder;
- builder.WithUserFilePrefs(pref_file, message_loop_.message_loop_proxy());
+ builder.WithUserFilePrefs(pref_file,
+ message_loop_.message_loop_proxy().get());
scoped_refptr<user_prefs::PrefRegistrySyncable> registry(
new user_prefs::PrefRegistrySyncable);
scoped_ptr<PrefServiceSyncable> prefs(builder.CreateSyncable(registry.get()));
diff --git a/chrome/browser/prefs/pref_service_syncable.cc b/chrome/browser/prefs/pref_service_syncable.cc
index 82c18ba..0a4a455 100644
--- a/chrome/browser/prefs/pref_service_syncable.cc
+++ b/chrome/browser/prefs/pref_service_syncable.cc
@@ -96,7 +96,7 @@ PrefServiceSyncable* PrefServiceSyncable::CreateIncognitoPrefService(
NULL, // command_line_prefs
incognito_pref_store,
NULL, // recommended
- forked_registry->defaults(),
+ forked_registry->defaults().get(),
pref_notifier),
incognito_pref_store,
forked_registry.get(),
diff --git a/chrome/browser/prefs/pref_service_syncable_builder.cc b/chrome/browser/prefs/pref_service_syncable_builder.cc
index 5dc83c3..69a090c 100644
--- a/chrome/browser/prefs/pref_service_syncable_builder.cc
+++ b/chrome/browser/prefs/pref_service_syncable_builder.cc
@@ -48,14 +48,13 @@ PrefServiceSyncable* PrefServiceSyncableBuilder::CreateSyncable(
PrefNotifierImpl* pref_notifier = new PrefNotifierImpl();
PrefServiceSyncable* pref_service = new PrefServiceSyncable(
pref_notifier,
- new PrefValueStore(
- managed_prefs_.get(),
- extension_prefs_.get(),
- command_line_prefs_.get(),
- user_prefs_.get(),
- recommended_prefs_.get(),
- pref_registry->defaults(),
- pref_notifier),
+ new PrefValueStore(managed_prefs_.get(),
+ extension_prefs_.get(),
+ command_line_prefs_.get(),
+ user_prefs_.get(),
+ recommended_prefs_.get(),
+ pref_registry->defaults().get(),
+ pref_notifier),
user_prefs_.get(),
pref_registry,
read_error_callback_,
diff --git a/chrome/browser/printing/cloud_print/test/cloud_print_proxy_process_browsertest.cc b/chrome/browser/printing/cloud_print/test/cloud_print_proxy_process_browsertest.cc
index fd41ece..9fdeaa5 100644
--- a/chrome/browser/printing/cloud_print/test/cloud_print_proxy_process_browsertest.cc
+++ b/chrome/browser/printing/cloud_print/test/cloud_print_proxy_process_browsertest.cc
@@ -96,7 +96,7 @@ class TestServiceProcess : public ServiceProcess {
ServiceProcessState* state);
base::MessageLoopProxy* IOMessageLoopProxy() {
- return io_thread_->message_loop_proxy();
+ return io_thread_->message_loop_proxy().get();
}
};
@@ -290,7 +290,7 @@ class CloudPrintProxyPolicyStartupTest : public base::MultiProcessTest,
virtual void SetUp();
base::MessageLoopProxy* IOMessageLoopProxy() {
- return io_thread_.message_loop_proxy();
+ return io_thread_.message_loop_proxy().get();
}
base::ProcessHandle Launch(const std::string& name);
void WaitForConnect();
@@ -411,10 +411,12 @@ base::ProcessHandle CloudPrintProxyPolicyStartupTest::Launch(
void CloudPrintProxyPolicyStartupTest::WaitForConnect() {
observer_.Wait();
EXPECT_TRUE(CheckServiceProcessReady());
- EXPECT_TRUE(base::MessageLoopProxy::current());
- ServiceProcessControl::GetInstance()->SetChannel(new IPC::ChannelProxy(
- GetServiceProcessChannel(), IPC::Channel::MODE_NAMED_CLIENT,
- ServiceProcessControl::GetInstance(), IOMessageLoopProxy()));
+ EXPECT_TRUE(base::MessageLoopProxy::current().get());
+ ServiceProcessControl::GetInstance()->SetChannel(
+ new IPC::ChannelProxy(GetServiceProcessChannel(),
+ IPC::Channel::MODE_NAMED_CLIENT,
+ ServiceProcessControl::GetInstance(),
+ IOMessageLoopProxy()));
}
bool CloudPrintProxyPolicyStartupTest::Send(IPC::Message* message) {
diff --git a/chrome/browser/printing/print_dialog_gtk.cc b/chrome/browser/printing/print_dialog_gtk.cc
index 8960a25..e4a6e5d 100644
--- a/chrome/browser/printing/print_dialog_gtk.cc
+++ b/chrome/browser/printing/print_dialog_gtk.cc
@@ -407,8 +407,10 @@ void PrintDialogGtk::OnJobCompleted(GtkPrintJob* print_job, GError* error) {
if (print_job)
g_object_unref(print_job);
base::FileUtilProxy::Delete(
- BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE),
- path_to_pdf_, false, base::FileUtilProxy::StatusCallback());
+ BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE).get(),
+ path_to_pdf_,
+ false,
+ base::FileUtilProxy::StatusCallback());
// Printing finished. Matches AddRef() in PrintDocument();
Release();
}
diff --git a/chrome/browser/process_singleton_linux_unittest.cc b/chrome/browser/process_singleton_linux_unittest.cc
index 30042ae..06ae82a 100644
--- a/chrome/browser/process_singleton_linux_unittest.cc
+++ b/chrome/browser/process_singleton_linux_unittest.cc
@@ -87,7 +87,7 @@ class ProcessSingletonLinuxTest : public testing::Test {
virtual void TearDown() {
scoped_refptr<base::ThreadTestHelper> io_helper(new base::ThreadTestHelper(
- BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO)));
+ BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO).get()));
ASSERT_TRUE(io_helper->Run());
// Destruct the ProcessSingleton object before the IO thread so that its
@@ -98,8 +98,8 @@ class ProcessSingletonLinuxTest : public testing::Test {
base::Bind(&ProcessSingletonLinuxTest::DestructProcessSingleton,
base::Unretained(this)));
- scoped_refptr<base::ThreadTestHelper> helper(
- new base::ThreadTestHelper(worker_thread_->message_loop_proxy()));
+ scoped_refptr<base::ThreadTestHelper> helper(new base::ThreadTestHelper(
+ worker_thread_->message_loop_proxy().get()));
ASSERT_TRUE(helper->Run());
}
@@ -119,8 +119,7 @@ class ProcessSingletonLinuxTest : public testing::Test {
base::Unretained(this)));
scoped_refptr<base::ThreadTestHelper> helper(
- new base::ThreadTestHelper(
- worker_thread_->message_loop_proxy()));
+ new base::ThreadTestHelper(worker_thread_->message_loop_proxy().get()));
ASSERT_TRUE(helper->Run());
}
diff --git a/chrome/browser/profiles/off_the_record_profile_impl.cc b/chrome/browser/profiles/off_the_record_profile_impl.cc
index 1212b87..592ed84 100644
--- a/chrome/browser/profiles/off_the_record_profile_impl.cc
+++ b/chrome/browser/profiles/off_the_record_profile_impl.cc
@@ -120,7 +120,8 @@ void OffTheRecordProfileImpl::Init() {
#if defined(ENABLE_PLUGINS)
ChromePluginServiceFilter::GetInstance()->RegisterResourceContext(
- PluginPrefs::GetForProfile(this), io_data_.GetResourceContextNoInit());
+ PluginPrefs::GetForProfile(this).get(),
+ io_data_.GetResourceContextNoInit());
#endif
BrowserThread::PostTask(
@@ -246,7 +247,7 @@ net::URLRequestContextGetter* OffTheRecordProfileImpl::GetRequestContext() {
net::URLRequestContextGetter* OffTheRecordProfileImpl::CreateRequestContext(
content::ProtocolHandlerMap* protocol_handlers) {
- return io_data_.CreateMainRequestContextGetter(protocol_handlers);
+ return io_data_.CreateMainRequestContextGetter(protocol_handlers).get();
}
net::URLRequestContextGetter*
@@ -274,12 +275,13 @@ net::URLRequestContextGetter*
OffTheRecordProfileImpl::GetMediaRequestContextForStoragePartition(
const base::FilePath& partition_path,
bool in_memory) {
- return io_data_.GetIsolatedAppRequestContextGetter(partition_path, in_memory);
+ return io_data_.GetIsolatedAppRequestContextGetter(partition_path, in_memory)
+ .get();
}
net::URLRequestContextGetter*
OffTheRecordProfileImpl::GetRequestContextForExtensions() {
- return io_data_.GetExtensionsRequestContextGetter();
+ return io_data_.GetExtensionsRequestContextGetter().get();
}
net::URLRequestContextGetter*
@@ -288,7 +290,7 @@ net::URLRequestContextGetter*
bool in_memory,
content::ProtocolHandlerMap* protocol_handlers) {
return io_data_.CreateIsolatedAppRequestContextGetter(
- partition_path, in_memory, protocol_handlers);
+ partition_path, in_memory, protocol_handlers).get();
}
content::ResourceContext* OffTheRecordProfileImpl::GetResourceContext() {
diff --git a/chrome/browser/profiles/profile_impl.cc b/chrome/browser/profiles/profile_impl.cc
index 4ae0c4e..a16a24a 100644
--- a/chrome/browser/profiles/profile_impl.cc
+++ b/chrome/browser/profiles/profile_impl.cc
@@ -536,7 +536,7 @@ void ProfileImpl::DoFinalInit() {
#if defined(ENABLE_PLUGINS)
ChromePluginServiceFilter::GetInstance()->RegisterResourceContext(
- PluginPrefs::GetForProfile(this),
+ PluginPrefs::GetForProfile(this).get(),
io_data_.GetResourceContextNoInit());
#endif
@@ -707,7 +707,7 @@ ExtensionSpecialStoragePolicy*
if (!extension_special_storage_policy_.get()) {
TRACE_EVENT0("browser", "ProfileImpl::GetExtensionSpecialStoragePolicy")
extension_special_storage_policy_ = new ExtensionSpecialStoragePolicy(
- CookieSettings::Factory::GetForProfile(this));
+ CookieSettings::Factory::GetForProfile(this).get());
}
return extension_special_storage_policy_.get();
}
@@ -816,10 +816,10 @@ base::FilePath ProfileImpl::GetPrefFilePath() {
net::URLRequestContextGetter* ProfileImpl::CreateRequestContext(
content::ProtocolHandlerMap* protocol_handlers) {
- return io_data_.CreateMainRequestContextGetter(
- protocol_handlers,
- g_browser_process->local_state(),
- g_browser_process->io_thread());
+ return io_data_
+ .CreateMainRequestContextGetter(protocol_handlers,
+ g_browser_process->local_state(),
+ g_browser_process->io_thread()).get();
}
net::URLRequestContextGetter* ProfileImpl::GetRequestContext() {
@@ -836,7 +836,7 @@ net::URLRequestContextGetter* ProfileImpl::GetRequestContextForRenderProcess(
net::URLRequestContextGetter* ProfileImpl::GetMediaRequestContext() {
// Return the default media context.
- return io_data_.GetMediaRequestContextGetter();
+ return io_data_.GetMediaRequestContextGetter().get();
}
net::URLRequestContextGetter*
@@ -853,8 +853,8 @@ net::URLRequestContextGetter*
ProfileImpl::GetMediaRequestContextForStoragePartition(
const base::FilePath& partition_path,
bool in_memory) {
- return io_data_.GetIsolatedMediaRequestContextGetter(partition_path,
- in_memory);
+ return io_data_
+ .GetIsolatedMediaRequestContextGetter(partition_path, in_memory).get();
}
content::ResourceContext* ProfileImpl::GetResourceContext() {
@@ -862,7 +862,7 @@ content::ResourceContext* ProfileImpl::GetResourceContext() {
}
net::URLRequestContextGetter* ProfileImpl::GetRequestContextForExtensions() {
- return io_data_.GetExtensionsRequestContextGetter();
+ return io_data_.GetExtensionsRequestContextGetter().get();
}
net::URLRequestContextGetter*
@@ -871,7 +871,7 @@ ProfileImpl::CreateRequestContextForStoragePartition(
bool in_memory,
content::ProtocolHandlerMap* protocol_handlers) {
return io_data_.CreateIsolatedAppRequestContextGetter(
- partition_path, in_memory, protocol_handlers);
+ partition_path, in_memory, protocol_handlers).get();
}
net::SSLConfigService* ProfileImpl::GetSSLConfigService() {
@@ -900,7 +900,7 @@ content::GeolocationPermissionContext*
content::SpeechRecognitionPreferences*
ProfileImpl::GetSpeechRecognitionPreferences() {
#if defined(ENABLE_INPUT_SPEECH)
- return ChromeSpeechRecognitionPreferences::GetForProfile(this);
+ return ChromeSpeechRecognitionPreferences::GetForProfile(this).get();
#else
return NULL;
#endif
diff --git a/chrome/browser/profiles/profile_impl_io_data.cc b/chrome/browser/profiles/profile_impl_io_data.cc
index 59a7ab7..c153e25 100644
--- a/chrome/browser/profiles/profile_impl_io_data.cc
+++ b/chrome/browser/profiles/profile_impl_io_data.cc
@@ -415,7 +415,8 @@ void ProfileImplIOData::InitializeInternal(
ChooseCacheBackendType(),
lazy_params_->cache_path,
lazy_params_->cache_max_size,
- BrowserThread::GetMessageLoopProxyForThread(BrowserThread::CACHE));
+ BrowserThread::GetMessageLoopProxyForThread(BrowserThread::CACHE)
+ .get());
net::HttpNetworkSession::Params network_session_params;
PopulateNetworkSessionParams(profile_params, &network_session_params);
net::HttpCache* main_cache = new net::HttpCache(
@@ -538,7 +539,8 @@ ProfileImplIOData::InitializeAppRequestContext(
ChooseCacheBackendType(),
cache_path,
app_cache_max_size_,
- BrowserThread::GetMessageLoopProxyForThread(BrowserThread::CACHE));
+ BrowserThread::GetMessageLoopProxyForThread(BrowserThread::CACHE)
+ .get());
}
net::HttpNetworkSession* main_network_session =
main_http_factory_->GetSession();
@@ -629,7 +631,8 @@ ProfileImplIOData::InitializeMediaRequestContext(
ChooseCacheBackendType(),
cache_path,
cache_max_size,
- BrowserThread::GetMessageLoopProxyForThread(BrowserThread::CACHE));
+ BrowserThread::GetMessageLoopProxyForThread(BrowserThread::CACHE)
+ .get());
net::HttpNetworkSession* main_network_session =
main_http_factory_->GetSession();
scoped_ptr<net::HttpTransactionFactory> media_http_cache(
diff --git a/chrome/browser/safe_browsing/safe_browsing_service_browsertest.cc b/chrome/browser/safe_browsing/safe_browsing_service_browsertest.cc
index 879c373..3254a6cd 100644
--- a/chrome/browser/safe_browsing/safe_browsing_service_browsertest.cc
+++ b/chrome/browser/safe_browsing/safe_browsing_service_browsertest.cc
@@ -445,7 +445,7 @@ class SafeBrowsingServiceTest : public InProcessBrowserTest {
// to wait for the SafeBrowsingService to finish loading/stopping.
void WaitForIOThread() {
scoped_refptr<base::ThreadTestHelper> io_helper(new base::ThreadTestHelper(
- BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO)));
+ BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO).get()));
ASSERT_TRUE(io_helper->Run());
}
diff --git a/chrome/browser/safe_browsing/sandboxed_zip_analyzer.cc b/chrome/browser/safe_browsing/sandboxed_zip_analyzer.cc
index fe03da2..3d93e67 100644
--- a/chrome/browser/safe_browsing/sandboxed_zip_analyzer.cc
+++ b/chrome/browser/safe_browsing/sandboxed_zip_analyzer.cc
@@ -117,8 +117,8 @@ void SandboxedZipAnalyzer::StartProcessOnIOThread() {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
utility_process_host_ = content::UtilityProcessHost::Create(
this,
- BrowserThread::GetMessageLoopProxyForThread(
- BrowserThread::IO))->AsWeakPtr();
+ BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO).get())
+ ->AsWeakPtr();
utility_process_host_->Send(new ChromeUtilityMsg_StartupPing);
// Wait for the startup notification before sending the main IPC to the
// utility process, so that we can dup the file handle.
diff --git a/chrome/browser/safe_browsing/two_phase_uploader_unittest.cc b/chrome/browser/safe_browsing/two_phase_uploader_unittest.cc
index e2464c34..1d9e76a 100644
--- a/chrome/browser/safe_browsing/two_phase_uploader_unittest.cc
+++ b/chrome/browser/safe_browsing/two_phase_uploader_unittest.cc
@@ -77,7 +77,7 @@ TEST_F(TwoPhaseUploaderTest, UploadFile) {
Delegate delegate;
scoped_ptr<TwoPhaseUploader> uploader(TwoPhaseUploader::Create(
url_request_context_getter_.get(),
- BrowserThread::GetMessageLoopProxyForThread(BrowserThread::DB),
+ BrowserThread::GetMessageLoopProxyForThread(BrowserThread::DB).get(),
test_server.GetURL("start"),
"metadata",
GetTestFilePath(),
@@ -103,7 +103,7 @@ TEST_F(TwoPhaseUploaderTest, BadPhaseOneResponse) {
Delegate delegate;
scoped_ptr<TwoPhaseUploader> uploader(TwoPhaseUploader::Create(
url_request_context_getter_.get(),
- BrowserThread::GetMessageLoopProxyForThread(BrowserThread::DB),
+ BrowserThread::GetMessageLoopProxyForThread(BrowserThread::DB).get(),
test_server.GetURL("start?p1code=500"),
"metadata",
GetTestFilePath(),
@@ -125,7 +125,7 @@ TEST_F(TwoPhaseUploaderTest, BadPhaseTwoResponse) {
Delegate delegate;
scoped_ptr<TwoPhaseUploader> uploader(TwoPhaseUploader::Create(
url_request_context_getter_.get(),
- BrowserThread::GetMessageLoopProxyForThread(BrowserThread::DB),
+ BrowserThread::GetMessageLoopProxyForThread(BrowserThread::DB).get(),
test_server.GetURL("start?p2code=500"),
"metadata",
GetTestFilePath(),
@@ -151,7 +151,7 @@ TEST_F(TwoPhaseUploaderTest, PhaseOneConnectionClosed) {
Delegate delegate;
scoped_ptr<TwoPhaseUploader> uploader(TwoPhaseUploader::Create(
url_request_context_getter_.get(),
- BrowserThread::GetMessageLoopProxyForThread(BrowserThread::DB),
+ BrowserThread::GetMessageLoopProxyForThread(BrowserThread::DB).get(),
test_server.GetURL("start?p1close=1"),
"metadata",
GetTestFilePath(),
@@ -173,7 +173,7 @@ TEST_F(TwoPhaseUploaderTest, PhaseTwoConnectionClosed) {
Delegate delegate;
scoped_ptr<TwoPhaseUploader> uploader(TwoPhaseUploader::Create(
url_request_context_getter_.get(),
- BrowserThread::GetMessageLoopProxyForThread(BrowserThread::DB),
+ BrowserThread::GetMessageLoopProxyForThread(BrowserThread::DB).get(),
test_server.GetURL("start?p2close=1"),
"metadata",
GetTestFilePath(),
diff --git a/chrome/browser/safe_json_parser.cc b/chrome/browser/safe_json_parser.cc
index df0ce00..f3a881f 100644
--- a/chrome/browser/safe_json_parser.cc
+++ b/chrome/browser/safe_json_parser.cc
@@ -31,8 +31,7 @@ SafeJsonParser::~SafeJsonParser() {}
void SafeJsonParser::StartWorkOnIOThread() {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
UtilityProcessHost* host =
- UtilityProcessHost::Create(
- this, base::MessageLoopProxy::current());
+ UtilityProcessHost::Create(this, base::MessageLoopProxy::current().get());
host->EnableZygote();
host->Send(new ChromeUtilityMsg_ParseJSON(unsafe_json_));
}
diff --git a/chrome/browser/service/service_process_control.cc b/chrome/browser/service/service_process_control.cc
index 2b04211..3c16d4f 100644
--- a/chrome/browser/service/service_process_control.cc
+++ b/chrome/browser/service/service_process_control.cc
@@ -48,8 +48,10 @@ void ServiceProcessControl::ConnectInternal() {
// TODO(hclam): Handle error connecting to channel.
const IPC::ChannelHandle channel_id = GetServiceProcessChannel();
SetChannel(new IPC::ChannelProxy(
- channel_id, IPC::Channel::MODE_NAMED_CLIENT, this,
- BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO)));
+ channel_id,
+ IPC::Channel::MODE_NAMED_CLIENT,
+ this,
+ BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO).get()));
}
void ServiceProcessControl::SetChannel(IPC::ChannelProxy* channel) {
diff --git a/chrome/browser/signin/chrome_signin_manager_delegate.cc b/chrome/browser/signin/chrome_signin_manager_delegate.cc
index 2b63603..71689b9 100644
--- a/chrome/browser/signin/chrome_signin_manager_delegate.cc
+++ b/chrome/browser/signin/chrome_signin_manager_delegate.cc
@@ -23,7 +23,7 @@ ChromeSigninManagerDelegate::~ChromeSigninManagerDelegate() {
// static
bool ChromeSigninManagerDelegate::ProfileAllowsSigninCookies(Profile* profile) {
CookieSettings* cookie_settings =
- CookieSettings::Factory::GetForProfile(profile);
+ CookieSettings::Factory::GetForProfile(profile).get();
return SettingsAllowSigninCookies(cookie_settings);
}
diff --git a/chrome/browser/speech/extension_api/tts_engine_extension_api.cc b/chrome/browser/speech/extension_api/tts_engine_extension_api.cc
index fa7f944..ae3fa1d 100644
--- a/chrome/browser/speech/extension_api/tts_engine_extension_api.cc
+++ b/chrome/browser/speech/extension_api/tts_engine_extension_api.cc
@@ -68,7 +68,7 @@ void GetExtensionVoices(Profile* profile, std::vector<VoiceData>* out_voices) {
const ExtensionSet* extensions = service->extensions();
ExtensionSet::const_iterator iter;
for (iter = extensions->begin(); iter != extensions->end(); ++iter) {
- const Extension* extension = *iter;
+ const Extension* extension = iter->get();
if (!event_router->ExtensionHasEventListener(
extension->id(), tts_engine_events::kOnSpeak) ||
diff --git a/chrome/browser/sync/glue/autofill_data_type_controller.cc b/chrome/browser/sync/glue/autofill_data_type_controller.cc
index ba5a1be..a9d666a 100644
--- a/chrome/browser/sync/glue/autofill_data_type_controller.cc
+++ b/chrome/browser/sync/glue/autofill_data_type_controller.cc
@@ -107,7 +107,7 @@ void AutofillDataTypeController::UpdateAutofillCullingSettings(
scoped_refptr<autofill::AutofillWebDataService> web_data_service) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::DB));
AutocompleteSyncableService* service =
- AutocompleteSyncableService::FromWebDataService(web_data_service);
+ AutocompleteSyncableService::FromWebDataService(web_data_service.get());
if (!service) {
DVLOG(1) << "Can't update culling, no AutocompleteSyncableService.";
return;
diff --git a/chrome/browser/sync/test/integration/passwords_helper.cc b/chrome/browser/sync/test/integration/passwords_helper.cc
index 3f489d3..e72133f 100644
--- a/chrome/browser/sync/test/integration/passwords_helper.cc
+++ b/chrome/browser/sync/test/integration/passwords_helper.cc
@@ -128,12 +128,12 @@ bool SetDecryptionPassphrase(int index, const std::string& passphrase) {
PasswordStore* GetPasswordStore(int index) {
return PasswordStoreFactory::GetForProfile(test()->GetProfile(index),
- Profile::IMPLICIT_ACCESS);
+ Profile::IMPLICIT_ACCESS).get();
}
PasswordStore* GetVerifierPasswordStore() {
return PasswordStoreFactory::GetForProfile(test()->verifier(),
- Profile::IMPLICIT_ACCESS);
+ Profile::IMPLICIT_ACCESS).get();
}
bool ProfileContainsSamePasswordFormsAsVerifier(int index) {
diff --git a/chrome/browser/sync_file_system/drive_file_sync_service.cc b/chrome/browser/sync_file_system/drive_file_sync_service.cc
index de5fe45..ddaa0ea 100644
--- a/chrome/browser/sync_file_system/drive_file_sync_service.cc
+++ b/chrome/browser/sync_file_system/drive_file_sync_service.cc
@@ -70,10 +70,10 @@ bool CreateTemporaryFile(const base::FilePath& dir_path,
file_util::CreateTemporaryFileInDir(dir_path, &temp_file_path);
if (!success)
return success;
- *temp_file = webkit_blob::ScopedFile(
- temp_file_path,
- webkit_blob::ScopedFile::DELETE_ON_SCOPE_OUT,
- base::MessageLoopProxy::current());
+ *temp_file =
+ webkit_blob::ScopedFile(temp_file_path,
+ webkit_blob::ScopedFile::DELETE_ON_SCOPE_OUT,
+ base::MessageLoopProxy::current().get());
return success;
}
@@ -362,7 +362,7 @@ void DriveFileSyncService::Initialize(
metadata_store_.reset(new DriveMetadataStore(
profile_->GetPath().Append(GetSyncFileSystemDir()),
content::BrowserThread::GetMessageLoopProxyForThread(
- content::BrowserThread::FILE)));
+ content::BrowserThread::FILE).get()));
metadata_store_->Initialize(
base::Bind(&DriveFileSyncService::DidInitializeMetadataStore,
diff --git a/chrome/browser/sync_file_system/drive_file_sync_service_mock_unittest.cc b/chrome/browser/sync_file_system/drive_file_sync_service_mock_unittest.cc
index 6608383..4dbf84f 100644
--- a/chrome/browser/sync_file_system/drive_file_sync_service_mock_unittest.cc
+++ b/chrome/browser/sync_file_system/drive_file_sync_service_mock_unittest.cc
@@ -282,7 +282,7 @@ class DriveFileSyncServiceMockTest : public testing::Test {
scoped_ptr<DriveUploaderInterface>()).Pass();
ASSERT_TRUE(base_dir_.CreateUniqueTempDir());
metadata_store_.reset(new DriveMetadataStore(
- base_dir_.path(), base::MessageLoopProxy::current()));
+ base_dir_.path(), base::MessageLoopProxy::current().get()));
bool done = false;
metadata_store_->Initialize(base::Bind(&DidInitialize, &done));
diff --git a/chrome/browser/sync_file_system/drive_file_sync_service_sync_unittest.cc b/chrome/browser/sync_file_system/drive_file_sync_service_sync_unittest.cc
index 5522838..d9f92d0 100644
--- a/chrome/browser/sync_file_system/drive_file_sync_service_sync_unittest.cc
+++ b/chrome/browser/sync_file_system/drive_file_sync_service_sync_unittest.cc
@@ -164,8 +164,7 @@ class DriveFileSyncServiceSyncTest : public testing::Test {
fake_remote_processor_.reset(new FakeRemoteChangeProcessor);
metadata_store_ = new DriveMetadataStore(
- base_dir_,
- base::MessageLoopProxy::current());
+ base_dir_, base::MessageLoopProxy::current().get());
bool done = false;
metadata_store_->Initialize(base::Bind(&DidInitialize, &done));
@@ -251,8 +250,7 @@ class DriveFileSyncServiceSyncTest : public testing::Test {
message_loop_.RunUntilIdle();
metadata_store_ = new DriveMetadataStore(
- base_dir_,
- base::MessageLoopProxy::current());
+ base_dir_, base::MessageLoopProxy::current().get());
bool done = false;
metadata_store_->Initialize(base::Bind(&DidInitialize, &done));
diff --git a/chrome/browser/sync_file_system/drive_file_sync_service_unittest.cc b/chrome/browser/sync_file_system/drive_file_sync_service_unittest.cc
index 118f4aa..96dae8d 100644
--- a/chrome/browser/sync_file_system/drive_file_sync_service_unittest.cc
+++ b/chrome/browser/sync_file_system/drive_file_sync_service_unittest.cc
@@ -54,8 +54,7 @@ class DriveFileSyncServiceTest : public testing::Test {
ASSERT_TRUE(scoped_base_dir_.CreateUniqueTempDir());
base_dir_ = scoped_base_dir_.path();
metadata_store_ = new DriveMetadataStore(
- base_dir_,
- base::MessageLoopProxy::current());
+ base_dir_, base::MessageLoopProxy::current().get());
bool done = false;
metadata_store_->Initialize(base::Bind(&DidInitialize, &done));
message_loop_.RunUntilIdle();
diff --git a/chrome/browser/sync_file_system/drive_metadata_store.cc b/chrome/browser/sync_file_system/drive_metadata_store.cc
index f774f8e..08eaab5 100644
--- a/chrome/browser/sync_file_system/drive_metadata_store.cc
+++ b/chrome/browser/sync_file_system/drive_metadata_store.cc
@@ -646,11 +646,15 @@ void DriveMetadataStore::DidUpdateOrigin(
void DriveMetadataStore::WriteToDB(scoped_ptr<leveldb::WriteBatch> batch,
const SyncStatusCallback& callback) {
base::PostTaskAndReplyWithResult(
- file_task_runner_, FROM_HERE,
- base::Bind(&leveldb::DB::Write, base::Unretained(db_.get()),
- leveldb::WriteOptions(), base::Owned(batch.release())),
+ file_task_runner_.get(),
+ FROM_HERE,
+ base::Bind(&leveldb::DB::Write,
+ base::Unretained(db_.get()),
+ leveldb::WriteOptions(),
+ base::Owned(batch.release())),
base::Bind(&DriveMetadataStore::UpdateDBStatusAndInvokeCallback,
- AsWeakPtr(), callback));
+ AsWeakPtr(),
+ callback));
}
void DriveMetadataStore::UpdateDBStatus(SyncStatusCode status) {
diff --git a/chrome/browser/sync_file_system/local_file_sync_service.cc b/chrome/browser/sync_file_system/local_file_sync_service.cc
index c719c96..ff8804c 100644
--- a/chrome/browser/sync_file_system/local_file_sync_service.cc
+++ b/chrome/browser/sync_file_system/local_file_sync_service.cc
@@ -96,8 +96,9 @@ void LocalFileSyncService::OriginChangeMap::SetOriginEnabled(
LocalFileSyncService::LocalFileSyncService(Profile* profile)
: profile_(profile),
sync_context_(new LocalFileSyncContext(
- BrowserThread::GetMessageLoopProxyForThread(BrowserThread::UI),
- BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO))),
+ BrowserThread::GetMessageLoopProxyForThread(BrowserThread::UI).get(),
+ BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO)
+ .get())),
local_change_processor_(NULL) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
sync_context_->AddOriginChangeObserver(this);
diff --git a/chrome/browser/thumbnails/content_based_thumbnailing_algorithm.cc b/chrome/browser/thumbnails/content_based_thumbnailing_algorithm.cc
index 3b11e61..79bac82 100644
--- a/chrome/browser/thumbnails/content_based_thumbnailing_algorithm.cc
+++ b/chrome/browser/thumbnails/content_based_thumbnailing_algorithm.cc
@@ -25,7 +25,7 @@ void CallbackInvocationAdapter(
const thumbnails::ThumbnailingAlgorithm::ConsumerCallback& callback,
scoped_refptr<thumbnails::ThumbnailingContext> context,
const SkBitmap& source_bitmap) {
- callback.Run(*context, source_bitmap);
+ callback.Run(*context.get(), source_bitmap);
}
} // namespace
@@ -60,15 +60,15 @@ void ContentBasedThumbnailingAlgorithm::ProcessBitmap(
const ConsumerCallback& callback,
const SkBitmap& bitmap) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
- DCHECK(context);
+ DCHECK(context.get());
if (bitmap.isNull() || bitmap.empty())
return;
gfx::Size target_thumbnail_size =
SimpleThumbnailCrop::ComputeTargetSizeAtMaximumScale(target_size_);
- SkBitmap source_bitmap = PrepareSourceBitmap(
- bitmap, target_thumbnail_size, context);
+ SkBitmap source_bitmap =
+ PrepareSourceBitmap(bitmap, target_thumbnail_size, context.get());
// If the source is same (or smaller) than the target, just return it as
// the final result. Otherwise, send the shrinking task to the blocking
@@ -83,7 +83,7 @@ void ContentBasedThumbnailingAlgorithm::ProcessBitmap(
context->clip_result == CLIP_RESULT_NOT_CLIPPED ||
context->clip_result == CLIP_RESULT_SOURCE_SAME_AS_TARGET);
- callback.Run(*context, source_bitmap);
+ callback.Run(*context.get(), source_bitmap);
return;
}
diff --git a/chrome/browser/thumbnails/content_based_thumbnailing_algorithm_unittest.cc b/chrome/browser/thumbnails/content_based_thumbnailing_algorithm_unittest.cc
index 38b0209..05ef7a8 100644
--- a/chrome/browser/thumbnails/content_based_thumbnailing_algorithm_unittest.cc
+++ b/chrome/browser/thumbnails/content_based_thumbnailing_algorithm_unittest.cc
@@ -109,7 +109,7 @@ TEST_F(ContentBasedThumbnailingAlgorithmTest, PrepareSourceBitmap) {
source.allocPixels();
source.eraseRGB(50, 150, 200);
SkBitmap result = ContentBasedThumbnailingAlgorithm::PrepareSourceBitmap(
- source, thumbnail_size, context);
+ source, thumbnail_size, context.get());
EXPECT_EQ(CLIP_RESULT_SOURCE_SAME_AS_TARGET, context->clip_result);
EXPECT_GE(result.width(), copy_size.width());
EXPECT_GE(result.height(), copy_size.height());
@@ -122,7 +122,7 @@ TEST_F(ContentBasedThumbnailingAlgorithmTest, PrepareSourceBitmap) {
EXPECT_NEAR(result.height(), source.height(), gfx::scrollbar_size());
result = ContentBasedThumbnailingAlgorithm::PrepareSourceBitmap(
- source, thumbnail_size, context);
+ source, thumbnail_size, context.get());
EXPECT_EQ(CLIP_RESULT_SOURCE_SAME_AS_TARGET, context->clip_result);
EXPECT_GE(result.width(), copy_size.width());
EXPECT_GE(result.height(), copy_size.height());
diff --git a/chrome/browser/thumbnails/simple_thumbnail_crop.cc b/chrome/browser/thumbnails/simple_thumbnail_crop.cc
index 1a0ce5f..22fa309 100644
--- a/chrome/browser/thumbnails/simple_thumbnail_crop.cc
+++ b/chrome/browser/thumbnails/simple_thumbnail_crop.cc
@@ -55,7 +55,7 @@ void SimpleThumbnailCrop::ProcessBitmap(
context->clip_result == CLIP_RESULT_TALLER_THAN_WIDE ||
context->clip_result == CLIP_RESULT_NOT_CLIPPED);
- callback.Run(*context, thumbnail);
+ callback.Run(*context.get(), thumbnail);
}
double SimpleThumbnailCrop::CalculateBoringScore(const SkBitmap& bitmap) {
diff --git a/chrome/browser/ui/browser_browsertest.cc b/chrome/browser/ui/browser_browsertest.cc
index 8e5cbfe..6ed98d1 100644
--- a/chrome/browser/ui/browser_browsertest.cc
+++ b/chrome/browser/ui/browser_browsertest.cc
@@ -262,7 +262,7 @@ class BrowserTest : public ExtensionBrowserTest {
for (ExtensionSet::const_iterator it = extensions->begin();
it != extensions->end(); ++it) {
if ((*it)->name() == "App Test")
- return *it;
+ return it->get();
}
NOTREACHED();
return NULL;
diff --git a/chrome/browser/ui/content_settings/content_setting_bubble_model.cc b/chrome/browser/ui/content_settings/content_setting_bubble_model.cc
index 809f1a34..d4c70c7 100644
--- a/chrome/browser/ui/content_settings/content_setting_bubble_model.cc
+++ b/chrome/browser/ui/content_settings/content_setting_bubble_model.cc
@@ -352,7 +352,7 @@ void ContentSettingSingleRadioGroup::SetRadioGroup() {
radio_group.radio_items.push_back(radio_block_label);
HostContentSettingsMap* map = profile()->GetHostContentSettingsMap();
CookieSettings* cookie_settings =
- CookieSettings::Factory::GetForProfile(profile());
+ CookieSettings::Factory::GetForProfile(profile()).get();
ContentSetting most_restrictive_setting;
SettingSource most_restrictive_setting_source = SETTING_SOURCE_NONE;
diff --git a/chrome/browser/ui/gtk/collected_cookies_gtk.cc b/chrome/browser/ui/gtk/collected_cookies_gtk.cc
index 568c6ba..ee12e58 100644
--- a/chrome/browser/ui/gtk/collected_cookies_gtk.cc
+++ b/chrome/browser/ui/gtk/collected_cookies_gtk.cc
@@ -488,7 +488,7 @@ void CollectedCookiesGtk::AddExceptions(GtkTreeSelection* selection,
Profile* profile =
Profile::FromBrowserContext(web_contents_->GetBrowserContext());
host_node->CreateContentException(
- CookieSettings::Factory::GetForProfile(profile), setting);
+ CookieSettings::Factory::GetForProfile(profile).get(), setting);
}
}
g_list_foreach(paths, reinterpret_cast<GFunc>(gtk_tree_path_free), NULL);
diff --git a/chrome/browser/ui/pdf/pdf_unsupported_feature.cc b/chrome/browser/ui/pdf/pdf_unsupported_feature.cc
index 07a1f50..d6c9638 100644
--- a/chrome/browser/ui/pdf/pdf_unsupported_feature.cc
+++ b/chrome/browser/ui/pdf/pdf_unsupported_feature.cc
@@ -104,7 +104,7 @@ bool PDFEnableAdobeReaderPromptDelegate::ShouldExpire(
void PDFEnableAdobeReaderPromptDelegate::Accept() {
content::RecordAction(UserMetricsAction("PDF_EnableReaderInfoBarOK"));
- PluginPrefs* plugin_prefs = PluginPrefs::GetForProfile(profile_);
+ PluginPrefs* plugin_prefs = PluginPrefs::GetForProfile(profile_).get();
plugin_prefs->EnablePluginGroup(
true, ASCIIToUTF16(PluginMetadata::kAdobeReaderGroupName));
plugin_prefs->EnablePluginGroup(
diff --git a/chrome/browser/ui/sync/one_click_signin_helper_unittest.cc b/chrome/browser/ui/sync/one_click_signin_helper_unittest.cc
index bf5b10d..3f32a3d 100644
--- a/chrome/browser/ui/sync/one_click_signin_helper_unittest.cc
+++ b/chrome/browser/ui/sync/one_click_signin_helper_unittest.cc
@@ -288,11 +288,10 @@ void OneClickSigninHelperTest::AddEmailToOneClickRejectedList(
}
void OneClickSigninHelperTest::AllowSigninCookies(bool enable) {
- CookieSettings* cookie_settings =
- CookieSettings::Factory::GetForProfile(
- Profile::FromBrowserContext(browser_context_.get()));
- cookie_settings->SetDefaultCookieSetting(
- enable ? CONTENT_SETTING_ALLOW : CONTENT_SETTING_BLOCK);
+ CookieSettings* cookie_settings = CookieSettings::Factory::GetForProfile(
+ Profile::FromBrowserContext(browser_context_.get())).get();
+ cookie_settings->SetDefaultCookieSetting(enable ? CONTENT_SETTING_ALLOW
+ : CONTENT_SETTING_BLOCK);
}
void OneClickSigninHelperTest::SetAllowedUsernamePattern(
@@ -359,7 +358,7 @@ TestProfileIOData* OneClickSigninHelperIOTest::CreateTestProfileIOData(
PrefService* pref_service = profile_->GetPrefs();
PrefService* local_state = g_browser_process->local_state();
CookieSettings* cookie_settings =
- CookieSettings::Factory::GetForProfile(profile_);
+ CookieSettings::Factory::GetForProfile(profile_).get();
TestProfileIOData* io_data = new TestProfileIOData(
is_incognito, pref_service, local_state, cookie_settings);
io_data->set_reverse_autologin_pending_email("user@gmail.com");
diff --git a/chrome/browser/ui/sync/profile_signin_confirmation_helper_unittest.cc b/chrome/browser/ui/sync/profile_signin_confirmation_helper_unittest.cc
index 32a49ea..465995d 100644
--- a/chrome/browser/ui/sync/profile_signin_confirmation_helper_unittest.cc
+++ b/chrome/browser/ui/sync/profile_signin_confirmation_helper_unittest.cc
@@ -203,8 +203,7 @@ TEST_F(ProfileSigninConfirmationHelperTest, PromptForNewProfile_Extensions) {
scoped_refptr<extensions::Extension> webstore =
CreateExtension("web store", extension_misc::kWebStoreAppId);
extensions->extension_prefs()->AddGrantedPermissions(
- webstore->id(),
- make_scoped_refptr(new extensions::PermissionSet));
+ webstore->id(), make_scoped_refptr(new extensions::PermissionSet).get());
extensions->AddExtension(webstore.get());
EXPECT_FALSE(GetCallbackResult(
base::Bind(&ui::CheckShouldPromptForNewProfile, profile_.get())));
@@ -212,7 +211,7 @@ TEST_F(ProfileSigninConfirmationHelperTest, PromptForNewProfile_Extensions) {
scoped_refptr<extensions::Extension> extension =
CreateExtension("foo", std::string());
extensions->extension_prefs()->AddGrantedPermissions(
- extension->id(), make_scoped_refptr(new extensions::PermissionSet));
+ extension->id(), make_scoped_refptr(new extensions::PermissionSet).get());
extensions->AddExtension(extension.get());
EXPECT_TRUE(GetCallbackResult(
base::Bind(&ui::CheckShouldPromptForNewProfile, profile_.get())));
diff --git a/chrome/browser/ui/tabs/tab_utils.cc b/chrome/browser/ui/tabs/tab_utils.cc
index a45f9ca..9ac23a0 100644
--- a/chrome/browser/ui/tabs/tab_utils.cc
+++ b/chrome/browser/ui/tabs/tab_utils.cc
@@ -33,7 +33,8 @@ bool ShouldShowRecordingIndicator(content::WebContents* contents) {
bool IsPlayingAudio(content::WebContents* contents) {
AudioStreamIndicator* audio_indicator =
- MediaCaptureDevicesDispatcher::GetInstance()->GetAudioStreamIndicator();
+ MediaCaptureDevicesDispatcher::GetInstance()->GetAudioStreamIndicator()
+ .get();
return audio_indicator->IsPlayingAudio(contents);
}
diff --git a/chrome/browser/ui/toolbar/action_box_button_controller.cc b/chrome/browser/ui/toolbar/action_box_button_controller.cc
index 98bd29c..351d3a6 100644
--- a/chrome/browser/ui/toolbar/action_box_button_controller.cc
+++ b/chrome/browser/ui/toolbar/action_box_button_controller.cc
@@ -87,7 +87,7 @@ scoped_ptr<ActionBoxMenuModel> ActionBoxButtonController::CreateMenuModel() {
const ExtensionSet* extensions = extension_service->extensions();
for (ExtensionSet::const_iterator it = extensions->begin();
it != extensions->end(); ++it) {
- const extensions::Extension* extension = *it;
+ const extensions::Extension* extension = it->get();
if (ActionInfo::GetPageLauncherInfo(extension)) {
int command_id = GetCommandIdForExtension(*extension);
menu_model->AddExtension(*extension, command_id);
diff --git a/chrome/browser/ui/webui/extensions/command_handler.cc b/chrome/browser/ui/webui/extensions/command_handler.cc
index a3aec9d..b9f1273 100644
--- a/chrome/browser/ui/webui/extensions/command_handler.cc
+++ b/chrome/browser/ui/webui/extensions/command_handler.cc
@@ -127,7 +127,8 @@ void CommandHandler::GetAllCommands(base::DictionaryValue* commands) {
CommandService::ALL,
&browser_action,
&active)) {
- extensions_list->Append(browser_action.ToValue((*extension), active));
+ extensions_list->Append(
+ browser_action.ToValue((extension->get()), active));
}
extensions::Command page_action;
@@ -135,7 +136,7 @@ void CommandHandler::GetAllCommands(base::DictionaryValue* commands) {
CommandService::ALL,
&page_action,
&active)) {
- extensions_list->Append(page_action.ToValue((*extension), active));
+ extensions_list->Append(page_action.ToValue((extension->get()), active));
}
extensions::Command script_badge;
@@ -143,7 +144,7 @@ void CommandHandler::GetAllCommands(base::DictionaryValue* commands) {
CommandService::ALL,
&script_badge,
&active)) {
- extensions_list->Append(script_badge.ToValue((*extension), active));
+ extensions_list->Append(script_badge.ToValue((extension->get()), active));
}
extensions::CommandMap named_commands;
@@ -157,7 +158,8 @@ void CommandHandler::GetAllCommands(base::DictionaryValue* commands) {
(*extension)->id(), iter->second.command_name());
active = (shortcut_assigned.key_code() != ui::VKEY_UNKNOWN);
- extensions_list->Append(iter->second.ToValue((*extension), active));
+ extensions_list->Append(
+ iter->second.ToValue((extension->get()), active));
}
}
diff --git a/chrome/browser/ui/webui/extensions/extension_icon_source.cc b/chrome/browser/ui/webui/extensions/extension_icon_source.cc
index 01554d6..edb0dbb 100644
--- a/chrome/browser/ui/webui/extensions/extension_icon_source.cc
+++ b/chrome/browser/ui/webui/extensions/extension_icon_source.cc
@@ -129,7 +129,7 @@ void ExtensionIconSource::StartDataRequest(
// added to |request_map_|.
// Send back the default application icon (not resized or desaturated) as
// the default response.
- callback.Run(BitmapToMemory(GetDefaultAppImage()));
+ callback.Run(BitmapToMemory(GetDefaultAppImage()).get());
return;
}
@@ -174,7 +174,7 @@ void ExtensionIconSource::FinalizeImage(const SkBitmap* image,
else
bitmap = *image;
- request->callback.Run(BitmapToMemory(&bitmap));
+ request->callback.Run(BitmapToMemory(&bitmap).get());
ClearData(request_id);
}
diff --git a/chrome/browser/ui/webui/extensions/extension_settings_handler.cc b/chrome/browser/ui/webui/extensions/extension_settings_handler.cc
index 50d9e04..f0a00e1 100644
--- a/chrome/browser/ui/webui/extensions/extension_settings_handler.cc
+++ b/chrome/browser/ui/webui/extensions/extension_settings_handler.cc
@@ -541,7 +541,7 @@ void ExtensionSettingsHandler::ReloadUnpackedExtensions() {
for (ExtensionSet::const_iterator extension = extensions->begin();
extension != extensions->end(); ++extension) {
if (Manifest::IsUnpackedLocation((*extension)->location()))
- unpacked_extensions.push_back(*extension);
+ unpacked_extensions.push_back(extension->get());
}
for (std::vector<const Extension*>::iterator iter =
@@ -567,8 +567,8 @@ void ExtensionSettingsHandler::HandleRequestExtensionsData(
extension != extensions->end(); ++extension) {
if ((*extension)->ShouldDisplayInExtensionSettings()) {
extensions_list->Append(CreateExtensionDetailValue(
- *extension,
- GetInspectablePagesForExtension(*extension, true),
+ extension->get(),
+ GetInspectablePagesForExtension(extension->get(), true),
warnings));
}
}
@@ -577,8 +577,8 @@ void ExtensionSettingsHandler::HandleRequestExtensionsData(
extension != extensions->end(); ++extension) {
if ((*extension)->ShouldDisplayInExtensionSettings()) {
extensions_list->Append(CreateExtensionDetailValue(
- *extension,
- GetInspectablePagesForExtension(*extension, false),
+ extension->get(),
+ GetInspectablePagesForExtension(extension->get(), false),
warnings));
}
}
@@ -588,7 +588,7 @@ void ExtensionSettingsHandler::HandleRequestExtensionsData(
extension != extensions->end(); ++extension) {
if ((*extension)->ShouldDisplayInExtensionSettings()) {
extensions_list->Append(CreateExtensionDetailValue(
- *extension,
+ extension->get(),
empty_pages, // Terminated process has no active pages.
warnings));
}
diff --git a/chrome/browser/ui/webui/flash_ui.cc b/chrome/browser/ui/webui/flash_ui.cc
index 1e939fb..1ef49ac 100644
--- a/chrome/browser/ui/webui/flash_ui.cc
+++ b/chrome/browser/ui/webui/flash_ui.cc
@@ -272,7 +272,7 @@ void FlashDOMHandler::MaybeRespondToPage() {
AddPair(list, ASCIIToUTF16(kFlashPlugin), "Not installed");
} else {
PluginPrefs* plugin_prefs =
- PluginPrefs::GetForProfile(Profile::FromWebUI(web_ui()));
+ PluginPrefs::GetForProfile(Profile::FromWebUI(web_ui())).get();
bool found_enabled = false;
for (size_t i = 0; i < info_array.size(); ++i) {
string16 flash_version = info_array[i].version + ASCIIToUTF16(" ") +
diff --git a/chrome/browser/ui/webui/nacl_ui.cc b/chrome/browser/ui/webui/nacl_ui.cc
index dc0802f..69047f4 100644
--- a/chrome/browser/ui/webui/nacl_ui.cc
+++ b/chrome/browser/ui/webui/nacl_ui.cc
@@ -287,7 +287,7 @@ void NaClDomHandler::PopulatePageInformation(DictionaryValue* naclInfo) {
AddPair(list.get(), nacl_key, ASCIIToUTF16("Disabled"));
} else {
PluginPrefs* plugin_prefs =
- PluginPrefs::GetForProfile(Profile::FromWebUI(web_ui()));
+ PluginPrefs::GetForProfile(Profile::FromWebUI(web_ui())).get();
// Only the 0th plugin is used.
nacl_version = info_array[0].version + ASCIIToUTF16(" ") +
diff --git a/chrome/browser/ui/webui/net_internals/net_internals_ui.cc b/chrome/browser/ui/webui/net_internals/net_internals_ui.cc
index 4b67807..80563e3 100644
--- a/chrome/browser/ui/webui/net_internals/net_internals_ui.cc
+++ b/chrome/browser/ui/webui/net_internals/net_internals_ui.cc
@@ -909,7 +909,7 @@ void NetInternalsMessageHandler::OnGetExtensionInfo(const ListValue* list) {
it != extensions->end(); ++it) {
DictionaryValue* extension_info = new DictionaryValue();
bool enabled = extension_service->IsExtensionEnabled((*it)->id());
- extensions::GetExtensionBasicInfo(*it, enabled, extension_info);
+ extensions::GetExtensionBasicInfo(it->get(), enabled, extension_info);
extension_list->Append(extension_info);
}
}
diff --git a/chrome/browser/ui/webui/options/certificate_manager_handler.cc b/chrome/browser/ui/webui/options/certificate_manager_handler.cc
index 9bb04c5..6a97f84 100644
--- a/chrome/browser/ui/webui/options/certificate_manager_handler.cc
+++ b/chrome/browser/ui/webui/options/certificate_manager_handler.cc
@@ -259,7 +259,7 @@ CancelableTaskTracker::TaskId FileAccessProvider::StartRead(
// Post task to file thread to read file.
return tracker->PostTaskAndReply(
- BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE),
+ BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE).get(),
FROM_HERE,
base::Bind(&FileAccessProvider::DoRead, this, path, saved_errno, data),
base::Bind(callback, base::Owned(saved_errno), base::Owned(data)));
@@ -276,12 +276,16 @@ CancelableTaskTracker::TaskId FileAccessProvider::StartWrite(
// Post task to file thread to write file.
return tracker->PostTaskAndReply(
- BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE),
+ BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE).get(),
FROM_HERE,
- base::Bind(&FileAccessProvider::DoWrite, this,
- path, data, saved_errno, bytes_written),
- base::Bind(callback,
- base::Owned(saved_errno), base::Owned(bytes_written)));
+ base::Bind(&FileAccessProvider::DoWrite,
+ this,
+ path,
+ data,
+ saved_errno,
+ bytes_written),
+ base::Bind(
+ callback, base::Owned(saved_errno), base::Owned(bytes_written)));
}
void FileAccessProvider::DoRead(const base::FilePath& path,
diff --git a/chrome/browser/ui/webui/options/content_settings_handler.cc b/chrome/browser/ui/webui/options/content_settings_handler.cc
index 8f616f1..46b78f7 100644
--- a/chrome/browser/ui/webui/options/content_settings_handler.cc
+++ b/chrome/browser/ui/webui/options/content_settings_handler.cc
@@ -233,7 +233,7 @@ void AddExceptionsGrantedByHostedApps(
for (extensions::URLPatternSet::const_iterator pattern = web_extent.begin();
pattern != web_extent.end(); ++pattern) {
std::string url_pattern = pattern->GetAsString();
- AddExceptionForHostedApp(url_pattern, **extension, exceptions);
+ AddExceptionForHostedApp(url_pattern, *extension->get(), exceptions);
}
// Retrieve the launch URL.
GURL launch_url = extensions::AppLaunchInfo::GetLaunchWebURL(*extension);
diff --git a/chrome/browser/ui/webui/options/password_manager_handler.cc b/chrome/browser/ui/webui/options/password_manager_handler.cc
index af79368..93d4d08 100644
--- a/chrome/browser/ui/webui/options/password_manager_handler.cc
+++ b/chrome/browser/ui/webui/options/password_manager_handler.cc
@@ -108,7 +108,7 @@ void PasswordManagerHandler::OnLoginsChanged() {
PasswordStore* PasswordManagerHandler::GetPasswordStore() {
return PasswordStoreFactory::GetForProfile(Profile::FromWebUI(web_ui()),
- Profile::EXPLICIT_ACCESS);
+ Profile::EXPLICIT_ACCESS).get();
}
void PasswordManagerHandler::UpdatePasswordLists(const ListValue* args) {
diff --git a/chrome/browser/ui/webui/plugins_ui.cc b/chrome/browser/ui/webui/plugins_ui.cc
index 8b129e82..da7cc9f 100644
--- a/chrome/browser/ui/webui/plugins_ui.cc
+++ b/chrome/browser/ui/webui/plugins_ui.cc
@@ -238,7 +238,7 @@ void PluginsDOMHandler::HandleEnablePluginMessage(const ListValue* args) {
}
bool enable = enable_str == "true";
- PluginPrefs* plugin_prefs = PluginPrefs::GetForProfile(profile);
+ PluginPrefs* plugin_prefs = PluginPrefs::GetForProfile(profile).get();
if (is_group_str == "true") {
string16 group_name;
if (!args->GetString(0, &group_name)) {
@@ -331,7 +331,7 @@ void PluginsDOMHandler::LoadPlugins() {
void PluginsDOMHandler::PluginsLoaded(
const std::vector<webkit::WebPluginInfo>& plugins) {
Profile* profile = Profile::FromWebUI(web_ui());
- PluginPrefs* plugin_prefs = PluginPrefs::GetForProfile(profile);
+ PluginPrefs* plugin_prefs = PluginPrefs::GetForProfile(profile).get();
ContentSettingsPattern wildcard = ContentSettingsPattern::Wildcard();
diff --git a/chrome/browser/ui/webui/uber/uber_ui.cc b/chrome/browser/ui/webui/uber/uber_ui.cc
index e8d807b..0f6c6c3 100644
--- a/chrome/browser/ui/webui/uber/uber_ui.cc
+++ b/chrome/browser/ui/webui/uber/uber_ui.cc
@@ -74,7 +74,7 @@ bool HasExtensionType(Profile* profile, const char* extensionType) {
for (ExtensionSet::const_iterator iter = extensionSet->begin();
iter != extensionSet->end(); ++iter) {
extensions::URLOverrides::URLOverrideMap map =
- extensions::URLOverrides::GetChromeURLOverrides(*iter);
+ extensions::URLOverrides::GetChromeURLOverrides(iter->get());
extensions::URLOverrides::URLOverrideMap::const_iterator result =
map.find(std::string(extensionType));
diff --git a/chrome/browser/ui/webui/version_handler.cc b/chrome/browser/ui/webui/version_handler.cc
index aef487b..c469d18 100644
--- a/chrome/browser/ui/webui/version_handler.cc
+++ b/chrome/browser/ui/webui/version_handler.cc
@@ -137,7 +137,7 @@ void VersionHandler::OnGotPlugins(
string16 flash_version =
l10n_util::GetStringUTF16(IDS_PLUGINS_DISABLED_PLUGIN);
PluginPrefs* plugin_prefs =
- PluginPrefs::GetForProfile(Profile::FromWebUI(web_ui()));
+ PluginPrefs::GetForProfile(Profile::FromWebUI(web_ui())).get();
if (plugin_prefs) {
for (size_t i = 0; i < info_array.size(); ++i) {
if (plugin_prefs->IsPluginEnabled(info_array[i])) {
diff --git a/chrome/browser/web_resource/json_asynchronous_unpacker.cc b/chrome/browser/web_resource/json_asynchronous_unpacker.cc
index 441c864..8eee8aa 100644
--- a/chrome/browser/web_resource/json_asynchronous_unpacker.cc
+++ b/chrome/browser/web_resource/json_asynchronous_unpacker.cc
@@ -106,7 +106,7 @@ class JSONAsynchronousUnpackerImpl
void StartProcessOnIOThread(BrowserThread::ID thread_id,
const std::string& json_data) {
UtilityProcessHost* host = UtilityProcessHost::Create(
- this, BrowserThread::GetMessageLoopProxyForThread(thread_id));
+ this, BrowserThread::GetMessageLoopProxyForThread(thread_id).get());
host->EnableZygote();
// TODO(mrc): get proper file path when we start using web resources
// that need to be unpacked.
diff --git a/chrome/common/cancelable_task_tracker.cc b/chrome/common/cancelable_task_tracker.cc
index 4ab86e3..f27d116 100644
--- a/chrome/common/cancelable_task_tracker.cc
+++ b/chrome/common/cancelable_task_tracker.cc
@@ -84,7 +84,7 @@ CancelableTaskTracker::TaskId CancelableTaskTracker::PostTaskAndReply(
DCHECK(thread_checker_.CalledOnValidThread());
// We need a MessageLoop to run reply.
- DCHECK(base::MessageLoopProxy::current());
+ DCHECK(base::MessageLoopProxy::current().get());
// Owned by reply callback below.
CancellationFlag* flag = new CancellationFlag();
@@ -110,7 +110,7 @@ CancelableTaskTracker::TaskId CancelableTaskTracker::PostTaskAndReply(
CancelableTaskTracker::TaskId CancelableTaskTracker::NewTrackedTaskId(
IsCanceledCallback* is_canceled_cb) {
DCHECK(thread_checker_.CalledOnValidThread());
- DCHECK(base::MessageLoopProxy::current());
+ DCHECK(base::MessageLoopProxy::current().get());
TaskId id = next_id_;
next_id_++; // int64 is big enough that we ignore the potential overflow.
diff --git a/chrome/common/cancelable_task_tracker_unittest.cc b/chrome/common/cancelable_task_tracker_unittest.cc
index 11cff80..e5147e3 100644
--- a/chrome/common/cancelable_task_tracker_unittest.cc
+++ b/chrome/common/cancelable_task_tracker_unittest.cc
@@ -87,18 +87,15 @@ TEST_F(CancelableTaskTrackerTest, NoCancel) {
base::Thread worker_thread("worker thread");
ASSERT_TRUE(worker_thread.Start());
- ignore_result(
- task_tracker_.PostTask(
- worker_thread.message_loop_proxy(),
- FROM_HERE,
- MakeExpectedRunClosure(FROM_HERE)));
+ ignore_result(task_tracker_.PostTask(worker_thread.message_loop_proxy().get(),
+ FROM_HERE,
+ MakeExpectedRunClosure(FROM_HERE)));
ignore_result(
- task_tracker_.PostTaskAndReply(
- worker_thread.message_loop_proxy(),
- FROM_HERE,
- MakeExpectedRunClosure(FROM_HERE),
- MakeExpectedRunClosure(FROM_HERE)));
+ task_tracker_.PostTaskAndReply(worker_thread.message_loop_proxy().get(),
+ FROM_HERE,
+ MakeExpectedRunClosure(FROM_HERE),
+ MakeExpectedRunClosure(FROM_HERE)));
CancelableTaskTracker::IsCanceledCallback is_canceled;
ignore_result(task_tracker_.NewTrackedTaskId(&is_canceled));
@@ -178,11 +175,10 @@ TEST_F(CancelableTaskTrackerTest, CancelReplyDifferentThread) {
ASSERT_TRUE(worker_thread.Start());
CancelableTaskTracker::TaskId task_id =
- task_tracker_.PostTaskAndReply(
- worker_thread.message_loop_proxy(),
- FROM_HERE,
- base::Bind(&base::DoNothing),
- MakeExpectedNotRunClosure(FROM_HERE));
+ task_tracker_.PostTaskAndReply(worker_thread.message_loop_proxy().get(),
+ FROM_HERE,
+ base::Bind(&base::DoNothing),
+ MakeExpectedNotRunClosure(FROM_HERE));
EXPECT_NE(CancelableTaskTracker::kBadTaskId, task_id);
task_tracker_.TryCancel(task_id);
@@ -385,10 +381,11 @@ void MaybeRunDeadlyTaskTrackerMemberFunction(
void PostDoNothingTask(CancelableTaskTracker* task_tracker) {
ignore_result(
- task_tracker->PostTask(
- scoped_refptr<base::TestSimpleTaskRunner>(
- new base::TestSimpleTaskRunner()),
- FROM_HERE, base::Bind(&base::DoNothing)));
+ task_tracker->PostTask(scoped_refptr<base::TestSimpleTaskRunner>(
+ new base::TestSimpleTaskRunner())
+ .get(),
+ FROM_HERE,
+ base::Bind(&base::DoNothing)));
}
TEST_F(CancelableTaskTrackerDeathTest, PostFromDifferentThread) {
diff --git a/chrome/common/extensions/extension_set.h b/chrome/common/extensions/extension_set.h
index 74d13bf..7e09c14 100644
--- a/chrome/common/extensions/extension_set.h
+++ b/chrome/common/extensions/extension_set.h
@@ -61,6 +61,9 @@ class ExtensionSet {
const scoped_refptr<const extensions::Extension> operator*() {
return it_->second;
}
+ const scoped_refptr<const extensions::Extension>* operator->() {
+ return &it_->second;
+ }
bool operator!=(const const_iterator& other) { return it_ != other.it_; }
bool operator==(const const_iterator& other) { return it_ == other.it_; }
diff --git a/chrome/common/extensions/manifest_tests/extension_manifests_launch_unittest.cc b/chrome/common/extensions/manifest_tests/extension_manifests_launch_unittest.cc
index 456122e..9a63f61 100644
--- a/chrome/common/extensions/manifest_tests/extension_manifests_launch_unittest.cc
+++ b/chrome/common/extensions/manifest_tests/extension_manifests_launch_unittest.cc
@@ -24,21 +24,21 @@ TEST_F(AppLaunchManifestTest, AppLaunchContainer) {
extension = LoadAndExpectSuccess("launch_tab.json");
EXPECT_EQ(extension_misc::LAUNCH_TAB,
- AppLaunchInfo::GetLaunchContainer(extension));
+ AppLaunchInfo::GetLaunchContainer(extension.get()));
extension = LoadAndExpectSuccess("launch_panel.json");
EXPECT_EQ(extension_misc::LAUNCH_PANEL,
- AppLaunchInfo::GetLaunchContainer(extension));
+ AppLaunchInfo::GetLaunchContainer(extension.get()));
extension = LoadAndExpectSuccess("launch_default.json");
EXPECT_EQ(extension_misc::LAUNCH_TAB,
- AppLaunchInfo::GetLaunchContainer(extension));
+ AppLaunchInfo::GetLaunchContainer(extension.get()));
extension = LoadAndExpectSuccess("launch_width.json");
- EXPECT_EQ(640, AppLaunchInfo::GetLaunchWidth(extension));
+ EXPECT_EQ(640, AppLaunchInfo::GetLaunchWidth(extension.get()));
extension = LoadAndExpectSuccess("launch_height.json");
- EXPECT_EQ(480, AppLaunchInfo::GetLaunchHeight(extension));
+ EXPECT_EQ(480, AppLaunchInfo::GetLaunchHeight(extension.get()));
Testcase testcases[] = {
Testcase("launch_window.json", errors::kInvalidLaunchContainer),
@@ -110,11 +110,11 @@ TEST_F(AppLaunchManifestTest, AppLaunchURL) {
scoped_refptr<Extension> extension;
extension = LoadAndExpectSuccess("launch_local_path.json");
EXPECT_EQ(extension->url().spec() + "launch.html",
- AppLaunchInfo::GetFullLaunchURL(extension).spec());
+ AppLaunchInfo::GetFullLaunchURL(extension.get()).spec());
extension = LoadAndExpectSuccess("launch_local_path_localized.json");
EXPECT_EQ(extension->url().spec() + "launch.html",
- AppLaunchInfo::GetFullLaunchURL(extension).spec());
+ AppLaunchInfo::GetFullLaunchURL(extension.get()).spec());
LoadAndExpectError("launch_web_url_relative.json",
ErrorUtils::FormatErrorMessage(
@@ -123,10 +123,10 @@ TEST_F(AppLaunchManifestTest, AppLaunchURL) {
extension = LoadAndExpectSuccess("launch_web_url_absolute.json");
EXPECT_EQ(GURL("http://www.google.com/launch.html"),
- AppLaunchInfo::GetFullLaunchURL(extension));
+ AppLaunchInfo::GetFullLaunchURL(extension.get()));
extension = LoadAndExpectSuccess("launch_web_url_localized.json");
EXPECT_EQ(GURL("http://www.google.com/launch.html"),
- AppLaunchInfo::GetFullLaunchURL(extension));
+ AppLaunchInfo::GetFullLaunchURL(extension.get()));
}
} // namespace extensions
diff --git a/chrome/common/extensions/manifest_tests/extension_manifests_validapp_unittest.cc b/chrome/common/extensions/manifest_tests/extension_manifests_validapp_unittest.cc
index 684f690..f7fe762 100644
--- a/chrome/common/extensions/manifest_tests/extension_manifests_validapp_unittest.cc
+++ b/chrome/common/extensions/manifest_tests/extension_manifests_validapp_unittest.cc
@@ -18,9 +18,9 @@ TEST_F(ValidAppManifestTest, ValidApp) {
AddPattern(&expected_patterns, "http://www.google.com/foobar/*");
EXPECT_EQ(expected_patterns, extension->web_extent());
EXPECT_EQ(extension_misc::LAUNCH_TAB,
- extensions::AppLaunchInfo::GetLaunchContainer(extension));
+ extensions::AppLaunchInfo::GetLaunchContainer(extension.get()));
EXPECT_EQ(GURL("http://www.google.com/mail/"),
- extensions::AppLaunchInfo::GetLaunchWebURL(extension));
+ extensions::AppLaunchInfo::GetLaunchWebURL(extension.get()));
}
TEST_F(ValidAppManifestTest, AllowUnrecognizedPermissions) {
diff --git a/chrome/common/extensions/sync_type_unittest.cc b/chrome/common/extensions/sync_type_unittest.cc
index c64d8b8..d68d37d 100644
--- a/chrome/common/extensions/sync_type_unittest.cc
+++ b/chrome/common/extensions/sync_type_unittest.cc
@@ -78,7 +78,7 @@ TEST_F(ExtensionSyncTypeTest, NormalExtensionNoUpdateUrl) {
MakeSyncTestExtension(EXTENSION, GURL(), GURL(),
Manifest::INTERNAL, 0, base::FilePath(),
Extension::NO_FLAGS));
- EXPECT_TRUE(sync_helper::IsSyncableExtension(extension));
+ EXPECT_TRUE(sync_helper::IsSyncableExtension(extension.get()));
}
TEST_F(ExtensionSyncTypeTest, UserScriptValidUpdateUrl) {
@@ -86,7 +86,7 @@ TEST_F(ExtensionSyncTypeTest, UserScriptValidUpdateUrl) {
MakeSyncTestExtension(USER_SCRIPT, GURL(kValidUpdateUrl1), GURL(),
Manifest::INTERNAL, 0, base::FilePath(),
Extension::NO_FLAGS));
- EXPECT_TRUE(sync_helper::IsSyncableExtension(extension));
+ EXPECT_TRUE(sync_helper::IsSyncableExtension(extension.get()));
}
TEST_F(ExtensionSyncTypeTest, UserScriptNoUpdateUrl) {
@@ -94,7 +94,7 @@ TEST_F(ExtensionSyncTypeTest, UserScriptNoUpdateUrl) {
MakeSyncTestExtension(USER_SCRIPT, GURL(), GURL(),
Manifest::INTERNAL, 0, base::FilePath(),
Extension::NO_FLAGS));
- EXPECT_FALSE(sync_helper::IsSyncableExtension(extension));
+ EXPECT_FALSE(sync_helper::IsSyncableExtension(extension.get()));
}
TEST_F(ExtensionSyncTypeTest, ThemeNoUpdateUrl) {
@@ -102,8 +102,8 @@ TEST_F(ExtensionSyncTypeTest, ThemeNoUpdateUrl) {
MakeSyncTestExtension(THEME, GURL(), GURL(),
Manifest::INTERNAL, 0, base::FilePath(),
Extension::NO_FLAGS));
- EXPECT_FALSE(sync_helper::IsSyncableExtension(extension));
- EXPECT_FALSE(sync_helper::IsSyncableApp(extension));
+ EXPECT_FALSE(sync_helper::IsSyncableExtension(extension.get()));
+ EXPECT_FALSE(sync_helper::IsSyncableApp(extension.get()));
}
TEST_F(ExtensionSyncTypeTest, AppWithLaunchUrl) {
@@ -111,7 +111,7 @@ TEST_F(ExtensionSyncTypeTest, AppWithLaunchUrl) {
MakeSyncTestExtension(EXTENSION, GURL(), GURL("http://www.google.com"),
Manifest::INTERNAL, 0, base::FilePath(),
Extension::NO_FLAGS));
- EXPECT_TRUE(sync_helper::IsSyncableApp(extension));
+ EXPECT_TRUE(sync_helper::IsSyncableApp(extension.get()));
}
TEST_F(ExtensionSyncTypeTest, ExtensionExternal) {
@@ -119,7 +119,7 @@ TEST_F(ExtensionSyncTypeTest, ExtensionExternal) {
MakeSyncTestExtension(EXTENSION, GURL(), GURL(),
Manifest::EXTERNAL_PREF, 0, base::FilePath(),
Extension::NO_FLAGS));
- EXPECT_FALSE(sync_helper::IsSyncableExtension(extension));
+ EXPECT_FALSE(sync_helper::IsSyncableExtension(extension.get()));
}
TEST_F(ExtensionSyncTypeTest, UserScriptThirdPartyUpdateUrl) {
@@ -127,7 +127,7 @@ TEST_F(ExtensionSyncTypeTest, UserScriptThirdPartyUpdateUrl) {
MakeSyncTestExtension(
USER_SCRIPT, GURL("http://third-party.update_url.com"), GURL(),
Manifest::INTERNAL, 0, base::FilePath(), Extension::NO_FLAGS));
- EXPECT_FALSE(sync_helper::IsSyncableExtension(extension));
+ EXPECT_FALSE(sync_helper::IsSyncableExtension(extension.get()));
}
TEST_F(ExtensionSyncTypeTest, OnlyDisplayAppsInLauncher) {
@@ -201,13 +201,13 @@ TEST_F(ExtensionSyncTypeTest, OnlySyncInternal) {
MakeSyncTestExtension(EXTENSION, GURL(), GURL(),
Manifest::INTERNAL, 0, base::FilePath(),
Extension::NO_FLAGS));
- EXPECT_TRUE(sync_helper::IsSyncable(extension_internal));
+ EXPECT_TRUE(sync_helper::IsSyncable(extension_internal.get()));
scoped_refptr<Extension> extension_noninternal(
MakeSyncTestExtension(EXTENSION, GURL(), GURL(),
Manifest::COMPONENT, 0, base::FilePath(),
Extension::NO_FLAGS));
- EXPECT_FALSE(sync_helper::IsSyncable(extension_noninternal));
+ EXPECT_FALSE(sync_helper::IsSyncable(extension_noninternal.get()));
}
TEST_F(ExtensionSyncTypeTest, DontSyncDefault) {
@@ -215,7 +215,7 @@ TEST_F(ExtensionSyncTypeTest, DontSyncDefault) {
MakeSyncTestExtension(EXTENSION, GURL(), GURL(),
Manifest::INTERNAL, 0, base::FilePath(),
Extension::WAS_INSTALLED_BY_DEFAULT));
- EXPECT_FALSE(sync_helper::IsSyncable(extension_default));
+ EXPECT_FALSE(sync_helper::IsSyncable(extension_default.get()));
}
// These last 2 tests don't make sense on Chrome OS, where extension plugins
@@ -227,7 +227,7 @@ TEST_F(ExtensionSyncTypeTest, ExtensionWithPlugin) {
Manifest::INTERNAL, 1, base::FilePath(),
Extension::NO_FLAGS));
if (extension.get())
- EXPECT_FALSE(sync_helper::IsSyncableExtension(extension));
+ EXPECT_FALSE(sync_helper::IsSyncableExtension(extension.get()));
}
TEST_F(ExtensionSyncTypeTest, ExtensionWithTwoPlugins) {
@@ -236,7 +236,7 @@ TEST_F(ExtensionSyncTypeTest, ExtensionWithTwoPlugins) {
Manifest::INTERNAL, 2, base::FilePath(),
Extension::NO_FLAGS));
if (extension.get())
- EXPECT_FALSE(sync_helper::IsSyncableExtension(extension));
+ EXPECT_FALSE(sync_helper::IsSyncableExtension(extension.get()));
}
#endif // !defined(OS_CHROMEOS)
diff --git a/chrome/common/service_process_util_unittest.cc b/chrome/common/service_process_util_unittest.cc
index a7dcf0e..5139d9c 100644
--- a/chrome/common/service_process_util_unittest.cc
+++ b/chrome/common/service_process_util_unittest.cc
@@ -71,7 +71,7 @@ class ServiceProcessStateTest : public base::MultiProcessTest {
virtual ~ServiceProcessStateTest();
virtual void SetUp();
base::MessageLoopProxy* IOMessageLoopProxy() {
- return io_thread_.message_loop_proxy();
+ return io_thread_.message_loop_proxy().get();
}
void LaunchAndWait(const std::string& name);
@@ -224,7 +224,7 @@ MULTIPROCESS_TEST_MAIN(ServiceProcessStateTestShutdown) {
ServiceProcessState state;
EXPECT_TRUE(state.Initialize());
EXPECT_TRUE(state.SignalReady(
- io_thread_.message_loop_proxy(),
+ io_thread_.message_loop_proxy().get(),
base::Bind(&ShutdownTask, base::MessageLoop::current())));
message_loop.PostDelayedTask(FROM_HERE,
base::MessageLoop::QuitClosure(),
diff --git a/chrome/nacl/nacl_ipc_adapter_unittest.cc b/chrome/nacl/nacl_ipc_adapter_unittest.cc
index 1a2db8b..008e31a 100644
--- a/chrome/nacl/nacl_ipc_adapter_unittest.cc
+++ b/chrome/nacl/nacl_ipc_adapter_unittest.cc
@@ -31,7 +31,7 @@ class NaClIPCAdapterTest : public testing::Test {
// loop instead of using a real IO thread. This should work OK since we do
// not need real IPC for the tests.
adapter_ = new NaClIPCAdapter(scoped_ptr<IPC::Channel>(sink_),
- base::MessageLoopProxy::current());
+ base::MessageLoopProxy::current().get());
}
virtual void TearDown() OVERRIDE {
sink_ = NULL; // This pointer is actually owned by the IPCAdapter.
diff --git a/chrome/nacl/nacl_listener.cc b/chrome/nacl/nacl_listener.cc
index e771496..8d91a8b 100644
--- a/chrome/nacl/nacl_listener.cc
+++ b/chrome/nacl/nacl_listener.cc
@@ -206,8 +206,8 @@ void NaClListener::Listen() {
std::string channel_name =
CommandLine::ForCurrentProcess()->GetSwitchValueASCII(
switches::kProcessChannelID);
- channel_.reset(new IPC::SyncChannel(this, io_thread_.message_loop_proxy(),
- &shutdown_event_));
+ channel_.reset(new IPC::SyncChannel(
+ this, io_thread_.message_loop_proxy().get(), &shutdown_event_));
filter_ = new IPC::SyncMessageFilter(&shutdown_event_);
channel_->AddFilter(filter_.get());
channel_->Init(channel_name, IPC::Channel::MODE_CLIENT, true);
@@ -238,7 +238,7 @@ void NaClListener::OnStart(const nacl::NaClStartParams& params) {
IPC::ChannelHandle handle =
IPC::Channel::GenerateVerifiedChannelID("nacl");
scoped_refptr<NaClIPCAdapter> ipc_adapter(
- new NaClIPCAdapter(handle, io_thread_.message_loop_proxy()));
+ new NaClIPCAdapter(handle, io_thread_.message_loop_proxy().get()));
ipc_adapter->ConnectChannel();
// Pass a NaClDesc to the untrusted side. This will hold a ref to the
diff --git a/chrome/renderer/chrome_content_renderer_client_unittest.cc b/chrome/renderer/chrome_content_renderer_client_unittest.cc
index d3429fd..65ee472 100644
--- a/chrome/renderer/chrome_content_renderer_client_unittest.cc
+++ b/chrome/renderer/chrome_content_renderer_client_unittest.cc
@@ -126,8 +126,10 @@ TEST_F(ChromeContentRendererClientTest, NaClRestriction) {
{
WebPluginParams params;
EXPECT_TRUE(ChromeContentRendererClient::IsNaClAllowed(
- GURL(), GURL(), kNaClUnrestricted,
- CreateExtension(kExtensionRestricted, kExtensionNotFromWebStore),
+ GURL(),
+ GURL(),
+ kNaClUnrestricted,
+ CreateExtension(kExtensionRestricted, kExtensionNotFromWebStore).get(),
&params));
EXPECT_TRUE(AllowsDevInterfaces(params));
}
@@ -136,8 +138,11 @@ TEST_F(ChromeContentRendererClientTest, NaClRestriction) {
{
WebPluginParams params;
EXPECT_TRUE(ChromeContentRendererClient::IsNaClAllowed(
- GURL(), GURL(kExtensionUrl), kNaClRestricted,
- CreateExtension(kExtensionUnrestricted, kExtensionNotFromWebStore),
+ GURL(),
+ GURL(kExtensionUrl),
+ kNaClRestricted,
+ CreateExtension(kExtensionUnrestricted, kExtensionNotFromWebStore)
+ .get(),
&params));
EXPECT_TRUE(AllowsDevInterfaces(params));
}
@@ -146,8 +151,10 @@ TEST_F(ChromeContentRendererClientTest, NaClRestriction) {
{
WebPluginParams params;
EXPECT_TRUE(ChromeContentRendererClient::IsNaClAllowed(
- GURL(), GURL(kExtensionUrl), kNaClRestricted,
- CreateExtension(kExtensionRestricted, kExtensionFromWebStore),
+ GURL(),
+ GURL(kExtensionUrl),
+ kNaClRestricted,
+ CreateExtension(kExtensionRestricted, kExtensionFromWebStore).get(),
&params));
EXPECT_FALSE(AllowsDevInterfaces(params));
}
@@ -155,8 +162,10 @@ TEST_F(ChromeContentRendererClientTest, NaClRestriction) {
{
WebPluginParams params;
EXPECT_TRUE(ChromeContentRendererClient::IsNaClAllowed(
- GURL(), GURL(kExtensionUrl), kNaClUnrestricted,
- CreateExtension(kExtensionRestricted, kExtensionFromWebStore),
+ GURL(),
+ GURL(kExtensionUrl),
+ kNaClUnrestricted,
+ CreateExtension(kExtensionRestricted, kExtensionFromWebStore).get(),
&params));
EXPECT_FALSE(AllowsDevInterfaces(params));
}
@@ -166,8 +175,10 @@ TEST_F(ChromeContentRendererClientTest, NaClRestriction) {
WebPluginParams params;
AddFakeDevAttribute(&params);
EXPECT_TRUE(ChromeContentRendererClient::IsNaClAllowed(
- GURL(), GURL(kExtensionUrl), kNaClRestricted,
- CreateExtension(kExtensionRestricted, kExtensionFromWebStore),
+ GURL(),
+ GURL(kExtensionUrl),
+ kNaClRestricted,
+ CreateExtension(kExtensionRestricted, kExtensionFromWebStore).get(),
&params));
EXPECT_FALSE(AllowsDevInterfaces(params));
}
@@ -177,8 +188,9 @@ TEST_F(ChromeContentRendererClientTest, NaClRestriction) {
WebPluginParams params;
EXPECT_TRUE(ChromeContentRendererClient::IsNaClAllowed(
GURL("chrome-extension://acadkphlmlegjaadjagenfimbpphcgnh"),
- GURL(), kNaClRestricted,
- CreateExtension(kExtensionRestricted, kExtensionFromWebStore),
+ GURL(),
+ kNaClRestricted,
+ CreateExtension(kExtensionRestricted, kExtensionFromWebStore).get(),
&params));
EXPECT_TRUE(AllowsDevInterfaces(params));
}
@@ -187,39 +199,45 @@ TEST_F(ChromeContentRendererClientTest, NaClRestriction) {
{
WebPluginParams params;
EXPECT_FALSE(ChromeContentRendererClient::IsNaClAllowed(
- GURL(), GURL("http://plus.google.com/foo"),
+ GURL(),
+ GURL("http://plus.google.com/foo"),
kNaClRestricted,
- CreateExtension(kExtensionRestricted, kExtensionNotFromWebStore),
+ CreateExtension(kExtensionRestricted, kExtensionNotFromWebStore).get(),
&params));
EXPECT_FALSE(AllowsDevInterfaces(params));
EXPECT_TRUE(ChromeContentRendererClient::IsNaClAllowed(
- GURL(), GURL("https://plus.google.com/foo"),
+ GURL(),
+ GURL("https://plus.google.com/foo"),
kNaClRestricted,
- CreateExtension(kExtensionRestricted, kExtensionNotFromWebStore),
+ CreateExtension(kExtensionRestricted, kExtensionNotFromWebStore).get(),
&params));
EXPECT_FALSE(AllowsDevInterfaces(params));
EXPECT_TRUE(ChromeContentRendererClient::IsNaClAllowed(
- GURL(), GURL("https://plus.google.com/209089085730"),
+ GURL(),
+ GURL("https://plus.google.com/209089085730"),
kNaClRestricted,
- CreateExtension(kExtensionRestricted, kExtensionNotFromWebStore),
+ CreateExtension(kExtensionRestricted, kExtensionNotFromWebStore).get(),
&params));
EXPECT_FALSE(AllowsDevInterfaces(params));
EXPECT_FALSE(ChromeContentRendererClient::IsNaClAllowed(
- GURL(), GURL("http://plus.sandbox.google.com/foo"),
+ GURL(),
+ GURL("http://plus.sandbox.google.com/foo"),
kNaClRestricted,
- CreateExtension(kExtensionRestricted, kExtensionNotFromWebStore),
+ CreateExtension(kExtensionRestricted, kExtensionNotFromWebStore).get(),
&params));
EXPECT_FALSE(AllowsDevInterfaces(params));
EXPECT_TRUE(ChromeContentRendererClient::IsNaClAllowed(
- GURL(), GURL("https://plus.sandbox.google.com/foo"),
+ GURL(),
+ GURL("https://plus.sandbox.google.com/foo"),
kNaClRestricted,
- CreateExtension(kExtensionRestricted, kExtensionNotFromWebStore),
+ CreateExtension(kExtensionRestricted, kExtensionNotFromWebStore).get(),
&params));
EXPECT_FALSE(AllowsDevInterfaces(params));
EXPECT_TRUE(ChromeContentRendererClient::IsNaClAllowed(
- GURL(), GURL("https://plus.google.com/209089085730"),
+ GURL(),
+ GURL("https://plus.google.com/209089085730"),
kNaClRestricted,
- CreateExtension(kExtensionRestricted, kExtensionNotFromWebStore),
+ CreateExtension(kExtensionRestricted, kExtensionNotFromWebStore).get(),
&params));
EXPECT_FALSE(AllowsDevInterfaces(params));
}
@@ -227,9 +245,10 @@ TEST_F(ChromeContentRendererClientTest, NaClRestriction) {
{
WebPluginParams params;
EXPECT_TRUE(ChromeContentRendererClient::IsNaClAllowed(
- GURL(), GURL("https://plus.google.com/209089085730"),
+ GURL(),
+ GURL("https://plus.google.com/209089085730"),
kNaClUnrestricted,
- CreateExtension(kExtensionRestricted, kExtensionNotFromWebStore),
+ CreateExtension(kExtensionRestricted, kExtensionNotFromWebStore).get(),
&params));
EXPECT_FALSE(AllowsDevInterfaces(params));
}
@@ -239,9 +258,10 @@ TEST_F(ChromeContentRendererClientTest, NaClRestriction) {
WebPluginParams params;
AddFakeDevAttribute(&params);
EXPECT_TRUE(ChromeContentRendererClient::IsNaClAllowed(
- GURL(), GURL("https://plus.google.com/209089085730"),
+ GURL(),
+ GURL("https://plus.google.com/209089085730"),
kNaClRestricted,
- CreateExtension(kExtensionRestricted, kExtensionNotFromWebStore),
+ CreateExtension(kExtensionRestricted, kExtensionNotFromWebStore).get(),
&params));
EXPECT_FALSE(AllowsDevInterfaces(params));
}
@@ -249,40 +269,49 @@ TEST_F(ChromeContentRendererClientTest, NaClRestriction) {
{
WebPluginParams params;
EXPECT_FALSE(ChromeContentRendererClient::IsNaClAllowed(
- GURL(), GURL("https://plus.google.com.evil.com/foo1"),
+ GURL(),
+ GURL("https://plus.google.com.evil.com/foo1"),
kNaClRestricted,
- CreateExtension(kExtensionRestricted, kExtensionNotFromWebStore),
+ CreateExtension(kExtensionRestricted, kExtensionNotFromWebStore).get(),
&params));
EXPECT_FALSE(ChromeContentRendererClient::IsNaClAllowed(
- GURL(), GURL("https://plus.google.com.evil.com/foo2"),
+ GURL(),
+ GURL("https://plus.google.com.evil.com/foo2"),
kNaClRestricted,
- CreateExtension(kExtensionRestricted, kExtensionFromWebStore),
+ CreateExtension(kExtensionRestricted, kExtensionFromWebStore).get(),
&params));
EXPECT_FALSE(ChromeContentRendererClient::IsNaClAllowed(
- GURL(), GURL("https://plus.google.com.evil.com/foo3"),
+ GURL(),
+ GURL("https://plus.google.com.evil.com/foo3"),
kNaClRestricted,
- CreateExtension(kExtensionUnrestricted, kExtensionNotFromWebStore),
+ CreateExtension(kExtensionUnrestricted, kExtensionNotFromWebStore)
+ .get(),
&params));
EXPECT_FALSE(ChromeContentRendererClient::IsNaClAllowed(
- GURL(), GURL("https://plus.google.com.evil.com/foo4"),
+ GURL(),
+ GURL("https://plus.google.com.evil.com/foo4"),
kNaClRestricted,
- CreateExtension(kExtensionUnrestricted, kExtensionFromWebStore),
+ CreateExtension(kExtensionUnrestricted, kExtensionFromWebStore).get(),
&params));
}
// Non chrome-extension:// URLs belonging to hosted apps are allowed.
{
WebPluginParams params;
EXPECT_TRUE(ChromeContentRendererClient::IsNaClAllowed(
- GURL(), GURL("http://example.com/test.html"),
+ GURL(),
+ GURL("http://example.com/test.html"),
kNaClRestricted,
- CreateHostedApp(kExtensionRestricted, kExtensionNotFromWebStore,
- "http://example.com/"),
+ CreateHostedApp(kExtensionRestricted,
+ kExtensionNotFromWebStore,
+ "http://example.com/").get(),
&params));
EXPECT_FALSE(ChromeContentRendererClient::IsNaClAllowed(
- GURL(), GURL("http://example.evil.com/test.html"),
+ GURL(),
+ GURL("http://example.evil.com/test.html"),
kNaClRestricted,
- CreateHostedApp(kExtensionRestricted, kExtensionNotFromWebStore,
- "http://example.com/"),
+ CreateHostedApp(kExtensionRestricted,
+ kExtensionNotFromWebStore,
+ "http://example.com/").get(),
&params));
}
}
diff --git a/chrome/service/cloud_print/cloud_print_auth.cc b/chrome/service/cloud_print/cloud_print_auth.cc
index bc9f36c..3505a91 100644
--- a/chrome/service/cloud_print/cloud_print_auth.cc
+++ b/chrome/service/cloud_print/cloud_print_auth.cc
@@ -38,9 +38,10 @@ void CloudPrintAuth::AuthenticateWithLsid(
VLOG(1) << "CP_AUTH: Authenticating with LSID";
scoped_refptr<ServiceGaiaAuthenticator> gaia_auth_for_print(
new ServiceGaiaAuthenticator(
- kProxyAuthUserAgent, kCloudPrintGaiaServiceId,
+ kProxyAuthUserAgent,
+ kCloudPrintGaiaServiceId,
GaiaUrls::GetInstance()->client_login_url(),
- g_service_process->io_thread()->message_loop_proxy()));
+ g_service_process->io_thread()->message_loop_proxy().get()));
gaia_auth_for_print->set_message_loop(base::MessageLoop::current());
if (gaia_auth_for_print->AuthenticateWithLsid(lsid)) {
// Stash away the user email so we can save it in prefs.
diff --git a/chrome/service/cloud_print/cloud_print_url_fetcher_unittest.cc b/chrome/service/cloud_print/cloud_print_url_fetcher_unittest.cc
index 1d66991..9f71b30 100644
--- a/chrome/service/cloud_print/cloud_print_url_fetcher_unittest.cc
+++ b/chrome/service/cloud_print/cloud_print_url_fetcher_unittest.cc
@@ -213,7 +213,7 @@ class CloudPrintURLFetcherRetryBackoffTest : public CloudPrintURLFetcherTest {
void CloudPrintURLFetcherTest::CreateFetcher(const GURL& url, int max_retries) {
- fetcher_ = new TestCloudPrintURLFetcher(io_message_loop_proxy());
+ fetcher_ = new TestCloudPrintURLFetcher(io_message_loop_proxy().get());
// Registers an entry for test url. It only allows 3 requests to be sent
// in 200 milliseconds.
diff --git a/chrome/service/net/service_url_request_context.cc b/chrome/service/net/service_url_request_context.cc
index a55b4e3..6484a56 100644
--- a/chrome/service/net/service_url_request_context.cc
+++ b/chrome/service/net/service_url_request_context.cc
@@ -149,10 +149,9 @@ ServiceURLRequestContextGetter::ServiceURLRequestContextGetter()
// TODO(sanjeevr): Change CreateSystemProxyConfigService to accept a
// MessageLoopProxy* instead of MessageLoop*.
DCHECK(g_service_process);
- proxy_config_service_.reset(
- net::ProxyService::CreateSystemProxyConfigService(
- g_service_process->io_thread()->message_loop_proxy(),
- g_service_process->file_thread()->message_loop()));
+ proxy_config_service_.reset(net::ProxyService::CreateSystemProxyConfigService(
+ g_service_process->io_thread()->message_loop_proxy().get(),
+ g_service_process->file_thread()->message_loop()));
}
net::URLRequestContext*
diff --git a/chrome/service/service_ipc_server.cc b/chrome/service/service_ipc_server.cc
index 9935f34..c1f7e21 100644
--- a/chrome/service/service_ipc_server.cc
+++ b/chrome/service/service_ipc_server.cc
@@ -25,9 +25,12 @@ bool ServiceIPCServer::Init() {
void ServiceIPCServer::CreateChannel() {
channel_.reset(NULL); // Tear down the existing channel, if any.
- channel_.reset(new IPC::SyncChannel(channel_handle_,
- IPC::Channel::MODE_NAMED_SERVER, this,
- g_service_process->io_thread()->message_loop_proxy(), true,
+ channel_.reset(new IPC::SyncChannel(
+ channel_handle_,
+ IPC::Channel::MODE_NAMED_SERVER,
+ this,
+ g_service_process->io_thread()->message_loop_proxy().get(),
+ true,
g_service_process->shutdown_event()));
DCHECK(sync_message_filter_.get());
channel_->AddFilter(sync_message_filter_.get());
diff --git a/chrome/service/service_process.cc b/chrome/service/service_process.cc
index f59217e..af04fbd 100644
--- a/chrome/service/service_process.cc
+++ b/chrome/service/service_process.cc
@@ -163,7 +163,8 @@ bool ServiceProcess::Initialize(base::MessageLoopForUI* message_loop,
user_data_dir.Append(chrome::kServiceStateFileName);
service_prefs_.reset(new ServiceProcessPrefs(
pref_path,
- JsonPrefStore::GetTaskRunnerForFile(pref_path, blocking_pool_.get())));
+ JsonPrefStore::GetTaskRunnerForFile(pref_path, blocking_pool_.get())
+ .get()));
service_prefs_->ReadPrefs();
// This switch it required to run connector with test gaia.
@@ -203,8 +204,8 @@ bool ServiceProcess::Initialize(base::MessageLoopForUI* message_loop,
// After the IPC server has started we signal that the service process is
// ready.
if (!service_process_state_->SignalReady(
- io_thread_->message_loop_proxy(),
- base::Bind(&ServiceProcess::Terminate, base::Unretained(this)))) {
+ io_thread_->message_loop_proxy().get(),
+ base::Bind(&ServiceProcess::Terminate, base::Unretained(this)))) {
return false;
}
diff --git a/chrome/service/service_process_prefs_unittest.cc b/chrome/service/service_process_prefs_unittest.cc
index 5ec3ce6..190da9e 100644
--- a/chrome/service/service_process_prefs_unittest.cc
+++ b/chrome/service/service_process_prefs_unittest.cc
@@ -18,7 +18,7 @@ class ServiceProcessPrefsTest : public testing::Test {
prefs_.reset(new ServiceProcessPrefs(
temp_dir_.path().AppendASCII("service_process_prefs.txt"),
- message_loop_.message_loop_proxy()));
+ message_loop_.message_loop_proxy().get()));
}
virtual void TearDown() OVERRIDE {
diff --git a/chrome/test/automation/automation_proxy.cc b/chrome/test/automation/automation_proxy.cc
index 617c94c..55cd320 100644
--- a/chrome/test/automation/automation_proxy.cc
+++ b/chrome/test/automation/automation_proxy.cc
@@ -158,10 +158,9 @@ void AutomationProxy::InitializeChannel(const std::string& channel_id,
// The shutdown event could be global on the same lines as the automation
// provider, where we use the shutdown event provided by the chrome browser
// process.
- channel_.reset(new IPC::SyncChannel(
- this, // we are the listener
- thread_->message_loop_proxy(),
- shutdown_event_.get()));
+ channel_.reset(new IPC::SyncChannel(this, // we are the listener
+ thread_->message_loop_proxy().get(),
+ shutdown_event_.get()));
channel_->AddFilter(new AutomationMessageFilter(this));
// Create the pipe synchronously so that Chrome doesn't try to connect to an
diff --git a/chrome/test/base/testing_pref_service_syncable.cc b/chrome/test/base/testing_pref_service_syncable.cc
index 168d56e..3addba3 100644
--- a/chrome/test/base/testing_pref_service_syncable.cc
+++ b/chrome/test/base/testing_pref_service_syncable.cc
@@ -24,7 +24,7 @@ TestingPrefServiceBase<PrefServiceSyncable, user_prefs::PrefRegistrySyncable>::
NULL,
user_prefs,
recommended_prefs,
- pref_registry->defaults(),
+ pref_registry->defaults().get(),
pref_notifier),
user_prefs,
pref_registry,
diff --git a/chrome/test/base/testing_profile.cc b/chrome/test/base/testing_profile.cc
index 466191e..a5bdae8 100644
--- a/chrome/test/base/testing_profile.cc
+++ b/chrome/test/base/testing_profile.cc
@@ -694,7 +694,7 @@ TestingProfile::GetGeolocationPermissionContext() {
content::SpeechRecognitionPreferences*
TestingProfile::GetSpeechRecognitionPreferences() {
#if defined(ENABLE_INPUT_SPEECH)
- return ChromeSpeechRecognitionPreferences::GetForProfile(this);
+ return ChromeSpeechRecognitionPreferences::GetForProfile(this).get();
#else
return NULL;
#endif
diff --git a/chrome/test/chromedriver/chrome/adb_impl.cc b/chrome/test/chromedriver/chrome/adb_impl.cc
index d26d393..0386e29 100644
--- a/chrome/test/chromedriver/chrome/adb_impl.cc
+++ b/chrome/test/chromedriver/chrome/adb_impl.cc
@@ -74,7 +74,7 @@ AdbImpl::AdbImpl(
const scoped_refptr<base::MessageLoopProxy>& io_message_loop_proxy,
Log* log)
: io_message_loop_proxy_(io_message_loop_proxy), log_(log) {
- CHECK(io_message_loop_proxy_);
+ CHECK(io_message_loop_proxy_.get());
}
AdbImpl::~AdbImpl() {}
diff --git a/chrome/test/chromedriver/net/sync_websocket_impl_unittest.cc b/chrome/test/chromedriver/net/sync_websocket_impl_unittest.cc
index dcaa070..e9daca6 100644
--- a/chrome/test/chromedriver/net/sync_websocket_impl_unittest.cc
+++ b/chrome/test/chromedriver/net/sync_websocket_impl_unittest.cc
@@ -73,7 +73,7 @@ TEST_F(SyncWebSocketImplTest, SendReceive) {
}
TEST_F(SyncWebSocketImplTest, SendReceiveTimeout) {
- SyncWebSocketImpl sock(context_getter_);
+ SyncWebSocketImpl sock(context_getter_.get());
ASSERT_TRUE(sock.Connect(server_.web_socket_url()));
ASSERT_TRUE(sock.Send("hi"));
std::string message;
diff --git a/chrome/test/reliability/automated_ui_test_base.cc b/chrome/test/reliability/automated_ui_test_base.cc
index 541a0c6..b753329 100644
--- a/chrome/test/reliability/automated_ui_test_base.cc
+++ b/chrome/test/reliability/automated_ui_test_base.cc
@@ -31,7 +31,7 @@ void AutomatedUITestBase::LogInfoMessage(const std::string& info) {
void AutomatedUITestBase::SetUp() {
UITest::SetUp();
- set_active_browser(automation()->GetBrowserWindow(0));
+ set_active_browser(automation()->GetBrowserWindow(0).get());
}
bool AutomatedUITestBase::BackButton() {
diff --git a/chrome/test/reliability/automated_ui_tests.cc b/chrome/test/reliability/automated_ui_tests.cc
index 7154f31..2e5957b6 100644
--- a/chrome/test/reliability/automated_ui_tests.cc
+++ b/chrome/test/reliability/automated_ui_tests.cc
@@ -300,7 +300,7 @@ void AutomatedUITest::RunAutomatedUITest() {
// Try and start up again.
CloseBrowserAndServer();
LaunchBrowserAndServer();
- set_active_browser(automation()->GetBrowserWindow(0));
+ set_active_browser(automation()->GetBrowserWindow(0).get());
if (DidCrash(true)) {
no_errors = false;
// We crashed again, so skip to the end of the this command.
diff --git a/chrome/test/reliability/page_load_test.cc b/chrome/test/reliability/page_load_test.cc
index f888c1f..0c6185d 100644
--- a/chrome/test/reliability/page_load_test.cc
+++ b/chrome/test/reliability/page_load_test.cc
@@ -735,7 +735,7 @@ class PageLoadTest : public UITest {
base::FilePath path = user_data_dir().Append(chrome::kLocalStateFilename);
PrefServiceMockBuilder builder;
builder.WithUserFilePrefs(
- path, base::MessageLoop::current()->message_loop_proxy());
+ path, base::MessageLoop::current()->message_loop_proxy().get());
return builder.Create(registry);
}
diff --git a/chrome/utility/profile_import_handler.cc b/chrome/utility/profile_import_handler.cc
index c1119ef..79cf0be 100644
--- a/chrome/utility/profile_import_handler.cc
+++ b/chrome/utility/profile_import_handler.cc
@@ -36,8 +36,9 @@ void ProfileImportHandler::OnImportStart(
uint16 items,
const base::DictionaryValue& localized_strings) {
bridge_ = new ExternalProcessImporterBridge(
- localized_strings, content::UtilityThread::Get(),
- base::MessageLoopProxy::current());
+ localized_strings,
+ content::UtilityThread::Get(),
+ base::MessageLoopProxy::current().get());
importer_ = importer::CreateImporterByType(source_profile.importer_type);
if (!importer_.get()) {
Send(new ProfileImportProcessHostMsg_Import_Finished(
diff --git a/components/webdata/common/web_data_service_base.cc b/components/webdata/common/web_data_service_base.cc
index e05da38..6422cb4 100644
--- a/components/webdata/common/web_data_service_base.cc
+++ b/components/webdata/common/web_data_service_base.cc
@@ -61,14 +61,14 @@ void WebDataServiceBase::CancelRequest(Handle h) {
}
bool WebDataServiceBase::IsDatabaseLoaded() {
- if (!wdbs_)
+ if (!wdbs_.get())
return false;
return wdbs_->db_loaded();
}
void WebDataServiceBase::RegisterDBLoadedCallback(
const base::Callback<void(void)>& callback) {
- if (!wdbs_)
+ if (!wdbs_.get())
return;
wdbs_->RegisterDBLoadedCallback(callback);
}
diff --git a/content/browser/appcache/chrome_appcache_service.cc b/content/browser/appcache/chrome_appcache_service.cc
index b4ba814..1d913b9 100644
--- a/content/browser/appcache/chrome_appcache_service.cc
+++ b/content/browser/appcache/chrome_appcache_service.cc
@@ -43,8 +43,9 @@ void ChromeAppCacheService::InitializeOnIOThread(
Initialize(
cache_path_,
BrowserThread::GetMessageLoopProxyForThread(
- BrowserThread::FILE_USER_BLOCKING),
- BrowserThread::GetMessageLoopProxyForThread(BrowserThread::CACHE));
+ BrowserThread::FILE_USER_BLOCKING)
+ .get(),
+ BrowserThread::GetMessageLoopProxyForThread(BrowserThread::CACHE).get());
set_appcache_policy(this);
set_special_storage_policy(special_storage_policy.get());
}
diff --git a/content/browser/appcache/chrome_appcache_service_unittest.cc b/content/browser/appcache/chrome_appcache_service_unittest.cc
index 10cc360..ebcca07 100644
--- a/content/browser/appcache/chrome_appcache_service_unittest.cc
+++ b/content/browser/appcache/chrome_appcache_service_unittest.cc
@@ -106,11 +106,13 @@ ChromeAppCacheServiceTest::CreateAppCacheService(
scoped_refptr<MockURLRequestContextGetter> mock_request_context_getter =
new MockURLRequestContextGetter(
browser_context_.GetResourceContext()->GetRequestContext(),
- message_loop_.message_loop_proxy());
+ message_loop_.message_loop_proxy().get());
BrowserThread::PostTask(
- BrowserThread::IO, FROM_HERE,
+ BrowserThread::IO,
+ FROM_HERE,
base::Bind(&ChromeAppCacheService::InitializeOnIOThread,
- appcache_service.get(), appcache_path,
+ appcache_service.get(),
+ appcache_path,
browser_context_.GetResourceContext(),
mock_request_context_getter,
mock_policy));
diff --git a/content/browser/devtools/devtools_http_handler_impl.cc b/content/browser/devtools/devtools_http_handler_impl.cc
index bf64d52..f176025 100644
--- a/content/browser/devtools/devtools_http_handler_impl.cc
+++ b/content/browser/devtools/devtools_http_handler_impl.cc
@@ -85,7 +85,7 @@ class DevToolsDefaultBindingHandler
}
virtual DevToolsAgentHost* ForIdentifier(const std::string& id) OVERRIDE {
- return DevToolsAgentHost::GetForId(id);
+ return DevToolsAgentHost::GetForId(id).get();
}
};
diff --git a/content/browser/devtools/devtools_manager_unittest.cc b/content/browser/devtools/devtools_manager_unittest.cc
index 0167a15..56a974e 100644
--- a/content/browser/devtools/devtools_manager_unittest.cc
+++ b/content/browser/devtools/devtools_manager_unittest.cc
@@ -211,8 +211,7 @@ TEST_F(DevToolsManagerTest, ReattachOnCancelPendingNavigation) {
TestDevToolsClientHost client_host;
DevToolsManager* devtools_manager = DevToolsManager::GetInstance();
devtools_manager->RegisterDevToolsClientHostFor(
- DevToolsAgentHost::GetOrCreateFor(rvh()),
- &client_host);
+ DevToolsAgentHost::GetOrCreateFor(rvh()).get(), &client_host);
// Navigate to new site which should get a new RenderViewHost.
const GURL url2("http://www.yahoo.com");
diff --git a/content/browser/dom_storage/dom_storage_context_impl.cc b/content/browser/dom_storage/dom_storage_context_impl.cc
index 74b175b..f790ecd 100644
--- a/content/browser/dom_storage/dom_storage_context_impl.cc
+++ b/content/browser/dom_storage/dom_storage_context_impl.cc
@@ -70,16 +70,17 @@ DOMStorageContextImpl::DOMStorageContextImpl(
quota::SpecialStoragePolicy* special_storage_policy) {
base::SequencedWorkerPool* worker_pool = BrowserThread::GetBlockingPool();
context_ = new dom_storage::DomStorageContext(
- data_path.empty() ?
- data_path : data_path.AppendASCII(kLocalStorageDirectory),
- data_path.empty() ?
- data_path : data_path.AppendASCII(kSessionStorageDirectory),
+ data_path.empty() ? data_path
+ : data_path.AppendASCII(kLocalStorageDirectory),
+ data_path.empty() ? data_path
+ : data_path.AppendASCII(kSessionStorageDirectory),
special_storage_policy,
new DomStorageWorkerPoolTaskRunner(
worker_pool,
worker_pool->GetNamedSequenceToken("dom_storage_primary"),
worker_pool->GetNamedSequenceToken("dom_storage_commit"),
- BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO)));
+ BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO)
+ .get()));
}
DOMStorageContextImpl::~DOMStorageContextImpl() {
diff --git a/content/browser/fileapi/file_system_browsertest.cc b/content/browser/fileapi/file_system_browsertest.cc
index c5d8c16..7c464a3 100644
--- a/content/browser/fileapi/file_system_browsertest.cc
+++ b/content/browser/fileapi/file_system_browsertest.cc
@@ -71,9 +71,8 @@ class FileSystemBrowserTestWithLowQuota : public FileSystemBrowserTest {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
qm->SetTemporaryGlobalOverrideQuota(bytes, quota::QuotaCallback());
// Don't return until the quota has been set.
- scoped_refptr<base::ThreadTestHelper> helper(
- new base::ThreadTestHelper(
- BrowserThread::GetMessageLoopProxyForThread(BrowserThread::DB)));
+ scoped_refptr<base::ThreadTestHelper> helper(new base::ThreadTestHelper(
+ BrowserThread::GetMessageLoopProxyForThread(BrowserThread::DB).get()));
ASSERT_TRUE(helper->Run());
}
};
diff --git a/content/browser/geolocation/fake_access_token_store.cc b/content/browser/geolocation/fake_access_token_store.cc
index bccdcf0..9f9f61b 100644
--- a/content/browser/geolocation/fake_access_token_store.cc
+++ b/content/browser/geolocation/fake_access_token_store.cc
@@ -40,7 +40,7 @@ void FakeAccessTokenStore::NotifyDelegateTokensLoaded() {
void FakeAccessTokenStore::DefaultLoadAccessTokens(
const LoadAccessTokensCallbackType& callback) {
- originating_message_loop_ = MessageLoopProxy::current();
+ originating_message_loop_ = MessageLoopProxy::current().get();
callback_ = callback;
}
diff --git a/content/browser/gpu/shader_disk_cache.cc b/content/browser/gpu/shader_disk_cache.cc
index 3e07572..a9ad9b8 100644
--- a/content/browser/gpu/shader_disk_cache.cc
+++ b/content/browser/gpu/shader_disk_cache.cc
@@ -529,7 +529,7 @@ void ShaderDiskCache::Init() {
cache_path_.Append(kGpuCachePath),
max_cache_size_,
true,
- BrowserThread::GetMessageLoopProxyForThread(BrowserThread::CACHE),
+ BrowserThread::GetMessageLoopProxyForThread(BrowserThread::CACHE).get(),
NULL,
&backend_,
base::Bind(&ShaderDiskCache::CacheCreatedCallback, this));
diff --git a/content/browser/in_process_webkit/indexed_db_browsertest.cc b/content/browser/in_process_webkit/indexed_db_browsertest.cc
index da493f7..bf2f94f 100644
--- a/content/browser/in_process_webkit/indexed_db_browsertest.cc
+++ b/content/browser/in_process_webkit/indexed_db_browsertest.cc
@@ -96,9 +96,8 @@ class IndexedDBBrowserTest : public ContentBrowserTest {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
qm->SetTemporaryGlobalOverrideQuota(bytes, quota::QuotaCallback());
// Don't return until the quota has been set.
- scoped_refptr<base::ThreadTestHelper> helper(
- new base::ThreadTestHelper(
- BrowserThread::GetMessageLoopProxyForThread(BrowserThread::DB)));
+ scoped_refptr<base::ThreadTestHelper> helper(new base::ThreadTestHelper(
+ BrowserThread::GetMessageLoopProxyForThread(BrowserThread::DB).get()));
ASSERT_TRUE(helper->Run());
}
@@ -110,7 +109,7 @@ class IndexedDBBrowserTest : public ContentBrowserTest {
&IndexedDBBrowserTest::DidGetDiskUsage, this));
scoped_refptr<base::ThreadTestHelper> helper(
new base::ThreadTestHelper(BrowserThread::GetMessageLoopProxyForThread(
- BrowserThread::WEBKIT_DEPRECATED)));
+ BrowserThread::WEBKIT_DEPRECATED).get()));
EXPECT_TRUE(helper->Run());
// Wait for DidGetDiskUsage to be called.
base::MessageLoop::current()->RunUntilIdle();
@@ -256,7 +255,7 @@ class IndexedDBBrowserTestWithPreexistingLevelDB : public IndexedDBBrowserTest {
EnclosingLevelDBDir()));
scoped_refptr<base::ThreadTestHelper> helper(
new base::ThreadTestHelper(BrowserThread::GetMessageLoopProxyForThread(
- BrowserThread::WEBKIT_DEPRECATED)));
+ BrowserThread::WEBKIT_DEPRECATED).get()));
ASSERT_TRUE(helper->Run());
}
diff --git a/content/browser/indexed_db/indexed_db_backing_store.cc b/content/browser/indexed_db/indexed_db_backing_store.cc
index 39fc7e2..e3b6a43 100644
--- a/content/browser/indexed_db/indexed_db_backing_store.cc
+++ b/content/browser/indexed_db/indexed_db_backing_store.cc
@@ -2619,13 +2619,13 @@ IndexedDBBackingStore::Transaction::~Transaction() {}
void IndexedDBBackingStore::Transaction::begin() {
IDB_TRACE("IndexedDBBackingStore::Transaction::begin");
- DCHECK(!transaction_);
+ DCHECK(!transaction_.get());
transaction_ = LevelDBTransaction::Create(backing_store_->db_.get());
}
bool IndexedDBBackingStore::Transaction::Commit() {
IDB_TRACE("IndexedDBBackingStore::Transaction::commit");
- DCHECK(transaction_);
+ DCHECK(transaction_.get());
bool result = transaction_->Commit();
transaction_ = NULL;
if (!result)
@@ -2635,7 +2635,7 @@ bool IndexedDBBackingStore::Transaction::Commit() {
void IndexedDBBackingStore::Transaction::Rollback() {
IDB_TRACE("IndexedDBBackingStore::Transaction::rollback");
- DCHECK(transaction_);
+ DCHECK(transaction_.get());
transaction_->Rollback();
transaction_ = NULL;
}
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 8058b2f..f283a21 100644
--- a/content/browser/indexed_db/indexed_db_backing_store_unittest.cc
+++ b/content/browser/indexed_db/indexed_db_backing_store_unittest.cc
@@ -418,13 +418,13 @@ TEST(IndexedDBFactoryTest, RejectLongOrigins)
std::string("http://" + origin + ":81/").c_str()));
scoped_refptr<IndexedDBBackingStore> diskStore1 =
factory->TestOpenBackingStore(too_long_origin, base_path);
- EXPECT_FALSE(diskStore1);
+ EXPECT_FALSE(diskStore1.get());
WebSecurityOrigin ok_origin =
WebSecurityOrigin::createFromString("http://someorigin.com:82/");
scoped_refptr<IndexedDBBackingStore> diskStore2 =
factory->TestOpenBackingStore(ok_origin, base_path);
- EXPECT_TRUE(diskStore2);
+ EXPECT_TRUE(diskStore2.get());
}
} // namespace
diff --git a/content/browser/indexed_db/indexed_db_database.cc b/content/browser/indexed_db/indexed_db_database.cc
index 5b34a13..1d47037 100644
--- a/content/browser/indexed_db/indexed_db_database.cc
+++ b/content/browser/indexed_db/indexed_db_database.cc
@@ -1020,7 +1020,7 @@ void PutOperation::Perform(IndexedDBTransaction* transaction) {
for (size_t i = 0; i < index_writers.size(); ++i) {
IndexedDBObjectStoreImpl::IndexWriter* index_writer = index_writers[i];
index_writer->WriteIndexKeys(record_identifier,
- backing_store_,
+ backing_store_.get(),
transaction->BackingStoreTransaction(),
database_id_,
object_store_.id);
@@ -1520,7 +1520,7 @@ void IndexedDBDatabase::CreateTransaction(
static_cast<indexed_db::TransactionMode>(mode),
this);
DCHECK(transactions_.find(transaction_id) == transactions_.end());
- transactions_[transaction_id] = transaction;
+ transactions_[transaction_id] = transaction.get();
}
bool IndexedDBDatabase::IsOpenConnectionBlocked() const {
@@ -1617,7 +1617,7 @@ void IndexedDBDatabase::RunVersionChangeTransaction(
int64 transaction_id,
int64 requested_version) {
- DCHECK(callbacks);
+ DCHECK(callbacks.get());
DCHECK(database_callbacks_set_.has(database_callbacks));
if (ConnectionCount() > 1) {
// Front end ensures the event is not fired at connections that have
@@ -1626,7 +1626,7 @@ void IndexedDBDatabase::RunVersionChangeTransaction(
database_callbacks_set_.begin();
it != database_callbacks_set_.end();
++it) {
- if (*it != database_callbacks.get())
+ if (it->get() != database_callbacks.get())
(*it)->OnVersionChange(metadata_.int_version, requested_version);
}
// TODO(jsbell): Remove the call to on_blocked and instead wait
@@ -1699,7 +1699,7 @@ bool IndexedDBDatabase::IsDeleteDatabaseBlocked() const {
void IndexedDBDatabase::DeleteDatabaseFinal(
scoped_refptr<IndexedDBCallbacksWrapper> callbacks) {
DCHECK(!IsDeleteDatabaseBlocked());
- DCHECK(backing_store_);
+ DCHECK(backing_store_.get());
if (!backing_store_->DeleteDatabase(metadata_.name)) {
callbacks->OnError(
IndexedDBDatabaseError(WebKit::WebIDBDatabaseExceptionUnknownError,
@@ -1715,7 +1715,7 @@ void IndexedDBDatabase::DeleteDatabaseFinal(
void IndexedDBDatabase::Close(
scoped_refptr<IndexedDBDatabaseCallbacksWrapper> callbacks) {
- DCHECK(callbacks);
+ DCHECK(callbacks.get());
DCHECK(database_callbacks_set_.has(callbacks));
// Close outstanding transactions from the closing connection. This
@@ -1729,7 +1729,7 @@ void IndexedDBDatabase::Close(
end = transactions.end();
it != end;
++it) {
- if (it->second->connection() == callbacks)
+ if (it->second->connection() == callbacks.get())
it->second->Abort(
IndexedDBDatabaseError(WebKit::WebIDBDatabaseExceptionUnknownError,
"Connection is closing."));
@@ -1738,7 +1738,7 @@ void IndexedDBDatabase::Close(
database_callbacks_set_.erase(callbacks);
if (pending_second_half_open_ &&
- pending_second_half_open_->DatabaseCallbacks() == callbacks) {
+ pending_second_half_open_->DatabaseCallbacks().get() == callbacks.get()) {
pending_second_half_open_->Callbacks()->OnError(
IndexedDBDatabaseError(WebKit::WebIDBDatabaseExceptionAbortError,
"The connection was closed."));
@@ -1764,7 +1764,7 @@ void IndexedDBDatabase::Close(
// This check should only be false in unit tests.
// TODO(jsbell): Assert factory_ || we're executing a unit test.
- if (factory_)
+ if (factory_.get())
factory_->RemoveIDBDatabaseBackend(identifier_);
}
}
diff --git a/content/browser/indexed_db/indexed_db_database_unittest.cc b/content/browser/indexed_db/indexed_db_database_unittest.cc
index 175131a..251b6b0 100644
--- a/content/browser/indexed_db/indexed_db_database_unittest.cc
+++ b/content/browser/indexed_db/indexed_db_database_unittest.cc
@@ -137,7 +137,7 @@ TEST(IndexedDBDatabaseTest, ConnectionLifecycle) {
db->Close(connection2);
EXPECT_TRUE(backing_store->HasOneRef());
- EXPECT_FALSE(db->BackingStore());
+ EXPECT_FALSE(db->BackingStore().get());
db = NULL;
}
diff --git a/content/browser/indexed_db/indexed_db_factory.cc b/content/browser/indexed_db/indexed_db_factory.cc
index 4cbbc9e..374e96c 100644
--- a/content/browser/indexed_db/indexed_db_factory.cc
+++ b/content/browser/indexed_db/indexed_db_factory.cc
@@ -57,7 +57,7 @@ void IndexedDBFactory::GetDatabaseNames(
IDB_TRACE("IndexedDBFactory::get_database_names");
scoped_refptr<IndexedDBBackingStore> backing_store =
OpenBackingStore(database_identifier, data_directory);
- if (!backing_store) {
+ if (!backing_store.get()) {
callbacks->OnError(
IndexedDBDatabaseError(WebKit::WebIDBDatabaseExceptionUnknownError,
"Internal error opening backing store for "
@@ -89,7 +89,7 @@ void IndexedDBFactory::DeleteDatabase(
// TODO(jsbell): Everything from now on should be done on another thread.
scoped_refptr<IndexedDBBackingStore> backing_store =
OpenBackingStore(database_identifier, data_directory);
- if (!backing_store) {
+ if (!backing_store.get()) {
callbacks->OnError(IndexedDBDatabaseError(
WebKit::WebIDBDatabaseExceptionUnknownError,
ASCIIToUTF16("Internal error opening backing store "
@@ -99,7 +99,7 @@ void IndexedDBFactory::DeleteDatabase(
scoped_refptr<IndexedDBDatabase> database_backend = IndexedDBDatabase::Create(
name, backing_store.get(), this, unique_identifier);
- if (!database_backend) {
+ if (!database_backend.get()) {
callbacks->OnError(IndexedDBDatabaseError(
WebKit::WebIDBDatabaseExceptionUnknownError,
ASCIIToUTF16("Internal error creating database backend for "
@@ -131,7 +131,7 @@ scoped_refptr<IndexedDBBackingStore> IndexedDBFactory::OpenBackingStore(
database_identifier, data_directory, file_identifier);
}
- if (backing_store) {
+ if (backing_store.get()) {
CleanWeakMap(&backing_store_map_);
backing_store_map_[file_identifier] = backing_store->GetWeakPtr();
// If an in-memory database, bind lifetime to this factory instance.
@@ -166,7 +166,7 @@ void IndexedDBFactory::Open(
if (it == database_backend_map_.end()) {
scoped_refptr<IndexedDBBackingStore> backing_store =
OpenBackingStore(database_identifier, data_directory);
- if (!backing_store) {
+ if (!backing_store.get()) {
callbacks->OnError(IndexedDBDatabaseError(
WebKit::WebIDBDatabaseExceptionUnknownError,
ASCIIToUTF16(
@@ -176,7 +176,7 @@ void IndexedDBFactory::Open(
database_backend = IndexedDBDatabase::Create(
name, backing_store.get(), this, unique_identifier);
- if (!database_backend) {
+ if (!database_backend.get()) {
callbacks->OnError(IndexedDBDatabaseError(
WebKit::WebIDBDatabaseExceptionUnknownError,
ASCIIToUTF16(
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 141d86b..61fe26b 100644
--- a/content/browser/indexed_db/indexed_db_quota_client_unittest.cc
+++ b/content/browser/indexed_db/indexed_db_quota_client_unittest.cc
@@ -165,7 +165,8 @@ class IndexedDBQuotaClientTest : public testing::Test {
};
TEST_F(IndexedDBQuotaClientTest, GetOriginUsage) {
- IndexedDBQuotaClient client(base::MessageLoopProxy::current(), idb_context());
+ IndexedDBQuotaClient client(base::MessageLoopProxy::current().get(),
+ idb_context());
AddFakeIndexedDB(kOriginA, 6);
AddFakeIndexedDB(kOriginB, 3);
@@ -182,7 +183,8 @@ TEST_F(IndexedDBQuotaClientTest, GetOriginUsage) {
}
TEST_F(IndexedDBQuotaClientTest, GetOriginsForHost) {
- IndexedDBQuotaClient client(base::MessageLoopProxy::current(), idb_context());
+ IndexedDBQuotaClient client(base::MessageLoopProxy::current().get(),
+ idb_context());
EXPECT_EQ(kOriginA.host(), kOriginB.host());
EXPECT_NE(kOriginA.host(), kOriginOther.host());
@@ -206,7 +208,8 @@ TEST_F(IndexedDBQuotaClientTest, GetOriginsForHost) {
}
TEST_F(IndexedDBQuotaClientTest, GetOriginsForType) {
- IndexedDBQuotaClient client(base::MessageLoopProxy::current(), idb_context());
+ IndexedDBQuotaClient client(base::MessageLoopProxy::current().get(),
+ idb_context());
EXPECT_TRUE(GetOriginsForType(&client, kTemp).empty());
EXPECT_TRUE(GetOriginsForType(&client, kPerm).empty());
@@ -220,7 +223,8 @@ TEST_F(IndexedDBQuotaClientTest, GetOriginsForType) {
}
TEST_F(IndexedDBQuotaClientTest, DeleteOrigin) {
- IndexedDBQuotaClient client(base::MessageLoopProxy::current(), idb_context());
+ IndexedDBQuotaClient client(base::MessageLoopProxy::current().get(),
+ idb_context());
AddFakeIndexedDB(kOriginA, 1000);
AddFakeIndexedDB(kOriginB, 50);
diff --git a/content/browser/indexed_db/indexed_db_transaction.cc b/content/browser/indexed_db/indexed_db_transaction.cc
index e78c55d..cb69f04 100644
--- a/content/browser/indexed_db/indexed_db_transaction.cc
+++ b/content/browser/indexed_db/indexed_db_transaction.cc
@@ -160,7 +160,7 @@ void IndexedDBTransaction::Abort(const IndexedDBDatabaseError& error) {
#endif
database_->TransactionFinished(this);
- if (callbacks_)
+ if (callbacks_.get())
callbacks_->OnAbort(id_, error);
database_->TransactionFinishedAndAbortFired(this);
diff --git a/content/browser/indexed_db/webidbdatabase_impl.cc b/content/browser/indexed_db/webidbdatabase_impl.cc
index c74becf..1c7c3ce 100644
--- a/content/browser/indexed_db/webidbdatabase_impl.cc
+++ b/content/browser/indexed_db/webidbdatabase_impl.cc
@@ -53,7 +53,7 @@ void WebIDBDatabaseImpl::createTransaction(
IndexedDBDatabaseCallbacks* /*callbacks*/,
const std::vector<int64>& object_store_ids,
unsigned short mode) {
- if (!database_callbacks_)
+ if (!database_callbacks_.get())
return;
database_backend_->CreateTransaction(
id, database_callbacks_.get(), object_store_ids, mode);
@@ -62,14 +62,14 @@ void WebIDBDatabaseImpl::createTransaction(
void WebIDBDatabaseImpl::close() {
// Use the callbacks passed in to the constructor so that the backend in
// multi-process chromium knows which database connection is closing.
- if (!database_callbacks_)
+ if (!database_callbacks_.get())
return;
database_backend_->Close(database_callbacks_);
database_callbacks_ = NULL;
}
void WebIDBDatabaseImpl::forceClose() {
- if (!database_callbacks_)
+ if (!database_callbacks_.get())
return;
database_backend_->Close(database_callbacks_);
database_callbacks_->OnForcedClose();
@@ -77,18 +77,18 @@ void WebIDBDatabaseImpl::forceClose() {
}
void WebIDBDatabaseImpl::abort(long long transaction_id) {
- if (database_backend_)
+ if (database_backend_.get())
database_backend_->Abort(transaction_id);
}
void WebIDBDatabaseImpl::abort(long long transaction_id,
const WebIDBDatabaseError& error) {
- if (database_backend_)
+ if (database_backend_.get())
database_backend_->Abort(transaction_id, IndexedDBDatabaseError(error));
}
void WebIDBDatabaseImpl::commit(long long transaction_id) {
- if (database_backend_)
+ if (database_backend_.get())
database_backend_->Commit(transaction_id);
}
@@ -100,7 +100,7 @@ void WebIDBDatabaseImpl::openCursor(long long transaction_id,
bool key_only,
WebKit::WebIDBDatabase::TaskType task_type,
IndexedDBCallbacksBase* callbacks) {
- if (database_backend_)
+ if (database_backend_.get())
database_backend_->OpenCursor(
transaction_id,
object_store_id,
@@ -117,7 +117,7 @@ void WebIDBDatabaseImpl::count(long long transaction_id,
long long index_id,
const IndexedDBKeyRange& key_range,
IndexedDBCallbacksBase* callbacks) {
- if (database_backend_)
+ if (database_backend_.get())
database_backend_->Count(transaction_id,
object_store_id,
index_id,
@@ -131,7 +131,7 @@ void WebIDBDatabaseImpl::get(long long transaction_id,
const IndexedDBKeyRange& key_range,
bool key_only,
IndexedDBCallbacksBase* callbacks) {
- if (database_backend_)
+ if (database_backend_.get())
database_backend_->Get(transaction_id,
object_store_id,
index_id,
@@ -148,7 +148,7 @@ void WebIDBDatabaseImpl::put(long long transaction_id,
IndexedDBCallbacksBase* callbacks,
const std::vector<int64>& index_ids,
const std::vector<IndexKeys>& index_keys) {
- if (!database_backend_)
+ if (!database_backend_.get())
return;
DCHECK_EQ(index_ids.size(), index_keys.size());
@@ -169,7 +169,7 @@ void WebIDBDatabaseImpl::setIndexKeys(
const IndexedDBKey& primary_key,
const std::vector<int64>& index_ids,
const std::vector<IndexKeys>& index_keys) {
- if (!database_backend_)
+ if (!database_backend_.get())
return;
DCHECK_EQ(index_ids.size(), index_keys.size());
@@ -185,7 +185,7 @@ void WebIDBDatabaseImpl::setIndexesReady(
long long transaction_id,
long long object_store_id,
const std::vector<int64>& web_index_ids) {
- if (!database_backend_)
+ if (!database_backend_.get())
return;
std::vector<int64> index_ids(web_index_ids.size());
@@ -199,7 +199,7 @@ void WebIDBDatabaseImpl::deleteRange(long long transaction_id,
long long object_store_id,
const IndexedDBKeyRange& key_range,
IndexedDBCallbacksBase* callbacks) {
- if (database_backend_)
+ if (database_backend_.get())
database_backend_->DeleteRange(
transaction_id,
object_store_id,
@@ -210,7 +210,7 @@ void WebIDBDatabaseImpl::deleteRange(long long transaction_id,
void WebIDBDatabaseImpl::clear(long long transaction_id,
long long object_store_id,
IndexedDBCallbacksBase* callbacks) {
- if (database_backend_)
+ if (database_backend_.get())
database_backend_->Clear(transaction_id,
object_store_id,
IndexedDBCallbacksWrapper::Create(callbacks));
@@ -223,7 +223,7 @@ void WebIDBDatabaseImpl::createIndex(long long transaction_id,
const IndexedDBKeyPath& key_path,
bool unique,
bool multi_entry) {
- if (database_backend_)
+ if (database_backend_.get())
database_backend_->CreateIndex(transaction_id,
object_store_id,
index_id,
@@ -236,7 +236,7 @@ void WebIDBDatabaseImpl::createIndex(long long transaction_id,
void WebIDBDatabaseImpl::deleteIndex(long long transaction_id,
long long object_store_id,
long long index_id) {
- if (database_backend_)
+ if (database_backend_.get())
database_backend_->DeleteIndex(transaction_id, object_store_id, index_id);
}
diff --git a/content/browser/loader/redirect_to_file_resource_handler.cc b/content/browser/loader/redirect_to_file_resource_handler.cc
index 02be739..9d996dc 100644
--- a/content/browser/loader/redirect_to_file_resource_handler.cc
+++ b/content/browser/loader/redirect_to_file_resource_handler.cc
@@ -95,7 +95,7 @@ bool RedirectToFileResourceHandler::OnWillStart(int request_id,
// network request like this.
did_defer_ = *defer = true;
base::FileUtilProxy::CreateTemporary(
- BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE),
+ BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE).get(),
base::PLATFORM_FILE_ASYNC,
base::Bind(&RedirectToFileResourceHandler::DidCreateTemporaryFile,
weak_factory_.GetWeakPtr()));
@@ -165,12 +165,13 @@ void RedirectToFileResourceHandler::DidCreateTemporaryFile(
base::PassPlatformFile file_handle,
const base::FilePath& file_path) {
deletable_file_ = ShareableFileReference::GetOrCreate(
- file_path, ShareableFileReference::DELETE_ON_FINAL_RELEASE,
- BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE));
- file_stream_.reset(new net::FileStream(file_handle.ReleaseValue(),
- base::PLATFORM_FILE_WRITE |
- base::PLATFORM_FILE_ASYNC,
- NULL));
+ file_path,
+ ShareableFileReference::DELETE_ON_FINAL_RELEASE,
+ BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE).get());
+ file_stream_.reset(
+ new net::FileStream(file_handle.ReleaseValue(),
+ base::PLATFORM_FILE_WRITE | base::PLATFORM_FILE_ASYNC,
+ NULL));
host_->RegisterDownloadedTempFile(
process_id_, request_id_, deletable_file_.get());
ResumeIfDeferred();
diff --git a/content/browser/loader/resource_dispatcher_host_impl.cc b/content/browser/loader/resource_dispatcher_host_impl.cc
index 328042f..10d3663 100644
--- a/content/browser/loader/resource_dispatcher_host_impl.cc
+++ b/content/browser/loader/resource_dispatcher_host_impl.cc
@@ -1022,7 +1022,8 @@ void ResourceDispatcherHostImpl::BeginRequest(
request_data.request_body->ResolveElementsAndCreateUploadDataStream(
filter_->blob_storage_context()->controller(),
filter_->file_system_context(),
- BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE))));
+ BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE)
+ .get())));
}
bool allow_download = request_data.allow_download &&
diff --git a/content/browser/plugin_loader_posix.cc b/content/browser/plugin_loader_posix.cc
index 473e262..56a6839 100644
--- a/content/browser/plugin_loader_posix.cc
+++ b/content/browser/plugin_loader_posix.cc
@@ -104,7 +104,7 @@ void PluginLoaderPosix::LoadPluginsInternal() {
UtilityProcessHostImpl* host = new UtilityProcessHostImpl(
this,
- BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO));
+ BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO).get());
process_host_ = host->AsWeakPtr();
process_host_->DisableSandbox();
#if defined(OS_MACOSX)
diff --git a/content/browser/ppapi_plugin_process_host.cc b/content/browser/ppapi_plugin_process_host.cc
index 526180d..73de9c1 100644
--- a/content/browser/ppapi_plugin_process_host.cc
+++ b/content/browser/ppapi_plugin_process_host.cc
@@ -222,7 +222,7 @@ PpapiPluginProcessHost::PpapiPluginProcessHost(
false));
process_->GetHost()->AddFilter(filter_.get());
- process_->GetHost()->AddFilter(host_impl_->message_filter());
+ process_->GetHost()->AddFilter(host_impl_->message_filter().get());
GetContentClient()->browser()->DidCreatePpapiPlugin(host_impl_.get());
diff --git a/content/browser/renderer_host/media/audio_input_device_manager_unittest.cc b/content/browser/renderer_host/media/audio_input_device_manager_unittest.cc
index decc71a..5b4aa55 100644
--- a/content/browser/renderer_host/media/audio_input_device_manager_unittest.cc
+++ b/content/browser/renderer_host/media/audio_input_device_manager_unittest.cc
@@ -59,7 +59,7 @@ class AudioInputDeviceManagerTest : public testing::Test {
manager_ = new AudioInputDeviceManager(audio_manager_.get());
audio_input_listener_.reset(new MockAudioInputDeviceManagerListener());
manager_->Register(audio_input_listener_.get(),
- message_loop_->message_loop_proxy());
+ message_loop_->message_loop_proxy().get());
// Gets the enumerated device list from the AudioInputDeviceManager.
manager_->EnumerateDevices(MEDIA_DEVICE_AUDIO_CAPTURE);
diff --git a/content/browser/renderer_host/media/audio_renderer_host_unittest.cc b/content/browser/renderer_host/media/audio_renderer_host_unittest.cc
index 7847981..537b73b 100644
--- a/content/browser/renderer_host/media/audio_renderer_host_unittest.cc
+++ b/content/browser/renderer_host/media/audio_renderer_host_unittest.cc
@@ -245,7 +245,7 @@ class AudioRendererHostTest : public testing::Test {
void CreateUnifiedStream() {
EXPECT_CALL(*observer_,
OnSetAudioStreamStatus(_, kStreamId, "created"));
- EXPECT_CALL(*host_, OnStreamCreated(kStreamId, _))
+ EXPECT_CALL(*host_.get(), OnStreamCreated(kStreamId, _))
.WillOnce(QuitMessageLoop(message_loop_.get()));
EXPECT_CALL(mirroring_manager_,
AddDiverter(kRenderProcessId, kRenderViewId, NotNull()))
diff --git a/content/browser/renderer_host/media/media_stream_manager.cc b/content/browser/renderer_host/media/media_stream_manager.cc
index 2a52423..14095ac 100644
--- a/content/browser/renderer_host/media/media_stream_manager.cc
+++ b/content/browser/renderer_host/media/media_stream_manager.cc
@@ -592,11 +592,12 @@ void MediaStreamManager::InitializeDeviceManagersOnIOThread() {
CHECK(device_thread_->Start());
audio_input_device_manager_ = new AudioInputDeviceManager(audio_manager_);
- audio_input_device_manager_->Register(this,
- device_thread_->message_loop_proxy());
+ audio_input_device_manager_->Register(
+ this, device_thread_->message_loop_proxy().get());
video_capture_manager_ = new VideoCaptureManager();
- video_capture_manager_->Register(this, device_thread_->message_loop_proxy());
+ video_capture_manager_->Register(this,
+ device_thread_->message_loop_proxy().get());
// We want to be notified of IO message loop destruction to delete the thread
// and the device managers.
diff --git a/content/browser/renderer_host/media/video_capture_manager_unittest.cc b/content/browser/renderer_host/media/video_capture_manager_unittest.cc
index a5890b1..54b9c30 100644
--- a/content/browser/renderer_host/media/video_capture_manager_unittest.cc
+++ b/content/browser/renderer_host/media/video_capture_manager_unittest.cc
@@ -75,7 +75,7 @@ class VideoCaptureManagerTest : public testing::Test {
message_loop_.get()));
vcm_ = new VideoCaptureManager();
vcm_->UseFakeDevice();
- vcm_->Register(listener_.get(), message_loop_->message_loop_proxy());
+ vcm_->Register(listener_.get(), message_loop_->message_loop_proxy().get());
frame_observer_.reset(new MockFrameObserver());
}
diff --git a/content/browser/renderer_host/pepper/browser_ppapi_host_impl.cc b/content/browser/renderer_host/pepper/browser_ppapi_host_impl.cc
index 4fcbcf2..ff6b93d 100644
--- a/content/browser/renderer_host/pepper/browser_ppapi_host_impl.cc
+++ b/content/browser/renderer_host/pepper/browser_ppapi_host_impl.cc
@@ -37,7 +37,7 @@ BrowserPpapiHost* BrowserPpapiHost::CreateExternalPluginProcess(
host_resolver,
render_process_id,
render_view_id));
- channel->AddFilter(browser_ppapi_host->message_filter());
+ channel->AddFilter(browser_ppapi_host->message_filter().get());
channel->AddFilter(new TraceMessageFilter());
return browser_ppapi_host;
diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc
index 132494c..2eb4653 100644
--- a/content/browser/renderer_host/render_process_host_impl.cc
+++ b/content/browser/renderer_host/render_process_host_impl.cc
@@ -488,15 +488,21 @@ bool RenderProcessHostImpl::Init() {
#if defined(OS_ANDROID)
// Android WebView needs to be able to wait from the UI thread to support
// the synchronous legacy APIs.
- browser_command_line.HasSwitch(switches::kEnableWebViewSynchronousAPIs) ?
- new IPC::SyncChannel(
- channel_id, IPC::Channel::MODE_SERVER, this,
- BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO),
- true, &dummy_shutdown_event_) :
+ browser_command_line.HasSwitch(switches::kEnableWebViewSynchronousAPIs)
+ ? new IPC::SyncChannel(
+ channel_id,
+ IPC::Channel::MODE_SERVER,
+ this,
+ BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO),
+ true,
+ &dummy_shutdown_event_)
+ :
#endif
- new IPC::ChannelProxy(
- channel_id, IPC::Channel::MODE_SERVER, this,
- BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO)));
+ new IPC::ChannelProxy(channel_id,
+ IPC::Channel::MODE_SERVER,
+ this,
+ BrowserThread::GetMessageLoopProxyForThread(
+ BrowserThread::IO).get()));
// Call the embedder first so that their IPC filters have priority.
GetContentClient()->browser()->RenderProcessHostCreated(this);
diff --git a/content/browser/speech/speech_recognition_manager_impl.cc b/content/browser/speech/speech_recognition_manager_impl.cc
index 33cf503..03b663c 100644
--- a/content/browser/speech/speech_recognition_manager_impl.cc
+++ b/content/browser/speech/speech_recognition_manager_impl.cc
@@ -592,7 +592,7 @@ void SpeechRecognitionManagerImpl::ResetCapturingSessionId(
}
void SpeechRecognitionManagerImpl::SessionDelete(Session* session) {
- DCHECK(session->recognizer == NULL || !session->recognizer->IsActive());
+ DCHECK(session->recognizer.get() == NULL || !session->recognizer->IsActive());
if (primary_session_id_ == session->id)
primary_session_id_ = kSessionIDInvalid;
sessions_.erase(session->id);
diff --git a/content/browser/speech/speech_recognizer_impl_unittest.cc b/content/browser/speech/speech_recognizer_impl_unittest.cc
index 8c7c2d7..04a4724 100644
--- a/content/browser/speech/speech_recognizer_impl_unittest.cc
+++ b/content/browser/speech/speech_recognizer_impl_unittest.cc
@@ -57,7 +57,7 @@ class SpeechRecognizerImplTest : public SpeechRecognitionEventListener,
recognizer_ = new SpeechRecognizerImpl(
this, kTestingSessionId, kOneShotMode, sr_engine);
audio_manager_.reset(new media::MockAudioManager(
- base::MessageLoop::current()->message_loop_proxy()));
+ base::MessageLoop::current()->message_loop_proxy().get()));
recognizer_->SetAudioManagerForTests(audio_manager_.get());
int audio_packet_length_bytes =
diff --git a/content/browser/storage_partition_impl.cc b/content/browser/storage_partition_impl.cc
index 3039b98..e32fc72 100644
--- a/content/browser/storage_partition_impl.cc
+++ b/content/browser/storage_partition_impl.cc
@@ -196,12 +196,12 @@ StoragePartitionImpl* StoragePartitionImpl::Create(
// QuotaManager prior to the QuotaManger being used. We do them
// all together here prior to handing out a reference to anything
// that utilizes the QuotaManager.
- scoped_refptr<quota::QuotaManager> quota_manager =
- new quota::QuotaManager(
- in_memory, partition_path,
- BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO),
- BrowserThread::GetMessageLoopProxyForThread(BrowserThread::DB),
- context->GetSpecialStoragePolicy());
+ scoped_refptr<quota::QuotaManager> quota_manager = new quota::QuotaManager(
+ in_memory,
+ partition_path,
+ BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO).get(),
+ BrowserThread::GetMessageLoopProxyForThread(BrowserThread::DB).get(),
+ context->GetSpecialStoragePolicy());
// Each consumer is responsible for registering its QuotaClient during
// its construction.
@@ -213,19 +213,23 @@ StoragePartitionImpl* StoragePartitionImpl::Create(
scoped_refptr<webkit_database::DatabaseTracker> database_tracker =
new webkit_database::DatabaseTracker(
- partition_path, in_memory,
- context->GetSpecialStoragePolicy(), quota_manager->proxy(),
- BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE));
+ partition_path,
+ in_memory,
+ context->GetSpecialStoragePolicy(),
+ quota_manager->proxy(),
+ BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE)
+ .get());
base::FilePath path = in_memory ? base::FilePath() : partition_path;
scoped_refptr<DOMStorageContextImpl> dom_storage_context =
new DOMStorageContextImpl(path, context->GetSpecialStoragePolicy());
scoped_refptr<IndexedDBContextImpl> indexed_db_context =
- new IndexedDBContextImpl(path, context->GetSpecialStoragePolicy(),
+ new IndexedDBContextImpl(path,
+ context->GetSpecialStoragePolicy(),
quota_manager->proxy(),
BrowserThread::GetMessageLoopProxyForThread(
- BrowserThread::WEBKIT_DEPRECATED));
+ BrowserThread::WEBKIT_DEPRECATED).get());
scoped_refptr<ChromeAppCacheService> appcache_service =
new ChromeAppCacheService(quota_manager->proxy());
diff --git a/content/browser/storage_partition_impl_map.cc b/content/browser/storage_partition_impl_map.cc
index 8987692..a8b41cc 100644
--- a/content/browser/storage_partition_impl_map.cc
+++ b/content/browser/storage_partition_impl_map.cc
@@ -82,9 +82,10 @@ class BlobProtocolHandler : public net::URLRequestJobFactory::ProtocolHandler {
StreamContext* stream_context,
fileapi::FileSystemContext* file_system_context)
: webkit_blob::BlobProtocolHandler(
- blob_storage_controller, file_system_context,
- BrowserThread::GetMessageLoopProxyForThread(
- BrowserThread::FILE)),
+ blob_storage_controller,
+ file_system_context,
+ BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE)
+ .get()),
stream_context_(stream_context) {}
virtual ~WebKitBlobProtocolHandlerImpl() {}
diff --git a/content/browser/streams/stream_handle_impl.cc b/content/browser/streams/stream_handle_impl.cc
index 11f6959..d9f877c 100644
--- a/content/browser/streams/stream_handle_impl.cc
+++ b/content/browser/streams/stream_handle_impl.cc
@@ -16,8 +16,7 @@ StreamHandleImpl::StreamHandleImpl(const base::WeakPtr<Stream>& stream,
url_(stream->url()),
original_url_(original_url),
mime_type_(mime_type),
- stream_message_loop_(base::MessageLoopProxy::current()) {
-}
+ stream_message_loop_(base::MessageLoopProxy::current().get()) {}
StreamHandleImpl::~StreamHandleImpl() {
stream_message_loop_->PostTask(FROM_HERE,
diff --git a/content/browser/web_contents/navigation_controller_impl_unittest.cc b/content/browser/web_contents/navigation_controller_impl_unittest.cc
index 8116fab8..736d983 100644
--- a/content/browser/web_contents/navigation_controller_impl_unittest.cc
+++ b/content/browser/web_contents/navigation_controller_impl_unittest.cc
@@ -3593,7 +3593,7 @@ TEST_F(NavigationControllerTest, MAYBE_PurgeScreenshot) {
entry = NavigationEntryImpl::FromNavigationEntry(
controller.GetEntryAtIndex(i));
screenshot_manager->TakeScreenshotFor(entry);
- EXPECT_TRUE(entry->screenshot());
+ EXPECT_TRUE(entry->screenshot().get());
}
NavigateAndCommit(GURL("https://foo/"));
@@ -3605,13 +3605,14 @@ TEST_F(NavigationControllerTest, MAYBE_PurgeScreenshot) {
for (int i = 0; i < 2; ++i) {
entry = NavigationEntryImpl::FromNavigationEntry(
controller.GetEntryAtIndex(i));
- EXPECT_FALSE(entry->screenshot()) << "Screenshot " << i << " not purged";
+ EXPECT_FALSE(entry->screenshot().get()) << "Screenshot " << i
+ << " not purged";
}
for (int i = 2; i < controller.GetEntryCount() - 1; ++i) {
entry = NavigationEntryImpl::FromNavigationEntry(
controller.GetEntryAtIndex(i));
- EXPECT_TRUE(entry->screenshot()) << "Screenshot not found for " << i;
+ EXPECT_TRUE(entry->screenshot().get()) << "Screenshot not found for " << i;
}
// Navigate to index 5 and then try to assign screenshot to all entries.
@@ -3627,7 +3628,8 @@ TEST_F(NavigationControllerTest, MAYBE_PurgeScreenshot) {
for (int i = 10; i <= 12; ++i) {
entry = NavigationEntryImpl::FromNavigationEntry(
controller.GetEntryAtIndex(i));
- EXPECT_FALSE(entry->screenshot()) << "Screenshot " << i << " not purged";
+ EXPECT_FALSE(entry->screenshot().get()) << "Screenshot " << i
+ << " not purged";
screenshot_manager->TakeScreenshotFor(entry);
}
@@ -3644,7 +3646,8 @@ TEST_F(NavigationControllerTest, MAYBE_PurgeScreenshot) {
for (int i = 0; i < 2; ++i) {
entry = NavigationEntryImpl::FromNavigationEntry(
controller.GetEntryAtIndex(i));
- EXPECT_FALSE(entry->screenshot()) << "Screenshot " << i << " not purged";
+ EXPECT_FALSE(entry->screenshot().get()) << "Screenshot " << i
+ << " not purged";
}
// Clear all screenshots.
@@ -3655,7 +3658,8 @@ TEST_F(NavigationControllerTest, MAYBE_PurgeScreenshot) {
for (int i = 0; i < controller.GetEntryCount(); ++i) {
entry = NavigationEntryImpl::FromNavigationEntry(
controller.GetEntryAtIndex(i));
- EXPECT_FALSE(entry->screenshot()) << "Screenshot " << i << " not cleared";
+ EXPECT_FALSE(entry->screenshot().get()) << "Screenshot " << i
+ << " not cleared";
}
}
diff --git a/content/browser/web_contents/web_contents_screenshot_manager.cc b/content/browser/web_contents/web_contents_screenshot_manager.cc
index 49cb0c6..b2eeb46 100644
--- a/content/browser/web_contents/web_contents_screenshot_manager.cc
+++ b/content/browser/web_contents/web_contents_screenshot_manager.cc
@@ -168,7 +168,7 @@ int WebContentsScreenshotManager::GetScreenshotCount() const {
for (int i = 0; i < entry_count; ++i) {
NavigationEntryImpl* entry =
NavigationEntryImpl::FromNavigationEntry(owner_->GetEntryAtIndex(i));
- if (entry->screenshot())
+ if (entry->screenshot().get())
screenshot_count++;
}
return screenshot_count;
@@ -197,7 +197,7 @@ void WebContentsScreenshotManager::OnScreenshotSet(NavigationEntryImpl* entry) {
}
bool WebContentsScreenshotManager::ClearScreenshot(NavigationEntryImpl* entry) {
- if (!entry->screenshot())
+ if (!entry->screenshot().get())
return false;
entry->SetScreenshotPNGData(NULL);
@@ -214,8 +214,8 @@ void WebContentsScreenshotManager::PurgeScreenshotsIfNecessary() {
const int current = owner_->GetCurrentEntryIndex();
const int num_entries = owner_->GetEntryCount();
int available_slots = kMaxScreenshots;
- if (NavigationEntryImpl::FromNavigationEntry(
- owner_->GetEntryAtIndex(current))->screenshot()) {
+ if (NavigationEntryImpl::FromNavigationEntry(owner_->GetEntryAtIndex(current))
+ ->screenshot().get()) {
--available_slots;
}
@@ -234,7 +234,7 @@ void WebContentsScreenshotManager::PurgeScreenshotsIfNecessary() {
if (back >= 0) {
NavigationEntryImpl* entry = NavigationEntryImpl::FromNavigationEntry(
owner_->GetEntryAtIndex(back));
- if (entry->screenshot())
+ if (entry->screenshot().get())
--available_slots;
--back;
}
@@ -242,7 +242,7 @@ void WebContentsScreenshotManager::PurgeScreenshotsIfNecessary() {
if (available_slots > 0 && forward < num_entries) {
NavigationEntryImpl* entry = NavigationEntryImpl::FromNavigationEntry(
owner_->GetEntryAtIndex(forward));
- if (entry->screenshot())
+ if (entry->screenshot().get())
--available_slots;
++forward;
}
diff --git a/content/child/child_process.h b/content/child/child_process.h
index fca4585d2..4837c3c 100644
--- a/content/child/child_process.h
+++ b/content/child/child_process.h
@@ -32,7 +32,7 @@ class CONTENT_EXPORT ChildProcess {
base::MessageLoop* io_message_loop() { return io_thread_.message_loop(); }
base::MessageLoopProxy* io_message_loop_proxy() {
- return io_thread_.message_loop_proxy();
+ return io_thread_.message_loop_proxy().get();
}
// A global event object that is signalled when the main thread's message
diff --git a/content/child/child_thread.cc b/content/child/child_thread.cc
index 08d14b6..a0981d9 100644
--- a/content/child/child_thread.cc
+++ b/content/child/child_thread.cc
@@ -116,8 +116,8 @@ void ChildThread::Init() {
sync_message_filter_ =
new IPC::SyncMessageFilter(ChildProcess::current()->GetShutDownEvent());
- thread_safe_sender_ = new ThreadSafeSender(base::MessageLoopProxy::current(),
- sync_message_filter_.get());
+ thread_safe_sender_ = new ThreadSafeSender(
+ base::MessageLoopProxy::current().get(), sync_message_filter_.get());
histogram_message_filter_ = new ChildHistogramMessageFilter();
resource_message_filter_ =
new ChildResourceMessageFilter(resource_dispatcher());
diff --git a/content/common/gpu/client/gpu_channel_host.cc b/content/common/gpu/client/gpu_channel_host.cc
index 1a350a9..1d83372 100644
--- a/content/common/gpu/client/gpu_channel_host.cc
+++ b/content/common/gpu/client/gpu_channel_host.cc
@@ -237,7 +237,7 @@ bool GpuChannelHost::CollectRenderingStatsForSurface(
void GpuChannelHost::AddRoute(
int route_id, base::WeakPtr<IPC::Listener> listener) {
- DCHECK(MessageLoopProxy::current());
+ DCHECK(MessageLoopProxy::current().get());
scoped_refptr<base::MessageLoopProxy> io_loop = factory_->GetIOLoopProxy();
io_loop->PostTask(FROM_HERE,
diff --git a/content/renderer/gpu/input_event_filter.cc b/content/renderer/gpu/input_event_filter.cc
index 0d06a1f..f0766bf 100644
--- a/content/renderer/gpu/input_event_filter.cc
+++ b/content/renderer/gpu/input_event_filter.cc
@@ -20,7 +20,7 @@ InputEventFilter::InputEventFilter(
main_listener_(main_listener),
sender_(NULL),
target_loop_(target_loop) {
- DCHECK(target_loop_);
+ DCHECK(target_loop_.get());
}
void InputEventFilter::SetBoundHandler(const Handler& handler) {
diff --git a/content/renderer/media/media_stream_dependency_factory.cc b/content/renderer/media/media_stream_dependency_factory.cc
index 47d5b6b..f9b10fb 100644
--- a/content/renderer/media/media_stream_dependency_factory.cc
+++ b/content/renderer/media/media_stream_dependency_factory.cc
@@ -282,7 +282,7 @@ void MediaStreamDependencyFactory::CreateNativeMediaSources(
source_data->SetVideoSource(
CreateLocalVideoSource(source_data->device_info().session_id,
is_screencast,
- &native_video_constraints));
+ &native_video_constraints).get());
source_observer->AddSource(source_data->video_source());
}
@@ -320,7 +320,7 @@ void MediaStreamDependencyFactory::CreateNativeMediaSources(
// Creates a LocalAudioSource object which holds audio options.
source_data->SetLocalAudioSource(
- CreateLocalAudioSource(&native_audio_constraints));
+ CreateLocalAudioSource(&native_audio_constraints).get());
source_observer->AddSource(source_data->local_audio_source());
}
@@ -622,7 +622,7 @@ bool MediaStreamDependencyFactory::CreateWebAudioSource(
// third_party/Libjingle.
WebAudioConstraints webaudio_audio_constraints_all_false;
source_data->SetLocalAudioSource(
- CreateLocalAudioSource(&webaudio_audio_constraints_all_false));
+ CreateLocalAudioSource(&webaudio_audio_constraints_all_false).get());
source->setExtraData(source_data);
// Replace the default source with WebAudio as source instead.
diff --git a/content/renderer/media/rtc_peer_connection_handler.cc b/content/renderer/media/rtc_peer_connection_handler.cc
index 4b710a3..a213f6c2 100644
--- a/content/renderer/media/rtc_peer_connection_handler.cc
+++ b/content/renderer/media/rtc_peer_connection_handler.cc
@@ -229,7 +229,7 @@ class SetSessionDescriptionRequest
class StatsResponse : public webrtc::StatsObserver {
public:
explicit StatsResponse(const scoped_refptr<LocalRTCStatsRequest>& request)
- : request_(request.get()), response_(request_->createResponse()) {}
+ : request_(request.get()), response_(request_->createResponse().get()) {}
virtual void OnComplete(
const std::vector<webrtc::StatsReport>& reports) OVERRIDE {
diff --git a/content/renderer/pepper/pepper_file_io_host.cc b/content/renderer/pepper/pepper_file_io_host.cc
index f6adcd4..37a4ac9 100644
--- a/content/renderer/pepper/pepper_file_io_host.cc
+++ b/content/renderer/pepper/pepper_file_io_host.cc
@@ -171,7 +171,8 @@ int32_t PepperFileIOHost::OnHostMsgQuery(
return PP_ERROR_FAILED;
if (!base::FileUtilProxy::GetFileInfoFromPlatformFile(
- plugin_delegate_->GetFileThreadMessageLoopProxy(), file_,
+ plugin_delegate_->GetFileThreadMessageLoopProxy().get(),
+ file_,
base::Bind(&PepperFileIOHost::ExecutePlatformQueryCallback,
weak_factory_.GetWeakPtr(),
context->MakeReplyMessageContext())))
@@ -209,8 +210,9 @@ int32_t PepperFileIOHost::OnHostMsgTouch(
// TODO(nhiroki): fix a failure of FileIO.Touch for an external filesystem on
// Mac and Linux due to sandbox restrictions (http://crbug.com/101128).
if (!base::FileUtilProxy::Touch(
- plugin_delegate_->GetFileThreadMessageLoopProxy(),
- file_, PPTimeToTime(last_access_time),
+ plugin_delegate_->GetFileThreadMessageLoopProxy().get(),
+ file_,
+ PPTimeToTime(last_access_time),
PPTimeToTime(last_modified_time),
base::Bind(&PepperFileIOHost::ExecutePlatformGeneralCallback,
weak_factory_.GetWeakPtr(),
@@ -244,7 +246,9 @@ int32_t PepperFileIOHost::OnHostMsgRead(
return PP_ERROR_FAILED;
if (!base::FileUtilProxy::Read(
- plugin_delegate_->GetFileThreadMessageLoopProxy(), file_, offset,
+ plugin_delegate_->GetFileThreadMessageLoopProxy().get(),
+ file_,
+ offset,
max_read_length,
base::Bind(&PepperFileIOHost::ExecutePlatformReadCallback,
weak_factory_.GetWeakPtr(),
@@ -276,8 +280,11 @@ int32_t PepperFileIOHost::OnHostMsgWrite(
return PP_ERROR_FAILED;
if (!base::FileUtilProxy::Write(
- plugin_delegate_->GetFileThreadMessageLoopProxy(), file_, offset,
- buffer.c_str(), buffer.size(),
+ plugin_delegate_->GetFileThreadMessageLoopProxy().get(),
+ file_,
+ offset,
+ buffer.c_str(),
+ buffer.size(),
base::Bind(&PepperFileIOHost::ExecutePlatformWriteCallback,
weak_factory_.GetWeakPtr(),
context->MakeReplyMessageContext())))
@@ -310,7 +317,9 @@ int32_t PepperFileIOHost::OnHostMsgSetLength(
// TODO(nhiroki): fix a failure of FileIO.SetLength for an external
// filesystem on Mac due to sandbox restrictions (http://crbug.com/156077).
if (!base::FileUtilProxy::Truncate(
- plugin_delegate_->GetFileThreadMessageLoopProxy(), file_, length,
+ plugin_delegate_->GetFileThreadMessageLoopProxy().get(),
+ file_,
+ length,
base::Bind(&PepperFileIOHost::ExecutePlatformGeneralCallback,
weak_factory_.GetWeakPtr(),
context->MakeReplyMessageContext())))
@@ -332,7 +341,8 @@ int32_t PepperFileIOHost::OnHostMsgFlush(
return PP_ERROR_FAILED;
if (!base::FileUtilProxy::Flush(
- plugin_delegate_->GetFileThreadMessageLoopProxy(), file_,
+ plugin_delegate_->GetFileThreadMessageLoopProxy().get(),
+ file_,
base::Bind(&PepperFileIOHost::ExecutePlatformGeneralCallback,
weak_factory_.GetWeakPtr(),
context->MakeReplyMessageContext())))
@@ -346,7 +356,7 @@ int32_t PepperFileIOHost::OnHostMsgClose(
ppapi::host::HostMessageContext* context) {
if (file_ != base::kInvalidPlatformFileValue && plugin_delegate_) {
base::FileUtilProxy::Close(
- plugin_delegate_->GetFileThreadMessageLoopProxy(),
+ plugin_delegate_->GetFileThreadMessageLoopProxy().get(),
file_,
base::ResetAndReturn(&notify_close_file_callback_));
file_ = base::kInvalidPlatformFileValue;
diff --git a/content/renderer/pepper/pepper_platform_audio_input_impl.cc b/content/renderer/pepper/pepper_platform_audio_input_impl.cc
index 9f46ae9..3d95888 100644
--- a/content/renderer/pepper/pepper_platform_audio_input_impl.cc
+++ b/content/renderer/pepper/pepper_platform_audio_input_impl.cc
@@ -82,7 +82,8 @@ void PepperPlatformAudioInputImpl::OnStreamCreated(
// TODO(yzshen): Make use of circular buffer scheme. crbug.com/181449.
DCHECK_EQ(1, total_segments);
- if (base::MessageLoopProxy::current() != main_message_loop_proxy_.get()) {
+ if (base::MessageLoopProxy::current().get() !=
+ main_message_loop_proxy_.get()) {
// If shutdown has occurred, |client_| will be NULL and the handles will be
// cleaned up on the main thread.
main_message_loop_proxy_->PostTask(
diff --git a/content/renderer/pepper/pepper_platform_audio_output_impl.cc b/content/renderer/pepper/pepper_platform_audio_output_impl.cc
index 277fb18..7c93982 100644
--- a/content/renderer/pepper/pepper_platform_audio_output_impl.cc
+++ b/content/renderer/pepper/pepper_platform_audio_output_impl.cc
@@ -82,7 +82,7 @@ void PepperPlatformAudioOutputImpl::OnStreamCreated(
#endif
DCHECK(length);
- if (base::MessageLoopProxy::current() == main_message_loop_proxy_) {
+ if (base::MessageLoopProxy::current().get() == main_message_loop_proxy_) {
// Must dereference the client only on the main thread. Shutdown may have
// occurred while the request was in-flight, so we need to NULL check.
if (client_)
@@ -107,8 +107,7 @@ PepperPlatformAudioOutputImpl::~PepperPlatformAudioOutputImpl() {
PepperPlatformAudioOutputImpl::PepperPlatformAudioOutputImpl()
: client_(NULL),
- main_message_loop_proxy_(base::MessageLoopProxy::current()) {
-}
+ main_message_loop_proxy_(base::MessageLoopProxy::current().get()) {}
bool PepperPlatformAudioOutputImpl::Initialize(
int sample_rate,
diff --git a/content/renderer/pepper/pepper_plugin_delegate_impl.cc b/content/renderer/pepper/pepper_plugin_delegate_impl.cc
index 4a0be19..92a7b2c 100644
--- a/content/renderer/pepper/pepper_plugin_delegate_impl.cc
+++ b/content/renderer/pepper/pepper_plugin_delegate_impl.cc
@@ -286,7 +286,8 @@ void DidOpenFileSystemURL(
// Make sure we won't leak file handle if the requester has died.
if (file != base::kInvalidPlatformFileValue) {
base::FileUtilProxy::Close(
- RenderThreadImpl::current()->GetFileThreadMessageLoopProxy(), file,
+ RenderThreadImpl::current()->GetFileThreadMessageLoopProxy().get(),
+ file,
base::Bind(&DoNotifyCloseFile, file_open_id));
}
}
@@ -965,7 +966,8 @@ void PepperPluginDelegateImpl::OnAsyncFileOpened(
callback->Run(error_code, base::PassPlatformFile(&file));
// Make sure we won't leak file handle if the requester has died.
if (file != base::kInvalidPlatformFileValue)
- base::FileUtilProxy::Close(GetFileThreadMessageLoopProxy(), file,
+ base::FileUtilProxy::Close(GetFileThreadMessageLoopProxy().get(),
+ file,
base::FileUtilProxy::StatusCallback());
delete callback;
}
diff --git a/content/renderer/render_thread_impl.cc b/content/renderer/render_thread_impl.cc
index 006aba3..0123a0a 100644
--- a/content/renderer/render_thread_impl.cc
+++ b/content/renderer/render_thread_impl.cc
@@ -376,7 +376,8 @@ void RenderThreadImpl::Init() {
peer_connection_tracker_.reset(new PeerConnectionTracker());
AddObserver(peer_connection_tracker_.get());
- p2p_socket_dispatcher_ = new P2PSocketDispatcher(GetIOMessageLoopProxy());
+ p2p_socket_dispatcher_ =
+ new P2PSocketDispatcher(GetIOMessageLoopProxy().get());
AddFilter(p2p_socket_dispatcher_.get());
#endif // defined(ENABLE_WEBRTC)
vc_manager_ = new VideoCaptureImplManager();
@@ -458,7 +459,7 @@ void RenderThreadImpl::Shutdown() {
compositor_thread_.reset();
input_handler_manager_.reset();
- if (input_event_filter_) {
+ if (input_event_filter_.get()) {
RemoveFilter(input_event_filter_.get());
input_event_filter_ = NULL;
}
@@ -763,7 +764,7 @@ void RenderThreadImpl::EnsureWebKitInitialized() {
compositor_message_loop_proxy_ =
factory->GetCompositorMessageLoop();
#endif
- if (!compositor_message_loop_proxy_) {
+ if (!compositor_message_loop_proxy_.get()) {
compositor_thread_.reset(new base::Thread("Compositor"));
compositor_thread_->Start();
#if defined(OS_ANDROID)
@@ -989,9 +990,9 @@ void RenderThreadImpl::OnGpuVDAContextLoss() {
DCHECK(self);
if (!self->gpu_vda_context3d_)
return;
- if (self->compositor_message_loop_proxy()) {
- self->compositor_message_loop_proxy()->DeleteSoon(
- FROM_HERE, self->gpu_vda_context3d_.release());
+ if (self->compositor_message_loop_proxy().get()) {
+ self->compositor_message_loop_proxy()
+ ->DeleteSoon(FROM_HERE, self->gpu_vda_context3d_.release());
} else {
self->gpu_vda_context3d_.reset();
}
diff --git a/content/renderer/render_widget.cc b/content/renderer/render_widget.cc
index 74ba85a..b4bdc4a 100644
--- a/content/renderer/render_widget.cc
+++ b/content/renderer/render_widget.cc
@@ -573,7 +573,7 @@ void RenderWidget::OnUpdateRectAck() {
bool RenderWidget::SupportsAsynchronousSwapBuffers() {
// Contexts using the command buffer support asynchronous swapbuffers.
// See RenderWidget::CreateOutputSurface().
- if (RenderThreadImpl::current()->compositor_message_loop_proxy())
+ if (RenderThreadImpl::current()->compositor_message_loop_proxy().get())
return false;
return true;
@@ -1513,7 +1513,7 @@ void RenderWidget::suppressCompositorScheduling(bool enable) {
void RenderWidget::willBeginCompositorFrame() {
TRACE_EVENT0("gpu", "RenderWidget::willBeginCompositorFrame");
- DCHECK(RenderThreadImpl::current()->compositor_message_loop_proxy());
+ DCHECK(RenderThreadImpl::current()->compositor_message_loop_proxy().get());
// The following two can result in further layout and possibly
// enable GPU acceleration so they need to be called before any painting
@@ -1573,7 +1573,7 @@ void RenderWidget::didCompleteSwapBuffers() {
void RenderWidget::scheduleComposite() {
TRACE_EVENT0("gpu", "RenderWidget::scheduleComposite");
- if (RenderThreadImpl::current()->compositor_message_loop_proxy() &&
+ if (RenderThreadImpl::current()->compositor_message_loop_proxy().get() &&
compositor_) {
compositor_->setNeedsRedraw();
} else {
diff --git a/content/renderer/renderer_webkitplatformsupport_impl.cc b/content/renderer/renderer_webkitplatformsupport_impl.cc
index ee72f5c2..a96d292 100644
--- a/content/renderer/renderer_webkitplatformsupport_impl.cc
+++ b/content/renderer/renderer_webkitplatformsupport_impl.cc
@@ -628,7 +628,7 @@ bool RendererWebKitPlatformSupportImpl::canAccelerate2dCanvas() {
}
bool RendererWebKitPlatformSupportImpl::isThreadedCompositingEnabled() {
- return !!RenderThreadImpl::current()->compositor_message_loop_proxy();
+ return !!RenderThreadImpl::current()->compositor_message_loop_proxy().get();
}
double RendererWebKitPlatformSupportImpl::audioHardwareSampleRate() {
diff --git a/content/shell/shell_devtools_frontend.cc b/content/shell/shell_devtools_frontend.cc
index 5975b64..d102eaa 100644
--- a/content/shell/shell_devtools_frontend.cc
+++ b/content/shell/shell_devtools_frontend.cc
@@ -53,8 +53,8 @@ ShellDevToolsFrontend* ShellDevToolsFrontend::Show(
gfx::Size());
ShellDevToolsFrontend* devtools_frontend = new ShellDevToolsFrontend(
shell,
- DevToolsAgentHost::GetOrCreateFor(
- inspected_contents->GetRenderViewHost()));
+ DevToolsAgentHost::GetOrCreateFor(inspected_contents->GetRenderViewHost())
+ .get());
ShellDevToolsDelegate* delegate = ShellContentBrowserClient::Get()->
shell_browser_main_parts()->devtools_delegate();
diff --git a/content/shell/shell_url_request_context_getter.cc b/content/shell/shell_url_request_context_getter.cc
index bd73546..eabc762 100644
--- a/content/shell/shell_url_request_context_getter.cc
+++ b/content/shell/shell_url_request_context_getter.cc
@@ -76,7 +76,7 @@ ShellURLRequestContextGetter::ShellURLRequestContextGetter(
if (!CommandLine::ForCurrentProcess()->HasSwitch(switches::kDumpRenderTree)) {
proxy_config_service_.reset(
net::ProxyService::CreateSystemProxyConfigService(
- io_loop_->message_loop_proxy(), file_loop_));
+ io_loop_->message_loop_proxy().get(), file_loop_));
}
}
@@ -129,8 +129,8 @@ net::URLRequestContext* ShellURLRequestContextGetter::GetURLRequestContext() {
net::CACHE_BACKEND_DEFAULT,
cache_path,
0,
- BrowserThread::GetMessageLoopProxyForThread(
- BrowserThread::CACHE));
+ BrowserThread::GetMessageLoopProxyForThread(BrowserThread::CACHE)
+ .get());
net::HttpNetworkSession::Params network_session_params;
network_session_params.cert_verifier =
diff --git a/content/test/webrtc_audio_device_test.cc b/content/test/webrtc_audio_device_test.cc
index 63deaba..83c9a52 100644
--- a/content/test/webrtc_audio_device_test.cc
+++ b/content/test/webrtc_audio_device_test.cc
@@ -314,12 +314,12 @@ bool WebRTCAudioDeviceTest::OnMessageReceived(const IPC::Message& message) {
// Posts a final task to the IO message loop and waits for completion.
void WebRTCAudioDeviceTest::WaitForIOThreadCompletion() {
WaitForMessageLoopCompletion(
- ChildProcess::current()->io_message_loop()->message_loop_proxy());
+ ChildProcess::current()->io_message_loop()->message_loop_proxy().get());
}
void WebRTCAudioDeviceTest::WaitForAudioManagerCompletion() {
if (audio_manager_)
- WaitForMessageLoopCompletion(audio_manager_->GetMessageLoop());
+ WaitForMessageLoopCompletion(audio_manager_->GetMessageLoop().get());
}
void WebRTCAudioDeviceTest::WaitForMessageLoopCompletion(
diff --git a/gpu/command_buffer/service/async_pixel_transfer_manager.cc b/gpu/command_buffer/service/async_pixel_transfer_manager.cc
index 6b4ad91..e82444e 100644
--- a/gpu/command_buffer/service/async_pixel_transfer_manager.cc
+++ b/gpu/command_buffer/service/async_pixel_transfer_manager.cc
@@ -38,7 +38,7 @@ AsyncPixelTransferManager::GetPixelTransferState(
if (it == state_map_.end()) {
return NULL;
} else {
- return it->second;
+ return it->second.get();
}
}
diff --git a/gpu/command_buffer/service/async_pixel_transfer_manager_egl.cc b/gpu/command_buffer/service/async_pixel_transfer_manager_egl.cc
index 49e2811..50d2a84 100644
--- a/gpu/command_buffer/service/async_pixel_transfer_manager_egl.cc
+++ b/gpu/command_buffer/service/async_pixel_transfer_manager_egl.cc
@@ -134,7 +134,7 @@ base::LazyInstance<TransferThread>
g_transfer_thread = LAZY_INSTANCE_INITIALIZER;
base::MessageLoopProxy* transfer_message_loop_proxy() {
- return g_transfer_thread.Pointer()->message_loop_proxy();
+ return g_transfer_thread.Pointer()->message_loop_proxy().get();
}
SafeSharedMemoryPool* safe_shared_memory_pool() {
diff --git a/gpu/command_buffer/service/async_pixel_transfer_manager_share_group.cc b/gpu/command_buffer/service/async_pixel_transfer_manager_share_group.cc
index 99eab94..683f6a8 100644
--- a/gpu/command_buffer/service/async_pixel_transfer_manager_share_group.cc
+++ b/gpu/command_buffer/service/async_pixel_transfer_manager_share_group.cc
@@ -131,7 +131,7 @@ base::LazyInstance<TransferThread>::Leaky
g_transfer_thread = LAZY_INSTANCE_INITIALIZER;
base::MessageLoopProxy* transfer_message_loop_proxy() {
- return g_transfer_thread.Pointer()->message_loop_proxy();
+ return g_transfer_thread.Pointer()->message_loop_proxy().get();
}
SafeSharedMemoryPool* safe_shared_memory_pool() {
diff --git a/gpu/command_buffer/service/buffer_manager.cc b/gpu/command_buffer/service/buffer_manager.cc
index 4966237..c9cda11 100644
--- a/gpu/command_buffer/service/buffer_manager.cc
+++ b/gpu/command_buffer/service/buffer_manager.cc
@@ -241,8 +241,9 @@ bool BufferManager::IsUsageClientSideArray(GLenum usage) {
}
bool BufferManager::UseNonZeroSizeForClientSideArrayBuffer() {
- return feature_info_ && feature_info_->workarounds(
- ).use_non_zero_size_for_client_side_stream_buffers;
+ return feature_info_.get() &&
+ feature_info_->workarounds()
+ .use_non_zero_size_for_client_side_stream_buffers;
}
void BufferManager::SetInfo(
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder.cc b/gpu/command_buffer/service/gles2_cmd_decoder.cc
index 2363e53..8ce9a62 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder.cc
+++ b/gpu/command_buffer/service/gles2_cmd_decoder.cc
@@ -3112,7 +3112,7 @@ void GLES2DecoderImpl::Destroy(bool have_context) {
state_.bound_draw_framebuffer = NULL;
state_.bound_renderbuffer = NULL;
- if (offscreen_saved_color_texture_info_) {
+ if (offscreen_saved_color_texture_info_.get()) {
DCHECK(offscreen_target_color_texture_);
DCHECK_EQ(offscreen_saved_color_texture_info_->service_id(),
offscreen_saved_color_texture_->id());
@@ -5586,7 +5586,7 @@ bool GLES2DecoderImpl::SetBlackTextureForNonRenderableTextures() {
if (texture_unit_index < state_.texture_units.size()) {
TextureUnit& texture_unit = state_.texture_units[texture_unit_index];
TextureRef* texture =
- texture_unit.GetInfoForSamplerType(uniform_info->type);
+ texture_unit.GetInfoForSamplerType(uniform_info->type).get();
if (!texture || !texture_manager()->CanRender(texture)) {
textures_set = true;
glActiveTexture(GL_TEXTURE0 + texture_unit_index);
@@ -5658,7 +5658,7 @@ bool GLES2DecoderImpl::ClearUnclearedTextures() {
if (texture_unit_index < state_.texture_units.size()) {
TextureUnit& texture_unit = state_.texture_units[texture_unit_index];
TextureRef* texture_ref =
- texture_unit.GetInfoForSamplerType(uniform_info->type);
+ texture_unit.GetInfoForSamplerType(uniform_info->type).get();
if (texture_ref && !texture_ref->texture()->SafeToRenderFrom()) {
if (!texture_manager()->ClearRenderableLevels(this, texture_ref)) {
return false;
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder_unittest.cc b/gpu/command_buffer/service/gles2_cmd_decoder_unittest.cc
index 8382233..b03d9f9 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder_unittest.cc
+++ b/gpu/command_buffer/service/gles2_cmd_decoder_unittest.cc
@@ -7939,7 +7939,7 @@ TEST_F(GLES2DecoderTest, BindTexImage2DCHROMIUM) {
Texture* texture = texture_ref->texture();
EXPECT_EQ(kServiceTextureId, texture->service_id());
- group().image_manager()->AddImage(gfx::GLImage::CreateGLImage(0), 1);
+ group().image_manager()->AddImage(gfx::GLImage::CreateGLImage(0).get(), 1);
EXPECT_FALSE(group().image_manager()->LookupImage(1) == NULL);
GLsizei width;
@@ -7986,7 +7986,7 @@ TEST_F(GLES2DecoderTest, ReleaseTexImage2DCHROMIUM) {
Texture* texture = texture_ref->texture();
EXPECT_EQ(kServiceTextureId, texture->service_id());
- group().image_manager()->AddImage(gfx::GLImage::CreateGLImage(0), 1);
+ group().image_manager()->AddImage(gfx::GLImage::CreateGLImage(0).get(), 1);
EXPECT_FALSE(group().image_manager()->LookupImage(1) == NULL);
GLsizei width;
diff --git a/gpu/command_buffer/service/texture_manager_unittest.cc b/gpu/command_buffer/service/texture_manager_unittest.cc
index b5c409a..f8a3f6b 100644
--- a/gpu/command_buffer/service/texture_manager_unittest.cc
+++ b/gpu/command_buffer/service/texture_manager_unittest.cc
@@ -1569,14 +1569,18 @@ TEST_F(TextureTest, GetLevelImage) {
Texture* texture = texture_ref_->texture();
EXPECT_TRUE(texture->GetLevelImage(GL_TEXTURE_2D, 1) == NULL);
// Set image.
- manager_->SetLevelImage(
- texture_ref_.get(), GL_TEXTURE_2D, 1, gfx::GLImage::CreateGLImage(0));
+ manager_->SetLevelImage(texture_ref_.get(),
+ GL_TEXTURE_2D,
+ 1,
+ gfx::GLImage::CreateGLImage(0).get());
EXPECT_FALSE(texture->GetLevelImage(GL_TEXTURE_2D, 1) == NULL);
// Remove it.
manager_->SetLevelImage(texture_ref_.get(), GL_TEXTURE_2D, 1, NULL);
EXPECT_TRUE(texture->GetLevelImage(GL_TEXTURE_2D, 1) == NULL);
- manager_->SetLevelImage(
- texture_ref_.get(), GL_TEXTURE_2D, 1, gfx::GLImage::CreateGLImage(0));
+ manager_->SetLevelImage(texture_ref_.get(),
+ GL_TEXTURE_2D,
+ 1,
+ gfx::GLImage::CreateGLImage(0).get());
// Image should be reset when SetLevelInfo is called.
manager_->SetLevelInfo(texture_ref_.get(),
GL_TEXTURE_2D,
diff --git a/ipc/ipc_channel_unittest.cc b/ipc/ipc_channel_unittest.cc
index 21507bf..b40293f 100644
--- a/ipc/ipc_channel_unittest.cc
+++ b/ipc/ipc_channel_unittest.cc
@@ -192,7 +192,7 @@ TEST_F(IPCChannelTest, ChannelProxyTest) {
// Set up IPC channel proxy.
GenericChannelListener listener;
- CreateChannelProxy(&listener, thread.message_loop_proxy());
+ CreateChannelProxy(&listener, thread.message_loop_proxy().get());
listener.Init(sender());
ASSERT_TRUE(StartClient());
diff --git a/ipc/ipc_sync_channel_unittest.cc b/ipc/ipc_sync_channel_unittest.cc
index f71f874..bd13089 100644
--- a/ipc/ipc_sync_channel_unittest.cc
+++ b/ipc/ipc_sync_channel_unittest.cc
@@ -154,9 +154,12 @@ class Worker : public Listener, public Sender {
}
virtual SyncChannel* CreateChannel() {
- return new SyncChannel(
- channel_name_, mode_, this, ipc_thread_.message_loop_proxy(), true,
- &shutdown_event_);
+ return new SyncChannel(channel_name_,
+ mode_,
+ this,
+ ipc_thread_.message_loop_proxy().get(),
+ true,
+ &shutdown_event_);
}
base::Thread* ListenerThread() {
@@ -325,7 +328,7 @@ class TwoStepServer : public Worker {
virtual SyncChannel* CreateChannel() OVERRIDE {
SyncChannel* channel = new SyncChannel(
- this, ipc_thread().message_loop_proxy(), shutdown_event());
+ this, ipc_thread().message_loop_proxy().get(), shutdown_event());
channel->Init(channel_name(), mode(), create_pipe_now_);
return channel;
}
@@ -346,7 +349,7 @@ class TwoStepClient : public Worker {
virtual SyncChannel* CreateChannel() OVERRIDE {
SyncChannel* channel = new SyncChannel(
- this, ipc_thread().message_loop_proxy(), shutdown_event());
+ this, ipc_thread().message_loop_proxy().get(), shutdown_event());
channel->Init(channel_name(), mode(), create_pipe_now_);
return channel;
}
@@ -1242,9 +1245,13 @@ class RestrictedDispatchClient : public Worker {
else
LOG(ERROR) << "Send failed to dispatch incoming message on same channel";
- non_restricted_channel_.reset(new SyncChannel(
- "non_restricted_channel", Channel::MODE_CLIENT, this,
- ipc_thread().message_loop_proxy(), true, shutdown_event()));
+ non_restricted_channel_.reset(
+ new SyncChannel("non_restricted_channel",
+ Channel::MODE_CLIENT,
+ this,
+ ipc_thread().message_loop_proxy().get(),
+ true,
+ shutdown_event()));
server_->ListenerThread()->message_loop()->PostTask(
FROM_HERE, base::Bind(&RestrictedDispatchServer::OnDoPing, server_, 2));
@@ -1630,9 +1637,13 @@ class RestrictedDispatchPipeWorker : public Worker {
if (is_first())
event1_->Signal();
event2_->Wait();
- other_channel_.reset(new SyncChannel(
- other_channel_name_, Channel::MODE_CLIENT, this,
- ipc_thread().message_loop_proxy(), true, shutdown_event()));
+ other_channel_.reset(
+ new SyncChannel(other_channel_name_,
+ Channel::MODE_CLIENT,
+ this,
+ ipc_thread().message_loop_proxy().get(),
+ true,
+ shutdown_event()));
other_channel_->SetRestrictDispatchChannelGroup(group_);
if (!is_first()) {
event1_->Signal();
@@ -1706,9 +1717,13 @@ class ReentrantReplyServer1 : public Worker {
server_ready_(server_ready) { }
virtual void Run() OVERRIDE {
- server2_channel_.reset(new SyncChannel(
- "reentrant_reply2", Channel::MODE_CLIENT, this,
- ipc_thread().message_loop_proxy(), true, shutdown_event()));
+ server2_channel_.reset(
+ new SyncChannel("reentrant_reply2",
+ Channel::MODE_CLIENT,
+ this,
+ ipc_thread().message_loop_proxy().get(),
+ true,
+ shutdown_event()));
server_ready_->Signal();
Message* msg = new SyncChannelTestMsg_Reentrant1();
server2_channel_->Send(msg);
diff --git a/ipc/ipc_sync_message_filter.cc b/ipc/ipc_sync_message_filter.cc
index 541d685..a534c44 100644
--- a/ipc/ipc_sync_message_filter.cc
+++ b/ipc/ipc_sync_message_filter.cc
@@ -46,8 +46,8 @@ bool SyncMessageFilter::Send(Message* message) {
base::AutoLock auto_lock(lock_);
// Can't use this class on the main thread or else it can lead to deadlocks.
// Also by definition, can't use this on IO thread since we're blocking it.
- DCHECK(MessageLoopProxy::current() != listener_loop_.get());
- DCHECK(MessageLoopProxy::current() != io_loop_.get());
+ DCHECK(MessageLoopProxy::current().get() != listener_loop_.get());
+ DCHECK(MessageLoopProxy::current().get() != io_loop_.get());
pending_sync_messages_.insert(&pending_message);
}
diff --git a/ipc/unix_domain_socket_util_unittest.cc b/ipc/unix_domain_socket_util_unittest.cc
index 3c0469c..81d2f06 100644
--- a/ipc/unix_domain_socket_util_unittest.cc
+++ b/ipc/unix_domain_socket_util_unittest.cc
@@ -108,7 +108,7 @@ class TestUnixSocketConnection {
stat(socket_name_.value().c_str(), &socket_stat);
EXPECT_TRUE(S_ISSOCK(socket_stat.st_mode));
acceptor_.reset(new SocketAcceptor(server_listen_fd_,
- worker_.message_loop_proxy()));
+ worker_.message_loop_proxy().get()));
acceptor_->WaitUntilReady();
return true;
}
diff --git a/media/audio/audio_manager_base.cc b/media/audio/audio_manager_base.cc
index 2a8f031..220e0b6 100644
--- a/media/audio/audio_manager_base.cc
+++ b/media/audio/audio_manager_base.cc
@@ -264,7 +264,7 @@ AudioOutputStream* AudioManagerBase::MakeAudioOutputStreamProxy(
CompareByParams(dispatcher_params));
if (it != output_dispatchers_.end()) {
delete dispatcher_params;
- return new AudioOutputProxy((*it)->dispatcher);
+ return new AudioOutputProxy((*it)->dispatcher.get());
}
const base::TimeDelta kCloseDelay =
diff --git a/media/filters/ffmpeg_demuxer.cc b/media/filters/ffmpeg_demuxer.cc
index 2bae64e..508dd09 100644
--- a/media/filters/ffmpeg_demuxer.cc
+++ b/media/filters/ffmpeg_demuxer.cc
@@ -336,9 +336,13 @@ void FFmpegDemuxer::Seek(base::TimeDelta time, const PipelineStatusCB& cb) {
// the lowest-index audio stream.
pending_seek_ = true;
base::PostTaskAndReplyWithResult(
- blocking_thread_.message_loop_proxy(), FROM_HERE,
- base::Bind(&av_seek_frame, glue_->format_context(), -1,
- time.InMicroseconds(), flags),
+ blocking_thread_.message_loop_proxy().get(),
+ FROM_HERE,
+ base::Bind(&av_seek_frame,
+ glue_->format_context(),
+ -1,
+ time.InMicroseconds(),
+ flags),
base::Bind(&FFmpegDemuxer::OnSeekFrameDone, weak_this_, cb));
}
@@ -379,7 +383,8 @@ void FFmpegDemuxer::Initialize(DemuxerHost* host,
// Open the AVFormatContext using our glue layer.
CHECK(blocking_thread_.Start());
base::PostTaskAndReplyWithResult(
- blocking_thread_.message_loop_proxy(), FROM_HERE,
+ blocking_thread_.message_loop_proxy().get(),
+ FROM_HERE,
base::Bind(&FFmpegGlue::OpenContext, base::Unretained(glue_.get())),
base::Bind(&FFmpegDemuxer::OnOpenContextDone, weak_this_, status_cb));
}
@@ -456,8 +461,10 @@ void FFmpegDemuxer::OnOpenContextDone(const PipelineStatusCB& status_cb,
// Fully initialize AVFormatContext by parsing the stream a little.
base::PostTaskAndReplyWithResult(
- blocking_thread_.message_loop_proxy(), FROM_HERE,
- base::Bind(&avformat_find_stream_info, glue_->format_context(),
+ blocking_thread_.message_loop_proxy().get(),
+ FROM_HERE,
+ base::Bind(&avformat_find_stream_info,
+ glue_->format_context(),
static_cast<AVDictionary**>(NULL)),
base::Bind(&FFmpegDemuxer::OnFindStreamInfoDone, weak_this_, status_cb));
}
@@ -620,10 +627,11 @@ void FFmpegDemuxer::ReadFrameIfNeeded() {
pending_read_ = true;
base::PostTaskAndReplyWithResult(
- blocking_thread_.message_loop_proxy(), FROM_HERE,
+ blocking_thread_.message_loop_proxy().get(),
+ FROM_HERE,
base::Bind(&av_read_frame, glue_->format_context(), packet_ptr),
- base::Bind(&FFmpegDemuxer::OnReadFrameDone, weak_this_,
- base::Passed(&packet)));
+ base::Bind(
+ &FFmpegDemuxer::OnReadFrameDone, weak_this_, base::Passed(&packet)));
}
void FFmpegDemuxer::OnReadFrameDone(ScopedAVPacket packet, int result) {
diff --git a/media/filters/video_renderer_base_unittest.cc b/media/filters/video_renderer_base_unittest.cc
index c108fc2..a5004de 100644
--- a/media/filters/video_renderer_base_unittest.cc
+++ b/media/filters/video_renderer_base_unittest.cc
@@ -509,14 +509,14 @@ TEST_F(VideoRendererBaseTest, Preroll_RightAfter) {
TEST_F(VideoRendererBaseTest, GetCurrentFrame_Initialized) {
Initialize();
- EXPECT_TRUE(GetCurrentFrame()); // Due to prerolling.
+ EXPECT_TRUE(GetCurrentFrame().get()); // Due to prerolling.
Shutdown();
}
TEST_F(VideoRendererBaseTest, GetCurrentFrame_Playing) {
Initialize();
Play();
- EXPECT_TRUE(GetCurrentFrame());
+ EXPECT_TRUE(GetCurrentFrame().get());
Shutdown();
}
@@ -524,7 +524,7 @@ TEST_F(VideoRendererBaseTest, GetCurrentFrame_Paused) {
Initialize();
Play();
Pause();
- EXPECT_TRUE(GetCurrentFrame());
+ EXPECT_TRUE(GetCurrentFrame().get());
Shutdown();
}
@@ -536,7 +536,7 @@ TEST_F(VideoRendererBaseTest, GetCurrentFrame_Flushed) {
// Frame shouldn't be updated.
ResetCurrentFrame();
Flush();
- EXPECT_FALSE(GetCurrentFrame());
+ EXPECT_FALSE(GetCurrentFrame().get());
Shutdown();
}
@@ -553,7 +553,7 @@ TEST_F(VideoRendererBaseTest, GetCurrentFrame_EndOfStream) {
// Frame shouldn't be updated.
ResetCurrentFrame();
Preroll(0, PIPELINE_OK);
- EXPECT_FALSE(GetCurrentFrame());
+ EXPECT_FALSE(GetCurrentFrame().get());
// Start playing, we should immediately get notified of end of stream.
Play();
@@ -568,7 +568,7 @@ TEST_F(VideoRendererBaseTest, GetCurrentFrame_Shutdown) {
// Frame shouldn't be updated.
ResetCurrentFrame();
Shutdown();
- EXPECT_FALSE(GetCurrentFrame());
+ EXPECT_FALSE(GetCurrentFrame().get());
}
// Stop() is called immediately during an error.
@@ -578,7 +578,7 @@ TEST_F(VideoRendererBaseTest, GetCurrentFrame_Error) {
// Frame shouldn't be updated.
ResetCurrentFrame();
Stop();
- EXPECT_FALSE(GetCurrentFrame());
+ EXPECT_FALSE(GetCurrentFrame().get());
}
// Verify that a late decoder response doesn't break invariants in the renderer.
diff --git a/media/tools/shader_bench/shader_bench.cc b/media/tools/shader_bench/shader_bench.cc
index 813f6eb..d033357 100644
--- a/media/tools/shader_bench/shader_bench.cc
+++ b/media/tools/shader_bench/shader_bench.cc
@@ -130,11 +130,9 @@ int main(int argc, char** argv) {
gfx::GLSurface::InitializeOneOff();
scoped_ptr<media::Window> window(new media::Window(width, height));
gfx::GLSurface* surface =
- gfx::GLSurface::CreateViewGLSurface(false, window->PluginWindow());
+ gfx::GLSurface::CreateViewGLSurface(false, window->PluginWindow()).get();
gfx::GLContext* context = gfx::GLContext::CreateGLContext(
- NULL,
- surface,
- gfx::PreferDiscreteGpu);
+ NULL, surface, gfx::PreferDiscreteGpu).get();
context->MakeCurrent(surface);
// This sets D3DPRESENT_INTERVAL_IMMEDIATE on Windows.
context->SetSwapInterval(0);
diff --git a/net/base/upload_data_stream_unittest.cc b/net/base/upload_data_stream_unittest.cc
index 59b44af..a31dd5c 100644
--- a/net/base/upload_data_stream_unittest.cc
+++ b/net/base/upload_data_stream_unittest.cc
@@ -170,9 +170,12 @@ TEST_F(UploadDataStreamTest, File) {
ASSERT_EQ(static_cast<int>(kTestDataSize),
file_util::WriteFile(temp_file_path, kTestData, kTestDataSize));
- element_readers_.push_back(new UploadFileElementReader(
- base::MessageLoopProxy::current(),
- temp_file_path, 0, kuint64max, base::Time()));
+ element_readers_.push_back(
+ new UploadFileElementReader(base::MessageLoopProxy::current().get(),
+ temp_file_path,
+ 0,
+ kuint64max,
+ base::Time()));
TestCompletionCallback init_callback;
UploadDataStream stream(&element_readers_, 0);
@@ -205,9 +208,12 @@ TEST_F(UploadDataStreamTest, FileSmallerThanLength) {
UploadFileElementReader::ScopedOverridingContentLengthForTests
overriding_content_length(kFakeSize);
- element_readers_.push_back(new UploadFileElementReader(
- base::MessageLoopProxy::current(),
- temp_file_path, 0, kuint64max, base::Time()));
+ element_readers_.push_back(
+ new UploadFileElementReader(base::MessageLoopProxy::current().get(),
+ temp_file_path,
+ 0,
+ kuint64max,
+ base::Time()));
TestCompletionCallback init_callback;
UploadDataStream stream(&element_readers_, 0);
@@ -318,9 +324,12 @@ TEST_F(UploadDataStreamTest, FileAndBytes) {
const uint64 kFileRangeOffset = 1;
const uint64 kFileRangeLength = 4;
- element_readers_.push_back(new UploadFileElementReader(
- base::MessageLoopProxy::current(),
- temp_file_path, kFileRangeOffset, kFileRangeLength, base::Time()));
+ element_readers_.push_back(
+ new UploadFileElementReader(base::MessageLoopProxy::current().get(),
+ temp_file_path,
+ kFileRangeOffset,
+ kFileRangeLength,
+ base::Time()));
element_readers_.push_back(new UploadBytesElementReader(
kTestData, kTestDataSize));
@@ -520,7 +529,7 @@ void UploadDataStreamTest::FileChangedHelper(const base::FilePath& file_path,
// reusing element_readers_ is wrong.
ScopedVector<UploadElementReader> element_readers;
element_readers.push_back(new UploadFileElementReader(
- base::MessageLoopProxy::current(), file_path, 1, 2, time));
+ base::MessageLoopProxy::current().get(), file_path, 1, 2, time));
TestCompletionCallback init_callback;
UploadDataStream stream(&element_readers, 0);
@@ -561,9 +570,12 @@ TEST_F(UploadDataStreamTest, MultipleInit) {
// Prepare data.
element_readers_.push_back(new UploadBytesElementReader(
kTestData, kTestDataSize));
- element_readers_.push_back(new UploadFileElementReader(
- base::MessageLoopProxy::current(),
- temp_file_path, 0, kuint64max, base::Time()));
+ element_readers_.push_back(
+ new UploadFileElementReader(base::MessageLoopProxy::current().get(),
+ temp_file_path,
+ 0,
+ kuint64max,
+ base::Time()));
UploadDataStream stream(&element_readers_, 0);
std::string expected_data(kTestData, kTestData + kTestDataSize);
@@ -603,9 +615,12 @@ TEST_F(UploadDataStreamTest, MultipleInitAsync) {
// Prepare data.
element_readers_.push_back(new UploadBytesElementReader(
kTestData, kTestDataSize));
- element_readers_.push_back(new UploadFileElementReader(
- base::MessageLoopProxy::current(),
- temp_file_path, 0, kuint64max, base::Time()));
+ element_readers_.push_back(
+ new UploadFileElementReader(base::MessageLoopProxy::current().get(),
+ temp_file_path,
+ 0,
+ kuint64max,
+ base::Time()));
UploadDataStream stream(&element_readers_, 0);
std::string expected_data(kTestData, kTestData + kTestDataSize);
@@ -642,9 +657,12 @@ TEST_F(UploadDataStreamTest, InitToReset) {
// Prepare data.
element_readers_.push_back(new UploadBytesElementReader(
kTestData, kTestDataSize));
- element_readers_.push_back(new UploadFileElementReader(
- base::MessageLoopProxy::current(),
- temp_file_path, 0, kuint64max, base::Time()));
+ element_readers_.push_back(
+ new UploadFileElementReader(base::MessageLoopProxy::current().get(),
+ temp_file_path,
+ 0,
+ kuint64max,
+ base::Time()));
UploadDataStream stream(&element_readers_, 0);
std::vector<char> expected_data(kTestData, kTestData + kTestDataSize);
@@ -696,9 +714,12 @@ TEST_F(UploadDataStreamTest, InitDuringAsyncInit) {
// Prepare data.
element_readers_.push_back(new UploadBytesElementReader(
kTestData, kTestDataSize));
- element_readers_.push_back(new UploadFileElementReader(
- base::MessageLoopProxy::current(),
- temp_file_path, 0, kuint64max, base::Time()));
+ element_readers_.push_back(
+ new UploadFileElementReader(base::MessageLoopProxy::current().get(),
+ temp_file_path,
+ 0,
+ kuint64max,
+ base::Time()));
UploadDataStream stream(&element_readers_, 0);
std::vector<char> expected_data(kTestData, kTestData + kTestDataSize);
@@ -741,9 +762,12 @@ TEST_F(UploadDataStreamTest, InitDuringAsyncRead) {
// Prepare data.
element_readers_.push_back(new UploadBytesElementReader(
kTestData, kTestDataSize));
- element_readers_.push_back(new UploadFileElementReader(
- base::MessageLoopProxy::current(),
- temp_file_path, 0, kuint64max, base::Time()));
+ element_readers_.push_back(
+ new UploadFileElementReader(base::MessageLoopProxy::current().get(),
+ temp_file_path,
+ 0,
+ kuint64max,
+ base::Time()));
UploadDataStream stream(&element_readers_, 0);
std::vector<char> expected_data(kTestData, kTestData + kTestDataSize);
diff --git a/net/base/upload_file_element_reader_unittest.cc b/net/base/upload_file_element_reader_unittest.cc
index bd0594c..8224f7730 100644
--- a/net/base/upload_file_element_reader_unittest.cc
+++ b/net/base/upload_file_element_reader_unittest.cc
@@ -30,9 +30,12 @@ class UploadFileElementReaderTest : public PlatformTest {
static_cast<int>(bytes_.size()),
file_util::WriteFile(temp_file_path_, &bytes_[0], bytes_.size()));
- reader_.reset(new UploadFileElementReader(
- base::MessageLoopProxy::current(),
- temp_file_path_, 0, kuint64max, base::Time()));
+ reader_.reset(
+ new UploadFileElementReader(base::MessageLoopProxy::current().get(),
+ temp_file_path_,
+ 0,
+ kuint64max,
+ base::Time()));
TestCompletionCallback callback;
ASSERT_EQ(ERR_IO_PENDING, reader_->Init(callback.callback()));
EXPECT_EQ(OK, callback.WaitForResult());
@@ -170,9 +173,12 @@ TEST_F(UploadFileElementReaderTest, InitDuringAsyncOperation) {
TEST_F(UploadFileElementReaderTest, Range) {
const uint64 kOffset = 2;
const uint64 kLength = bytes_.size() - kOffset * 3;
- reader_.reset(new UploadFileElementReader(
- base::MessageLoopProxy::current(),
- temp_file_path_, kOffset, kLength, base::Time()));
+ reader_.reset(
+ new UploadFileElementReader(base::MessageLoopProxy::current().get(),
+ temp_file_path_,
+ kOffset,
+ kLength,
+ base::Time()));
TestCompletionCallback init_callback;
ASSERT_EQ(ERR_IO_PENDING, reader_->Init(init_callback.callback()));
EXPECT_EQ(OK, init_callback.WaitForResult());
@@ -197,9 +203,12 @@ TEST_F(UploadFileElementReaderTest, FileChanged) {
// Expect one second before the actual modification time to simulate change.
const base::Time expected_modification_time =
info.last_modified - base::TimeDelta::FromSeconds(1);
- reader_.reset(new UploadFileElementReader(
- base::MessageLoopProxy::current(),
- temp_file_path_, 0, kuint64max, expected_modification_time));
+ reader_.reset(
+ new UploadFileElementReader(base::MessageLoopProxy::current().get(),
+ temp_file_path_,
+ 0,
+ kuint64max,
+ expected_modification_time));
TestCompletionCallback init_callback;
ASSERT_EQ(ERR_IO_PENDING, reader_->Init(init_callback.callback()));
EXPECT_EQ(ERR_UPLOAD_FILE_CHANGED, init_callback.WaitForResult());
@@ -207,9 +216,12 @@ TEST_F(UploadFileElementReaderTest, FileChanged) {
TEST_F(UploadFileElementReaderTest, WrongPath) {
const base::FilePath wrong_path(FILE_PATH_LITERAL("wrong_path"));
- reader_.reset(new UploadFileElementReader(
- base::MessageLoopProxy::current(),
- wrong_path, 0, kuint64max, base::Time()));
+ reader_.reset(
+ new UploadFileElementReader(base::MessageLoopProxy::current().get(),
+ wrong_path,
+ 0,
+ kuint64max,
+ base::Time()));
TestCompletionCallback init_callback;
ASSERT_EQ(ERR_IO_PENDING, reader_->Init(init_callback.callback()));
EXPECT_EQ(OK, init_callback.WaitForResult());
diff --git a/net/disk_cache/backend_unittest.cc b/net/disk_cache/backend_unittest.cc
index 7c9c005..2b0a155 100644
--- a/net/disk_cache/backend_unittest.cc
+++ b/net/disk_cache/backend_unittest.cc
@@ -238,11 +238,16 @@ TEST_F(DiskCacheTest, CreateBackend) {
cache = NULL;
// Now test the public API.
- int rv = disk_cache::CreateCacheBackend(net::DISK_CACHE,
- net::CACHE_BACKEND_DEFAULT,
- cache_path_, 0, false,
- cache_thread.message_loop_proxy(),
- NULL, &cache, cb.callback());
+ int rv =
+ disk_cache::CreateCacheBackend(net::DISK_CACHE,
+ net::CACHE_BACKEND_DEFAULT,
+ cache_path_,
+ 0,
+ false,
+ cache_thread.message_loop_proxy().get(),
+ NULL,
+ &cache,
+ cb.callback());
ASSERT_EQ(net::OK, cb.GetResult(rv));
ASSERT_TRUE(cache);
delete cache;
@@ -273,7 +278,7 @@ TEST_F(DiskCacheBackendTest, CreateBackend_MissingFile) {
bool prev = base::ThreadRestrictions::SetIOAllowed(false);
disk_cache::BackendImpl* cache = new disk_cache::BackendImpl(
- cache_path_, cache_thread.message_loop_proxy(), NULL);
+ cache_path_, cache_thread.message_loop_proxy().get(), NULL);
int rv = cache->Init(cb.callback());
ASSERT_EQ(net::ERR_FAILED, cb.GetResult(rv));
base::ThreadRestrictions::SetIOAllowed(prev);
@@ -476,9 +481,16 @@ TEST_F(DiskCacheTest, TruncatedIndex) {
net::TestCompletionCallback cb;
disk_cache::Backend* backend = NULL;
- int rv = disk_cache::CreateCacheBackend(
- net::DISK_CACHE, net::CACHE_BACKEND_BLOCKFILE, cache_path_, 0, false,
- cache_thread.message_loop_proxy(), NULL, &backend, cb.callback());
+ int rv =
+ disk_cache::CreateCacheBackend(net::DISK_CACHE,
+ net::CACHE_BACKEND_BLOCKFILE,
+ cache_path_,
+ 0,
+ false,
+ cache_thread.message_loop_proxy().get(),
+ NULL,
+ &backend,
+ cb.callback());
ASSERT_NE(net::OK, cb.GetResult(rv));
ASSERT_TRUE(backend == NULL);
@@ -1677,7 +1689,7 @@ TEST_F(DiskCacheTest, WrongVersion) {
net::TestCompletionCallback cb;
disk_cache::BackendImpl* cache = new disk_cache::BackendImpl(
- cache_path_, cache_thread.message_loop_proxy(), NULL);
+ cache_path_, cache_thread.message_loop_proxy().get(), NULL);
int rv = cache->Init(cb.callback());
ASSERT_EQ(net::ERR_FAILED, cb.GetResult(rv));
@@ -1695,11 +1707,16 @@ TEST_F(DiskCacheBackendTest, DeleteOld) {
net::TestCompletionCallback cb;
bool prev = base::ThreadRestrictions::SetIOAllowed(false);
base::FilePath path(cache_path_);
- int rv = disk_cache::CreateCacheBackend(net::DISK_CACHE,
- net::CACHE_BACKEND_BLOCKFILE, path,
- 0, true,
- cache_thread.message_loop_proxy(),
- NULL, &cache_, cb.callback());
+ int rv =
+ disk_cache::CreateCacheBackend(net::DISK_CACHE,
+ net::CACHE_BACKEND_BLOCKFILE,
+ path,
+ 0,
+ true,
+ cache_thread.message_loop_proxy().get(),
+ NULL,
+ &cache_,
+ cb.callback());
path.clear(); // Make sure path was captured by the previous call.
ASSERT_EQ(net::OK, cb.GetResult(rv));
base::ThreadRestrictions::SetIOAllowed(prev);
@@ -2456,8 +2473,7 @@ TEST_F(DiskCacheTest, Backend_UsageStats) {
ASSERT_TRUE(CleanupCacheDir());
scoped_ptr<disk_cache::BackendImpl> cache;
cache.reset(new disk_cache::BackendImpl(
- cache_path_, base::MessageLoopProxy::current(),
- NULL));
+ cache_path_, base::MessageLoopProxy::current().get(), NULL));
ASSERT_TRUE(NULL != cache.get());
cache->SetUnitTestMode();
ASSERT_EQ(net::OK, cache->SyncInit());
@@ -2581,13 +2597,26 @@ TEST_F(DiskCacheTest, MultipleInstances) {
const int kNumberOfCaches = 2;
disk_cache::Backend* cache[kNumberOfCaches];
- int rv = disk_cache::CreateCacheBackend(
- net::DISK_CACHE, net::CACHE_BACKEND_DEFAULT, store1.path(), 0, false,
- cache_thread.message_loop_proxy(), NULL, &cache[0], cb.callback());
+ int rv =
+ disk_cache::CreateCacheBackend(net::DISK_CACHE,
+ net::CACHE_BACKEND_DEFAULT,
+ store1.path(),
+ 0,
+ false,
+ cache_thread.message_loop_proxy().get(),
+ NULL,
+ &cache[0],
+ cb.callback());
ASSERT_EQ(net::OK, cb.GetResult(rv));
- rv = disk_cache::CreateCacheBackend(
- net::MEDIA_CACHE, net::CACHE_BACKEND_DEFAULT, store2.path(), 0, false,
- cache_thread.message_loop_proxy(), NULL, &cache[1], cb.callback());
+ rv = disk_cache::CreateCacheBackend(net::MEDIA_CACHE,
+ net::CACHE_BACKEND_DEFAULT,
+ store2.path(),
+ 0,
+ false,
+ cache_thread.message_loop_proxy().get(),
+ NULL,
+ &cache[1],
+ cb.callback());
ASSERT_EQ(net::OK, cb.GetResult(rv));
ASSERT_TRUE(cache[0] != NULL && cache[1] != NULL);
@@ -2989,8 +3018,10 @@ TEST_F(DiskCacheBackendTest, SimpleCacheOverBlockfileCache) {
ASSERT_TRUE(cache_thread.StartWithOptions(
base::Thread::Options(base::MessageLoop::TYPE_IO, 0)));
disk_cache::SimpleBackendImpl* simple_cache =
- new disk_cache::SimpleBackendImpl(cache_path_, 0, net::DISK_CACHE,
- cache_thread.message_loop_proxy(),
+ new disk_cache::SimpleBackendImpl(cache_path_,
+ 0,
+ net::DISK_CACHE,
+ cache_thread.message_loop_proxy().get(),
NULL);
net::TestCompletionCallback cb;
int rv = simple_cache->Init(cb.callback());
@@ -3020,7 +3051,7 @@ TEST_F(DiskCacheBackendTest, BlockfileCacheOverSimpleCache) {
ASSERT_TRUE(cache_thread.StartWithOptions(
base::Thread::Options(base::MessageLoop::TYPE_IO, 0)));
disk_cache::BackendImpl* cache = new disk_cache::BackendImpl(
- cache_path_, base::MessageLoopProxy::current(), NULL);
+ cache_path_, base::MessageLoopProxy::current().get(), NULL);
cache->SetUnitTestMode();
net::TestCompletionCallback cb;
int rv = cache->Init(cb.callback());
diff --git a/net/disk_cache/disk_cache_perftest.cc b/net/disk_cache/disk_cache_perftest.cc
index f112cde..1d6bfd6 100644
--- a/net/disk_cache/disk_cache_perftest.cc
+++ b/net/disk_cache/disk_cache_perftest.cc
@@ -180,9 +180,16 @@ TEST_F(DiskCacheTest, CacheBackendPerformance) {
ASSERT_TRUE(CleanupCacheDir());
net::TestCompletionCallback cb;
disk_cache::Backend* cache;
- int rv = disk_cache::CreateCacheBackend(
- net::DISK_CACHE, net::CACHE_BACKEND_BLOCKFILE, cache_path_, 0, false,
- cache_thread.message_loop_proxy(), NULL, &cache, cb.callback());
+ int rv =
+ disk_cache::CreateCacheBackend(net::DISK_CACHE,
+ net::CACHE_BACKEND_BLOCKFILE,
+ cache_path_,
+ 0,
+ false,
+ cache_thread.message_loop_proxy().get(),
+ NULL,
+ &cache,
+ cb.callback());
ASSERT_EQ(net::OK, cb.GetResult(rv));
@@ -208,10 +215,15 @@ TEST_F(DiskCacheTest, CacheBackendPerformance) {
ASSERT_TRUE(file_util::EvictFileFromSystemCache(
cache_path_.AppendASCII("data_3")));
- rv = disk_cache::CreateCacheBackend(
- net::DISK_CACHE, net::CACHE_BACKEND_BLOCKFILE, cache_path_, 0, false,
- cache_thread.message_loop_proxy(),
- NULL, &cache, cb.callback());
+ rv = disk_cache::CreateCacheBackend(net::DISK_CACHE,
+ net::CACHE_BACKEND_BLOCKFILE,
+ cache_path_,
+ 0,
+ false,
+ cache_thread.message_loop_proxy().get(),
+ NULL,
+ &cache,
+ cb.callback());
ASSERT_EQ(net::OK, cb.GetResult(rv));
EXPECT_TRUE(TimeRead(num_entries, cache, entries, true));
diff --git a/net/disk_cache/disk_cache_test_base.cc b/net/disk_cache/disk_cache_test_base.cc
index af47321..d6688bb 100644
--- a/net/disk_cache/disk_cache_test_base.cc
+++ b/net/disk_cache/disk_cache_test_base.cc
@@ -266,15 +266,15 @@ void DiskCacheTestWithCache::InitDiskCache() {
void DiskCacheTestWithCache::CreateBackend(uint32 flags, base::Thread* thread) {
base::MessageLoopProxy* runner;
if (use_current_thread_)
- runner = base::MessageLoopProxy::current();
+ runner = base::MessageLoopProxy::current().get();
else
- runner = thread->message_loop_proxy();
+ runner = thread->message_loop_proxy().get();
if (simple_cache_mode_) {
net::TestCompletionCallback cb;
disk_cache::SimpleBackendImpl* simple_backend =
- new disk_cache::SimpleBackendImpl(cache_path_, size_, type_,
- make_scoped_refptr(runner), NULL);
+ new disk_cache::SimpleBackendImpl(
+ cache_path_, size_, type_, make_scoped_refptr(runner).get(), NULL);
int rv = simple_backend->Init(cb.callback());
ASSERT_EQ(net::OK, cb.GetResult(rv));
cache_ = simple_cache_impl_ = simple_backend;
diff --git a/net/disk_cache/disk_cache_test_util.cc b/net/disk_cache/disk_cache_test_util.cc
index 0a622dc..8f334f0 100644
--- a/net/disk_cache/disk_cache_test_util.cc
+++ b/net/disk_cache/disk_cache_test_util.cc
@@ -63,7 +63,7 @@ bool DeleteCache(const base::FilePath& path) {
bool CheckCacheIntegrity(const base::FilePath& path, bool new_eviction,
uint32 mask) {
scoped_ptr<disk_cache::BackendImpl> cache(new disk_cache::BackendImpl(
- path, mask, base::MessageLoopProxy::current(), NULL));
+ path, mask, base::MessageLoopProxy::current().get(), NULL));
if (!cache.get())
return false;
if (new_eviction)
diff --git a/net/disk_cache/entry_unittest.cc b/net/disk_cache/entry_unittest.cc
index 971e719..01645dc 100644
--- a/net/disk_cache/entry_unittest.cc
+++ b/net/disk_cache/entry_unittest.cc
@@ -2865,13 +2865,15 @@ TEST_F(DiskCacheEntryTest, SimpleCacheOptimisticWriteReleases) {
// operations. To ensure the queue is empty, we issue a write and wait until
// it completes.
EXPECT_EQ(kWriteSize,
- WriteData(entry, 0, 0, buffer1, kWriteSize, false));
+ WriteData(entry, 0, 0, buffer1.get(), kWriteSize, false));
EXPECT_TRUE(buffer1->HasOneRef());
// Finally, we should perform an optimistic write and confirm that all
// references to the IO buffer have been released.
- EXPECT_EQ(kWriteSize, entry->WriteData(
- 1, 0, buffer1, kWriteSize, net::CompletionCallback(), false));
+ EXPECT_EQ(
+ kWriteSize,
+ entry->WriteData(
+ 1, 0, buffer1.get(), kWriteSize, net::CompletionCallback(), false));
EXPECT_TRUE(buffer1->HasOneRef());
entry->Close();
}
@@ -3218,7 +3220,7 @@ TEST_F(DiskCacheEntryTest, SimpleCacheReadCombineCRC) {
ASSERT_EQ(net::OK, CreateEntry(key, &entry));
EXPECT_NE(null, entry);
- EXPECT_EQ(kSize, WriteData(entry, 0, 0, buffer1, kSize, false));
+ EXPECT_EQ(kSize, WriteData(entry, 0, 0, buffer1.get(), kSize, false));
entry->Close();
disk_cache::Entry* entry2 = NULL;
@@ -3229,14 +3231,14 @@ TEST_F(DiskCacheEntryTest, SimpleCacheReadCombineCRC) {
int offset = 0;
int buf_len = kHalfSize;
scoped_refptr<net::IOBuffer> buffer1_read1(new net::IOBuffer(buf_len));
- EXPECT_EQ(buf_len, ReadData(entry2, 0, offset, buffer1_read1, buf_len));
+ EXPECT_EQ(buf_len, ReadData(entry2, 0, offset, buffer1_read1.get(), buf_len));
EXPECT_EQ(0, memcmp(buffer1->data(), buffer1_read1->data(), buf_len));
// Read the second half of the data.
offset = buf_len;
buf_len = kHalfSize;
scoped_refptr<net::IOBuffer> buffer1_read2(new net::IOBuffer(buf_len));
- EXPECT_EQ(buf_len, ReadData(entry2, 0, offset, buffer1_read2, buf_len));
+ EXPECT_EQ(buf_len, ReadData(entry2, 0, offset, buffer1_read2.get(), buf_len));
char* buffer1_data = buffer1->data() + offset;
EXPECT_EQ(0, memcmp(buffer1_data, buffer1_read2->data(), buf_len));
@@ -3274,10 +3276,12 @@ TEST_F(DiskCacheEntryTest, SimpleCacheNonSequentialWrite) {
int offset = kHalfSize;
int buf_len = kHalfSize;
- EXPECT_EQ(buf_len, WriteData(entry, 0, offset, buffer2, buf_len, false));
+ EXPECT_EQ(buf_len,
+ WriteData(entry, 0, offset, buffer2.get(), buf_len, false));
offset = 0;
buf_len = kHalfSize;
- EXPECT_EQ(buf_len, WriteData(entry, 0, offset, buffer1, buf_len, false));
+ EXPECT_EQ(buf_len,
+ WriteData(entry, 0, offset, buffer1.get(), buf_len, false));
entry->Close();
disk_cache::Entry* entry2 = NULL;
@@ -3285,7 +3289,7 @@ TEST_F(DiskCacheEntryTest, SimpleCacheNonSequentialWrite) {
EXPECT_EQ(entry, entry2);
scoped_refptr<net::IOBuffer> buffer1_read1(new net::IOBuffer(kSize));
- EXPECT_EQ(kSize, ReadData(entry2, 0, 0, buffer1_read1, kSize));
+ EXPECT_EQ(kSize, ReadData(entry2, 0, 0, buffer1_read1.get(), kSize));
EXPECT_EQ(0, memcmp(buffer1->data(), buffer1_read1->data(), kSize));
// Check that we are not leaking.
diff --git a/net/disk_cache/simple/simple_backend_impl.cc b/net/disk_cache/simple/simple_backend_impl.cc
index 1179153..4e74106 100644
--- a/net/disk_cache/simple/simple_backend_impl.cc
+++ b/net/disk_cache/simple/simple_backend_impl.cc
@@ -133,12 +133,11 @@ void RecordIndexLoad(base::TimeTicks constructed_since, int result) {
namespace disk_cache {
-SimpleBackendImpl::SimpleBackendImpl(
- const FilePath& path,
- int max_bytes,
- net::CacheType type,
- base::SingleThreadTaskRunner* cache_thread,
- net::NetLog* net_log)
+SimpleBackendImpl::SimpleBackendImpl(const FilePath& path,
+ int max_bytes,
+ net::CacheType type,
+ base::SingleThreadTaskRunner* cache_thread,
+ net::NetLog* net_log)
: path_(path),
index_(new SimpleIndex(MessageLoopProxy::current(), // io_thread
path,
diff --git a/net/disk_cache/simple/simple_index_unittest.cc b/net/disk_cache/simple/simple_index_unittest.cc
index 0f6a799..7f023e8 100644
--- a/net/disk_cache/simple/simple_index_unittest.cc
+++ b/net/disk_cache/simple/simple_index_unittest.cc
@@ -53,7 +53,7 @@ class TestSimpleIndexFile : public SimpleIndexFile,
scoped_refptr<base::SingleThreadTaskRunner> response_thread,
const SimpleIndexFile::IndexCompletionCallback&
completion_callback) OVERRIDE {
- last_response_thread_ = response_thread;
+ last_response_thread_ = response_thread.get();
completion_callback_ = completion_callback;
++get_index_entries_calls_;
}
diff --git a/net/disk_cache/stress_cache.cc b/net/disk_cache/stress_cache.cc
index b4129ef..ef257a7 100644
--- a/net/disk_cache/stress_cache.cc
+++ b/net/disk_cache/stress_cache.cc
@@ -111,9 +111,8 @@ void StressTheCache(int iteration) {
base::Thread::Options(base::MessageLoop::TYPE_IO, 0)))
return;
- disk_cache::BackendImpl* cache =
- new disk_cache::BackendImpl(path, mask, cache_thread.message_loop_proxy(),
- NULL);
+ disk_cache::BackendImpl* cache = new disk_cache::BackendImpl(
+ path, mask, cache_thread.message_loop_proxy().get(), NULL);
cache->SetMaxSize(cache_size);
cache->SetFlags(disk_cache::kNoLoadProtection);
diff --git a/net/http/http_network_transaction_spdy2_unittest.cc b/net/http/http_network_transaction_spdy2_unittest.cc
index 6f5c955..d9cbb0a 100644
--- a/net/http/http_network_transaction_spdy2_unittest.cc
+++ b/net/http/http_network_transaction_spdy2_unittest.cc
@@ -7551,8 +7551,11 @@ TEST_F(HttpNetworkTransactionSpdy2Test, UploadFileSmallerThanLength) {
ScopedVector<UploadElementReader> element_readers;
element_readers.push_back(
- new UploadFileElementReader(base::MessageLoopProxy::current(),
- temp_file_path, 0, kuint64max, base::Time()));
+ new UploadFileElementReader(base::MessageLoopProxy::current().get(),
+ temp_file_path,
+ 0,
+ kuint64max,
+ base::Time()));
UploadDataStream upload_data_stream(&element_readers, 0);
HttpRequestInfo request;
@@ -7605,8 +7608,11 @@ TEST_F(HttpNetworkTransactionSpdy2Test, UploadUnreadableFile) {
ScopedVector<UploadElementReader> element_readers;
element_readers.push_back(
- new UploadFileElementReader(base::MessageLoopProxy::current(),
- temp_file, 0, kuint64max, base::Time()));
+ new UploadFileElementReader(base::MessageLoopProxy::current().get(),
+ temp_file,
+ 0,
+ kuint64max,
+ base::Time()));
UploadDataStream upload_data_stream(&element_readers, 0);
HttpRequestInfo request;
@@ -7662,8 +7668,11 @@ TEST_F(HttpNetworkTransactionSpdy2Test, UnreadableUploadFileAfterAuthRestart) {
ScopedVector<UploadElementReader> element_readers;
element_readers.push_back(
- new UploadFileElementReader(base::MessageLoopProxy::current(),
- temp_file, 0, kuint64max, base::Time()));
+ new UploadFileElementReader(base::MessageLoopProxy::current().get(),
+ temp_file,
+ 0,
+ kuint64max,
+ base::Time()));
UploadDataStream upload_data_stream(&element_readers, 0);
HttpRequestInfo request;
diff --git a/net/http/http_network_transaction_spdy3_unittest.cc b/net/http/http_network_transaction_spdy3_unittest.cc
index af4fb72..7430808 100644
--- a/net/http/http_network_transaction_spdy3_unittest.cc
+++ b/net/http/http_network_transaction_spdy3_unittest.cc
@@ -7537,8 +7537,11 @@ TEST_F(HttpNetworkTransactionSpdy3Test, UploadFileSmallerThanLength) {
ScopedVector<UploadElementReader> element_readers;
element_readers.push_back(
- new UploadFileElementReader(base::MessageLoopProxy::current(),
- temp_file_path, 0, kuint64max, base::Time()));
+ new UploadFileElementReader(base::MessageLoopProxy::current().get(),
+ temp_file_path,
+ 0,
+ kuint64max,
+ base::Time()));
UploadDataStream upload_data_stream(&element_readers, 0);
HttpRequestInfo request;
@@ -7591,8 +7594,11 @@ TEST_F(HttpNetworkTransactionSpdy3Test, UploadUnreadableFile) {
ScopedVector<UploadElementReader> element_readers;
element_readers.push_back(
- new UploadFileElementReader(base::MessageLoopProxy::current(),
- temp_file, 0, kuint64max, base::Time()));
+ new UploadFileElementReader(base::MessageLoopProxy::current().get(),
+ temp_file,
+ 0,
+ kuint64max,
+ base::Time()));
UploadDataStream upload_data_stream(&element_readers, 0);
HttpRequestInfo request;
@@ -7648,8 +7654,11 @@ TEST_F(HttpNetworkTransactionSpdy3Test, UnreadableUploadFileAfterAuthRestart) {
ScopedVector<UploadElementReader> element_readers;
element_readers.push_back(
- new UploadFileElementReader(base::MessageLoopProxy::current(),
- temp_file, 0, kuint64max, base::Time()));
+ new UploadFileElementReader(base::MessageLoopProxy::current().get(),
+ temp_file,
+ 0,
+ kuint64max,
+ base::Time()));
UploadDataStream upload_data_stream(&element_readers, 0);
HttpRequestInfo request;
diff --git a/net/http/http_stream_factory_impl_job.cc b/net/http/http_stream_factory_impl_job.cc
index 480a575..fa7eba5 100644
--- a/net/http/http_stream_factory_impl_job.cc
+++ b/net/http/http_stream_factory_impl_job.cc
@@ -391,8 +391,8 @@ int HttpStreamFactoryImpl::Job::OnHostResolution(
// ClientSocketPoolManager will be destroyed in the same callback that
// destroys the SpdySessionPool.
bool has_session =
- spdy_session_pool->GetIfExists(spdy_session_key, net_log) != NULL;
- return has_session ? ERR_SPDY_SESSION_ALREADY_EXISTS : OK;
+ spdy_session_pool->GetIfExists(spdy_session_key, net_log).get() != NULL;
+ return has_session ? ERR_SPDY_SESSION_ALREADY_EXISTS : OK;
}
void HttpStreamFactoryImpl::Job::OnIOComplete(int result) {
diff --git a/net/http/http_stream_parser_unittest.cc b/net/http/http_stream_parser_unittest.cc
index 5d9bcfd..99a0803 100644
--- a/net/http/http_stream_parser_unittest.cc
+++ b/net/http/http_stream_parser_unittest.cc
@@ -125,8 +125,12 @@ TEST(HttpStreamParser, ShouldMergeRequestHeadersAndBody_FileBody) {
ASSERT_TRUE(file_util::CreateTemporaryFileInDir(temp_dir.path(),
&temp_file_path));
- element_readers.push_back(new UploadFileElementReader(
- base::MessageLoopProxy::current(), temp_file_path, 0, 0, base::Time()));
+ element_readers.push_back(
+ new UploadFileElementReader(base::MessageLoopProxy::current().get(),
+ temp_file_path,
+ 0,
+ 0,
+ base::Time()));
scoped_ptr<UploadDataStream> body(new UploadDataStream(&element_readers, 0));
TestCompletionCallback callback;
diff --git a/net/proxy/network_delegate_error_observer_unittest.cc b/net/proxy/network_delegate_error_observer_unittest.cc
index 881e4bf6..cb32760 100644
--- a/net/proxy/network_delegate_error_observer_unittest.cc
+++ b/net/proxy/network_delegate_error_observer_unittest.cc
@@ -99,13 +99,14 @@ TEST(NetworkDelegateErrorObserverTest, CallOnThread) {
base::Thread thread("test_thread");
thread.Start();
TestNetworkDelegate network_delegate;
- NetworkDelegateErrorObserver
- observer(&network_delegate,
- base::MessageLoopProxy::current());
- thread.message_loop()->PostTask(
- FROM_HERE,
- base::Bind(&NetworkDelegateErrorObserver::OnPACScriptError,
- base::Unretained(&observer), 42, base::string16()));
+ NetworkDelegateErrorObserver observer(
+ &network_delegate, base::MessageLoopProxy::current().get());
+ thread.message_loop()
+ ->PostTask(FROM_HERE,
+ base::Bind(&NetworkDelegateErrorObserver::OnPACScriptError,
+ base::Unretained(&observer),
+ 42,
+ base::string16()));
thread.Stop();
base::MessageLoop::current()->RunUntilIdle();
ASSERT_TRUE(network_delegate.got_pac_error());
@@ -115,12 +116,14 @@ TEST(NetworkDelegateErrorObserverTest, CallOnThread) {
TEST(NetworkDelegateErrorObserverTest, NoDelegate) {
base::Thread thread("test_thread");
thread.Start();
- NetworkDelegateErrorObserver
- observer(NULL, base::MessageLoopProxy::current());
- thread.message_loop()->PostTask(
- FROM_HERE,
- base::Bind(&NetworkDelegateErrorObserver::OnPACScriptError,
- base::Unretained(&observer), 42, base::string16()));
+ NetworkDelegateErrorObserver observer(
+ NULL, base::MessageLoopProxy::current().get());
+ thread.message_loop()
+ ->PostTask(FROM_HERE,
+ base::Bind(&NetworkDelegateErrorObserver::OnPACScriptError,
+ base::Unretained(&observer),
+ 42,
+ base::string16()));
thread.Stop();
base::MessageLoop::current()->RunUntilIdle();
// Shouldn't have crashed until here...
diff --git a/net/proxy/proxy_config_service_linux_unittest.cc b/net/proxy/proxy_config_service_linux_unittest.cc
index 5f0ebee..8f1ca8c 100644
--- a/net/proxy/proxy_config_service_linux_unittest.cc
+++ b/net/proxy/proxy_config_service_linux_unittest.cc
@@ -292,8 +292,8 @@ class SynchConfigGetter {
DCHECK_EQ(base::MessageLoop::TYPE_IO, file_loop->type());
// We pass the mock IO thread as both the IO and file threads.
config_service_->SetupAndFetchInitialConfig(
- base::MessageLoopProxy::current(),
- io_thread_.message_loop_proxy(),
+ base::MessageLoopProxy::current().get(),
+ io_thread_.message_loop_proxy().get(),
static_cast<base::MessageLoopForIO*>(file_loop));
}
// Synchronously gets the proxy config.
diff --git a/net/proxy/proxy_service_v8.cc b/net/proxy/proxy_service_v8.cc
index d5a3dd7..945719a 100644
--- a/net/proxy/proxy_service_v8.cc
+++ b/net/proxy/proxy_service_v8.cc
@@ -25,9 +25,8 @@ ProxyService* CreateProxyServiceUsingV8ProxyResolver(
DCHECK(dhcp_proxy_script_fetcher);
DCHECK(host_resolver);
- ProxyResolverErrorObserver* error_observer =
- new NetworkDelegateErrorObserver(
- network_delegate, base::MessageLoopProxy::current());
+ ProxyResolverErrorObserver* error_observer = new NetworkDelegateErrorObserver(
+ network_delegate, base::MessageLoopProxy::current().get());
ProxyResolver* proxy_resolver =
new ProxyResolverV8Tracing(host_resolver, error_observer, net_log);
diff --git a/net/quic/quic_http_stream_test.cc b/net/quic/quic_http_stream_test.cc
index 7ccd404..d9919f0 100644
--- a/net/quic/quic_http_stream_test.cc
+++ b/net/quic/quic_http_stream_test.cc
@@ -351,7 +351,7 @@ TEST_F(QuicHttpStreamTest, GetRequest) {
// Now that the headers have been processed, the callback will return.
EXPECT_EQ(OK, callback_.WaitForResult());
- ASSERT_TRUE(response_.headers);
+ ASSERT_TRUE(response_.headers.get());
EXPECT_EQ(404, response_.headers->response_code());
EXPECT_TRUE(response_.headers->HasHeaderValue("Content-Type", "text/plain"));
@@ -393,7 +393,7 @@ TEST_F(QuicHttpStreamTest, GetRequestFullResponseInSinglePacket) {
// Now that the headers have been processed, the callback will return.
EXPECT_EQ(OK, callback_.WaitForResult());
- ASSERT_TRUE(response_.headers);
+ ASSERT_TRUE(response_.headers.get());
EXPECT_EQ(200, response_.headers->response_code());
EXPECT_TRUE(response_.headers->HasHeaderValue("Content-Type", "text/plain"));
@@ -443,7 +443,7 @@ TEST_F(QuicHttpStreamTest, SendPostRequest) {
// Since the headers have already arrived, this should return immediately.
EXPECT_EQ(OK, stream_->ReadResponseHeaders(callback_.callback()));
- ASSERT_TRUE(response_.headers);
+ ASSERT_TRUE(response_.headers.get());
EXPECT_EQ(200, response_.headers->response_code());
EXPECT_TRUE(response_.headers->HasHeaderValue("Content-Type", "text/plain"));
@@ -505,7 +505,7 @@ TEST_F(QuicHttpStreamTest, SendChunkedPostRequest) {
// Since the headers have already arrived, this should return immediately.
ASSERT_EQ(OK, stream_->ReadResponseHeaders(callback_.callback()));
- ASSERT_TRUE(response_.headers);
+ ASSERT_TRUE(response_.headers.get());
EXPECT_EQ(200, response_.headers->response_code());
EXPECT_TRUE(response_.headers->HasHeaderValue("Content-Type", "text/plain"));
diff --git a/net/quic/quic_stream_factory.cc b/net/quic/quic_stream_factory.cc
index b314b78..303571b 100644
--- a/net/quic/quic_stream_factory.cc
+++ b/net/quic/quic_stream_factory.cc
@@ -377,8 +377,10 @@ QuicClientSession* QuicStreamFactory::CreateSession(
socket->Connect(addr);
QuicConnectionHelper* helper = new QuicConnectionHelper(
- base::MessageLoop::current()->message_loop_proxy(),
- clock_.get(), random_generator_, socket);
+ base::MessageLoop::current()->message_loop_proxy().get(),
+ clock_.get(),
+ random_generator_,
+ socket);
QuicConnection* connection = new QuicConnection(guid, addr, helper, false);
diff --git a/net/socket/ssl_client_socket_nss.cc b/net/socket/ssl_client_socket_nss.cc
index 091f28e..c37d690 100644
--- a/net/socket/ssl_client_socket_nss.cc
+++ b/net/socket/ssl_client_socket_nss.cc
@@ -3111,7 +3111,7 @@ int SSLClientSocketNSS::Init() {
}
void SSLClientSocketNSS::InitCore() {
- core_ = new Core(base::ThreadTaskRunnerHandle::Get(),
+ core_ = new Core(base::ThreadTaskRunnerHandle::Get().get(),
nss_task_runner_.get(),
transport_.get(),
host_and_port_,
@@ -3419,7 +3419,7 @@ int SSLClientSocketNSS::DoVerifyCert(int result) {
core_->state().server_cert.get(),
host_and_port_.host(),
flags,
- SSLConfigService::GetCRLSet(),
+ SSLConfigService::GetCRLSet().get(),
&server_cert_verify_result_,
base::Bind(&SSLClientSocketNSS::OnHandshakeIOComplete,
base::Unretained(this)),
diff --git a/net/spdy/spdy_network_transaction_spdy2_unittest.cc b/net/spdy/spdy_network_transaction_spdy2_unittest.cc
index 35d4ea3..d71cee2 100644
--- a/net/spdy/spdy_network_transaction_spdy2_unittest.cc
+++ b/net/spdy/spdy_network_transaction_spdy2_unittest.cc
@@ -421,9 +421,12 @@ class SpdyNetworkTransactionSpdy2Test
file_util::WriteFile(file_path, kUploadData, kUploadDataSize));
ScopedVector<UploadElementReader> element_readers;
- element_readers.push_back(new UploadFileElementReader(
- base::MessageLoopProxy::current(),
- file_path, 0, kUploadDataSize, base::Time()));
+ element_readers.push_back(
+ new UploadFileElementReader(base::MessageLoopProxy::current().get(),
+ file_path,
+ 0,
+ kUploadDataSize,
+ base::Time()));
upload_data_stream_.reset(new UploadDataStream(&element_readers, 0));
google_post_request_.method = "POST";
@@ -448,9 +451,12 @@ class SpdyNetworkTransactionSpdy2Test
ScopedVector<UploadElementReader> element_readers;
element_readers.push_back(
new UploadBytesElementReader(kUploadData, kFileRangeOffset));
- element_readers.push_back(new UploadFileElementReader(
- base::MessageLoopProxy::current(),
- file_path, kFileRangeOffset, kFileRangeLength, base::Time()));
+ element_readers.push_back(
+ new UploadFileElementReader(base::MessageLoopProxy::current().get(),
+ file_path,
+ kFileRangeOffset,
+ kFileRangeLength,
+ base::Time()));
element_readers.push_back(new UploadBytesElementReader(
kUploadData + kFileRangeOffset + kFileRangeLength,
kUploadDataSize - (kFileRangeOffset + kFileRangeLength)));
diff --git a/net/spdy/spdy_network_transaction_spdy3_unittest.cc b/net/spdy/spdy_network_transaction_spdy3_unittest.cc
index d7c1cc5..13b372d 100644
--- a/net/spdy/spdy_network_transaction_spdy3_unittest.cc
+++ b/net/spdy/spdy_network_transaction_spdy3_unittest.cc
@@ -423,9 +423,12 @@ class SpdyNetworkTransactionSpdy3Test
file_util::WriteFile(file_path, kUploadData, kUploadDataSize));
ScopedVector<UploadElementReader> element_readers;
- element_readers.push_back(new UploadFileElementReader(
- base::MessageLoopProxy::current(),
- file_path, 0, kUploadDataSize, base::Time()));
+ element_readers.push_back(
+ new UploadFileElementReader(base::MessageLoopProxy::current().get(),
+ file_path,
+ 0,
+ kUploadDataSize,
+ base::Time()));
upload_data_stream_.reset(new UploadDataStream(&element_readers, 0));
google_post_request_.method = "POST";
@@ -450,9 +453,12 @@ class SpdyNetworkTransactionSpdy3Test
ScopedVector<UploadElementReader> element_readers;
element_readers.push_back(
new UploadBytesElementReader(kUploadData, kFileRangeOffset));
- element_readers.push_back(new UploadFileElementReader(
- base::MessageLoopProxy::current(),
- file_path, kFileRangeOffset, kFileRangeLength, base::Time()));
+ element_readers.push_back(
+ new UploadFileElementReader(base::MessageLoopProxy::current().get(),
+ file_path,
+ kFileRangeOffset,
+ kFileRangeLength,
+ base::Time()));
element_readers.push_back(new UploadBytesElementReader(
kUploadData + kFileRangeOffset + kFileRangeLength,
kUploadDataSize - (kFileRangeOffset + kFileRangeLength)));
diff --git a/net/tools/crash_cache/crash_cache.cc b/net/tools/crash_cache/crash_cache.cc
index f59863e..5613d0d 100644
--- a/net/tools/crash_cache/crash_cache.cc
+++ b/net/tools/crash_cache/crash_cache.cc
@@ -138,8 +138,8 @@ bool CreateCache(const base::FilePath& path,
disk_cache::Backend** cache,
net::TestCompletionCallback* cb) {
int size = 1024 * 1024;
- disk_cache::BackendImpl* backend =
- new disk_cache::BackendImpl(path, thread->message_loop_proxy(), NULL);
+ disk_cache::BackendImpl* backend = new disk_cache::BackendImpl(
+ path, thread->message_loop_proxy().get(), NULL);
backend->SetMaxSize(size);
backend->SetType(net::DISK_CACHE);
backend->SetFlags(disk_cache::kNoRandom);
@@ -265,7 +265,7 @@ int LoadOperations(const base::FilePath& path, RankCrashes action,
// Work with a tiny index table (16 entries).
disk_cache::BackendImpl* cache = new disk_cache::BackendImpl(
- path, 0xf, cache_thread->message_loop_proxy(), NULL);
+ path, 0xf, cache_thread->message_loop_proxy().get(), NULL);
if (!cache || !cache->SetMaxSize(0x100000))
return GENERIC;
diff --git a/net/tools/dump_cache/simple_cache_dumper.cc b/net/tools/dump_cache/simple_cache_dumper.cc
index 4e846cb..42429cd 100644
--- a/net/tools/dump_cache/simple_cache_dumper.cc
+++ b/net/tools/dump_cache/simple_cache_dumper.cc
@@ -125,9 +125,15 @@ int SimpleCacheDumper::DoCreateCache() {
DCHECK(!cache_);
state_ = STATE_CREATE_CACHE_COMPLETE;
return disk_cache::CreateCacheBackend(
- DISK_CACHE, CACHE_BACKEND_DEFAULT, input_path_, 0, false,
- cache_thread_->message_loop_proxy(),
- NULL, &cache_, io_callback_);
+ DISK_CACHE,
+ CACHE_BACKEND_DEFAULT,
+ input_path_,
+ 0,
+ false,
+ cache_thread_->message_loop_proxy().get(),
+ NULL,
+ &cache_,
+ io_callback_);
}
int SimpleCacheDumper::DoCreateCacheComplete(int rv) {
diff --git a/net/tools/net_watcher/net_watcher.cc b/net/tools/net_watcher/net_watcher.cc
index c2a7766..18fd41d 100644
--- a/net/tools/net_watcher/net_watcher.cc
+++ b/net/tools/net_watcher/net_watcher.cc
@@ -171,8 +171,7 @@ G_GNUC_END_IGNORE_DEPRECATIONS
// Use the network loop as the file loop also.
scoped_ptr<net::ProxyConfigService> proxy_config_service(
net::ProxyService::CreateSystemProxyConfigService(
- network_loop.message_loop_proxy(),
- &network_loop));
+ network_loop.message_loop_proxy().get(), &network_loop));
// Uses |network_change_notifier|.
net::NetworkChangeNotifier::AddIPAddressObserver(&net_watcher);
diff --git a/net/url_request/url_fetcher_impl_unittest.cc b/net/url_request/url_fetcher_impl_unittest.cc
index c0b1573..9f31580 100644
--- a/net/url_request/url_fetcher_impl_unittest.cc
+++ b/net/url_request/url_fetcher_impl_unittest.cc
@@ -164,7 +164,7 @@ class URLFetcherMockDnsTest : public URLFetcherTest {
void URLFetcherTest::CreateFetcher(const GURL& url) {
fetcher_ = new URLFetcherImpl(url, URLFetcher::GET, this);
fetcher_->SetRequestContext(new ThrottlingTestURLRequestContextGetter(
- io_message_loop_proxy(), request_context()));
+ io_message_loop_proxy().get(), request_context()));
fetcher_->Start();
}
@@ -217,7 +217,7 @@ void URLFetcherMockDnsTest::SetUp() {
void URLFetcherMockDnsTest::CreateFetcher(const GURL& url) {
fetcher_ = new URLFetcherImpl(url, URLFetcher::GET, this);
fetcher_->SetRequestContext(new ThrottlingTestURLRequestContextGetter(
- io_message_loop_proxy(), request_context()));
+ io_message_loop_proxy().get(), request_context()));
}
void URLFetcherMockDnsTest::OnURLFetchComplete(const URLFetcher* source) {
@@ -522,9 +522,8 @@ class URLFetcherFileTest : public URLFetcherTest {
void URLFetcherPostTest::CreateFetcher(const GURL& url) {
fetcher_ = new URLFetcherImpl(url, URLFetcher::POST, this);
fetcher_->SetRequestContext(new ThrottlingTestURLRequestContextGetter(
- io_message_loop_proxy(), request_context()));
- fetcher_->SetUploadData("application/x-www-form-urlencoded",
- "bobsyeruncle");
+ io_message_loop_proxy().get(), request_context()));
+ fetcher_->SetUploadData("application/x-www-form-urlencoded", "bobsyeruncle");
fetcher_->Start();
}
@@ -548,7 +547,7 @@ URLFetcherPostFileTest::URLFetcherPostFileTest()
void URLFetcherPostFileTest::CreateFetcher(const GURL& url) {
fetcher_ = new URLFetcherImpl(url, URLFetcher::POST, this);
fetcher_->SetRequestContext(new ThrottlingTestURLRequestContextGetter(
- io_message_loop_proxy(), request_context()));
+ io_message_loop_proxy().get(), request_context()));
fetcher_->SetUploadFilePath("application/x-www-form-urlencoded",
path_,
range_offset_,
@@ -594,7 +593,7 @@ void URLFetcherEmptyPostTest::OnURLFetchComplete(const URLFetcher* source) {
void URLFetcherDownloadProgressTest::CreateFetcher(const GURL& url) {
fetcher_ = new URLFetcherImpl(url, URLFetcher::GET, this);
fetcher_->SetRequestContext(new ThrottlingTestURLRequestContextGetter(
- io_message_loop_proxy(), request_context()));
+ io_message_loop_proxy().get(), request_context()));
fetcher_->Start();
}
@@ -611,7 +610,7 @@ void URLFetcherDownloadProgressTest::OnURLFetchDownloadProgress(
void URLFetcherDownloadProgressCancelTest::CreateFetcher(const GURL& url) {
fetcher_ = new URLFetcherImpl(url, URLFetcher::GET, this);
fetcher_->SetRequestContext(new ThrottlingTestURLRequestContextGetter(
- io_message_loop_proxy(), request_context()));
+ io_message_loop_proxy().get(), request_context()));
cancelled_ = false;
fetcher_->Start();
}
@@ -635,7 +634,7 @@ void URLFetcherDownloadProgressCancelTest::OnURLFetchComplete(
void URLFetcherUploadProgressTest::CreateFetcher(const GURL& url) {
fetcher_ = new URLFetcherImpl(url, URLFetcher::POST, this);
fetcher_->SetRequestContext(new ThrottlingTestURLRequestContextGetter(
- io_message_loop_proxy(), request_context()));
+ io_message_loop_proxy().get(), request_context()));
previous_progress_ = 0;
// Large enough data to require more than one read from UploadDataStream.
chunk_.assign(1<<16, 'a');
@@ -692,7 +691,7 @@ URLFetcherStopOnRedirectTest::~URLFetcherStopOnRedirectTest() {
void URLFetcherStopOnRedirectTest::CreateFetcher(const GURL& url) {
fetcher_ = new URLFetcherImpl(url, URLFetcher::GET, this);
fetcher_->SetRequestContext(new ThrottlingTestURLRequestContextGetter(
- io_message_loop_proxy(), request_context()));
+ io_message_loop_proxy().get(), request_context()));
fetcher_->SetStopOnRedirect(true);
fetcher_->Start();
}
@@ -710,7 +709,7 @@ void URLFetcherStopOnRedirectTest::OnURLFetchComplete(
void URLFetcherProtectTest::CreateFetcher(const GURL& url) {
fetcher_ = new URLFetcherImpl(url, URLFetcher::GET, this);
fetcher_->SetRequestContext(new ThrottlingTestURLRequestContextGetter(
- io_message_loop_proxy(), request_context()));
+ io_message_loop_proxy().get(), request_context()));
start_time_ = Time::Now();
fetcher_->SetMaxRetriesOn5xx(11);
fetcher_->Start();
@@ -732,9 +731,8 @@ void URLFetcherProtectTest::OnURLFetchComplete(const URLFetcher* source) {
static int count = 0;
count++;
if (count < 20) {
- fetcher_->SetRequestContext(
- new ThrottlingTestURLRequestContextGetter(
- io_message_loop_proxy(), request_context()));
+ fetcher_->SetRequestContext(new ThrottlingTestURLRequestContextGetter(
+ io_message_loop_proxy().get(), request_context()));
fetcher_->Start();
} else {
// We have already sent 20 requests continuously. And we expect that
@@ -748,7 +746,7 @@ void URLFetcherProtectTest::OnURLFetchComplete(const URLFetcher* source) {
void URLFetcherProtectTestPassedThrough::CreateFetcher(const GURL& url) {
fetcher_ = new URLFetcherImpl(url, URLFetcher::GET, this);
fetcher_->SetRequestContext(new ThrottlingTestURLRequestContextGetter(
- io_message_loop_proxy(), request_context()));
+ io_message_loop_proxy().get(), request_context()));
fetcher_->SetAutomaticallyRetryOn5xx(false);
start_time_ = Time::Now();
fetcher_->SetMaxRetriesOn5xx(11);
@@ -807,8 +805,7 @@ void URLFetcherBadHTTPSTest::OnURLFetchComplete(
void URLFetcherCancelTest::CreateFetcher(const GURL& url) {
fetcher_ = new URLFetcherImpl(url, URLFetcher::GET, this);
CancelTestURLRequestContextGetter* context_getter =
- new CancelTestURLRequestContextGetter(io_message_loop_proxy(),
- url);
+ new CancelTestURLRequestContextGetter(io_message_loop_proxy().get(), url);
fetcher_->SetRequestContext(context_getter);
fetcher_->SetMaxRetriesOn5xx(2);
fetcher_->Start();
@@ -842,7 +839,7 @@ void URLFetcherMultipleAttemptTest::OnURLFetchComplete(
if (!data.empty() && data_.empty()) {
data_ = data;
fetcher_->SetRequestContext(new ThrottlingTestURLRequestContextGetter(
- io_message_loop_proxy(), request_context()));
+ io_message_loop_proxy().get(), request_context()));
fetcher_->Start();
} else {
EXPECT_EQ(data, data_);
@@ -854,7 +851,7 @@ void URLFetcherFileTest::CreateFetcherForFile(const GURL& url,
const base::FilePath& file_path) {
fetcher_ = new URLFetcherImpl(url, URLFetcher::GET, this);
fetcher_->SetRequestContext(new ThrottlingTestURLRequestContextGetter(
- io_message_loop_proxy(), request_context()));
+ io_message_loop_proxy().get(), request_context()));
// Use the IO message loop to do the file operations in this test.
fetcher_->SaveResponseToFileAtPath(file_path, io_message_loop_proxy());
@@ -864,7 +861,7 @@ void URLFetcherFileTest::CreateFetcherForFile(const GURL& url,
void URLFetcherFileTest::CreateFetcherForTempFile(const GURL& url) {
fetcher_ = new URLFetcherImpl(url, URLFetcher::GET, this);
fetcher_->SetRequestContext(new ThrottlingTestURLRequestContextGetter(
- io_message_loop_proxy(), request_context()));
+ io_message_loop_proxy().get(), request_context()));
// Use the IO message loop to do the file operations in this test.
fetcher_->SaveResponseToTemporaryFile(io_message_loop_proxy());
diff --git a/net/url_request/url_request_context_builder.cc b/net/url_request/url_request_context_builder.cc
index 7940b04..ee35572 100644
--- a/net/url_request/url_request_context_builder.cc
+++ b/net/url_request/url_request_context_builder.cc
@@ -274,12 +274,12 @@ URLRequestContext* URLRequestContextBuilder::Build() {
HttpCache::BackendFactory* http_cache_backend = NULL;
if (http_cache_params_.type == HttpCacheParams::DISK) {
context->StartCacheThread();
- http_cache_backend =
- new HttpCache::DefaultBackend(DISK_CACHE,
- net::CACHE_BACKEND_DEFAULT,
- http_cache_params_.path,
- http_cache_params_.max_size,
- context->cache_message_loop_proxy());
+ http_cache_backend = new HttpCache::DefaultBackend(
+ DISK_CACHE,
+ net::CACHE_BACKEND_DEFAULT,
+ http_cache_params_.path,
+ http_cache_params_.max_size,
+ context->cache_message_loop_proxy().get());
} else {
http_cache_backend =
HttpCache::DefaultBackend::InMemory(http_cache_params_.max_size);
diff --git a/net/url_request/url_request_unittest.cc b/net/url_request/url_request_unittest.cc
index 7b2f867..d57deec 100644
--- a/net/url_request/url_request_unittest.cc
+++ b/net/url_request/url_request_unittest.cc
@@ -3657,15 +3657,21 @@ TEST_F(URLRequestTestHTTP, PostFileTest) {
path = path.Append(FILE_PATH_LITERAL("data"));
path = path.Append(FILE_PATH_LITERAL("url_request_unittest"));
path = path.Append(FILE_PATH_LITERAL("with-headers.html"));
- element_readers.push_back(new UploadFileElementReader(
- base::MessageLoopProxy::current(), path, 0, kuint64max, base::Time()));
+ element_readers.push_back(
+ new UploadFileElementReader(base::MessageLoopProxy::current().get(),
+ path,
+ 0,
+ kuint64max,
+ base::Time()));
// This file should just be ignored in the upload stream.
element_readers.push_back(new UploadFileElementReader(
- base::MessageLoopProxy::current(),
+ base::MessageLoopProxy::current().get(),
base::FilePath(FILE_PATH_LITERAL(
"c:\\path\\to\\non\\existant\\file.randomness.12345")),
- 0, kuint64max, base::Time()));
+ 0,
+ kuint64max,
+ base::Time()));
r.set_upload(make_scoped_ptr(new UploadDataStream(&element_readers, 0)));
r.Start();
diff --git a/ppapi/proxy/ppapi_proxy_test.cc b/ppapi/proxy/ppapi_proxy_test.cc
index 86cc0b4..c3cca4d 100644
--- a/ppapi/proxy/ppapi_proxy_test.cc
+++ b/ppapi/proxy/ppapi_proxy_test.cc
@@ -551,7 +551,7 @@ void TwoWayTest::SetUp() {
&remote_harness_set_up));
remote_harness_set_up.Wait();
local_harness_->SetUpHarnessWithChannel(handle,
- io_thread_.message_loop_proxy(),
+ io_thread_.message_loop_proxy().get(),
&shutdown_event_,
true); // is_client
}
diff --git a/remoting/client/client_context.cc b/remoting/client/client_context.cc
index fbb5a46..92a2fdc 100644
--- a/remoting/client/client_context.cc
+++ b/remoting/client/client_context.cc
@@ -32,11 +32,11 @@ base::SingleThreadTaskRunner* ClientContext::main_task_runner() {
}
base::SingleThreadTaskRunner* ClientContext::decode_task_runner() {
- return decode_thread_.message_loop_proxy();
+ return decode_thread_.message_loop_proxy().get();
}
base::SingleThreadTaskRunner* ClientContext::audio_decode_task_runner() {
- return audio_decode_thread_.message_loop_proxy();
+ return audio_decode_thread_.message_loop_proxy().get();
}
} // namespace remoting
diff --git a/remoting/host/chromoting_host_context_unittest.cc b/remoting/host/chromoting_host_context_unittest.cc
index c945def..dca913f 100644
--- a/remoting/host/chromoting_host_context_unittest.cc
+++ b/remoting/host/chromoting_host_context_unittest.cc
@@ -23,13 +23,13 @@ TEST(ChromotingHostContextTest, StartAndStop) {
EXPECT_TRUE(context);
if (!context)
return;
- EXPECT_TRUE(context->audio_task_runner());
- EXPECT_TRUE(context->video_capture_task_runner());
- EXPECT_TRUE(context->video_encode_task_runner());
- EXPECT_TRUE(context->file_task_runner());
- EXPECT_TRUE(context->input_task_runner());
- EXPECT_TRUE(context->network_task_runner());
- EXPECT_TRUE(context->ui_task_runner());
+ EXPECT_TRUE(context->audio_task_runner().get());
+ EXPECT_TRUE(context->video_capture_task_runner().get());
+ EXPECT_TRUE(context->video_encode_task_runner().get());
+ EXPECT_TRUE(context->file_task_runner().get());
+ EXPECT_TRUE(context->input_task_runner().get());
+ EXPECT_TRUE(context->network_task_runner().get());
+ EXPECT_TRUE(context->ui_task_runner().get());
context.reset();
run_loop.Run();
diff --git a/remoting/host/remoting_me2me_host.cc b/remoting/host/remoting_me2me_host.cc
index 60a1dfa..50b0568 100644
--- a/remoting/host/remoting_me2me_host.cc
+++ b/remoting/host/remoting_me2me_host.cc
@@ -343,9 +343,11 @@ bool HostProcess::InitWithCommandLine(const CommandLine* cmd_line) {
std::string channel_name =
cmd_line->GetSwitchValueASCII(kDaemonPipeSwitchName);
if (!channel_name.empty()) {
- daemon_channel_.reset(new IPC::ChannelProxy(
- channel_name, IPC::Channel::MODE_CLIENT, this,
- context_->network_task_runner()));
+ daemon_channel_.reset(
+ new IPC::ChannelProxy(channel_name,
+ IPC::Channel::MODE_CLIENT,
+ this,
+ context_->network_task_runner().get()));
}
base::FilePath default_config_dir = remoting::GetConfigDir();
diff --git a/ui/compositor/layer.cc b/ui/compositor/layer.cc
index 3949402..fa60181 100644
--- a/ui/compositor/layer.cc
+++ b/ui/compositor/layer.cc
@@ -518,10 +518,10 @@ void Layer::SetExternalTexture(Texture* texture) {
void Layer::SetTextureMailbox(const cc::TextureMailbox& mailbox,
float scale_factor) {
DCHECK_EQ(type_, LAYER_TEXTURED);
- DCHECK(!solid_color_layer_);
+ DCHECK(!solid_color_layer_.get());
layer_updated_externally_ = true;
texture_ = NULL;
- if (!texture_layer_ || !texture_layer_->uses_mailbox()) {
+ if (!texture_layer_.get() || !texture_layer_->uses_mailbox()) {
scoped_refptr<cc::TextureLayer> new_layer =
cc::TextureLayer::CreateForMailbox(this);
new_layer->SetFlipped(false);
@@ -667,7 +667,7 @@ unsigned Layer::PrepareTexture(cc::ResourceUpdateQueue* queue) {
WebKit::WebGraphicsContext3D* Layer::Context3d() {
DCHECK(texture_layer_.get());
- if (texture_)
+ if (texture_.get())
return texture_->HostContext3D();
return NULL;
}
@@ -949,7 +949,7 @@ void Layer::RecomputeDrawsContentAndUVRect() {
if (texture_layer_.get()) {
gfx::Size texture_size;
if (!texture_layer_->uses_mailbox()) {
- DCHECK(texture_);
+ DCHECK(texture_.get());
float texture_scale_factor = 1.0f / texture_->device_scale_factor();
texture_size = gfx::ToFlooredSize(
gfx::ScaleSize(texture_->size(), texture_scale_factor));
diff --git a/webkit/browser/appcache/appcache_storage_impl_unittest.cc b/webkit/browser/appcache/appcache_storage_impl_unittest.cc
index 81d9ae4..5fbf3b4 100644
--- a/webkit/browser/appcache/appcache_storage_impl_unittest.cc
+++ b/webkit/browser/appcache/appcache_storage_impl_unittest.cc
@@ -146,11 +146,12 @@ class AppCacheStorageImplTest : public testing::Test {
class MockQuotaManager : public quota::QuotaManager {
public:
MockQuotaManager()
- : QuotaManager(true /* is_incognito */, base::FilePath(),
- io_thread->message_loop_proxy(),
- db_thread->message_loop_proxy(),
- NULL),
- async_(false) {}
+ : QuotaManager(true /* is_incognito */,
+ base::FilePath(),
+ io_thread->message_loop_proxy().get(),
+ db_thread->message_loop_proxy().get(),
+ NULL),
+ async_(false) {}
virtual void GetUsageAndQuota(
const GURL& origin,
@@ -281,7 +282,7 @@ class AppCacheStorageImplTest : public testing::Test {
DCHECK(base::MessageLoop::current() == io_thread->message_loop());
service_.reset(new AppCacheService(NULL));
service_->Initialize(
- base::FilePath(), db_thread->message_loop_proxy(), NULL);
+ base::FilePath(), db_thread->message_loop_proxy().get(), NULL);
mock_quota_manager_proxy_ = new MockQuotaManagerProxy();
service_->quota_manager_proxy_ = mock_quota_manager_proxy_;
delegate_.reset(new MockStorageDelegate(this));
diff --git a/webkit/browser/blob/blob_storage_context.cc b/webkit/browser/blob/blob_storage_context.cc
index 89f75af..123f398 100644
--- a/webkit/browser/blob/blob_storage_context.cc
+++ b/webkit/browser/blob/blob_storage_context.cc
@@ -67,7 +67,7 @@ scoped_ptr<BlobDataHandle> BlobStorageContext::GetBlobDataFromUUID(
return result.Pass();
DCHECK(!(found->second.flags & BEING_BUILT));
result.reset(new BlobDataHandle(
- found->second.data.get(), this, base::MessageLoopProxy::current()));
+ found->second.data.get(), this, base::MessageLoopProxy::current().get()));
return result.Pass();
}
diff --git a/webkit/browser/blob/blob_url_request_job_unittest.cc b/webkit/browser/blob/blob_url_request_job_unittest.cc
index 90bd261..2a204ba 100644
--- a/webkit/browser/blob/blob_url_request_job_unittest.cc
+++ b/webkit/browser/blob/blob_url_request_job_unittest.cc
@@ -125,7 +125,7 @@ class BlobURLRequestJobTest : public testing::Test {
network_delegate,
test_->blob_data_.get(),
test_->file_system_context_.get(),
- base::MessageLoopProxy::current());
+ base::MessageLoopProxy::current().get());
}
private:
diff --git a/webkit/browser/blob/mock_blob_url_request_context.cc b/webkit/browser/blob/mock_blob_url_request_context.cc
index 98f12de..45c6134 100644
--- a/webkit/browser/blob/mock_blob_url_request_context.cc
+++ b/webkit/browser/blob/mock_blob_url_request_context.cc
@@ -31,7 +31,7 @@ class MockBlobProtocolHandler
network_delegate,
blob_storage_controller_->GetBlobDataFromUrl(request->url()),
file_system_context_,
- base::MessageLoopProxy::current());
+ base::MessageLoopProxy::current().get());
}
private:
diff --git a/webkit/browser/database/database_quota_client_unittest.cc b/webkit/browser/database/database_quota_client_unittest.cc
index 4fb4a4c..329699f 100644
--- a/webkit/browser/database/database_quota_client_unittest.cc
+++ b/webkit/browser/database/database_quota_client_unittest.cc
@@ -210,9 +210,8 @@ class DatabaseQuotaClientTest : public testing::Test {
TEST_F(DatabaseQuotaClientTest, GetOriginUsage) {
- DatabaseQuotaClient client(
- base::MessageLoopProxy::current(),
- mock_tracker());
+ DatabaseQuotaClient client(base::MessageLoopProxy::current().get(),
+ mock_tracker());
EXPECT_EQ(0, GetOriginUsage(&client, kOriginA, kTemp));
EXPECT_EQ(0, GetOriginUsage(&client, kOriginA, kPerm));
@@ -226,9 +225,8 @@ TEST_F(DatabaseQuotaClientTest, GetOriginUsage) {
}
TEST_F(DatabaseQuotaClientTest, GetOriginsForHost) {
- DatabaseQuotaClient client(
- base::MessageLoopProxy::current(),
- mock_tracker());
+ DatabaseQuotaClient client(base::MessageLoopProxy::current().get(),
+ mock_tracker());
EXPECT_EQ(kOriginA.host(), kOriginB.host());
EXPECT_NE(kOriginA.host(), kOriginOther.host());
@@ -252,9 +250,8 @@ TEST_F(DatabaseQuotaClientTest, GetOriginsForHost) {
}
TEST_F(DatabaseQuotaClientTest, GetOriginsForType) {
- DatabaseQuotaClient client(
- base::MessageLoopProxy::current(),
- mock_tracker());
+ DatabaseQuotaClient client(base::MessageLoopProxy::current().get(),
+ mock_tracker());
EXPECT_TRUE(GetOriginsForType(&client, kTemp).empty());
EXPECT_TRUE(GetOriginsForType(&client, kPerm).empty());
@@ -268,9 +265,8 @@ TEST_F(DatabaseQuotaClientTest, GetOriginsForType) {
}
TEST_F(DatabaseQuotaClientTest, DeleteOriginData) {
- DatabaseQuotaClient client(
- base::MessageLoopProxy::current(),
- mock_tracker());
+ DatabaseQuotaClient client(base::MessageLoopProxy::current().get(),
+ mock_tracker());
// Perm deletions are short circuited in the Client and
// should not reach the DatabaseTracker.
diff --git a/webkit/browser/database/database_tracker_unittest.cc b/webkit/browser/database/database_tracker_unittest.cc
index 9cdaf97..303dd94 100644
--- a/webkit/browser/database/database_tracker_unittest.cc
+++ b/webkit/browser/database/database_tracker_unittest.cc
@@ -567,7 +567,7 @@ class DatabaseTracker_TestHelper_Test {
false,
special_storage_policy.get(),
NULL,
- base::MessageLoopProxy::current()));
+ base::MessageLoopProxy::current().get()));
// Open two new databases.
tracker->DatabaseOpened(kOrigin1, kDB1, kDescription, 0,
@@ -647,7 +647,7 @@ class DatabaseTracker_TestHelper_Test {
false,
special_storage_policy.get(),
NULL,
- base::MessageLoopProxy::current()));
+ base::MessageLoopProxy::current().get()));
tracker->SetForceKeepSessionState();
// Open two new databases.
diff --git a/webkit/browser/dom_storage/dom_storage_area_unittest.cc b/webkit/browser/dom_storage/dom_storage_area_unittest.cc
index 56afcf1..eb2b786 100644
--- a/webkit/browser/dom_storage/dom_storage_area_unittest.cc
+++ b/webkit/browser/dom_storage/dom_storage_area_unittest.cc
@@ -158,10 +158,10 @@ TEST_F(DomStorageAreaTest, BackingDatabaseOpened) {
// This should set up a DomStorageArea that is correctly backed to disk.
{
- scoped_refptr<DomStorageArea> area(
- new DomStorageArea(kOrigin,
- temp_dir.path(),
- new MockDomStorageTaskRunner(base::MessageLoopProxy::current())));
+ scoped_refptr<DomStorageArea> area(new DomStorageArea(
+ kOrigin,
+ temp_dir.path(),
+ new MockDomStorageTaskRunner(base::MessageLoopProxy::current().get())));
EXPECT_TRUE(area->backing_.get());
DomStorageDatabase* database = static_cast<LocalStorageDatabaseAdapter*>(
@@ -205,10 +205,10 @@ TEST_F(DomStorageAreaTest, CommitTasks) {
base::ScopedTempDir temp_dir;
ASSERT_TRUE(temp_dir.CreateUniqueTempDir());
- scoped_refptr<DomStorageArea> area(
- new DomStorageArea(kOrigin,
- temp_dir.path(),
- new MockDomStorageTaskRunner(base::MessageLoopProxy::current())));
+ scoped_refptr<DomStorageArea> area(new DomStorageArea(
+ kOrigin,
+ temp_dir.path(),
+ new MockDomStorageTaskRunner(base::MessageLoopProxy::current().get())));
// Inject an in-memory db to speed up the test.
area->backing_.reset(new LocalStorageDatabaseAdapter());
@@ -283,10 +283,10 @@ TEST_F(DomStorageAreaTest, CommitTasks) {
TEST_F(DomStorageAreaTest, CommitChangesAtShutdown) {
base::ScopedTempDir temp_dir;
ASSERT_TRUE(temp_dir.CreateUniqueTempDir());
- scoped_refptr<DomStorageArea> area(
- new DomStorageArea(kOrigin,
- temp_dir.path(),
- new MockDomStorageTaskRunner(base::MessageLoopProxy::current())));
+ scoped_refptr<DomStorageArea> area(new DomStorageArea(
+ kOrigin,
+ temp_dir.path(),
+ new MockDomStorageTaskRunner(base::MessageLoopProxy::current().get())));
// Inject an in-memory db to speed up the test and also to verify
// the final changes are commited in it's dtor.
@@ -310,10 +310,10 @@ TEST_F(DomStorageAreaTest, CommitChangesAtShutdown) {
TEST_F(DomStorageAreaTest, DeleteOrigin) {
base::ScopedTempDir temp_dir;
ASSERT_TRUE(temp_dir.CreateUniqueTempDir());
- scoped_refptr<DomStorageArea> area(
- new DomStorageArea(kOrigin,
- temp_dir.path(),
- new MockDomStorageTaskRunner(base::MessageLoopProxy::current())));
+ scoped_refptr<DomStorageArea> area(new DomStorageArea(
+ kOrigin,
+ temp_dir.path(),
+ new MockDomStorageTaskRunner(base::MessageLoopProxy::current().get())));
// This test puts files on disk.
base::FilePath db_file_path = static_cast<LocalStorageDatabaseAdapter*>(
@@ -371,10 +371,10 @@ TEST_F(DomStorageAreaTest, DeleteOrigin) {
TEST_F(DomStorageAreaTest, PurgeMemory) {
base::ScopedTempDir temp_dir;
ASSERT_TRUE(temp_dir.CreateUniqueTempDir());
- scoped_refptr<DomStorageArea> area(
- new DomStorageArea(kOrigin,
- temp_dir.path(),
- new MockDomStorageTaskRunner(base::MessageLoopProxy::current())));
+ scoped_refptr<DomStorageArea> area(new DomStorageArea(
+ kOrigin,
+ temp_dir.path(),
+ new MockDomStorageTaskRunner(base::MessageLoopProxy::current().get())));
// Inject an in-memory db to speed up the test.
area->backing_.reset(new LocalStorageDatabaseAdapter());
diff --git a/webkit/browser/dom_storage/dom_storage_context_unittest.cc b/webkit/browser/dom_storage/dom_storage_context_unittest.cc
index 17af914..88a1f77 100644
--- a/webkit/browser/dom_storage/dom_storage_context_unittest.cc
+++ b/webkit/browser/dom_storage/dom_storage_context_unittest.cc
@@ -39,8 +39,8 @@ class DomStorageContextTest : public testing::Test {
virtual void SetUp() {
ASSERT_TRUE(temp_dir_.CreateUniqueTempDir());
storage_policy_ = new quota::MockSpecialStoragePolicy;
- task_runner_ = new MockDomStorageTaskRunner(
- base::MessageLoopProxy::current());
+ task_runner_ =
+ new MockDomStorageTaskRunner(base::MessageLoopProxy::current().get());
context_ = new DomStorageContext(temp_dir_.path(),
base::FilePath(),
storage_policy_.get(),
diff --git a/webkit/browser/fileapi/copy_or_move_operation_delegate_unittest.cc b/webkit/browser/fileapi/copy_or_move_operation_delegate_unittest.cc
index b301bbf..fd02874 100644
--- a/webkit/browser/fileapi/copy_or_move_operation_delegate_unittest.cc
+++ b/webkit/browser/fileapi/copy_or_move_operation_delegate_unittest.cc
@@ -56,13 +56,14 @@ class CopyOrMoveOperationTestHelper {
void SetUp() {
ASSERT_TRUE(base_.CreateUniqueTempDir());
base::FilePath base_dir = base_.path();
- quota_manager_ = new quota::MockQuotaManager(
- false /* is_incognito */, base_dir,
- base::MessageLoopProxy::current(),
- base::MessageLoopProxy::current(),
- NULL /* special storage policy */);
+ quota_manager_ =
+ new quota::MockQuotaManager(false /* is_incognito */,
+ base_dir,
+ base::MessageLoopProxy::current().get(),
+ base::MessageLoopProxy::current().get(),
+ NULL /* special storage policy */);
quota_manager_proxy_ = new quota::MockQuotaManagerProxy(
- quota_manager_.get(), base::MessageLoopProxy::current());
+ quota_manager_.get(), base::MessageLoopProxy::current().get());
file_system_context_ =
CreateFileSystemContextForTesting(quota_manager_proxy_.get(), base_dir);
diff --git a/webkit/browser/fileapi/file_system_context_unittest.cc b/webkit/browser/fileapi/file_system_context_unittest.cc
index 27087c7..3c5dfcb 100644
--- a/webkit/browser/fileapi/file_system_context_unittest.cc
+++ b/webkit/browser/fileapi/file_system_context_unittest.cc
@@ -52,8 +52,8 @@ class FileSystemContextTest : public testing::Test {
mock_quota_manager_ =
new quota::MockQuotaManager(false /* is_incognito */,
data_dir_.path(),
- base::MessageLoopProxy::current(),
- base::MessageLoopProxy::current(),
+ base::MessageLoopProxy::current().get(),
+ base::MessageLoopProxy::current().get(),
storage_policy_.get());
}
diff --git a/webkit/browser/fileapi/file_system_usage_cache_unittest.cc b/webkit/browser/fileapi/file_system_usage_cache_unittest.cc
index 33560cc..bda821f 100644
--- a/webkit/browser/fileapi/file_system_usage_cache_unittest.cc
+++ b/webkit/browser/fileapi/file_system_usage_cache_unittest.cc
@@ -15,7 +15,7 @@ namespace fileapi {
class FileSystemUsageCacheTest : public testing::Test {
public:
FileSystemUsageCacheTest()
- : usage_cache_(base::MessageLoopProxy::current()) {}
+ : usage_cache_(base::MessageLoopProxy::current().get()) {}
virtual void SetUp() {
ASSERT_TRUE(data_dir_.CreateUniqueTempDir());
diff --git a/webkit/browser/fileapi/local_file_system_operation_unittest.cc b/webkit/browser/fileapi/local_file_system_operation_unittest.cc
index c485a98..333e5a9 100644
--- a/webkit/browser/fileapi/local_file_system_operation_unittest.cc
+++ b/webkit/browser/fileapi/local_file_system_operation_unittest.cc
@@ -59,14 +59,14 @@ class LocalFileSystemOperationTest
change_observers_ = MockFileChangeObserver::CreateList(&change_observer_);
base::FilePath base_dir = base_.path().AppendASCII("filesystem");
- quota_manager_ = new quota::MockQuotaManager(
- false /* is_incognito */, base_dir,
- base::MessageLoopProxy::current(),
- base::MessageLoopProxy::current(),
- NULL /* special storage policy */);
+ quota_manager_ =
+ new quota::MockQuotaManager(false /* is_incognito */,
+ base_dir,
+ base::MessageLoopProxy::current().get(),
+ base::MessageLoopProxy::current().get(),
+ NULL /* special storage policy */);
quota_manager_proxy_ = new quota::MockQuotaManagerProxy(
- quota_manager(),
- base::MessageLoopProxy::current());
+ quota_manager(), base::MessageLoopProxy::current().get());
sandbox_file_system_.SetUp(base_dir, quota_manager_proxy_.get());
sandbox_file_system_.file_system_context()->sandbox_provider()->
AddFileChangeObserver(sandbox_file_system_.type(),
diff --git a/webkit/browser/fileapi/local_file_system_operation_write_unittest.cc b/webkit/browser/fileapi/local_file_system_operation_write_unittest.cc
index ab8b4bf..151a11a 100644
--- a/webkit/browser/fileapi/local_file_system_operation_write_unittest.cc
+++ b/webkit/browser/fileapi/local_file_system_operation_write_unittest.cc
@@ -63,11 +63,12 @@ class LocalFileSystemOperationWriteTest
virtual void SetUp() {
ASSERT_TRUE(dir_.CreateUniqueTempDir());
- quota_manager_ = new quota::MockQuotaManager(
- false /* is_incognito */, dir_.path(),
- base::MessageLoopProxy::current(),
- base::MessageLoopProxy::current(),
- NULL /* special storage policy */);
+ quota_manager_ =
+ new quota::MockQuotaManager(false /* is_incognito */,
+ dir_.path(),
+ base::MessageLoopProxy::current().get(),
+ base::MessageLoopProxy::current().get(),
+ NULL /* special storage policy */);
virtual_path_ = base::FilePath(FILE_PATH_LITERAL("temporary file"));
file_system_context_ = CreateFileSystemContextForTesting(
diff --git a/webkit/browser/fileapi/mock_file_change_observer.cc b/webkit/browser/fileapi/mock_file_change_observer.cc
index bcb68c5..e72a389 100644
--- a/webkit/browser/fileapi/mock_file_change_observer.cc
+++ b/webkit/browser/fileapi/mock_file_change_observer.cc
@@ -20,7 +20,7 @@ MockFileChangeObserver::~MockFileChangeObserver() {}
ChangeObserverList MockFileChangeObserver::CreateList(
MockFileChangeObserver* observer) {
ChangeObserverList::Source source;
- source.AddObserver(observer, base::MessageLoopProxy::current());
+ source.AddObserver(observer, base::MessageLoopProxy::current().get());
return ChangeObserverList(source);
}
diff --git a/webkit/browser/fileapi/mock_file_system_context.cc b/webkit/browser/fileapi/mock_file_system_context.cc
index 4c1956e..70ddbcc 100644
--- a/webkit/browser/fileapi/mock_file_system_context.cc
+++ b/webkit/browser/fileapi/mock_file_system_context.cc
@@ -19,9 +19,8 @@ FileSystemContext* CreateFileSystemContextForTesting(
quota::QuotaManagerProxy* quota_manager_proxy,
const base::FilePath& base_path) {
ScopedVector<FileSystemMountPointProvider> additional_providers;
- additional_providers.push_back(
- new TestMountPointProvider(
- base::MessageLoopProxy::current(), base_path));
+ additional_providers.push_back(new TestMountPointProvider(
+ base::MessageLoopProxy::current().get(), base_path));
return CreateFileSystemContextWithAdditionalProvidersForTesting(
quota_manager_proxy, additional_providers.Pass(), base_path);
}
@@ -33,7 +32,7 @@ FileSystemContext* CreateFileSystemContextWithAdditionalProvidersForTesting(
return new FileSystemContext(
FileSystemTaskRunners::CreateMockTaskRunners(),
ExternalMountPoints::CreateRefCounted().get(),
- make_scoped_refptr(new quota::MockSpecialStoragePolicy()),
+ make_scoped_refptr(new quota::MockSpecialStoragePolicy()).get(),
quota_manager_proxy,
additional_providers.Pass(),
base_path,
diff --git a/webkit/browser/fileapi/obfuscated_file_util.cc b/webkit/browser/fileapi/obfuscated_file_util.cc
index 2636d6e..c949a97 100644
--- a/webkit/browser/fileapi/obfuscated_file_util.cc
+++ b/webkit/browser/fileapi/obfuscated_file_util.cc
@@ -1234,7 +1234,7 @@ std::string ObfuscatedFileUtil::GetDirectoryDatabaseKey(
return std::string();
}
// For isolated origin we just use a type string as a key.
- if (special_storage_policy_ &&
+ if (special_storage_policy_.get() &&
special_storage_policy_->HasIsolatedStorage(origin)) {
return type_string;
}
diff --git a/webkit/browser/fileapi/obfuscated_file_util_unittest.cc b/webkit/browser/fileapi/obfuscated_file_util_unittest.cc
index 93a4015..acba0b5 100644
--- a/webkit/browser/fileapi/obfuscated_file_util_unittest.cc
+++ b/webkit/browser/fileapi/obfuscated_file_util_unittest.cc
@@ -133,11 +133,12 @@ class ObfuscatedFileUtilTest : public testing::Test {
scoped_refptr<quota::SpecialStoragePolicy> storage_policy =
new quota::MockSpecialStoragePolicy();
- quota_manager_ = new quota::QuotaManager(false /* is_incognito */,
- data_dir_.path(),
- base::MessageLoopProxy::current(),
- base::MessageLoopProxy::current(),
- storage_policy.get());
+ quota_manager_ =
+ new quota::QuotaManager(false /* is_incognito */,
+ data_dir_.path(),
+ base::MessageLoopProxy::current().get(),
+ base::MessageLoopProxy::current().get(),
+ storage_policy.get());
// Every time we create a new sandbox_file_system helper,
// it creates another context, which creates another path manager,
diff --git a/webkit/browser/fileapi/sandbox_mount_point_provider_unittest.cc b/webkit/browser/fileapi/sandbox_mount_point_provider_unittest.cc
index 50ea2d4..df7c66d 100644
--- a/webkit/browser/fileapi/sandbox_mount_point_provider_unittest.cc
+++ b/webkit/browser/fileapi/sandbox_mount_point_provider_unittest.cc
@@ -86,12 +86,11 @@ class SandboxMountPointProviderTest : public testing::Test {
void SetUpNewProvider(const FileSystemOptions& options) {
provider_.reset(
- new SandboxMountPointProvider(
- NULL,
- base::MessageLoopProxy::current(),
- data_dir_.path(),
- options,
- NULL));
+ new SandboxMountPointProvider(NULL,
+ base::MessageLoopProxy::current().get(),
+ data_dir_.path(),
+ options,
+ NULL));
}
SandboxMountPointProvider::OriginEnumerator* CreateOriginEnumerator() const {
diff --git a/webkit/browser/fileapi/syncable/canned_syncable_file_system.cc b/webkit/browser/fileapi/syncable/canned_syncable_file_system.cc
index ef99628..c09ad08 100644
--- a/webkit/browser/fileapi/syncable/canned_syncable_file_system.cc
+++ b/webkit/browser/fileapi/syncable/canned_syncable_file_system.cc
@@ -203,7 +203,7 @@ void CannedSyncableFileSystem::SetUp() {
quota_manager_ = new QuotaManager(false /* is_incognito */,
data_dir_.path(),
io_task_runner_.get(),
- base::MessageLoopProxy::current(),
+ base::MessageLoopProxy::current().get(),
storage_policy.get());
file_system_context_ = new FileSystemContext(
diff --git a/webkit/browser/fileapi/syncable/local_file_change_tracker_unittest.cc b/webkit/browser/fileapi/syncable/local_file_change_tracker_unittest.cc
index 0d3e2e9..f9efbf0 100644
--- a/webkit/browser/fileapi/syncable/local_file_change_tracker_unittest.cc
+++ b/webkit/browser/fileapi/syncable/local_file_change_tracker_unittest.cc
@@ -36,14 +36,15 @@ class LocalFileChangeTrackerTest : public testing::Test {
LocalFileChangeTrackerTest()
: message_loop_(base::MessageLoop::TYPE_IO),
file_system_(GURL("http://example.com"),
- base::MessageLoopProxy::current(),
- base::MessageLoopProxy::current()) {}
+ base::MessageLoopProxy::current().get(),
+ base::MessageLoopProxy::current().get()) {}
virtual void SetUp() OVERRIDE {
file_system_.SetUp();
- sync_context_ = new LocalFileSyncContext(base::MessageLoopProxy::current(),
- base::MessageLoopProxy::current());
+ sync_context_ =
+ new LocalFileSyncContext(base::MessageLoopProxy::current().get(),
+ base::MessageLoopProxy::current().get());
ASSERT_EQ(
sync_file_system::SYNC_STATUS_OK,
file_system_.MaybeInitializeFileSystemContext(sync_context_.get()));
diff --git a/webkit/browser/fileapi/syncable/syncable_file_operation_runner_unittest.cc b/webkit/browser/fileapi/syncable/syncable_file_operation_runner_unittest.cc
index dc3acde..3654039 100644
--- a/webkit/browser/fileapi/syncable/syncable_file_operation_runner_unittest.cc
+++ b/webkit/browser/fileapi/syncable/syncable_file_operation_runner_unittest.cc
@@ -44,22 +44,23 @@ class SyncableFileOperationRunnerTest : public testing::Test {
// Use the current thread as IO thread so that we can directly call
// operations in the tests.
SyncableFileOperationRunnerTest()
- : message_loop_(base::MessageLoop::TYPE_IO),
- file_system_(GURL("http://example.com"),
- base::MessageLoopProxy::current(),
- base::MessageLoopProxy::current()),
- callback_count_(0),
- write_status_(base::PLATFORM_FILE_ERROR_FAILED),
- write_bytes_(0),
- write_complete_(false),
- url_request_context_(file_system_.file_system_context()),
- weak_factory_(this) {}
+ : message_loop_(base::MessageLoop::TYPE_IO),
+ file_system_(GURL("http://example.com"),
+ base::MessageLoopProxy::current().get(),
+ base::MessageLoopProxy::current().get()),
+ callback_count_(0),
+ write_status_(base::PLATFORM_FILE_ERROR_FAILED),
+ write_bytes_(0),
+ write_complete_(false),
+ url_request_context_(file_system_.file_system_context()),
+ weak_factory_(this) {}
virtual void SetUp() OVERRIDE {
ASSERT_TRUE(dir_.CreateUniqueTempDir());
file_system_.SetUp();
- sync_context_ = new LocalFileSyncContext(base::MessageLoopProxy::current(),
- base::MessageLoopProxy::current());
+ sync_context_ =
+ new LocalFileSyncContext(base::MessageLoopProxy::current().get(),
+ base::MessageLoopProxy::current().get());
ASSERT_EQ(
SYNC_STATUS_OK,
file_system_.MaybeInitializeFileSystemContext(sync_context_.get()));
diff --git a/webkit/browser/fileapi/syncable/syncable_file_system_unittest.cc b/webkit/browser/fileapi/syncable/syncable_file_system_unittest.cc
index 0db764a..acbbaf5 100644
--- a/webkit/browser/fileapi/syncable/syncable_file_system_unittest.cc
+++ b/webkit/browser/fileapi/syncable/syncable_file_system_unittest.cc
@@ -34,15 +34,16 @@ class SyncableFileSystemTest : public testing::Test {
public:
SyncableFileSystemTest()
: file_system_(GURL("http://example.com/"),
- base::MessageLoopProxy::current(),
- base::MessageLoopProxy::current()),
+ base::MessageLoopProxy::current().get(),
+ base::MessageLoopProxy::current().get()),
weak_factory_(this) {}
virtual void SetUp() {
file_system_.SetUp();
- sync_context_ = new LocalFileSyncContext(base::MessageLoopProxy::current(),
- base::MessageLoopProxy::current());
+ sync_context_ =
+ new LocalFileSyncContext(base::MessageLoopProxy::current().get(),
+ base::MessageLoopProxy::current().get());
ASSERT_EQ(
sync_file_system::SYNC_STATUS_OK,
file_system_.MaybeInitializeFileSystemContext(sync_context_.get()));
diff --git a/webkit/browser/fileapi/syncable/syncable_file_system_util_unittest.cc b/webkit/browser/fileapi/syncable/syncable_file_system_util_unittest.cc
index e0c2b7d..ec677b8 100644
--- a/webkit/browser/fileapi/syncable/syncable_file_system_util_unittest.cc
+++ b/webkit/browser/fileapi/syncable/syncable_file_system_util_unittest.cc
@@ -119,12 +119,12 @@ TEST(SyncableFileSystemUtilTest, SerializeBeforeOpenFileSystem) {
// Setting up a full syncable filesystem environment.
CannedSyncableFileSystem file_system(GURL(kOrigin),
- base::MessageLoopProxy::current(),
- base::MessageLoopProxy::current());
+ base::MessageLoopProxy::current().get(),
+ base::MessageLoopProxy::current().get());
file_system.SetUp();
scoped_refptr<LocalFileSyncContext> sync_context =
- new LocalFileSyncContext(base::MessageLoopProxy::current(),
- base::MessageLoopProxy::current());
+ new LocalFileSyncContext(base::MessageLoopProxy::current().get(),
+ base::MessageLoopProxy::current().get());
// Before calling initialization we would not be able to get a valid
// deserialized URL.
diff --git a/webkit/browser/quota/mock_quota_manager_unittest.cc b/webkit/browser/quota/mock_quota_manager_unittest.cc
index 41d9aa7..36ff9a4c 100644
--- a/webkit/browser/quota/mock_quota_manager_unittest.cc
+++ b/webkit/browser/quota/mock_quota_manager_unittest.cc
@@ -44,8 +44,8 @@ class MockQuotaManagerTest : public testing::Test {
policy_ = new MockSpecialStoragePolicy;
manager_ = new MockQuotaManager(false /* is_incognito */,
data_dir_.path(),
- base::MessageLoopProxy::current(),
- base::MessageLoopProxy::current(),
+ base::MessageLoopProxy::current().get(),
+ base::MessageLoopProxy::current().get(),
policy_.get());
}
diff --git a/webkit/browser/quota/quota_manager_unittest.cc b/webkit/browser/quota/quota_manager_unittest.cc
index 809fb23..f47d106 100644
--- a/webkit/browser/quota/quota_manager_unittest.cc
+++ b/webkit/browser/quota/quota_manager_unittest.cc
@@ -76,8 +76,8 @@ class QuotaManagerTest : public testing::Test {
void ResetQuotaManager(bool is_incognito) {
quota_manager_ = new QuotaManager(is_incognito,
data_dir_.path(),
- MessageLoopProxy::current(),
- MessageLoopProxy::current(),
+ MessageLoopProxy::current().get(),
+ MessageLoopProxy::current().get(),
mock_special_storage_policy_.get());
// Don't (automatically) start the eviction for testing.
quota_manager_->eviction_disabled_ = true;
diff --git a/webkit/common/blob/scoped_file.cc b/webkit/common/blob/scoped_file.cc
index df1d3d4..56f0743 100644
--- a/webkit/common/blob/scoped_file.cc
+++ b/webkit/common/blob/scoped_file.cc
@@ -41,7 +41,7 @@ void ScopedFile::AddScopeOutCallback(
const ScopeOutCallback& callback,
base::TaskRunner* callback_runner) {
if (!callback_runner)
- callback_runner = base::MessageLoopProxy::current();
+ callback_runner = base::MessageLoopProxy::current().get();
scope_out_callbacks_.push_back(std::make_pair(callback, callback_runner));
}
diff --git a/webkit/glue/resource_request_body_unittest.cc b/webkit/glue/resource_request_body_unittest.cc
index 3c107fa..523b7dc 100644
--- a/webkit/glue/resource_request_body_unittest.cc
+++ b/webkit/glue/resource_request_body_unittest.cc
@@ -72,7 +72,7 @@ TEST(ResourceRequestBodyTest, CreateUploadDataStreamWithoutBlob) {
scoped_ptr<net::UploadDataStream> upload(
request_body->ResolveElementsAndCreateUploadDataStream(
- NULL, NULL, base::MessageLoopProxy::current()));
+ NULL, NULL, base::MessageLoopProxy::current().get()));
EXPECT_EQ(kIdentifier, upload->identifier());
ASSERT_EQ(request_body->elements()->size(), upload->element_readers().size());
@@ -144,7 +144,9 @@ TEST(ResourceRequestBodyTest, ResolveBlobAndCreateUploadDataStream) {
scoped_ptr<net::UploadDataStream> upload(
request_body->ResolveElementsAndCreateUploadDataStream(
- &blob_storage_controller, NULL, base::MessageLoopProxy::current()));
+ &blob_storage_controller,
+ NULL,
+ base::MessageLoopProxy::current().get()));
ASSERT_EQ(2U, upload->element_readers().size());
EXPECT_TRUE(AreElementsEqual(*upload->element_readers()[0], upload_element1));
@@ -155,7 +157,7 @@ TEST(ResourceRequestBodyTest, ResolveBlobAndCreateUploadDataStream) {
request_body->AppendBlob(blob_url0);
upload.reset(request_body->ResolveElementsAndCreateUploadDataStream(
- &blob_storage_controller, NULL, base::MessageLoopProxy::current()));
+ &blob_storage_controller, NULL, base::MessageLoopProxy::current().get()));
ASSERT_EQ(0U, upload->element_readers().size());
// Test having only one blob reference.
@@ -163,7 +165,7 @@ TEST(ResourceRequestBodyTest, ResolveBlobAndCreateUploadDataStream) {
request_body->AppendBlob(blob_url1);
upload.reset(request_body->ResolveElementsAndCreateUploadDataStream(
- &blob_storage_controller, NULL, base::MessageLoopProxy::current()));
+ &blob_storage_controller, NULL, base::MessageLoopProxy::current().get()));
ASSERT_EQ(2U, upload->element_readers().size());
EXPECT_TRUE(AreElementsEqual(*upload->element_readers()[0], blob_element1));
EXPECT_TRUE(AreElementsEqual(*upload->element_readers()[1], blob_element2));
@@ -178,7 +180,7 @@ TEST(ResourceRequestBodyTest, ResolveBlobAndCreateUploadDataStream) {
upload_element2.expected_modification_time());
upload.reset(request_body->ResolveElementsAndCreateUploadDataStream(
- &blob_storage_controller, NULL, base::MessageLoopProxy::current()));
+ &blob_storage_controller, NULL, base::MessageLoopProxy::current().get()));
ASSERT_EQ(4U, upload->element_readers().size());
EXPECT_TRUE(AreElementsEqual(*upload->element_readers()[0], blob_element1));
EXPECT_TRUE(AreElementsEqual(*upload->element_readers()[1], blob_element2));
@@ -195,7 +197,7 @@ TEST(ResourceRequestBodyTest, ResolveBlobAndCreateUploadDataStream) {
request_body->AppendBlob(blob_url1);
upload.reset(request_body->ResolveElementsAndCreateUploadDataStream(
- &blob_storage_controller, NULL, base::MessageLoopProxy::current()));
+ &blob_storage_controller, NULL, base::MessageLoopProxy::current().get()));
ASSERT_EQ(4U, upload->element_readers().size());
EXPECT_TRUE(AreElementsEqual(*upload->element_readers()[0], upload_element1));
EXPECT_TRUE(AreElementsEqual(*upload->element_readers()[1], upload_element2));
@@ -212,7 +214,7 @@ TEST(ResourceRequestBodyTest, ResolveBlobAndCreateUploadDataStream) {
upload_element2.expected_modification_time());
upload.reset(request_body->ResolveElementsAndCreateUploadDataStream(
- &blob_storage_controller, NULL, base::MessageLoopProxy::current()));
+ &blob_storage_controller, NULL, base::MessageLoopProxy::current().get()));
ASSERT_EQ(4U, upload->element_readers().size());
EXPECT_TRUE(AreElementsEqual(*upload->element_readers()[0], upload_element1));
EXPECT_TRUE(AreElementsEqual(*upload->element_readers()[1], blob_element1));
@@ -231,7 +233,7 @@ TEST(ResourceRequestBodyTest, ResolveBlobAndCreateUploadDataStream) {
upload_element2.expected_modification_time());
upload.reset(request_body->ResolveElementsAndCreateUploadDataStream(
- &blob_storage_controller, NULL, base::MessageLoopProxy::current()));
+ &blob_storage_controller, NULL, base::MessageLoopProxy::current().get()));
ASSERT_EQ(8U, upload->element_readers().size());
EXPECT_TRUE(AreElementsEqual(*upload->element_readers()[0], blob_element1));
EXPECT_TRUE(AreElementsEqual(*upload->element_readers()[1], blob_element2));
diff --git a/webkit/plugins/ppapi/host_globals.cc b/webkit/plugins/ppapi/host_globals.cc
index fb437bb..43f2933 100644
--- a/webkit/plugins/ppapi/host_globals.cc
+++ b/webkit/plugins/ppapi/host_globals.cc
@@ -107,7 +107,7 @@ HostGlobals::~HostGlobals() {
InstanceMap::iterator found = instance_map_.find(instance);
if (found == instance_map_.end())
return NULL;
- return found->second->module()->GetCallbackTracker();
+ return found->second->module()->GetCallbackTracker().get();
}
::ppapi::thunk::PPB_Instance_API* HostGlobals::GetInstanceAPI(
diff --git a/webkit/plugins/ppapi/ppapi_plugin_instance.cc b/webkit/plugins/ppapi/ppapi_plugin_instance.cc
index 456b467..52846eb 100644
--- a/webkit/plugins/ppapi/ppapi_plugin_instance.cc
+++ b/webkit/plugins/ppapi/ppapi_plugin_instance.cc
@@ -1772,7 +1772,7 @@ void PluginInstance::UpdateLayer() {
return;
gpu::Mailbox mailbox;
- if (bound_graphics_3d_) {
+ if (bound_graphics_3d_.get()) {
PluginDelegate::PlatformContext3D* context =
bound_graphics_3d_->platform_context();
context->GetBackingMailbox(&mailbox);
diff --git a/webkit/plugins/ppapi/quota_file_io.cc b/webkit/plugins/ppapi/quota_file_io.cc
index a86dc04..40fe532 100644
--- a/webkit/plugins/ppapi/quota_file_io.cc
+++ b/webkit/plugins/ppapi/quota_file_io.cc
@@ -108,10 +108,13 @@ class QuotaFileIO::WriteOperation : public PendingOperationBase {
}
if (!base::PostTaskAndReplyWithResult(
- plugin_delegate->GetFileThreadMessageLoopProxy(), FROM_HERE,
+ plugin_delegate->GetFileThreadMessageLoopProxy().get(),
+ FROM_HERE,
base::Bind(&WriteAdapter,
- quota_io_->file_, offset_,
- base::Passed(&buffer_), bytes_to_write_),
+ quota_io_->file_,
+ offset_,
+ base::Passed(&buffer_),
+ bytes_to_write_),
base::Bind(&WriteOperation::DidWrite,
weak_factory_.GetWeakPtr()))) {
DidFail(base::PLATFORM_FILE_ERROR_FAILED);
@@ -195,8 +198,9 @@ class QuotaFileIO::SetLengthOperation : public PendingOperationBase {
}
if (!base::FileUtilProxy::Truncate(
- plugin_delegate->GetFileThreadMessageLoopProxy(),
- quota_io_->file_, length_,
+ plugin_delegate->GetFileThreadMessageLoopProxy().get(),
+ quota_io_->file_,
+ length_,
base::Bind(&SetLengthOperation::DidFinish,
weak_factory_.GetWeakPtr()))) {
DidFail(base::PLATFORM_FILE_ERROR_FAILED);
@@ -306,7 +310,8 @@ bool QuotaFileIO::RegisterOperationForQuotaChecks(
// Query the file size.
++outstanding_quota_queries_;
if (!base::FileUtilProxy::GetFileInfoFromPlatformFile(
- plugin_delegate->GetFileThreadMessageLoopProxy(), file_,
+ plugin_delegate->GetFileThreadMessageLoopProxy().get(),
+ file_,
base::Bind(&QuotaFileIO::DidQueryInfoForQuota,
weak_factory_.GetWeakPtr()))) {
// This makes the call fail synchronously; we do not fire the callback
diff --git a/webkit/renderer/media/webmediaplayer_impl.cc b/webkit/renderer/media/webmediaplayer_impl.cc
index acd54ea..0ff86fb 100644
--- a/webkit/renderer/media/webmediaplayer_impl.cc
+++ b/webkit/renderer/media/webmediaplayer_impl.cc
@@ -153,7 +153,7 @@ WebMediaPlayerImpl::WebMediaPlayerImpl(
media_log_->AddEvent(
media_log_->CreateEvent(media::MediaLogEvent::WEBMEDIAPLAYER_CREATED));
- pipeline_.reset(new media::Pipeline(media_loop_, media_log_));
+ pipeline_.reset(new media::Pipeline(media_loop_, media_log_.get()));
// Let V8 know we started new thread if we did not do it yet.
// Made separate task to avoid deletion of player currently being created.
diff --git a/webkit/renderer/media/webmediaplayer_params.cc b/webkit/renderer/media/webmediaplayer_params.cc
index af7b704..6bcac8d 100644
--- a/webkit/renderer/media/webmediaplayer_params.cc
+++ b/webkit/renderer/media/webmediaplayer_params.cc
@@ -19,7 +19,7 @@ WebMediaPlayerParams::WebMediaPlayerParams(
audio_renderer_sink_(audio_renderer_sink),
gpu_factories_(gpu_factories),
media_log_(media_log) {
- DCHECK(media_log_);
+ DCHECK(media_log_.get());
}
WebMediaPlayerParams::~WebMediaPlayerParams() {}
diff --git a/webkit/support/simple_appcache_system.cc b/webkit/support/simple_appcache_system.cc
index bf87be9..145cceb 100644
--- a/webkit/support/simple_appcache_system.cc
+++ b/webkit/support/simple_appcache_system.cc
@@ -410,8 +410,8 @@ void SimpleAppCacheSystem::InitOnIOThread(
service_ = new appcache::AppCacheService(NULL);
backend_impl_ = new appcache::AppCacheBackendImpl();
service_->Initialize(cache_directory_,
- db_thread_.message_loop_proxy(),
- SimpleResourceLoaderBridge::GetCacheThread());
+ db_thread_.message_loop_proxy().get(),
+ SimpleResourceLoaderBridge::GetCacheThread().get());
service_->set_request_context(request_context);
backend_impl_->Initialize(service_, frontend_proxy_.get(), kSingleProcessId);
diff --git a/webkit/support/simple_resource_loader_bridge.cc b/webkit/support/simple_resource_loader_bridge.cc
index 49410cf..ade6185 100644
--- a/webkit/support/simple_resource_loader_bridge.cc
+++ b/webkit/support/simple_resource_loader_bridge.cc
@@ -468,7 +468,7 @@ class RequestProxy
->blob_storage_controller(),
static_cast<TestShellRequestContext*>(g_request_context)
->file_system_context(),
- base::MessageLoopProxy::current())));
+ base::MessageLoopProxy::current().get())));
}
SimpleAppCacheSystem::SetExtraRequestInfo(
request_.get(), params->appcache_host_id, params->request_type);
@@ -478,8 +478,9 @@ class RequestProxy
base::FilePath path;
if (file_util::CreateTemporaryFile(&path)) {
downloaded_file_ = ShareableFileReference::GetOrCreate(
- path, ShareableFileReference::DELETE_ON_FINAL_RELEASE,
- base::MessageLoopProxy::current());
+ path,
+ ShareableFileReference::DELETE_ON_FINAL_RELEASE,
+ base::MessageLoopProxy::current().get());
file_stream_.reset(new net::FileStream(NULL));
file_stream_->OpenSync(
path, base::PLATFORM_FILE_OPEN | base::PLATFORM_FILE_WRITE);
diff --git a/webkit/support/test_shell_request_context.cc b/webkit/support/test_shell_request_context.cc
index f2c31ba..edd005a 100644
--- a/webkit/support/test_shell_request_context.cc
+++ b/webkit/support/test_shell_request_context.cc
@@ -96,8 +96,10 @@ void TestShellRequestContext::Init(
net::HttpCache::DefaultBackend* backend = new net::HttpCache::DefaultBackend(
cache_path.empty() ? net::MEMORY_CACHE : net::DISK_CACHE,
- net::CACHE_BACKEND_DEFAULT, cache_path, 0,
- SimpleResourceLoaderBridge::GetCacheThread());
+ net::CACHE_BACKEND_DEFAULT,
+ cache_path,
+ 0,
+ SimpleResourceLoaderBridge::GetCacheThread().get());
net::HttpNetworkSession::Params network_session_params;
network_session_params.host_resolver = host_resolver();
@@ -127,7 +129,7 @@ void TestShellRequestContext::Init(
new webkit_blob::BlobProtocolHandler(
blob_storage_controller_.get(),
file_system_context_.get(),
- SimpleResourceLoaderBridge::GetIoThread()));
+ SimpleResourceLoaderBridge::GetIoThread().get()));
job_factory->SetProtocolHandler(
"filesystem",
fileapi::CreateFileSystemProtocolHandler(file_system_context_.get()));