OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "media/base/media_log.h" | 5 #include "media/base/media_log.h" |
6 | 6 |
7 | |
8 #include "base/atomic_sequence_num.h" | 7 #include "base/atomic_sequence_num.h" |
9 #include "base/json/json_writer.h" | 8 #include "base/json/json_writer.h" |
10 #include "base/values.h" | 9 #include "base/values.h" |
11 | 10 |
12 namespace media { | 11 namespace media { |
13 | 12 |
14 // A count of all MediaLogs created in the current process. Used to generate | 13 // A count of all MediaLogs created in the current process. Used to generate |
15 // unique IDs. | 14 // unique IDs. |
16 static base::StaticAtomicSequenceNumber g_media_log_count; | 15 static base::StaticAtomicSequenceNumber g_media_log_count; |
17 | 16 |
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
276 : level_(level), log_cb_(log_cb) { | 275 : level_(level), log_cb_(log_cb) { |
277 } | 276 } |
278 | 277 |
279 LogHelper::~LogHelper() { | 278 LogHelper::~LogHelper() { |
280 if (log_cb_.is_null()) | 279 if (log_cb_.is_null()) |
281 return; | 280 return; |
282 log_cb_.Run(level_, stream_.str()); | 281 log_cb_.Run(level_, stream_.str()); |
283 } | 282 } |
284 | 283 |
285 } //namespace media | 284 } //namespace media |
OLD | NEW |