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

Unified Diff: chrome/browser/extensions/api/tab_capture/tab_capture_api.cc

Issue 2619973002: Prefix search code improvement in tab_capture_api.cc (Closed)
Patch Set: Created 3 years, 11 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/api/tab_capture/tab_capture_api.cc
diff --git a/chrome/browser/extensions/api/tab_capture/tab_capture_api.cc b/chrome/browser/extensions/api/tab_capture/tab_capture_api.cc
index 17987c1481d20419bbacea103a2451364b74787e..7ad501fee3a308161194491edc0bb6889e7db215 100644
--- a/chrome/browser/extensions/api/tab_capture/tab_capture_api.cc
+++ b/chrome/browser/extensions/api/tab_capture/tab_capture_api.cc
@@ -15,6 +15,7 @@
#include "base/command_line.h"
#include "base/macros.h"
+#include "base/strings/string_util.h"
#include "base/strings/stringprintf.h"
#include "base/values.h"
#include "chrome/browser/extensions/api/tab_capture/offscreen_tab.h"
@@ -87,7 +88,7 @@ void FilterDeprecatedGoogConstraints(TabCapture::CaptureOptions* options) {
std::vector<std::string> bad_keys;
base::DictionaryValue::Iterator it(*dict);
for (; !it.IsAtEnd(); it.Advance()) {
- if (it.key().find("goog") == 0)
+ if (base::StartsWith(it.key(), "goog", base::CompareCase::SENSITIVE))
bad_keys.push_back(it.key());
}
for (const std::string& k : bad_keys) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698