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

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

Issue 7068007: Revise about: and chrome: url handling. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Update special_tabs.py from Nirnimesh's codereview.chromium.org/6995057/. Created 9 years, 6 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/tab_restore_uitest.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 de8df7ff8a0a1c3618d3afb7c5f844aec280eaec..40f7d60303284116769074c99fb9edb0eafb2631 100644
--- a/chrome/browser/tabs/tab_strip_model.cc
+++ b/chrome/browser/tabs/tab_strip_model.cc
@@ -22,7 +22,6 @@
#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"
@@ -1104,9 +1103,10 @@ std::vector<int> TabStripModel::GetIndicesForCommand(int index) const {
bool TabStripModel::IsNewTabAtEndOfTabStrip(
TabContentsWrapper* contents) const {
const GURL& url = contents->tab_contents()->GetURL();
- return web_ui_util::ChromeURLHostEquals(url, chrome::kChromeUINewTabHost) &&
- contents == GetContentsAt(count() - 1) &&
- contents->controller().entry_count() == 1;
+ return url.SchemeIs(chrome::kChromeUIScheme) &&
+ url.host() == chrome::kChromeUINewTabHost &&
+ contents == GetContentsAt(count() - 1) &&
+ contents->controller().entry_count() == 1;
}
bool TabStripModel::InternalCloseTabs(const std::vector<int>& in_indices,
« no previous file with comments | « chrome/browser/tab_restore_uitest.cc ('k') | chrome/browser/ui/browser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698