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

Unified Diff: content/browser/iframe_zoom_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: content/browser/iframe_zoom_browsertest.cc
diff --git a/content/browser/iframe_zoom_browsertest.cc b/content/browser/iframe_zoom_browsertest.cc
index b74135ca51bf11d8aa6bc1ee09f223bbf479e3d1..80ba2665553ef0d77b153790a348242293dee050 100644
--- a/content/browser/iframe_zoom_browsertest.cc
+++ b/content/browser/iframe_zoom_browsertest.cc
@@ -4,6 +4,7 @@
#include <vector>
+#include "base/strings/string_util.h"
#include "content/browser/frame_host/frame_tree_node.h"
#include "content/browser/frame_host/render_frame_host_impl.h"
#include "content/browser/web_contents/web_contents_impl.h"
@@ -121,7 +122,7 @@
}
void Check(const std::string& status_msg) {
- if (status_msg.find(msg_label) != 0)
+ if (!base::StartsWith(status_msg, msg_label, base::CompareCase::SENSITIVE))
return;
double inner_width = std::stod(status_msg.substr(msg_label.length() + 1));

Powered by Google App Engine
This is Rietveld 408576698