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

Unified Diff: chrome/browser/automation/automation_provider.cc

Issue 7134020: Get URLRequestContext from the profile attached to the automation provider, not the default. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 6 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/automation/automation_provider.cc
===================================================================
--- chrome/browser/automation/automation_provider.cc (revision 88135)
+++ chrome/browser/automation/automation_provider.cc (working copy)
@@ -579,15 +579,9 @@
void AutomationProvider::SetProxyConfig(const std::string& new_proxy_config) {
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();
+ context_getter = g_browser_process->system_request_context();
willchan no longer on Chromium 2011/06/08 16:55:35 Profile always lazily creates a URLRequestContextG
}
DCHECK(context_getter);
« 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