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

Unified Diff: chrome/renderer/pepper/pepper_uma_host.cc

Issue 927483002: Fix the histograms whitelist for the OOP PDF plugin. (try 2) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix static initializer Created 5 years, 10 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/chrome_content_client_constants.cc ('k') | no next file » | 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 dc580e3ecd0010ed5c860e2e51cce8184243bcb1..693c4977a0a9c3c3492e68520627a2cd68511e15 100644
--- a/chrome/renderer/pepper/pepper_uma_host.cc
+++ b/chrome/renderer/pepper/pepper_uma_host.cc
@@ -7,6 +7,7 @@
#include "base/metrics/histogram.h"
#include "base/sha1.h"
#include "base/strings/string_number_conversions.h"
+#include "chrome/common/chrome_content_client.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/common/render_messages.h"
#include "chrome/renderer/chrome_content_renderer_client.h"
@@ -30,11 +31,11 @@ namespace {
const char* const kPredefinedAllowedUMAOrigins[] = {
"6EAED1924DB611B6EEF2A664BD077BE7EAD33B8F", // see http://crbug.com/317833
- "4EB74897CB187C7633357C2FE832E0AD6A44883A" // see http://crbug.com/317833
+ "4EB74897CB187C7633357C2FE832E0AD6A44883A", // see http://crbug.com/317833
};
const char* const kWhitelistedHistogramPrefixes[] = {
- "22F67DA2061FFC4DC9A4974036348D9C38C22919" // see http://crbug.com/390221
+ "22F67DA2061FFC4DC9A4974036348D9C38C22919", // see http://crbug.com/390221
};
const char* const kWhitelistedPluginBaseNames[] = {
@@ -42,7 +43,7 @@ const char* const kWhitelistedPluginBaseNames[] = {
kWidevineCdmAdapterFileName, // see http://crbug.com/368743
// and http://crbug.com/410630
#endif
- "libpdf.so" // see http://crbug.com/405305
+ ChromeContentClient::kPDFPluginPath,
};
std::string HashPrefix(const std::string& histogram) {
@@ -106,13 +107,12 @@ bool PepperUMAHost::IsHistogramAllowed(const std::string& histogram) {
}
if (IsPluginWhitelisted() &&
- allowed_histogram_prefixes_.find(HashPrefix(histogram)) !=
- allowed_histogram_prefixes_.end()) {
+ ContainsKey(allowed_histogram_prefixes_, HashPrefix(histogram))) {
return true;
}
- if (allowed_plugin_base_names_.find(plugin_base_name_.MaybeAsASCII()) !=
- allowed_plugin_base_names_.end()) {
+ if (ContainsKey(allowed_plugin_base_names_,
+ plugin_base_name_.MaybeAsASCII())) {
return true;
}
« no previous file with comments | « chrome/common/chrome_content_client_constants.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698