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

Unified Diff: content/browser/tab_contents/navigation_controller.h

Issue 7464009: Removal of Profile from content part 1. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: slight tweaking for comments 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/navigation_controller.h
diff --git a/content/browser/tab_contents/navigation_controller.h b/content/browser/tab_contents/navigation_controller.h
index a4132ce072c178e486f30bb6537d4b36f4ce6cb2..b2d254a8c4bea601dea774c160f93900a493edef 100644
--- a/content/browser/tab_contents/navigation_controller.h
+++ b/content/browser/tab_contents/navigation_controller.h
@@ -14,18 +14,19 @@
#include "base/memory/linked_ptr.h"
#include "base/time.h"
#include "googleurl/src/gurl.h"
+#include "chrome/browser/profiles/profile.h"
#include "content/browser/ssl/ssl_manager.h"
#include "content/common/navigation_types.h"
#include "content/common/page_transition_types.h"
class NavigationEntry;
-class Profile;
class SessionStorageNamespace;
class SiteInstance;
class TabContents;
struct ViewHostMsg_FrameNavigate_Params;
namespace content {
+class BrowserContext;
struct LoadCommittedDetails;
}
@@ -46,18 +47,24 @@ class NavigationController {
// ---------------------------------------------------------------------------
NavigationController(TabContents* tab_contents,
- Profile* profile,
+ content::BrowserContext* browser_context,
SessionStorageNamespace* session_storage_namespace);
~NavigationController();
- // Returns the profile for this controller. It can never be NULL.
- Profile* profile() const {
- return profile_;
+ // Returns the browser context for this controller. It can never be NULL.
+ content::BrowserContext* browser_context() const {
+ return browser_context_;
+ }
+
+ // Sets the browser context for this controller.
+ void set_browser_context(content::BrowserContext* browser_context) {
+ browser_context_ = browser_context;
}
- // Sets the profile for this controller.
- void set_profile(Profile* profile) {
- profile_ = profile;
+ // Returns the profile.
+ // TEMPORARY; http://crbug.com/76788
+ Profile* profile() const {
+ return Profile::FromBrowserContext(browser_context());
}
// Initializes this NavigationController with the given saved navigations,
@@ -319,10 +326,11 @@ class NavigationController {
// Creates navigation entry and translates the virtual url to a real one.
// Used when navigating to a new URL using LoadURL.
- static NavigationEntry* CreateNavigationEntry(const GURL& url,
- const GURL& referrer,
- PageTransition::Type transition,
- Profile* profile);
+ static NavigationEntry* CreateNavigationEntry(
+ const GURL& url,
+ const GURL& referrer,
+ PageTransition::Type transition,
+ content::BrowserContext* browser_context);
private:
class RestoreHelper;
@@ -410,8 +418,8 @@ class NavigationController {
// ---------------------------------------------------------------------------
- // The user profile associated with this controller
- Profile* profile_;
+ // The user browser context associated with this controller.
+ content::BrowserContext* browser_context_;
// List of NavigationEntry for this tab
typedef std::vector<linked_ptr<NavigationEntry> > NavigationEntries;
« no previous file with comments | « content/browser/tab_contents/interstitial_page.cc ('k') | content/browser/tab_contents/navigation_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698