Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(187)

Side by Side Diff: components/data_use_measurement/core/data_use.cc

Issue 2507813003: Periodically remove old pending navigation entries.
Patch Set: Sync Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « components/data_use_measurement/core/data_use.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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.h" 5 #include "components/data_use_measurement/core/data_use.h"
6 6
7 #include "base/time/time.h"
8
7 namespace data_use_measurement { 9 namespace data_use_measurement {
8 10
9 DataUse::DataUse() : total_bytes_sent_(0), total_bytes_received_(0) {} 11 DataUse::DataUse()
12 : total_bytes_sent_(0),
13 total_bytes_received_(0),
14 start_time_(base::Time::Now()) {}
10 15
11 DataUse::~DataUse() {} 16 DataUse::~DataUse() {}
12 17
13 void DataUse::MergeFrom(const DataUse& other) { 18 void DataUse::MergeFrom(const DataUse& other) {
14 total_bytes_sent_ += other.total_bytes_sent_; 19 total_bytes_sent_ += other.total_bytes_sent_;
15 total_bytes_received_ += other.total_bytes_received_; 20 total_bytes_received_ += other.total_bytes_received_;
16 } 21 }
17 22
18 } // namespace data_use_measurement 23 } // namespace data_use_measurement
OLDNEW
« no previous file with comments | « components/data_use_measurement/core/data_use.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698