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

Unified Diff: chrome/browser/gpu_util.cc

Issue 9864046: Don't log GPU blackluist stats if GPU blacklist is not loaded. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 9 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/gpu_util.cc
===================================================================
--- chrome/browser/gpu_util.cc (revision 129207)
+++ chrome/browser/gpu_util.cc (working copy)
@@ -390,13 +390,19 @@
}
void UpdateStats() {
+ GpuBlacklist* blacklist = GpuBlacklist::GetInstance();
+ uint32 max_entry_id = blacklist->max_entry_id();
+ if (max_entry_id == 0) {
+ // GPU Blacklist was not loaded. No need to go further.
+ return;
+ }
+
const CommandLine& command_line = *CommandLine::ForCurrentProcess();
uint32 flags = GpuDataManager::GetInstance()->GetGpuFeatureType();
- GpuBlacklist* blacklist = GpuBlacklist::GetInstance();
bool disabled = false;
if (flags == 0) {
UMA_HISTOGRAM_ENUMERATION("GPU.BlacklistTestResultsPerEntry",
- 0, blacklist->max_entry_id() + 1);
+ 0, max_entry_id + 1);
} else {
std::vector<uint32> flag_entries;
blacklist->GetGpuFeatureTypeEntries(
@@ -404,7 +410,7 @@
DCHECK_GT(flag_entries.size(), 0u);
for (size_t i = 0; i < flag_entries.size(); ++i) {
UMA_HISTOGRAM_ENUMERATION("GPU.BlacklistTestResultsPerEntry",
- flag_entries[i], blacklist->max_entry_id() + 1);
+ flag_entries[i], max_entry_id + 1);
}
}
@@ -416,7 +422,7 @@
content::GPU_FEATURE_TYPE_ALL, flag_disabled_entries, disabled);
for (size_t i = 0; i < flag_disabled_entries.size(); ++i) {
UMA_HISTOGRAM_ENUMERATION("GPU.BlacklistTestResultsPerDisabledEntry",
- flag_disabled_entries[i], blacklist->max_entry_id() + 1);
+ flag_disabled_entries[i], max_entry_id + 1);
}
const content::GpuFeatureType kGpuFeatures[] = {
« 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