| 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 "components/data_usage/core/data_use_aggregator.h" | 5 #include "components/data_usage/core/data_use_aggregator.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/callback.h" | 8 #include "base/callback.h" |
| 9 #include "build/build_config.h" |
| 9 #include "components/data_usage/core/data_use.h" | 10 #include "components/data_usage/core/data_use.h" |
| 10 #include "net/base/load_timing_info.h" | 11 #include "net/base/load_timing_info.h" |
| 11 #include "net/base/network_change_notifier.h" | 12 #include "net/base/network_change_notifier.h" |
| 12 #include "net/url_request/url_request.h" | 13 #include "net/url_request/url_request.h" |
| 13 | 14 |
| 14 #if defined(OS_ANDROID) | 15 #if defined(OS_ANDROID) |
| 15 #include "net/android/network_library.h" | 16 #include "net/android/network_library.h" |
| 16 #endif // OS_ANDROID | 17 #endif // OS_ANDROID |
| 17 | 18 |
| 18 namespace data_usage { | 19 namespace data_usage { |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 119 amortizer_->AmortizeDataUse(data_use.Pass(), amortization_callback_); | 120 amortizer_->AmortizeDataUse(data_use.Pass(), amortization_callback_); |
| 120 } | 121 } |
| 121 | 122 |
| 122 void DataUseAggregator::OnAmortizationComplete( | 123 void DataUseAggregator::OnAmortizationComplete( |
| 123 scoped_ptr<DataUse> amortized_data_use) { | 124 scoped_ptr<DataUse> amortized_data_use) { |
| 124 DCHECK(thread_checker_.CalledOnValidThread()); | 125 DCHECK(thread_checker_.CalledOnValidThread()); |
| 125 FOR_EACH_OBSERVER(Observer, observer_list_, OnDataUse(*amortized_data_use)); | 126 FOR_EACH_OBSERVER(Observer, observer_list_, OnDataUse(*amortized_data_use)); |
| 126 } | 127 } |
| 127 | 128 |
| 128 } // namespace data_usage | 129 } // namespace data_usage |
| OLD | NEW |