| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #include "base/metrics/histogram_base.h" | 5 #include "base/metrics/histogram_base.h" |
| 6 | 6 |
| 7 #include <climits> | 7 #include <climits> |
| 8 | 8 |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/json/json_string_value_serializer.h" | 10 #include "base/json/json_string_value_serializer.h" |
| (...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 112 scoped_ptr<DictionaryValue> parameters(new DictionaryValue()); | 112 scoped_ptr<DictionaryValue> parameters(new DictionaryValue()); |
| 113 GetParameters(parameters.get()); | 113 GetParameters(parameters.get()); |
| 114 | 114 |
| 115 JSONStringValueSerializer serializer(output); | 115 JSONStringValueSerializer serializer(output); |
| 116 DictionaryValue root; | 116 DictionaryValue root; |
| 117 root.SetString("name", histogram_name()); | 117 root.SetString("name", histogram_name()); |
| 118 root.SetInteger("count", count); | 118 root.SetInteger("count", count); |
| 119 root.SetInteger("flags", flags()); | 119 root.SetInteger("flags", flags()); |
| 120 root.Set("params", parameters.release()); | 120 root.Set("params", parameters.release()); |
| 121 root.Set("buckets", buckets.release()); | 121 root.Set("buckets", buckets.release()); |
| 122 root.SetInteger("pid", getpid()); | |
| 123 serializer.Serialize(root); | 122 serializer.Serialize(root); |
| 124 } | 123 } |
| 125 | 124 |
| 126 } // namespace base | 125 } // namespace base |
| OLD | NEW |