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

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 88522)
+++ chrome/browser/automation/automation_provider.cc (working copy)
@@ -579,16 +579,7 @@
void AutomationProvider::SetProxyConfig(const std::string& new_proxy_config) {
net::URLRequestContextGetter* context_getter =
- Profile::GetDefaultRequestContext();
- 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();
- }
+ profile_->GetRequestContext();
DCHECK(context_getter);
BrowserThread::PostTask(
« 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