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

Side by Side Diff: chrome/renderer/pepper/pepper_uma_host.cc

Issue 508543002: OOP PDF - Allow OOP PDF to use histograms (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/renderer/pepper/pepper_uma_host.h" 5 #include "chrome/renderer/pepper/pepper_uma_host.h"
6 6
7 #include "base/metrics/histogram.h" 7 #include "base/metrics/histogram.h"
8 #include "base/sha1.h" 8 #include "base/sha1.h"
9 #include "base/strings/string_number_conversions.h" 9 #include "base/strings/string_number_conversions.h"
10 #include "chrome/common/chrome_switches.h" 10 #include "chrome/common/chrome_switches.h"
(...skipping 15 matching lines...) Expand all
26 const char* const kPredefinedAllowedUMAOrigins[] = { 26 const char* const kPredefinedAllowedUMAOrigins[] = {
27 "6EAED1924DB611B6EEF2A664BD077BE7EAD33B8F", // see http://crbug.com/317833 27 "6EAED1924DB611B6EEF2A664BD077BE7EAD33B8F", // see http://crbug.com/317833
28 "4EB74897CB187C7633357C2FE832E0AD6A44883A" // see http://crbug.com/317833 28 "4EB74897CB187C7633357C2FE832E0AD6A44883A" // see http://crbug.com/317833
29 }; 29 };
30 30
31 const char* const kWhitelistedHistogramPrefixes[] = { 31 const char* const kWhitelistedHistogramPrefixes[] = {
32 "22F67DA2061FFC4DC9A4974036348D9C38C22919" // see http://crbug.com/390221 32 "22F67DA2061FFC4DC9A4974036348D9C38C22919" // see http://crbug.com/390221
33 }; 33 };
34 34
35 const char* const kWhitelistedPluginBaseNames[] = { 35 const char* const kWhitelistedPluginBaseNames[] = {
36 "libwidevinecdmadapter.so" // see http://crbug.com/368743 36 "libwidevinecdmadapter.so", // see http://crbug.com/368743
37 "libpdf.so" // see http://crbug.com/405305
37 }; 38 };
38 39
39 std::string HashPrefix(const std::string& histogram) { 40 std::string HashPrefix(const std::string& histogram) {
40 const std::string id_hash = 41 const std::string id_hash =
41 base::SHA1HashString(histogram.substr(0, histogram.find('.'))); 42 base::SHA1HashString(histogram.substr(0, histogram.find('.')));
42 DCHECK_EQ(id_hash.length(), base::kSHA1Length); 43 DCHECK_EQ(id_hash.length(), base::kSHA1Length);
43 return base::HexEncode(id_hash.c_str(), id_hash.length()); 44 return base::HexEncode(id_hash.c_str(), id_hash.length());
44 } 45 }
45 46
46 } // namespace 47 } // namespace
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 ppapi::host::HostMessageContext* context) { 191 ppapi::host::HostMessageContext* context) {
191 if (!IsPluginWhitelisted()) 192 if (!IsPluginWhitelisted())
192 return PP_ERROR_NOACCESS; 193 return PP_ERROR_NOACCESS;
193 bool enabled = false; 194 bool enabled = false;
194 content::RenderThread::Get()->Send( 195 content::RenderThread::Get()->Send(
195 new ChromeViewHostMsg_IsCrashReportingEnabled(&enabled)); 196 new ChromeViewHostMsg_IsCrashReportingEnabled(&enabled));
196 if (enabled) 197 if (enabled)
197 return PP_OK; 198 return PP_OK;
198 return PP_ERROR_FAILED; 199 return PP_ERROR_FAILED;
199 } 200 }
OLDNEW
« 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