Commit c5d93145 authored by dcheng's avatar dcheng Committed by Commit bot

Revert of Fix the histograms whitelist for the OOP PDF plugin. (patchset #1...

Revert of Fix the histograms whitelist for the OOP PDF plugin. (patchset #1 id:1 of https://codereview.chromium.org/897863003/)

Reason for revert:
Introduced 2 new static initializers:

pepper_uma_host.cc (anonymous namespace)::kWhitelistedPluginBaseNames
pepper_uma_host.cc __init_array_end+0x5e8

Original issue's description:
> Fix the histograms whitelist for the OOP PDF plugin.
>
> BUG=405305
>
> Committed: https://crrev.com/ad1fecf3841f539281c8d6ff3a873bfc9c11571d
> Cr-Commit-Position: refs/heads/master@{#314764}

TBR=raymes@chromium.org,thestig@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=405305

Review URL: https://codereview.chromium.org/901863002

Cr-Commit-Position: refs/heads/master@{#314776}
parent 4a089d9d
......@@ -7,7 +7,6 @@
#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"
......@@ -31,11 +30,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[] = {
......@@ -43,7 +42,7 @@ const char* const kWhitelistedPluginBaseNames[] = {
kWidevineCdmAdapterFileName, // see http://crbug.com/368743
// and http://crbug.com/410630
#endif
ChromeContentClient::kPDFPluginPath,
"libpdf.so" // see http://crbug.com/405305
};
std::string HashPrefix(const std::string& histogram) {
......@@ -107,12 +106,13 @@ bool PepperUMAHost::IsHistogramAllowed(const std::string& histogram) {
}
if (IsPluginWhitelisted() &&
ContainsKey(allowed_histogram_prefixes_, HashPrefix(histogram))) {
allowed_histogram_prefixes_.find(HashPrefix(histogram)) !=
allowed_histogram_prefixes_.end()) {
return true;
}
if (ContainsKey(allowed_plugin_base_names_,
plugin_base_name_.MaybeAsASCII())) {
if (allowed_plugin_base_names_.find(plugin_base_name_.MaybeAsASCII()) !=
allowed_plugin_base_names_.end()) {
return true;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment