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

Unified Diff: chrome/browser/ui/browser_navigator_browsertest.cc

Issue 2136453004: Reland of place string::find(prefix) == 0 pattern with base::StartsWith(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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
Index: chrome/browser/ui/browser_navigator_browsertest.cc
diff --git a/chrome/browser/ui/browser_navigator_browsertest.cc b/chrome/browser/ui/browser_navigator_browsertest.cc
index 4c8c1d98b578c3dee46e667bbfe633f54491a1fd..efae8f10f1bc73365fd7528efb12e56b488a7aa8 100644
--- a/chrome/browser/ui/browser_navigator_browsertest.cc
+++ b/chrome/browser/ui/browser_navigator_browsertest.cc
@@ -68,7 +68,7 @@
std::string url_string = url.spec();
const std::string long_prefix = "chrome://chrome/";
const std::string short_prefix = "chrome://";
- if (url_string.find(long_prefix) != 0)
+ if (!base::StartsWith(url_string, long_prefix, base::CompareCase::SENSITIVE))
return url;
url_string.replace(0, long_prefix.length(), short_prefix);
return GURL(url_string);
« no previous file with comments | « chrome/browser/profiles/profile_avatar_icon_util.cc ('k') | chrome/browser/ui/find_bar/find_bar_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698