diff options
author | avi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-07-27 19:23:38 +0000 |
---|---|---|
committer | avi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-07-27 19:23:38 +0000 |
commit | 6205c4f2302239185dd2a93c105c18f0dd14af63 (patch) | |
tree | 9281fac0b7e3d7c1819c6b49384fb80b64dd5ab6 /content/browser | |
parent | fc0a3b6d4bbacdcf2926200e1f854ba5cc40628d (diff) | |
download | chromium_src-6205c4f2302239185dd2a93c105c18f0dd14af63.zip chromium_src-6205c4f2302239185dd2a93c105c18f0dd14af63.tar.gz chromium_src-6205c4f2302239185dd2a93c105c18f0dd14af63.tar.bz2 |
Removal of Profile from content part 2.
BUG=76788
TEST=no change visible
Review URL: http://codereview.chromium.org/7480028
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@94332 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/browser')
-rw-r--r-- | content/browser/browsing_instance.h | 7 | ||||
-rw-r--r-- | content/browser/debugger/devtools_manager.cc | 3 | ||||
-rw-r--r-- | content/browser/renderer_host/render_process_host.h | 7 | ||||
-rw-r--r-- | content/browser/renderer_host/render_view_host.cc | 15 |
4 files changed, 10 insertions, 22 deletions
diff --git a/content/browser/browsing_instance.h b/content/browser/browsing_instance.h index 31a1cf4..b550659 100644 --- a/content/browser/browsing_instance.h +++ b/content/browser/browsing_instance.h @@ -8,7 +8,6 @@ #include "base/hash_tables.h" #include "base/memory/ref_counted.h" -#include "chrome/browser/profiles/profile.h" class GURL; class SiteInstance; @@ -70,12 +69,6 @@ class BrowsingInstance : public base::RefCounted<BrowsingInstance> { // Get the browser context to which this BrowsingInstance belongs. content::BrowserContext* browser_context() { return browser_context_; } - // Returns the profile. - // TEMPORARY; http://crbug.com/76788 - Profile* profile() { - return Profile::FromBrowserContext(browser_context()); - } - // Returns whether this BrowsingInstance has registered a SiteInstance for // the site of the given URL. bool HasSiteInstance(const GURL& url); diff --git a/content/browser/debugger/devtools_manager.cc b/content/browser/debugger/devtools_manager.cc index 01e6479..383d6c4 100644 --- a/content/browser/debugger/devtools_manager.cc +++ b/content/browser/debugger/devtools_manager.cc @@ -122,7 +122,8 @@ void DevToolsManager::ClientHostClosing(DevToolsClientHost* host) { NotificationService::current()->Notify( content::NOTIFICATION_DEVTOOLS_WINDOW_CLOSING, - Source<Profile>(inspected_rvh->site_instance()->GetProcess()->profile()), + Source<content::BrowserContext>( + inspected_rvh->site_instance()->GetProcess()->browser_context()), Details<RenderViewHost>(inspected_rvh)); UnbindClientHost(inspected_rvh, host); diff --git a/content/browser/renderer_host/render_process_host.h b/content/browser/renderer_host/render_process_host.h index 0b3b3e9..569d55c 100644 --- a/content/browser/renderer_host/render_process_host.h +++ b/content/browser/renderer_host/render_process_host.h @@ -13,7 +13,6 @@ #include "base/process.h" #include "base/process_util.h" #include "base/time.h" -#include "chrome/browser/profiles/profile.h" #include "ipc/ipc_channel_proxy.h" #include "ui/gfx/native_widget_types.h" #include "ui/gfx/surface/transport_dib.h" @@ -74,12 +73,6 @@ class RenderProcessHost : public IPC::Channel::Sender, // Returns the user browser context associated with this renderer process. content::BrowserContext* browser_context() const { return browser_context_; } - // Returns the profile. - // TEMPORARY; http://crbug.com/76788 - Profile* profile() const { - return Profile::FromBrowserContext(browser_context()); - } - // Returns the unique ID for this child process. This can be used later in // a call to FromID() to get back to this object (this is used to avoid // sending non-threadsafe pointers to other threads). diff --git a/content/browser/renderer_host/render_view_host.cc b/content/browser/renderer_host/render_view_host.cc index 9b1b954..d7526b6 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)); } |