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

Side by Side Diff: components/ukm/ukm_entry.h

Issue 2749433002: Create Field Trial param for whitelisting UKM Entries. (Closed)
Patch Set: add missing } from merge Created 3 years, 9 months 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 | « no previous file | components/ukm/ukm_service.h » ('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 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 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_UKM_UKM_ENTRY_H_ 5 #ifndef COMPONENTS_UKM_UKM_ENTRY_H_
6 #define COMPONENTS_UKM_UKM_ENTRY_H_ 6 #define COMPONENTS_UKM_UKM_ENTRY_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 11 matching lines...) Expand all
22 // proto message, the event and metric names will be hashed by 22 // proto message, the event and metric names will be hashed by
23 // base::HashMetricName. 23 // base::HashMetricName.
24 // 24 //
25 // To build UkmEntry objects, please use UkmEntryBuilder. 25 // To build UkmEntry objects, please use UkmEntryBuilder.
26 class UkmEntry { 26 class UkmEntry {
27 public: 27 public:
28 // Serializes the members of the class into the supplied proto. 28 // Serializes the members of the class into the supplied proto.
29 void PopulateProto(Entry* proto_entry) const; 29 void PopulateProto(Entry* proto_entry) const;
30 30
31 int32_t source_id() const { return source_id_; } 31 int32_t source_id() const { return source_id_; }
32 uint64_t event_hash() const { return event_hash_; }
32 33
33 ~UkmEntry(); 34 ~UkmEntry();
34 35
35 private: 36 private:
36 friend UkmEntryBuilder; 37 friend UkmEntryBuilder;
37 38
38 UkmEntry(int32_t source_id, const char* event_name); 39 UkmEntry(int32_t source_id, const char* event_name);
39 40
40 const int32_t source_id_; 41 const int32_t source_id_;
41 const uint64_t event_hash_; 42 const uint64_t event_hash_;
42 std::vector<std::pair<uint64_t, int64_t>> metrics_; 43 std::vector<std::pair<uint64_t, int64_t>> metrics_;
43 44
44 DISALLOW_COPY_AND_ASSIGN(UkmEntry); 45 DISALLOW_COPY_AND_ASSIGN(UkmEntry);
45 }; 46 };
46 47
47 } // namespace ukm 48 } // namespace ukm
48 49
49 #endif // COMPONENTS_UKM_UKM_ENTRY_H_ 50 #endif // COMPONENTS_UKM_UKM_ENTRY_H_
OLDNEW
« no previous file with comments | « no previous file | components/ukm/ukm_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698