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 "chrome/browser/protector/histograms.h" | 5 #include "chrome/browser/protector/histograms.h" |
6 | 6 |
7 #include "base/memory/scoped_ptr.h" | 7 #include "base/memory/scoped_ptr.h" |
8 #include "chrome/browser/search_engines/search_engine_type.h" | 8 #include "chrome/browser/search_engines/search_engine_type.h" |
9 #include "chrome/browser/search_engines/template_url.h" | 9 #include "chrome/browser/search_engines/template_url.h" |
10 #include "chrome/browser/search_engines/template_url_prepopulate_data.h" | 10 #include "chrome/browser/search_engines/template_url_prepopulate_data.h" |
11 | 11 |
12 namespace protector { | 12 namespace protector { |
13 | 13 |
14 const char kProtectorHistogramDefaultSearchProvider[] = | 14 const char kProtectorHistogramDefaultSearchProvider[] = |
15 "Protector.DefaultSearchProvider"; | 15 "Protector.DefaultSearchProvider"; |
16 | 16 |
| 17 const char kProtectorHistogramPrefs[] = |
| 18 "Protector.Preferences"; |
| 19 |
17 const char kProtectorHistogramSearchProviderApplied[] = | 20 const char kProtectorHistogramSearchProviderApplied[] = |
18 "Protector.SearchProvider.Applied"; | 21 "Protector.SearchProvider.Applied"; |
19 const char kProtectorHistogramSearchProviderCorrupt[] = | 22 const char kProtectorHistogramSearchProviderCorrupt[] = |
20 "Protector.SearchProvider.Corrupt"; | 23 "Protector.SearchProvider.Corrupt"; |
21 const char kProtectorHistogramSearchProviderDiscarded[] = | 24 const char kProtectorHistogramSearchProviderDiscarded[] = |
22 "Protector.SearchProvider.Discarded"; | 25 "Protector.SearchProvider.Discarded"; |
23 const char kProtectorHistogramSearchProviderFallback[] = | 26 const char kProtectorHistogramSearchProviderFallback[] = |
24 "Protector.SearchProvider.Fallback"; | 27 "Protector.SearchProvider.Fallback"; |
25 const char kProtectorHistogramSearchProviderHijacked[] = | 28 const char kProtectorHistogramSearchProviderHijacked[] = |
26 "Protector.SearchProvider.Hijacked"; | 29 "Protector.SearchProvider.Hijacked"; |
(...skipping 12 matching lines...) Expand all Loading... |
39 scoped_ptr<TemplateURL> prepopulated_url( | 42 scoped_ptr<TemplateURL> prepopulated_url( |
40 TemplateURLPrepopulateData::FindPrepopulatedEngine(turl->url()->url())); | 43 TemplateURLPrepopulateData::FindPrepopulatedEngine(turl->url()->url())); |
41 if (prepopulated_url.get()) | 44 if (prepopulated_url.get()) |
42 return static_cast<int>(prepopulated_url->search_engine_type()); | 45 return static_cast<int>(prepopulated_url->search_engine_type()); |
43 // If |turl| is not among the prepopulated providers, return | 46 // If |turl| is not among the prepopulated providers, return |
44 // SEARCH_ENGINE_OTHER as well. | 47 // SEARCH_ENGINE_OTHER as well. |
45 return SEARCH_ENGINE_OTHER; | 48 return SEARCH_ENGINE_OTHER; |
46 } | 49 } |
47 | 50 |
48 } // namespace protector | 51 } // namespace protector |
OLD | NEW |