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

Unified Diff: chrome/test/chromedriver/chrome/chrome_desktop_impl.cc

Issue 2127373006: Use base::StartWith() in more places when appropriate. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase, resolve conflict 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/test/chromedriver/chrome/chrome_desktop_impl.cc
diff --git a/chrome/test/chromedriver/chrome/chrome_desktop_impl.cc b/chrome/test/chromedriver/chrome/chrome_desktop_impl.cc
index a9685328013b4b62b0305f5e1276360797d27616..65784da87080d11c3166825cf5505de5e14aaf48 100644
--- a/chrome/test/chromedriver/chrome/chrome_desktop_impl.cc
+++ b/chrome/test/chromedriver/chrome/chrome_desktop_impl.cc
@@ -11,6 +11,7 @@
#include "base/logging.h"
#include "base/posix/eintr_wrapper.h"
#include "base/process/kill.h"
+#include "base/strings/string_util.h"
#include "base/sys_info.h"
#include "base/threading/platform_thread.h"
#include "base/time/time.h"
@@ -122,7 +123,7 @@ Status ChromeDesktopImpl::WaitForPageToLoad(
for (size_t i = 0; i < views_info.GetSize(); ++i) {
const WebViewInfo& view_info = views_info.Get(i);
- if (view_info.url.find(url) == 0) {
+ if (base::StartsWith(view_info.url, url, base::CompareCase::SENSITIVE)) {
id = view_info.id;
type = view_info.type;
break;
« no previous file with comments | « chrome/test/chromedriver/chrome/browser_info.cc ('k') | chrome/test/chromedriver/chrome/devtools_http_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698