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

Unified Diff: chrome/browser/ui/browser.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/tabs/tab_strip_model.cc ('k') | chrome/browser/ui/gtk/browser_toolbar_gtk.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/browser.cc
diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc
index f5f57fb5c44927d9f128f9aa7864e74f3e640a77..2d189340f8157e1cc5946947a2233d90f6f3b1d1 100644
--- a/chrome/browser/ui/browser.cc
+++ b/chrome/browser/ui/browser.cc
@@ -95,6 +95,7 @@
#include "chrome/browser/ui/webui/active_downloads_ui.h"
#include "chrome/browser/ui/webui/bug_report_ui.h"
#include "chrome/browser/ui/webui/options/content_settings_handler.h"
+#include "chrome/browser/ui/webui/web_ui_util.h"
#include "chrome/browser/ui/window_sizer.h"
#include "chrome/browser/upgrade_detector.h"
#include "chrome/browser/web_applications/web_app.h"
@@ -1600,8 +1601,8 @@ void Browser::ToggleFullscreenMode() {
#if defined(OS_CHROMEOS)
void Browser::Search() {
// If the NTP is showing, close it.
- if (StartsWithASCII(GetSelectedTabContents()->GetURL().spec(),
- chrome::kChromeUINewTabURL, true)) {
+ const GURL& url = GetSelectedTabContents()->GetURL();
+ if (web_ui_util::ChromeURLHostEquals(url, chrome::kChromeUINewTabHost)) {
CloseTab();
return;
}
« no previous file with comments | « chrome/browser/tabs/tab_strip_model.cc ('k') | chrome/browser/ui/gtk/browser_toolbar_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698