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

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: rebase 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..d4e8e1e2857750b268d62738fc58a92d5b9c568d 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) {
@@ -1803,7 +1801,7 @@ void ResourceDispatcherHostImpl::PauseRequest(int child_id,
MessageLoop::current()->PostTask(FROM_HERE,
base::Bind(
&ResourceDispatcherHostImpl::ResumeRequest,
- weak_factory_.GetWeakPtr(),
+ AsWeakPtr(),
global_id));
wtc 2012/05/30 17:57:28 Nit: this fits on the previous line. Or you may b
Takashi Toyoshima 2012/05/31 08:42:51 Done.
}
}
@@ -1921,7 +1919,7 @@ void ResourceDispatcherHostImpl::OnReadCompleted(net::URLRequest* request,
FROM_HERE,
base::Bind(
&ResourceDispatcherHostImpl::ResumeRequest,
- weak_factory_.GetWeakPtr(), id));
+ AsWeakPtr(), id));
wtc 2012/05/30 17:57:28 Nit: this may fit on the previous line, or you may
Takashi Toyoshima 2012/05/31 08:42:51 Done.
return;
}
}

Powered by Google App Engine
This is Rietveld 408576698