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

Side by Side Diff: chrome/browser/engagement/site_engagement_helper.cc

Issue 1825463003: Fix uninitialized value in SiteEngagementHelper. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/browser/engagement/site_engagement_helper.h" 5 #include "chrome/browser/engagement/site_engagement_helper.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/time/time.h" 9 #include "base/time/time.h"
10 #include "base/trace_event/trace_event.h" 10 #include "base/trace_event/trace_event.h"
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 base::TimeDelta delay) { 61 base::TimeDelta delay) {
62 pause_timer_->Start( 62 pause_timer_->Start(
63 FROM_HERE, delay, 63 FROM_HERE, delay,
64 base::Bind(&SiteEngagementHelper::PeriodicTracker::TrackingStarted, 64 base::Bind(&SiteEngagementHelper::PeriodicTracker::TrackingStarted,
65 base::Unretained(this))); 65 base::Unretained(this)));
66 } 66 }
67 67
68 SiteEngagementHelper::InputTracker::InputTracker( 68 SiteEngagementHelper::InputTracker::InputTracker(
69 SiteEngagementHelper* helper, 69 SiteEngagementHelper* helper,
70 content::WebContents* web_contents) 70 content::WebContents* web_contents)
71 : PeriodicTracker(helper), content::WebContentsObserver(web_contents) {} 71 : PeriodicTracker(helper),
72 content::WebContentsObserver(web_contents),
73 is_tracking_(false) {}
72 74
73 void SiteEngagementHelper::InputTracker::TrackingStarted() { 75 void SiteEngagementHelper::InputTracker::TrackingStarted() {
74 is_tracking_ = true; 76 is_tracking_ = true;
75 } 77 }
76 78
77 void SiteEngagementHelper::InputTracker::TrackingStopped() { 79 void SiteEngagementHelper::InputTracker::TrackingStopped() {
78 is_tracking_ = false; 80 is_tracking_ = false;
79 } 81 }
80 82
81 // Record that there was some user input, and defer handling of the input event. 83 // Record that there was some user input, and defer handling of the input event.
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
259 261
260 // static 262 // static
261 void SiteEngagementHelper::SetSecondsTrackingDelayAfterNavigation(int seconds) { 263 void SiteEngagementHelper::SetSecondsTrackingDelayAfterNavigation(int seconds) {
262 g_seconds_delay_after_navigation = seconds; 264 g_seconds_delay_after_navigation = seconds;
263 } 265 }
264 266
265 // static 267 // static
266 void SiteEngagementHelper::SetSecondsTrackingDelayAfterShow(int seconds) { 268 void SiteEngagementHelper::SetSecondsTrackingDelayAfterShow(int seconds) {
267 g_seconds_delay_after_show = seconds; 269 g_seconds_delay_after_show = seconds;
268 } 270 }
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