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 21 matching lines...) Expand all Loading... |
48 scoped_ptr<TemplateURL> prepopulated_url( | 51 scoped_ptr<TemplateURL> prepopulated_url( |
49 TemplateURLPrepopulateData::FindPrepopulatedEngine(turl->url()->url())); | 52 TemplateURLPrepopulateData::FindPrepopulatedEngine(turl->url()->url())); |
50 if (prepopulated_url.get()) | 53 if (prepopulated_url.get()) |
51 return static_cast<int>(prepopulated_url->search_engine_type()); | 54 return static_cast<int>(prepopulated_url->search_engine_type()); |
52 // If |turl| is not among the prepopulated providers, return | 55 // If |turl| is not among the prepopulated providers, return |
53 // SEARCH_ENGINE_OTHER as well. | 56 // SEARCH_ENGINE_OTHER as well. |
54 return SEARCH_ENGINE_OTHER; | 57 return SEARCH_ENGINE_OTHER; |
55 } | 58 } |
56 | 59 |
57 } // namespace protector | 60 } // namespace protector |
OLD | NEW |