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

Unified Diff: chrome/browser/tab_contents/render_view_host_delegate_helper.cc

Issue 7464009: Removal of Profile from content part 1. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: slight tweaking for comments Created 9 years, 5 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
Index: chrome/browser/tab_contents/render_view_host_delegate_helper.cc
diff --git a/chrome/browser/tab_contents/render_view_host_delegate_helper.cc b/chrome/browser/tab_contents/render_view_host_delegate_helper.cc
index ebcc451885eb87685f48740c705ec8527650ac1b..f605fa15f8798bcc4c746340d07fc8c0d75343d7 100644
--- a/chrome/browser/tab_contents/render_view_host_delegate_helper.cc
+++ b/chrome/browser/tab_contents/render_view_host_delegate_helper.cc
@@ -231,7 +231,7 @@ TabContents* RenderViewHostDelegateViewHelper::CreateNewWindowFromTabContents(
const ViewHostMsg_CreateWindow_Params& params) {
TabContents* new_contents = CreateNewWindow(
route_id,
- tab_contents->profile(),
+ Profile::FromBrowserContext(tab_contents->browser_context()),
tab_contents->GetSiteInstance(),
tab_contents->GetWebUITypeForCurrentState(),
tab_contents,
@@ -301,7 +301,8 @@ RenderWidgetHostView*
// static
WebPreferences RenderViewHostDelegateHelper::GetWebkitPrefs(
- Profile* profile, bool is_web_ui) {
+ content::BrowserContext* browser_context, bool is_web_ui) {
+ Profile* profile = Profile::FromBrowserContext(browser_context);
PrefService* prefs = profile->GetPrefs();
WebPreferences web_prefs;
@@ -479,14 +480,19 @@ WebPreferences RenderViewHostDelegateHelper::GetWebkitPrefs(
}
void RenderViewHostDelegateHelper::UpdateInspectorSetting(
- Profile* profile, const std::string& key, const std::string& value) {
- DictionaryPrefUpdate update(profile->GetPrefs(),
- prefs::kWebKitInspectorSettings);
+ content::BrowserContext* browser_context,
+ const std::string& key,
+ const std::string& value) {
+ DictionaryPrefUpdate update(
+ Profile::FromBrowserContext(browser_context)->GetPrefs(),
+ prefs::kWebKitInspectorSettings);
DictionaryValue* inspector_settings = update.Get();
inspector_settings->SetWithoutPathExpansion(key,
Value::CreateStringValue(value));
}
-void RenderViewHostDelegateHelper::ClearInspectorSettings(Profile* profile) {
- profile->GetPrefs()->ClearPref(prefs::kWebKitInspectorSettings);
+void RenderViewHostDelegateHelper::ClearInspectorSettings(
+ content::BrowserContext* browser_context) {
+ Profile::FromBrowserContext(browser_context)->GetPrefs()->
+ ClearPref(prefs::kWebKitInspectorSettings);
}
« no previous file with comments | « chrome/browser/tab_contents/render_view_host_delegate_helper.h ('k') | chrome/browser/ui/app_modal_dialogs/js_modal_dialog.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698