| OLD | NEW |
| 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" |
| 11 #include "chrome/browser/engagement/site_engagement_service.h" | 11 #include "chrome/browser/engagement/site_engagement_service.h" |
| 12 #include "chrome/browser/engagement/site_engagement_service_factory.h" | 12 #include "chrome/browser/engagement/site_engagement_service_factory.h" |
| 13 #include "chrome/browser/profiles/profile.h" | 13 #include "chrome/browser/profiles/profile.h" |
| 14 #include "content/public/browser/navigation_entry.h" | |
| 15 #include "content/public/browser/web_contents.h" | 14 #include "content/public/browser/web_contents.h" |
| 16 | 15 |
| 17 namespace { | 16 namespace { |
| 18 | 17 |
| 19 int g_seconds_to_pause_engagement_detection = 10; | 18 int g_seconds_to_pause_engagement_detection = 10; |
| 20 int g_seconds_delay_after_navigation = 10; | 19 int g_seconds_delay_after_navigation = 10; |
| 21 int g_seconds_delay_after_media_starts = 10; | 20 int g_seconds_delay_after_media_starts = 10; |
| 22 int g_seconds_delay_after_show = 5; | 21 int g_seconds_delay_after_show = 5; |
| 23 | 22 |
| 24 } // anonymous namespace | 23 } // anonymous namespace |
| (...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 236 | 235 |
| 237 // static | 236 // static |
| 238 void SiteEngagementHelper::SetSecondsTrackingDelayAfterNavigation(int seconds) { | 237 void SiteEngagementHelper::SetSecondsTrackingDelayAfterNavigation(int seconds) { |
| 239 g_seconds_delay_after_navigation = seconds; | 238 g_seconds_delay_after_navigation = seconds; |
| 240 } | 239 } |
| 241 | 240 |
| 242 // static | 241 // static |
| 243 void SiteEngagementHelper::SetSecondsTrackingDelayAfterShow(int seconds) { | 242 void SiteEngagementHelper::SetSecondsTrackingDelayAfterShow(int seconds) { |
| 244 g_seconds_delay_after_show = seconds; | 243 g_seconds_delay_after_show = seconds; |
| 245 } | 244 } |
| OLD | NEW |