diff options
author | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-03-05 20:17:00 +0000 |
---|---|---|
committer | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-03-05 20:17:00 +0000 |
commit | 0ed164e1bbe8bde1b5be616c10ef46388ea78079 (patch) | |
tree | f3245ca128c4240c37c47a7501faa985951e634e /chrome/browser/tabs | |
parent | 0654b7ba355aab9435a54cf9b5a7397ffc308b45 (diff) | |
download | chromium_src-0ed164e1bbe8bde1b5be616c10ef46388ea78079.zip chromium_src-0ed164e1bbe8bde1b5be616c10ef46388ea78079.tar.gz chromium_src-0ed164e1bbe8bde1b5be616c10ef46388ea78079.tar.bz2 |
Remove the TAB_CONTENTS_NEW_TAB_UI tab contents type. This was not actually used
now, so everytime this appears was dead code.
Review URL: http://codereview.chromium.org/39200
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11024 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/tabs')
-rw-r--r-- | chrome/browser/tabs/tab_strip_model.cc | 5 | ||||
-rw-r--r-- | chrome/browser/tabs/tab_strip_model_unittest.cc | 2 |
2 files changed, 5 insertions, 2 deletions
diff --git a/chrome/browser/tabs/tab_strip_model.cc b/chrome/browser/tabs/tab_strip_model.cc index 46d56fb..6a67942 100644 --- a/chrome/browser/tabs/tab_strip_model.cc +++ b/chrome/browser/tabs/tab_strip_model.cc @@ -13,12 +13,14 @@ #include "chrome/common/temp_scaffolding_stubs.h" #endif +#include "base/string_util.h" #include "chrome/browser/metrics/user_metrics.h" #include "chrome/browser/profile.h" #include "chrome/browser/tabs/tab_strip_model_order_controller.h" #include "chrome/browser/tab_contents/navigation_controller.h" #include "chrome/common/notification_service.h" #include "chrome/common/stl_util-inl.h" +#include "chrome/common/url_constants.h" namespace { @@ -532,7 +534,8 @@ void TabStripModel::Observe(NotificationType type, // TabStripModel, private: bool TabStripModel::IsNewTabAtEndOfTabStrip(TabContents* contents) const { - return contents->type() == TAB_CONTENTS_NEW_TAB_UI && + return LowerCaseEqualsASCII(contents->GetURL().spec(), + chrome::kChromeUINewTabURL) && contents == GetContentsAt(count() - 1) && contents->controller()->GetEntryCount() == 1; } diff --git a/chrome/browser/tabs/tab_strip_model_unittest.cc b/chrome/browser/tabs/tab_strip_model_unittest.cc index 48a16b4..323fd25 100644 --- a/chrome/browser/tabs/tab_strip_model_unittest.cc +++ b/chrome/browser/tabs/tab_strip_model_unittest.cc @@ -142,7 +142,7 @@ class TabStripModelTest : public testing::Test { } TabContents* CreateNewTabTabContents() { TabStripModelTestTabContents* contents = - new TabStripModelTestTabContents(TAB_CONTENTS_NEW_TAB_UI); + new TabStripModelTestTabContents(TAB_CONTENTS_WEB); contents->SetupController(profile_); return contents; } |