| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #ifndef CHROME_BROWSER_PROTECTOR_HISTOGRAMS_H_ | 5 #ifndef CHROME_BROWSER_PROTECTOR_HISTOGRAMS_H_ |
| 6 #define CHROME_BROWSER_PROTECTOR_HISTOGRAMS_H_ | 6 #define CHROME_BROWSER_PROTECTOR_HISTOGRAMS_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 class TemplateURL; |
| 10 |
| 9 namespace protector { | 11 namespace protector { |
| 10 | 12 |
| 11 // Histogram name to report protection errors for the default search | 13 // Histogram name to report protection errors for the default search |
| 12 // provider. | 14 // provider. Values are below. |
| 13 extern const char kProtectorHistogramDefaultSearchProvider[]; | 15 extern const char kProtectorHistogramDefaultSearchProvider[]; |
| 14 | 16 |
| 17 // Histogram value to report that the backup value is invalid or missing. |
| 15 extern const char kProtectorBackupInvalidCounter[]; | 18 extern const char kProtectorBackupInvalidCounter[]; |
| 19 // Histogram value to report that the value does not match the backup. |
| 16 extern const char kProtectorValueChangedCounter[]; | 20 extern const char kProtectorValueChangedCounter[]; |
| 21 // Histogram value to report that the value matches the backup. |
| 17 extern const char kProtectorValueValidCounter[]; | 22 extern const char kProtectorValueValidCounter[]; |
| 18 | 23 |
| 19 // Protector histogram values. | 24 // Protector histogram values. |
| 20 enum ProtectorError { | 25 enum ProtectorError { |
| 21 kProtectorErrorBackupInvalid, | 26 kProtectorErrorBackupInvalid, |
| 22 kProtectorErrorValueChanged, | 27 kProtectorErrorValueChanged, |
| 23 kProtectorErrorValueValid, | 28 kProtectorErrorValueValid, |
| 24 | 29 |
| 25 // This is for convenience only, must always be the last. | 30 // This is for convenience only, must always be the last. |
| 26 kProtectorErrorCount | 31 kProtectorErrorCount |
| 27 }; | 32 }; |
| 28 | 33 |
| 34 // Histogram name to report the new default search provider. |
| 35 extern const char kProtectorHistogramNewSearchProvider[]; |
| 36 // Histogram name to report when user accepts new default search provider. |
| 37 extern const char kProtectorHistogramSearchProviderApplied[]; |
| 38 // Histogram name to report when user keeps previous default search provider. |
| 39 extern const char kProtectorHistogramSearchProviderDiscarded[]; |
| 40 // Histogram name to report when user ignores search provider change. |
| 41 extern const char kProtectorHistogramSearchProviderTimeout[]; |
| 42 |
| 43 // Returns index to be used in histograms for given search provider (which may |
| 44 // be NULL, in which case a special index will be returned). |
| 45 int GetSearchProviderHistogramID(const TemplateURL* t_url); |
| 46 |
| 47 // Maximum value of search provider index in histogram enums. |
| 48 extern const int kProtectorMaxSearchProviderID; |
| 49 |
| 29 } // namespace protector | 50 } // namespace protector |
| 30 | 51 |
| 31 #endif // CHROME_BROWSER_PROTECTOR_HISTOGRAMS_H_ | 52 #endif // CHROME_BROWSER_PROTECTOR_HISTOGRAMS_H_ |
| 32 | |
| OLD | NEW |