Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(23)

Unified Diff: content/browser/renderer_host/resource_dispatcher_host_impl.cc

Issue 10332233: Inherits SupportsWeakPtr<T> instead of having WeakPtrFactory<T> (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix style nits Created 8 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/browser/renderer_host/resource_dispatcher_host_impl.cc
diff --git a/content/browser/renderer_host/resource_dispatcher_host_impl.cc b/content/browser/renderer_host/resource_dispatcher_host_impl.cc
index aeb257368cec219484bfcc40fdd12b1277de5731..ee6051b454c52c284eaf1890da3b1d228f5110f0 100644
--- a/content/browser/renderer_host/resource_dispatcher_host_impl.cc
+++ b/content/browser/renderer_host/resource_dispatcher_host_impl.cc
@@ -320,8 +320,6 @@ ResourceDispatcherHostImpl::ResourceDispatcherHostImpl()
: download_file_manager_(new DownloadFileManager(NULL)),
save_file_manager_(new SaveFileManager()),
request_id_(-1),
- ALLOW_THIS_IN_INITIALIZER_LIST(weak_factory_(this)),
- ALLOW_THIS_IN_INITIALIZER_LIST(ssl_delegate_weak_factory_(this)),
is_shutdown_(false),
max_outstanding_requests_cost_per_process_(
kMaxOutstandingRequestsCostPerProcess),
@@ -1517,9 +1515,9 @@ void ResourceDispatcherHostImpl::OnSSLCertificateError(
int render_view_id;
if(!info->GetAssociatedRenderView(&render_process_id, &render_view_id))
NOTREACHED();
- SSLManager::OnSSLCertificateError(ssl_delegate_weak_factory_.GetWeakPtr(),
- request_id, info->GetResourceType(), request->url(), render_process_id,
- render_view_id, ssl_info, is_hsts_host);
+ SSLManager::OnSSLCertificateError(
+ AsWeakPtr(), request_id, info->GetResourceType(), request->url(),
+ render_process_id, render_view_id, ssl_info, is_hsts_host);
}
void ResourceDispatcherHostImpl::OnResponseStarted(net::URLRequest* request) {
@@ -1801,10 +1799,8 @@ void ResourceDispatcherHostImpl::PauseRequest(int child_id,
// asynchronously to avoid recursion problems.
if (info->pause_count() == 0) {
MessageLoop::current()->PostTask(FROM_HERE,
- base::Bind(
- &ResourceDispatcherHostImpl::ResumeRequest,
- weak_factory_.GetWeakPtr(),
- global_id));
+ base::Bind(&ResourceDispatcherHostImpl::ResumeRequest,
+ AsWeakPtr(), global_id));
}
}
@@ -1919,9 +1915,8 @@ void ResourceDispatcherHostImpl::OnReadCompleted(net::URLRequest* request,
GlobalRequestID id(info->GetChildID(), info->GetRequestID());
MessageLoop::current()->PostTask(
FROM_HERE,
- base::Bind(
- &ResourceDispatcherHostImpl::ResumeRequest,
- weak_factory_.GetWeakPtr(), id));
+ base::Bind(&ResourceDispatcherHostImpl::ResumeRequest,
+ AsWeakPtr(), id));
return;
}
}

Powered by Google App Engine
This is Rietveld 408576698