OLD | NEW |
---|---|
(Empty) | |
1 // Copyright (c) 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 BASE_METRICS_CHROMEOS_USERACTION_SAMPLE_CHROMEOS_H | |
6 #define BASE_METRICS_CHROMEOS_USERACTION_SAMPLE_CHROMEOS_H | |
7 | |
8 #include <string> | |
9 | |
10 #include "base/base_export.h" | |
11 #include "base/compiler_specific.h" | |
12 #include "base/metrics/metric_sample_chromeos.h" | |
13 | |
14 using std::string; | |
Alexei Svitkine (slow)
2014/04/17 16:33:21
Nit: Remove and fully-qualify string. Please fix t
| |
15 | |
16 namespace base { | |
Alexei Svitkine (slow)
2014/04/17 16:33:21
Nit: Please add a blank line after this. Fix throu
| |
17 // Represents a logged action. | |
18 // This class is meant to be used to serialize and deserialize samples to | |
19 // send them from chromeOS to chrome. | |
20 class BASE_EXPORT UserActionSample : public MetricSample { | |
21 public: | |
22 explicit UserActionSample(const std::string& action); | |
23 virtual ~UserActionSample(); | |
24 | |
25 // Returns a serialized version of the sample on the format: | |
26 // useraction\0|name_|\0 | |
27 virtual string ToString() const OVERRIDE; | |
28 | |
29 // static | |
Alexei Svitkine (slow)
2014/04/17 16:33:21
No need for "// static" comment in header file. Pu
| |
30 // Deserialize a sample passed as a string. | |
31 // Returns a UserActionSample if the deserialization is successful and NULL | |
32 // otherwise. | |
33 static UserActionSample* ReadUserAction(const std::string& useraction); | |
34 }; | |
35 } // namespace base | |
Alexei Svitkine (slow)
2014/04/17 16:33:21
Please add a blank line before this. Please fix th
| |
36 #endif // BASE_METRICS_CHROMEOS_USERACTION_SAMPLE_CHROMEOS_H | |
Alexei Svitkine (slow)
2014/04/17 16:33:21
Please add a blank line before this. Please fix th
| |
OLD | NEW |