Chromium Code Reviews| Index: components/metrics/metrics_log_manager.cc |
| =================================================================== |
| --- components/metrics/metrics_log_manager.cc (revision 274238) |
| +++ components/metrics/metrics_log_manager.cc (working copy) |
| @@ -102,12 +102,13 @@ |
| } |
| void MetricsLogManager::StoreLog(std::string* log, LogType log_type) { |
| - DCHECK_NE(MetricsLogBase::NO_LOG, log_type); |
| - metrics::PersistedLogs* destination_queue = |
| - (log_type == MetricsLogBase::INITIAL_STABILITY_LOG) ? |
| - &initial_log_queue_ : &ongoing_log_queue_; |
| - |
| - destination_queue->StoreLog(log); |
| + switch (log_type) { |
| + case MetricsLogBase::INITIAL_STABILITY_LOG: |
| + initial_log_queue_.StoreLog(log); |
| + break; |
| + case MetricsLogBase::ONGOING_LOG: |
| + ongoing_log_queue_.StoreLog(log); |
|
Ilya Sherman
2014/06/02 22:06:19
nit: Probably wise to have a "break;" stmt here as
Alexei Svitkine (slow)
2014/06/03 16:52:53
Done.
|
| + } |
| } |
| void MetricsLogManager::StoreStagedLogAsUnsent( |