Commit 4066a1d5 authored by mirandac@chromium.org's avatar mirandac@chromium.org

Get URLRequestContext from the profile attached to the automation provider,...

Get URLRequestContext from the profile attached to the automation provider, not the default. Use System request context if no profile context available.

BUG=64339
TEST=automation provider tests continue to work correctly.

Review URL: http://codereview.chromium.org/7134020

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@88668 0039d316-1c4b-4281-b951-d872f2087c98
parent 78ac2077
...@@ -579,16 +579,7 @@ class SetProxyConfigTask : public Task { ...@@ -579,16 +579,7 @@ class SetProxyConfigTask : public Task {
void AutomationProvider::SetProxyConfig(const std::string& new_proxy_config) { void AutomationProvider::SetProxyConfig(const std::string& new_proxy_config) {
net::URLRequestContextGetter* context_getter = net::URLRequestContextGetter* context_getter =
Profile::GetDefaultRequestContext(); profile_->GetRequestContext();
if (!context_getter) {
FilePath user_data_dir;
PathService::Get(chrome::DIR_USER_DATA, &user_data_dir);
ProfileManager* profile_manager = g_browser_process->profile_manager();
DCHECK(profile_manager);
Profile* profile = profile_manager->GetDefaultProfile(user_data_dir);
DCHECK(profile);
context_getter = profile->GetRequestContext();
}
DCHECK(context_getter); DCHECK(context_getter);
BrowserThread::PostTask( BrowserThread::PostTask(
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment