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

Unified Diff: chrome/browser/tabs/tab_strip_model.cc

Issue 7049004: Normalize chrome://foo/ trailing slashes, ChromeURLHostEquals comparison, RIP dead consts. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Move ChromeURLHostEquals to web_ui_util. Created 9 years, 7 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
« no previous file with comments | « chrome/browser/extensions/extension_install_ui.cc ('k') | chrome/browser/ui/browser.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/tabs/tab_strip_model.cc
diff --git a/chrome/browser/tabs/tab_strip_model.cc b/chrome/browser/tabs/tab_strip_model.cc
index d1ded2fb870b424509045ebb4b63ded573a3a98a..908bac2b9570fe6eea095736bd3d564831f8cfac 100644
--- a/chrome/browser/tabs/tab_strip_model.cc
+++ b/chrome/browser/tabs/tab_strip_model.cc
@@ -22,6 +22,7 @@
#include "chrome/browser/tabs/tab_strip_model_delegate.h"
#include "chrome/browser/tabs/tab_strip_model_order_controller.h"
#include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h"
+#include "chrome/browser/ui/webui/web_ui_util.h"
#include "chrome/common/extensions/extension.h"
#include "chrome/common/url_constants.h"
#include "content/browser/renderer_host/render_process_host.h"
@@ -1102,8 +1103,8 @@ std::vector<int> TabStripModel::GetIndicesForCommand(int index) const {
bool TabStripModel::IsNewTabAtEndOfTabStrip(
TabContentsWrapper* contents) const {
- return LowerCaseEqualsASCII(contents->tab_contents()->GetURL().spec(),
- chrome::kChromeUINewTabURL) &&
+ const GURL& url = contents->tab_contents()->GetURL();
+ return web_ui_util::ChromeURLHostEquals(url, chrome::kChromeUINewTabHost) &&
contents == GetContentsAt(count() - 1) &&
contents->controller().entry_count() == 1;
}
« no previous file with comments | « chrome/browser/extensions/extension_install_ui.cc ('k') | chrome/browser/ui/browser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698