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

Unified Diff: chrome/browser/page_load_metrics/user_input_tracker.cc

Issue 2662803002: Chromium doesn't compile with -Wglobal-constructors (Closed)
Patch Set: Created 3 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
« no previous file with comments | « chrome/browser/page_load_metrics/user_input_tracker.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/page_load_metrics/user_input_tracker.cc
diff --git a/chrome/browser/page_load_metrics/user_input_tracker.cc b/chrome/browser/page_load_metrics/user_input_tracker.cc
index 117c6e0091e4ea1c132e07e0e2a0fddfe1cbdcf4..0bab1ad0f557882e4c0d3f2d747763e6726d85a0 100644
--- a/chrome/browser/page_load_metrics/user_input_tracker.cc
+++ b/chrome/browser/page_load_metrics/user_input_tracker.cc
@@ -24,8 +24,8 @@ const int kOldestAllowedEventAgeSeconds = kMaxEventAgeSeconds * 2;
// In order to limit to at most kMaxTrackedEvents, we rate limit the recorded
// events,
// allowing one per rate limit period.
-const int kRateLimitClampMillis = (kOldestAllowedEventAgeSeconds * 1000) /
- UserInputTracker::kMaxTrackedEvents;
+constexpr int kRateLimitClampMillis = (kOldestAllowedEventAgeSeconds * 1000) /
+ UserInputTracker::kMaxTrackedEvents;
bool IsInterestingInputEvent(const blink::WebInputEvent& event) {
// Ignore synthesized auto repeat events.
@@ -63,7 +63,7 @@ UserInputTracker::UserInputTracker() {
UserInputTracker::~UserInputTracker() {}
-const size_t UserInputTracker::kMaxTrackedEvents = 100;
+constexpr size_t UserInputTracker::kMaxTrackedEvents;
Charlie Harrison 2017/01/30 14:17:51 Can you move this bit of code nearer to the kRateL
ckulakowski 2017/01/30 15:46:56 Done.
// static
base::TimeTicks UserInputTracker::GetEventTime(
« no previous file with comments | « chrome/browser/page_load_metrics/user_input_tracker.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698