OLD | NEW |
(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 #include "components/metrics/useraction_sample_chromeos.h" |
| 6 |
| 7 #include <string> |
| 8 |
| 9 #include "base/strings/stringprintf.h" |
| 10 #include "components/metrics/metric_sample_chromeos.h" |
| 11 |
| 12 using base::StringPrintf; |
| 13 using std::string; |
| 14 |
| 15 namespace metrics { |
| 16 |
| 17 UserActionSample::UserActionSample(const std::string& action_name) |
| 18 : MetricSample(MetricSample::USER_ACTION, action_name) {} |
| 19 |
| 20 UserActionSample::~UserActionSample() {} |
| 21 |
| 22 string UserActionSample::ToString() const { |
| 23 return StringPrintf("useraction%c%s%c", '\0', name().c_str(), '\0'); |
| 24 } |
| 25 |
| 26 // static |
| 27 UserActionSample* UserActionSample::ReadUserAction(const std::string& action) { |
| 28 return new UserActionSample(action); |
| 29 } |
| 30 |
| 31 } // namespace metrics |
OLD | NEW |