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

Unified Diff: content/browser/renderer_host/render_process_host.h

Issue 7464009: Removal of Profile from content part 1. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: browser_context 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_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..5c1dabf4d355c64877ade703494d647af58d0f6e 100644
--- a/content/browser/renderer_host/render_process_host.h
+++ b/content/browser/renderer_host/render_process_host.h
@@ -24,6 +24,10 @@ namespace base {
class SharedMemory;
}
+namespace content {
+class BrowserContext;
+}
+
namespace net {
class URLRequestContextGetter;
}
@@ -64,10 +68,14 @@ class RenderProcessHost : public IPC::Channel::Sender,
bool was_extension_renderer;
};
- explicit RenderProcessHost(Profile* profile);
+ explicit RenderProcessHost(content::BrowserContext* context);
virtual ~RenderProcessHost();
- // Returns the user profile associated with this renderer process.
+ // Returns the user context associated with this renderer process.
+ content::BrowserContext* context() const { return context_; }
jam 2011/07/22 16:58:38 nit: browser_context everywhere in this file
+
+ // Returns the profile.
+ // TEMPORARY; http://crbug.com/76788
Profile* profile() const { return profile_; }
// Returns the unique ID for this child process. This can be used later in
@@ -262,12 +270,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
+ // Get an existing RenderProcessHost associated with the given context, if
// possible. The renderer process is chosen randomly from suitable renderers
- // that share the same profile and type.
+ // 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* context, Type type);
// Overrides the default heuristic for limiting the max renderer process
// count. This is useful for unit testing process limit behaviors.
@@ -305,6 +314,9 @@ class RenderProcessHost : public IPC::Channel::Sender,
// The globally-unique identifier for this RPH.
int id_;
+ content::BrowserContext* context_;
+
+ // TEMPORARY; http://crbug.com/76788
Profile* profile_;
// set of listeners that expect the renderer process to close
@@ -337,7 +349,7 @@ class RenderProcessHostFactory {
public:
virtual ~RenderProcessHostFactory() {}
virtual RenderProcessHost* CreateRenderProcessHost(
- Profile* profile) const = 0;
+ content::BrowserContext* context) const = 0;
};
#endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_PROCESS_HOST_H_

Powered by Google App Engine
This is Rietveld 408576698