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/template_url.h" | 8 #include "chrome/browser/search_engines/template_url.h" |
9 #include "chrome/browser/search_engines/template_url_prepopulate_data.h" | 9 #include "chrome/browser/search_engines/template_url_prepopulate_data.h" |
10 | 10 |
(...skipping 27 matching lines...) Expand all Loading... |
38 const char kProtectorHistogramStartupSettingsChanged[] = | 38 const char kProtectorHistogramStartupSettingsChanged[] = |
39 "Protector.StartupSettings.Changed"; | 39 "Protector.StartupSettings.Changed"; |
40 const char kProtectorHistogramStartupSettingsDiscarded[] = | 40 const char kProtectorHistogramStartupSettingsDiscarded[] = |
41 "Protector.StartupSettings.Discarded"; | 41 "Protector.StartupSettings.Discarded"; |
42 const char kProtectorHistogramStartupSettingsTimeout[] = | 42 const char kProtectorHistogramStartupSettingsTimeout[] = |
43 "Protector.StartupSettings.Timeout"; | 43 "Protector.StartupSettings.Timeout"; |
44 | 44 |
45 const int kProtectorMaxSearchProviderID = SEARCH_ENGINE_MAX; | 45 const int kProtectorMaxSearchProviderID = SEARCH_ENGINE_MAX; |
46 | 46 |
47 int GetSearchProviderHistogramID(const TemplateURL* t_url) { | 47 int GetSearchProviderHistogramID(const TemplateURL* t_url) { |
48 return (t_url && t_url->url()) ? | 48 return t_url ? |
49 TemplateURLPrepopulateData::GetEngineType(t_url->url()->url()) : | 49 TemplateURLPrepopulateData::GetEngineType(t_url->url()) : |
50 SEARCH_ENGINE_NONE; | 50 SEARCH_ENGINE_NONE; |
51 } | 51 } |
52 | 52 |
53 } // namespace protector | 53 } // namespace protector |
OLD | NEW |