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 "components/data_use_measurement/core/data_use_network_delegate.h" | 5 #include "components/data_use_measurement/core/data_use_network_delegate.h" |
6 | 6 |
7 #include <memory> | 7 #include <memory> |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "components/data_use_measurement/core/data_use_ascriber.h" | 10 #include "components/data_use_measurement/core/data_use_ascriber.h" |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 | 59 |
60 void DataUseNetworkDelegate::OnNetworkBytesSentInternal( | 60 void DataUseNetworkDelegate::OnNetworkBytesSentInternal( |
61 net::URLRequest* request, | 61 net::URLRequest* request, |
62 int64_t bytes_sent) { | 62 int64_t bytes_sent) { |
63 ascriber_->OnNetworkBytesSent(request, bytes_sent); | 63 ascriber_->OnNetworkBytesSent(request, bytes_sent); |
64 data_use_measurement_.OnNetworkBytesSent(*request, bytes_sent); | 64 data_use_measurement_.OnNetworkBytesSent(*request, bytes_sent); |
65 } | 65 } |
66 | 66 |
67 void DataUseNetworkDelegate::OnCompletedInternal(net::URLRequest* request, | 67 void DataUseNetworkDelegate::OnCompletedInternal(net::URLRequest* request, |
68 bool started) { | 68 bool started) { |
| 69 ascriber_->OnUrlRequestCompleted(*request, started); |
69 data_use_measurement_.OnCompleted(*request, started); | 70 data_use_measurement_.OnCompleted(*request, started); |
70 } | 71 } |
71 | 72 |
72 void DataUseNetworkDelegate::OnURLRequestDestroyedInternal( | 73 void DataUseNetworkDelegate::OnURLRequestDestroyedInternal( |
73 net::URLRequest* request) { | 74 net::URLRequest* request) { |
74 ascriber_->OnUrlRequestDestroyed(request); | 75 ascriber_->OnUrlRequestDestroyed(request); |
75 } | 76 } |
76 | 77 |
77 } // namespace data_use_measurement | 78 } // namespace data_use_measurement |
OLD | NEW |