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

Unified Diff: chrome/renderer/pepper/pepper_uma_host.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
« no previous file with comments | « chrome/common/importer/firefox_importer_utils.cc ('k') | chrome/test/chromedriver/chrome/browser_info.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/pepper/pepper_uma_host.cc
diff --git a/chrome/renderer/pepper/pepper_uma_host.cc b/chrome/renderer/pepper/pepper_uma_host.cc
index 6a1e5a32dbbf8c6dfa57877b2ff99066a483ceab..56ef732c6648c20bb7363e113b3b2c360281cea8 100644
--- a/chrome/renderer/pepper/pepper_uma_host.cc
+++ b/chrome/renderer/pepper/pepper_uma_host.cc
@@ -10,6 +10,7 @@
#include "base/metrics/histogram.h"
#include "base/sha1.h"
#include "base/strings/string_number_conversions.h"
+#include "base/strings/string_util.h"
#include "chrome/common/chrome_content_client.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/common/render_messages.h"
@@ -113,7 +114,8 @@ bool PepperUMAHost::IsPluginWhitelisted() {
}
bool PepperUMAHost::IsHistogramAllowed(const std::string& histogram) {
- if (is_plugin_in_process_ && histogram.find("NaCl.") == 0) {
+ if (is_plugin_in_process_ &&
+ base::StartsWith(histogram, "NaCl.", base::CompareCase::SENSITIVE)) {
return true;
}
« no previous file with comments | « chrome/common/importer/firefox_importer_utils.cc ('k') | chrome/test/chromedriver/chrome/browser_info.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698