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

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: works now 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 6d76c21c93bdd4b4ef9428d36dd9c3e7e9b5383c..dd8d55eb7f58c754d64302cee16656ad8c92e759 100644
--- a/chrome/browser/tab_contents/render_view_host_delegate_helper.cc
+++ b/chrome/browser/tab_contents/render_view_host_delegate_helper.cc
@@ -230,7 +230,7 @@ TabContents* RenderViewHostDelegateViewHelper::CreateNewWindowFromTabContents(
const ViewHostMsg_CreateWindow_Params& params) {
TabContents* new_contents = CreateNewWindow(
route_id,
- tab_contents->profile(),
+ static_cast<Profile*>(tab_contents->context()),
tab_contents->GetSiteInstance(),
tab_contents->GetWebUITypeForCurrentState(),
tab_contents,
@@ -295,7 +295,8 @@ RenderWidgetHostView*
// static
WebPreferences RenderViewHostDelegateHelper::GetWebkitPrefs(
- Profile* profile, bool is_web_ui) {
+ content::BrowserContext* context, bool is_web_ui) {
+ Profile* profile = static_cast<Profile*>(context);
PrefService* prefs = profile->GetPrefs();
WebPreferences web_prefs;
@@ -473,14 +474,18 @@ WebPreferences RenderViewHostDelegateHelper::GetWebkitPrefs(
}
void RenderViewHostDelegateHelper::UpdateInspectorSetting(
- Profile* profile, const std::string& key, const std::string& value) {
- DictionaryPrefUpdate update(profile->GetPrefs(),
+ content::BrowserContext* context,
+ const std::string& key,
+ const std::string& value) {
+ DictionaryPrefUpdate update(static_cast<Profile*>(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* context) {
+ static_cast<Profile*>(context)->GetPrefs()->
+ ClearPref(prefs::kWebKitInspectorSettings);
}

Powered by Google App Engine
This is Rietveld 408576698