| 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.h" | 5 #include "components/data_usage/core/data_use.h" |
| 6 | 6 |
| 7 namespace data_usage { | 7 namespace data_usage { |
| 8 | 8 |
| 9 namespace { | 9 namespace { |
| 10 | 10 |
| (...skipping 20 matching lines...) Expand all Loading... |
| 31 int64_t rx_bytes) | 31 int64_t rx_bytes) |
| 32 : url(url), | 32 : url(url), |
| 33 request_start(request_start), | 33 request_start(request_start), |
| 34 first_party_for_cookies(first_party_for_cookies), | 34 first_party_for_cookies(first_party_for_cookies), |
| 35 tab_id(tab_id), | 35 tab_id(tab_id), |
| 36 connection_type(connection_type), | 36 connection_type(connection_type), |
| 37 mcc_mnc(mcc_mnc), | 37 mcc_mnc(mcc_mnc), |
| 38 tx_bytes(tx_bytes), | 38 tx_bytes(tx_bytes), |
| 39 rx_bytes(rx_bytes) {} | 39 rx_bytes(rx_bytes) {} |
| 40 | 40 |
| 41 DataUse::DataUse(const DataUse& other) = default; |
| 42 |
| 41 DataUse::~DataUse() {} | 43 DataUse::~DataUse() {} |
| 42 | 44 |
| 43 bool DataUse::operator==(const DataUse& other) const { | 45 bool DataUse::operator==(const DataUse& other) const { |
| 44 return AreNonByteCountFieldsEqual(*this, other) && | 46 return AreNonByteCountFieldsEqual(*this, other) && |
| 45 AreByteCountFieldsEqual(*this, other); | 47 AreByteCountFieldsEqual(*this, other); |
| 46 } | 48 } |
| 47 | 49 |
| 48 bool DataUse::CanCombineWith(const DataUse& other) const { | 50 bool DataUse::CanCombineWith(const DataUse& other) const { |
| 49 return AreNonByteCountFieldsEqual(*this, other); | 51 return AreNonByteCountFieldsEqual(*this, other); |
| 50 } | 52 } |
| 51 | 53 |
| 52 } // namespace data_usage | 54 } // namespace data_usage |
| OLD | NEW |