diff options
author | rsleevi@chromium.org <rsleevi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-06-11 16:46:36 +0000 |
---|---|---|
committer | rsleevi@chromium.org <rsleevi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-06-11 16:46:36 +0000 |
commit | cadac62e5c2b9f5fef59ce0326bb2cd79ffbe622 (patch) | |
tree | 7b95f103fce509de887c8c5e643604855b57c0ba /webkit/support | |
parent | 9f6e673c7f43f6ee414f72a74585dad8ebaceec3 (diff) | |
download | chromium_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
Diffstat (limited to 'webkit/support')
-rw-r--r-- | webkit/support/simple_appcache_system.cc | 4 | ||||
-rw-r--r-- | webkit/support/simple_resource_loader_bridge.cc | 7 | ||||
-rw-r--r-- | webkit/support/test_shell_request_context.cc | 8 |
3 files changed, 11 insertions, 8 deletions
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())); |