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

Unified Diff: chrome/browser/chromeos/dbus/proxy_resolution_service_provider.cc

Issue 8135006: Fix yet another crash in ProxyResolutionService with debug build. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 2 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/dbus/proxy_resolution_service_provider.cc
diff --git a/chrome/browser/chromeos/dbus/proxy_resolution_service_provider.cc b/chrome/browser/chromeos/dbus/proxy_resolution_service_provider.cc
index 3e950a88e6cee7c875c4149cea0627cd18e69950..8cd16092bc40213766344cf58b3ec308078acd1d 100644
--- a/chrome/browser/chromeos/dbus/proxy_resolution_service_provider.cc
+++ b/chrome/browser/chromeos/dbus/proxy_resolution_service_provider.cc
@@ -80,13 +80,17 @@ class ProxyResolverImpl : public ProxyResolverInterface {
scoped_refptr<dbus::ExportedObject> exported_object) {
DCHECK(OnOriginThread());
- // GetDefaultProfile() must be called on UI thread.
+ // GetDefaultProfile() and GetRequestContext() must be called on UI
+ // thread.
Profile* profile = ProfileManager::GetDefaultProfile();
+ scoped_refptr<net::URLRequestContextGetter> getter =
+ profile->GetRequestContext();
+
BrowserThread::PostTask(
BrowserThread::IO, FROM_HERE,
base::Bind(&ProxyResolverImpl::ResolveProxyInternal,
this,
- profile,
+ getter,
source_url,
signal_interface,
signal_name,
@@ -96,7 +100,7 @@ class ProxyResolverImpl : public ProxyResolverInterface {
private:
// Helper function for ResolveProxy().
void ResolveProxyInternal(
- Profile* profile,
+ scoped_refptr<net::URLRequestContextGetter> getter,
const std::string& source_url,
const std::string& signal_interface,
const std::string& signal_name,
@@ -120,8 +124,6 @@ class ProxyResolverImpl : public ProxyResolverInterface {
}
// Check if we have the URLRequestContextGetter.
- scoped_refptr<net::URLRequestContextGetter> getter =
- profile->GetRequestContext();
if (!getter) {
request->error_ = "No URLRequestContextGetter";
request->OnCompletion(net::ERR_UNEXPECTED);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698