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

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

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 | « chrome/test/BUILD.gn ('k') | components/data_use_measurement/core/data_use.cc » ('j') | 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 #ifndef COMPONENTS_DATA_USE_MEASUREMENT_CORE_DATA_USE_H_ 5 #ifndef COMPONENTS_DATA_USE_MEASUREMENT_CORE_DATA_USE_H_
6 #define COMPONENTS_DATA_USE_MEASUREMENT_CORE_DATA_USE_H_ 6 #define COMPONENTS_DATA_USE_MEASUREMENT_CORE_DATA_USE_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <string> 10 #include <string>
(...skipping 20 matching lines...) Expand all
31 const std::string& description() const { return description_; } 31 const std::string& description() const { return description_; }
32 32
33 void set_description(const std::string& description) { 33 void set_description(const std::string& description) {
34 description_ = description; 34 description_ = description;
35 } 35 }
36 36
37 int64_t total_bytes_received() const { return total_bytes_received_; } 37 int64_t total_bytes_received() const { return total_bytes_received_; }
38 38
39 int64_t total_bytes_sent() const { return total_bytes_sent_; } 39 int64_t total_bytes_sent() const { return total_bytes_sent_; }
40 40
41 base::Time start_time() const { return start_time_; }
42
41 private: 43 private:
42 friend class DataUseRecorder; 44 friend class DataUseRecorder;
43 45
44 GURL url_; 46 GURL url_;
45 std::string description_; 47 std::string description_;
46 48
47 int64_t total_bytes_sent_; 49 int64_t total_bytes_sent_;
48 int64_t total_bytes_received_; 50 int64_t total_bytes_received_;
49 51
52 // When this data use started.
53 base::Time start_time_;
54
50 DISALLOW_COPY_AND_ASSIGN(DataUse); 55 DISALLOW_COPY_AND_ASSIGN(DataUse);
51 }; 56 };
52 57
53 } // namespace data_use_measurement 58 } // namespace data_use_measurement
54 59
55 #endif // COMPONENTS_DATA_USE_MEASUREMENT_CORE_DATA_USE_H_ 60 #endif // COMPONENTS_DATA_USE_MEASUREMENT_CORE_DATA_USE_H_
OLDNEW
« no previous file with comments | « chrome/test/BUILD.gn ('k') | components/data_use_measurement/core/data_use.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698