summaryrefslogtreecommitdiffstats
path: root/chrome/browser
diff options
context:
space:
mode:
authortim@chromium.org <tim@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2008-09-16 00:37:37 +0000
committertim@chromium.org <tim@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2008-09-16 00:37:37 +0000
commit0ae7d14ea97bdb4170948521144de57059eb4eeb (patch)
treebe76ed4549502f6ac6c4761a4e6e0420649fa94b /chrome/browser
parenta6e14c9c3c2af6b0a541c9399a984bdf1c4398ad (diff)
downloadchromium_src-0ae7d14ea97bdb4170948521144de57059eb4eeb.zip
chromium_src-0ae7d14ea97bdb4170948521144de57059eb4eeb.tar.gz
chromium_src-0ae7d14ea97bdb4170948521144de57059eb4eeb.tar.bz2
Remove registration step between NavigationController > Profile.
No code path requires NavigationControllers to register themselves with a profile. We won't need this moving forward, either. Review URL: http://codereview.chromium.org/2869 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2254 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser')
-rw-r--r--chrome/browser/navigation_controller.cc4
-rw-r--r--chrome/browser/profile.cc27
-rw-r--r--chrome/browser/profile.h19
3 files changed, 0 insertions, 50 deletions
diff --git a/chrome/browser/navigation_controller.cc b/chrome/browser/navigation_controller.cc
index d294ace..6f723b4 100644
--- a/chrome/browser/navigation_controller.cc
+++ b/chrome/browser/navigation_controller.cc
@@ -174,7 +174,6 @@ NavigationController::NavigationController(TabContents* contents,
if (contents)
RegisterTabContents(contents);
DCHECK(profile_);
- profile_->RegisterNavigationController(this);
}
NavigationController::NavigationController(
@@ -197,8 +196,6 @@ NavigationController::NavigationController(
DCHECK(selected_navigation >= 0 &&
selected_navigation < static_cast<int>(navigations.size()));
- profile_->RegisterNavigationController(this);
-
// Populate entries_ from the supplied TabNavigations.
CreateNavigationEntriesFromTabNavigations(navigations, &entries_);
@@ -212,7 +209,6 @@ NavigationController::~NavigationController() {
DiscardPendingEntryInternal();
- profile_->UnregisterNavigationController(this);
NotificationService::current()->Notify(NOTIFY_TAB_CLOSED,
Source<NavigationController>(this),
NotificationService::NoDetails());
diff --git a/chrome/browser/profile.cc b/chrome/browser/profile.cc
index 28027c7..dacbe95 100644
--- a/chrome/browser/profile.cc
+++ b/chrome/browser/profile.cc
@@ -451,19 +451,6 @@ class OffTheRecordProfileImpl : public Profile,
profile_->SetID(id);
}
- virtual void RegisterNavigationController(NavigationController* controller) {
- profile_->RegisterNavigationController(controller);
- }
-
- virtual void UnregisterNavigationController(NavigationController*
- controller) {
- profile_->UnregisterNavigationController(controller);
- }
-
- virtual const Profile::ProfileControllerSet& GetNavigationControllers() {
- return profile_->GetNavigationControllers();
- }
-
virtual bool DidLastSessionExitCleanly() {
return profile_->DidLastSessionExitCleanly();
}
@@ -815,20 +802,6 @@ void ProfileImpl::SetID(const std::wstring& id) {
GetPrefs()->SetString(prefs::kProfileID, id);
}
-void ProfileImpl::RegisterNavigationController(
- NavigationController* controller) {
- controllers_.insert(controller);
-}
-
-void ProfileImpl::UnregisterNavigationController(
- NavigationController* controller) {
- controllers_.erase(controller);
-}
-
-const Profile::ProfileControllerSet& ProfileImpl::GetNavigationControllers() {
- return controllers_;
-}
-
bool ProfileImpl::DidLastSessionExitCleanly() {
// last_session_exited_cleanly_ is set when the preferences are loaded. Force
// it to be set by asking for the prefs.
diff --git a/chrome/browser/profile.h b/chrome/browser/profile.h
index 2d7dbac..de7044e 100644
--- a/chrome/browser/profile.h
+++ b/chrome/browser/profile.h
@@ -167,20 +167,6 @@ class Profile {
virtual std::wstring GetID() = 0;
virtual void SetID(const std::wstring& id) = 0;
- // Allows open tabs using this profile to be registered, so that they
- // can be closed. When the last tab is unregistered, the profile removes
- // itself from the profile manager and deletes itself.
- // NOTE: NavigationController is the most stable object associated with
- // a notional tab, so we're using that to track tabs.
- virtual void RegisterNavigationController(
- NavigationController* controller) = 0;
- virtual void UnregisterNavigationController(
- NavigationController* controller) = 0;
-
- // Return the registered navigation controllers.
- typedef std::set<NavigationController*> ProfileControllerSet;
- virtual const ProfileControllerSet& GetNavigationControllers() = 0;
-
// Returns true if the last time this profile was open it was exited cleanly.
virtual bool DidLastSessionExitCleanly() = 0;
@@ -258,9 +244,6 @@ class ProfileImpl : public Profile {
virtual void SetName(const std::wstring& name);
virtual std::wstring GetID();
virtual void SetID(const std::wstring& id);
- virtual void RegisterNavigationController(NavigationController* controller);
- virtual void UnregisterNavigationController(NavigationController* controller);
- virtual const Profile::ProfileControllerSet& GetNavigationControllers();
virtual bool DidLastSessionExitCleanly();
virtual BookmarkModel* GetBookmarkModel();
virtual bool IsSameProfile(Profile* profile);
@@ -313,8 +296,6 @@ class ProfileImpl : public Profile {
// Whether or not the last session exited cleanly. This is set only once.
bool last_session_exited_cleanly_;
- ProfileControllerSet controllers_;
-
base::OneShotTimer<ProfileImpl> create_session_service_timer_;
scoped_ptr<OffTheRecordProfileImpl> off_the_record_profile_;