Index: chrome/browser/safe_browsing/safe_browsing_service.cc |
=================================================================== |
--- chrome/browser/safe_browsing/safe_browsing_service.cc (revision 62042) |
+++ chrome/browser/safe_browsing/safe_browsing_service.cc (working copy) |
@@ -386,6 +386,9 @@ |
mackey_url_prefix, |
disable_auto_update); |
+ // Balance the reference added by Start(). |
+ request_context_getter->Release(); |
+ |
protocol_manager_->Initialize(); |
} |
@@ -645,16 +648,14 @@ |
} |
// We will issue network fetches using the default profile's request context. |
- scoped_refptr<URLRequestContextGetter> request_context_getter = |
+ URLRequestContextGetter* request_context_getter = |
GetDefaultProfile()->GetRequestContext(); |
+ request_context_getter->AddRef(); // Balanced in OnIOInitialize. |
BrowserThread::PostTask( |
BrowserThread::IO, FROM_HERE, |
NewRunnableMethod( |
- this, |
- &SafeBrowsingService::OnIOInitialize, |
- client_key, |
- wrapped_key, |
+ this, &SafeBrowsingService::OnIOInitialize, client_key, wrapped_key, |
request_context_getter)); |
} |