Index: content/browser/renderer_host/render_process_host.h |
diff --git a/content/browser/renderer_host/render_process_host.h b/content/browser/renderer_host/render_process_host.h |
index 5035cd4250837853631e722297f266dfb24a9305..0b3b3e9c59905301bd0137d85a34e386518d073c 100644 |
--- a/content/browser/renderer_host/render_process_host.h |
+++ b/content/browser/renderer_host/render_process_host.h |
@@ -13,17 +13,21 @@ |
#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" |
-class Profile; |
struct ViewMsg_SwapOut_Params; |
namespace base { |
class SharedMemory; |
} |
+namespace content { |
+class BrowserContext; |
+} |
+ |
namespace net { |
class URLRequestContextGetter; |
} |
@@ -64,11 +68,17 @@ class RenderProcessHost : public IPC::Channel::Sender, |
bool was_extension_renderer; |
}; |
- explicit RenderProcessHost(Profile* profile); |
+ explicit RenderProcessHost(content::BrowserContext* browser_context); |
virtual ~RenderProcessHost(); |
- // Returns the user profile associated with this renderer process. |
- Profile* profile() const { return profile_; } |
+ // 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 |
@@ -262,12 +272,13 @@ class RenderProcessHost : public IPC::Channel::Sender, |
// RenderProcessHost rather than creating a new one. |
static bool ShouldTryToUseExistingProcessHost(); |
- // Get an existing RenderProcessHost associated with the given profile, if |
- // possible. The renderer process is chosen randomly from suitable renderers |
- // that share the same profile and type. |
+ // Get an existing RenderProcessHost associated with the given browser |
+ // context, if possible. The renderer process is chosen randomly from |
+ // suitable renderers that share the same context and type. |
// Returns NULL if no suitable renderer process is available, in which case |
// the caller is free to create a new renderer. |
- static RenderProcessHost* GetExistingProcessHost(Profile* profile, Type type); |
+ static RenderProcessHost* GetExistingProcessHost( |
+ content::BrowserContext* browser_context, Type type); |
// Overrides the default heuristic for limiting the max renderer process |
// count. This is useful for unit testing process limit behaviors. |
@@ -305,7 +316,7 @@ class RenderProcessHost : public IPC::Channel::Sender, |
// The globally-unique identifier for this RPH. |
int id_; |
- Profile* profile_; |
+ content::BrowserContext* browser_context_; |
// set of listeners that expect the renderer process to close |
std::set<int> listeners_expecting_close_; |
@@ -337,7 +348,7 @@ class RenderProcessHostFactory { |
public: |
virtual ~RenderProcessHostFactory() {} |
virtual RenderProcessHost* CreateRenderProcessHost( |
- Profile* profile) const = 0; |
+ content::BrowserContext* browser_context) const = 0; |
}; |
#endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_PROCESS_HOST_H_ |