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

Unified Diff: chrome/browser/ui/find_bar/find_bar_controller.cc

Issue 2137503002: Revert of Replace 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/find_bar/find_bar_controller.cc
diff --git a/chrome/browser/ui/find_bar/find_bar_controller.cc b/chrome/browser/ui/find_bar/find_bar_controller.cc
index f30cf920bc94356e5d95cbec12a3ae878cd53c22..909749f2437a3f06cc3c1bfaafb13c7f9ef92713 100644
--- a/chrome/browser/ui/find_bar/find_bar_controller.cc
+++ b/chrome/browser/ui/find_bar/find_bar_controller.cc
@@ -8,7 +8,6 @@
#include "base/i18n/rtl.h"
#include "base/logging.h"
-#include "base/strings/string_util.h"
#include "build/build_config.h"
#include "chrome/browser/chrome_notification_types.h"
#include "chrome/browser/profiles/profile.h"
@@ -144,10 +143,8 @@
const base::string16& last_search =
find_tab_helper->previous_find_text();
const base::string16& current_search = find_tab_helper->find_text();
- if (base::StartsWith(last_search, current_search,
- base::CompareCase::SENSITIVE)) {
+ if (last_search.find(current_search) != 0)
find_bar_->AudibleAlert();
- }
}
}
} else if (type == content::NOTIFICATION_NAV_ENTRY_COMMITTED) {
« no previous file with comments | « chrome/browser/ui/browser_navigator_browsertest.cc ('k') | chrome/test/chromedriver/net/adb_client_socket.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698