| OLD | NEW | 
|---|
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 "content/browser/media/audible_metrics.h" | 5 #include "content/browser/media/audible_metrics.h" | 
| 6 | 6 | 
| 7 #include <utility> | 7 #include <utility> | 
| 8 | 8 | 
| 9 #include "base/metrics/histogram_macros.h" | 9 #include "base/metrics/histogram_macros.h" | 
| 10 #include "base/metrics/user_metrics.h" |  | 
| 11 #include "base/time/default_tick_clock.h" | 10 #include "base/time/default_tick_clock.h" | 
| 12 | 11 | 
| 13 namespace content { | 12 namespace content { | 
| 14 | 13 | 
| 15 AudibleMetrics::AudibleMetrics() | 14 AudibleMetrics::AudibleMetrics() | 
| 16     : max_concurrent_audible_web_contents_in_session_(0), | 15     : max_concurrent_audible_web_contents_in_session_(0), | 
| 17       clock_(new base::DefaultTickClock()) { | 16       clock_(new base::DefaultTickClock()) { | 
| 18 } | 17 } | 
| 19 | 18 | 
| 20 AudibleMetrics::~AudibleMetrics() { | 19 AudibleMetrics::~AudibleMetrics() { | 
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 69     base::TimeDelta concurrent_total_time = | 68     base::TimeDelta concurrent_total_time = | 
| 70         clock_->NowTicks() - concurrent_web_contents_start_time_; | 69         clock_->NowTicks() - concurrent_web_contents_start_time_; | 
| 71     concurrent_web_contents_start_time_ = base::TimeTicks(); | 70     concurrent_web_contents_start_time_ = base::TimeTicks(); | 
| 72 | 71 | 
| 73     UMA_HISTOGRAM_LONG_TIMES("Media.Audible.ConcurrentTabsTime", | 72     UMA_HISTOGRAM_LONG_TIMES("Media.Audible.ConcurrentTabsTime", | 
| 74                              concurrent_total_time); | 73                              concurrent_total_time); | 
| 75   } | 74   } | 
| 76 } | 75 } | 
| 77 | 76 | 
| 78 }  // namespace content | 77 }  // namespace content | 
| OLD | NEW | 
|---|