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

Side by Side Diff: components/metrics/leak_detector/gnu_build_id_reader.h

Issue 2159013002: Read Chrome build ID and store it in leak reports (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef COMPONENTS_METRICS_LEAK_DETECTOR_GNU_BUILD_ID_READER_H_
6 #define COMPONENTS_METRICS_LEAK_DETECTOR_GNU_BUILD_ID_READER_H_
7
8 #include <stdint.h>
9
10 #include <vector>
11
12 namespace metrics {
13 namespace leak_detector {
14
15 // Reads the build ID from the GNU build notes and stores it internally. Since
16 // the build ID is not expected to change over a process, the stored build ID
17 // can be referenced repeatedly.
18 class GNUBuildIDReader {
19 public:
20 GNUBuildIDReader();
21 ~GNUBuildIDReader();
22
23 // Reads the build ID and stores it in |build_id_|.
24 void ReadBuildID();
Will Harris 2016/07/18 22:03:53 why not just a static function to return the build
Simon Que 2016/07/19 00:29:34 Done.
25
26 const std::vector<uint8_t>& build_id() const { return build_id_; }
Will Harris 2016/07/18 22:03:53 DCHECK if the build_id_ hasn't been read?
Simon Que 2016/07/19 00:29:34 Done.
27
28 private:
29 std::vector<uint8_t> build_id_;
30 };
31
32 } // namespace leak_detector
33 } // namespace metrics
34
35 #endif // COMPONENTS_METRICS_LEAK_DETECTOR_GNU_BUILD_ID_READER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698