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

Unified Diff: content/browser/accessibility/browser_accessibility_state_impl.cc

Issue 11778045: Add test for accessibility histograms. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Removed extraneous comments Created 7 years, 11 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
Index: content/browser/accessibility/browser_accessibility_state_impl.cc
diff --git a/content/browser/accessibility/browser_accessibility_state_impl.cc b/content/browser/accessibility/browser_accessibility_state_impl.cc
index 2f6e0c32a46de535d7aa75cea4eedc964035568b..3cb73fe8a8e1656c440ca4537933d387e658a8e2 100644
--- a/content/browser/accessibility/browser_accessibility_state_impl.cc
+++ b/content/browser/accessibility/browser_accessibility_state_impl.cc
@@ -50,12 +50,12 @@ BrowserAccessibilityStateImpl::BrowserAccessibilityStateImpl()
}
#if defined(OS_WIN)
- // On Windows, UpdateHistogram calls some system functions with unknown
+ // On Windows, UpdateHistograms calls some system functions with unknown
// runtime, so call it on the file thread to ensure there's no jank.
// Everything in that method must be safe to call on another thread.
BrowserThread::ID update_histogram_thread = BrowserThread::FILE;
#else
- // On all other platforms, UpdateHistogram should be called on the main
+ // On all other platforms, UpdateHistograms should be called on the main
// thread.
BrowserThread::ID update_histogram_thread = BrowserThread::UI;
#endif
@@ -65,7 +65,7 @@ BrowserAccessibilityStateImpl::BrowserAccessibilityStateImpl()
AddRef();
BrowserThread::PostDelayedTask(
update_histogram_thread, FROM_HERE,
- base::Bind(&BrowserAccessibilityStateImpl::UpdateHistogram, this),
+ base::Bind(&BrowserAccessibilityStateImpl::UpdateHistograms, this),
base::TimeDelta::FromSeconds(kAccessibilityHistogramDelaySecs));
}
@@ -94,7 +94,11 @@ void BrowserAccessibilityStateImpl::AddHistogramCallback(
histogram_callbacks_.push_back(callback);
}
-void BrowserAccessibilityStateImpl::UpdateHistogram() {
+void BrowserAccessibilityStateImpl::UpdateHistogramsForTesting() {
+ UpdateHistograms();
+}
+
+void BrowserAccessibilityStateImpl::UpdateHistograms() {
UpdatePlatformSpecificHistograms();
for (size_t i = 0; i < histogram_callbacks_.size(); ++i)
« no previous file with comments | « content/browser/accessibility/browser_accessibility_state_impl.h ('k') | content/public/browser/browser_accessibility_state.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698