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 "sync/api/sync_error.h" | 5 #include "sync/api/sync_error.h" |
6 | 6 |
7 #include <ostream> | 7 #include <ostream> |
8 | 8 |
9 #include "base/location.h" | 9 #include "base/location.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
11 #include "base/metrics/histogram.h" | |
11 #include "sync/internal_api/public/base/model_type.h" | 12 #include "sync/internal_api/public/base/model_type.h" |
12 | 13 |
13 namespace syncer { | 14 namespace syncer { |
14 | 15 |
15 SyncError::SyncError() { | 16 SyncError::SyncError() { |
16 Clear(); | 17 Clear(); |
17 } | 18 } |
18 | 19 |
19 SyncError::SyncError(const tracked_objects::Location& location, | 20 SyncError::SyncError(const tracked_objects::Location& location, |
20 ErrorType error_type, | 21 ErrorType error_type, |
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
130 location_->line_number(), | 131 location_->line_number(), |
131 logging::LOG_ERROR).stream(), | 132 logging::LOG_ERROR).stream(), |
132 LOG_IS_ON(ERROR)) | 133 LOG_IS_ON(ERROR)) |
133 << ModelTypeToString(model_type_) << " " << message_; | 134 << ModelTypeToString(model_type_) << " " << message_; |
134 } | 135 } |
135 | 136 |
136 void PrintTo(const SyncError& sync_error, std::ostream* os) { | 137 void PrintTo(const SyncError& sync_error, std::ostream* os) { |
137 *os << sync_error.ToString(); | 138 *os << sync_error.ToString(); |
138 } | 139 } |
139 | 140 |
141 void SyncError::LogDataLoadFailure(ModelType model_type) { | |
142 UMA_HISTOGRAM_ENUMERATION("Sync.LocalDataFailedToLoad", | |
143 model_type, | |
144 MODEL_TYPE_COUNT); | |
Ilya Sherman
2013/11/19 22:49:04
Please add this to histograms.xml as part of this
lipalani1
2013/11/26 23:31:35
It is already there.
On 2013/11/19 22:49:04, Ilya
Ilya Sherman
2013/12/05 07:01:54
Hmm, I don't see it included in the files modified
| |
145 } | |
146 | |
140 } // namespace syncer | 147 } // namespace syncer |
OLD | NEW |