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

Side by Side Diff: components/metrics/export/crash_sample.h

Issue 227873002: Create a histogram serialization mechanism in components/metrics (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Convert to use scoped_ptr. Remove using declarations. Fixed linting. Created 6 years, 7 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 2014 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_EXPORT_CRASH_SAMPLE_H_
6 #define COMPONENTS_METRICS_EXPORT_CRASH_SAMPLE_H_
7
8 #include <string>
9
10 #include "base/base_export.h"
11 #include "base/compiler_specific.h"
12 #include "base/memory/scoped_ptr.h"
13 #include "components/metrics/export/metric_sample.h"
14
15 namespace metrics {
16
17 // Represent a crash event described by a simple name.
18 class BASE_EXPORT CrashSample : public MetricSample {
19 public:
20 explicit CrashSample(const std::string& crashname);
21 virtual ~CrashSample();
22
23 // Produce a serialized version of the crash.
24 // Format: crash\0|name_|\0
25 virtual std::string ToString() const OVERRIDE;
26
27 // Return a CrashSample object representing the serialized crash if possible.
28 // If the deserialization fails, returns NULL.
29 static scoped_ptr<CrashSample> ReadCrash(const std::string& crash_serialized);
30
31 private:
32 DISALLOW_COPY_AND_ASSIGN(CrashSample);
33 };
34
35 } // namespace metrics
36
37 #endif // COMPONENTS_METRICS_EXPORT_CRASH_SAMPLE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698