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

Unified Diff: content/browser/tab_contents/tab_contents.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/tab_contents/tab_contents.h
diff --git a/content/browser/tab_contents/tab_contents.h b/content/browser/tab_contents/tab_contents.h
index 5d60b26c2221e89bef53a7855e6ed0f5d4046de0..e3bb731c3cdfb132ead823256aa965219dfecebf 100644
--- a/content/browser/tab_contents/tab_contents.h
+++ b/content/browser/tab_contents/tab_contents.h
@@ -15,6 +15,7 @@
#include "base/memory/scoped_ptr.h"
#include "base/observer_list.h"
#include "base/string16.h"
+#include "chrome/browser/profiles/profile.h"
#include "content/browser/download/save_package.h"
#include "content/browser/javascript_dialogs.h"
#include "content/browser/renderer_host/render_view_host_delegate.h"
@@ -40,7 +41,6 @@ class Rect;
class DownloadItem;
class LoadNotificationDetails;
-class Profile;
struct RendererPreferences;
class RenderViewHost;
class SessionStorageNamespace;
@@ -80,7 +80,7 @@ class TabContents : public PageNavigator,
// tab contentses to share the same session storage (part of the WebStorage
// spec) space. This is useful when restoring tabs, but most callers should
// pass in NULL which will cause a new SessionStorageNamespace to be created.
- TabContents(Profile* profile,
+ TabContents(content::BrowserContext* browser_context,
SiteInstance* site_instance,
int routing_id,
const TabContents* base_tab_contents,
@@ -102,9 +102,15 @@ class TabContents : public PageNavigator,
NavigationController& controller() { return controller_; }
const NavigationController& controller() const { return controller_; }
- // Returns the user profile associated with this TabContents (via the
+ // Returns the user context associated with this TabContents (via the
jam 2011/07/22 16:58:38 nit: browser_context
// NavigationController).
- Profile* profile() const { return controller_.profile(); }
+ content::BrowserContext* browser_context() const {
+ return controller_.browser_context();
+ }
+
+ // Returns the profile.
+ // TEMPORARY; http://crbug.com/76788
+ Profile* profile() const { return static_cast<Profile*>(browser_context()); }
// Returns the SavePackage which manages the page saving job. May be NULL.
SavePackage* save_package() const { return save_package_.get(); }
@@ -663,7 +669,8 @@ class TabContents : public PageNavigator,
virtual void RunBeforeUnloadConfirm(const RenderViewHost* rvh,
const string16& message,
IPC::Message* reply_msg);
- virtual RendererPreferences GetRendererPrefs(Profile* profile) const;
+ virtual RendererPreferences GetRendererPrefs(
+ content::BrowserContext* context) const OVERRIDE;
jam 2011/07/22 16:58:38 nit: browser_context
virtual WebPreferences GetWebkitPrefs();
virtual void OnUserGesture();
virtual void OnIgnoredUIEvent();

Powered by Google App Engine
This is Rietveld 408576698