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

Unified Diff: content/browser/renderer_host/render_view_host.cc

Issue 7480028: Removal of Profile from content part 2. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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: content/browser/renderer_host/render_view_host.cc
diff --git a/content/browser/renderer_host/render_view_host.cc b/content/browser/renderer_host/render_view_host.cc
index 9b1b954300c53591f9c0394442c6e9c20167357b..d7526b6c76f4f3024109c0ca2788e6114da6f1fe 100644
--- a/content/browser/renderer_host/render_view_host.cc
+++ b/content/browser/renderer_host/render_view_host.cc
@@ -104,8 +104,8 @@ RenderViewHost::RenderViewHost(SiteInstance* instance,
save_accessibility_tree_for_testing_(false),
render_view_termination_status_(base::TERMINATION_STATUS_STILL_RUNNING) {
if (!session_storage_namespace_) {
- session_storage_namespace_ =
- new SessionStorageNamespace(process()->profile()->GetWebKitContext());
+ session_storage_namespace_ = new SessionStorageNamespace(
+ process()->browser_context()->GetWebKitContext());
}
DCHECK(instance_);
@@ -147,7 +147,7 @@ bool RenderViewHost::CreateRenderView(const string16& frame_name) {
if (!process()->Init(renderer_accessible()))
return false;
DCHECK(process()->HasConnection());
- DCHECK(process()->profile());
+ DCHECK(process()->browser_context());
if (BindingsPolicy::is_web_ui_enabled(enabled_bindings_)) {
ChildProcessSecurityPolicy::GetInstance()->GrantWebUIBindings(
@@ -167,7 +167,7 @@ bool RenderViewHost::CreateRenderView(const string16& frame_name) {
ViewMsg_New_Params params;
params.parent_window = GetNativeViewId();
params.renderer_preferences =
- delegate_->GetRendererPrefs(process()->profile());
+ delegate_->GetRendererPrefs(process()->browser_context());
params.web_preferences = delegate_->GetWebkitPrefs();
params.view_id = routing_id();
params.session_storage_namespace_id = session_storage_namespace_->id();
@@ -193,7 +193,7 @@ bool RenderViewHost::IsRenderViewLive() const {
void RenderViewHost::SyncRendererPrefs() {
Send(new ViewMsg_SetRendererPrefs(routing_id(),
delegate_->GetRendererPrefs(
- process()->profile())));
+ process()->browser_context())));
}
void RenderViewHost::Navigate(const ViewMsg_Navigate_Params& params) {
@@ -1260,14 +1260,15 @@ void RenderViewHost::OnDidZoomURL(double zoom_level,
bool remember,
const GURL& url) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
- HostZoomMap* host_zoom_map = process()->profile()->GetHostZoomMap();
+ HostZoomMap* host_zoom_map = process()->browser_context()->GetHostZoomMap();
if (remember) {
host_zoom_map->SetZoomLevel(net::GetHostOrSpecFromURL(url), zoom_level);
// Notify renderers from this profile.
for (RenderProcessHost::iterator i(RenderProcessHost::AllHostsIterator());
!i.IsAtEnd(); i.Advance()) {
RenderProcessHost* render_process_host = i.GetCurrentValue();
- if (render_process_host->profile() == process()->profile()) {
+ if (render_process_host->browser_context() ==
+ process()->browser_context()) {
render_process_host->Send(
new ViewMsg_SetZoomLevelForCurrentURL(url, zoom_level));
}

Powered by Google App Engine
This is Rietveld 408576698