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

Side by Side Diff: extensions/browser/api/cast_channel/logger.cc

Issue 670623002: Change base::TickClock to a ref counted class. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@audio_redesign
Patch Set: y Created 6 years, 2 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 | « extensions/browser/api/cast_channel/logger.h ('k') | media/base/wall_clock_time_source.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "extensions/browser/api/cast_channel/logger.h" 5 #include "extensions/browser/api/cast_channel/logger.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/strings/string_util.h" 9 #include "base/strings/string_util.h"
10 #include "base/time/tick_clock.h" 10 #include "base/time/tick_clock.h"
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 } 120 }
121 121
122 } // namespace 122 } // namespace
123 123
124 Logger::AggregatedSocketEventLog::AggregatedSocketEventLog() { 124 Logger::AggregatedSocketEventLog::AggregatedSocketEventLog() {
125 } 125 }
126 126
127 Logger::AggregatedSocketEventLog::~AggregatedSocketEventLog() { 127 Logger::AggregatedSocketEventLog::~AggregatedSocketEventLog() {
128 } 128 }
129 129
130 Logger::Logger(scoped_ptr<base::TickClock> clock, 130 Logger::Logger(const scoped_refptr<base::TickClock>& clock,
131 base::TimeTicks unix_epoch_time_ticks) 131 base::TimeTicks unix_epoch_time_ticks)
132 : clock_(clock.Pass()), unix_epoch_time_ticks_(unix_epoch_time_ticks) { 132 : clock_(clock), unix_epoch_time_ticks_(unix_epoch_time_ticks) {
133 DCHECK(clock_); 133 DCHECK(clock_.get() != NULL);
134 134
135 // Logger may not be necessarily be created on the IO thread, but logging 135 // Logger may not be necessarily be created on the IO thread, but logging
136 // happens exclusively there. 136 // happens exclusively there.
137 thread_checker_.DetachFromThread(); 137 thread_checker_.DetachFromThread();
138 } 138 }
139 139
140 Logger::~Logger() { 140 Logger::~Logger() {
141 } 141 }
142 142
143 void Logger::LogNewSocketEvent(const CastSocket& cast_socket) { 143 void Logger::LogNewSocketEvent(const CastSocket& cast_socket) {
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after
362 if (it != aggregated_socket_events_.end()) { 362 if (it != aggregated_socket_events_.end()) {
363 return it->second->last_errors; 363 return it->second->last_errors;
364 } else { 364 } else {
365 return LastErrors(); 365 return LastErrors();
366 } 366 }
367 } 367 }
368 368
369 } // namespace cast_channel 369 } // namespace cast_channel
370 } // namespace core_api 370 } // namespace core_api
371 } // namespace extensions 371 } // namespace extensions
OLDNEW
« no previous file with comments | « extensions/browser/api/cast_channel/logger.h ('k') | media/base/wall_clock_time_source.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698