blob: c0ba39360ff7de2ef1ef134d37ec52f13574ad8a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
|
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chrome/browser/protector/histograms.h"
#include "base/memory/scoped_ptr.h"
#include "chrome/browser/search_engines/template_url.h"
#include "chrome/browser/search_engines/template_url_prepopulate_data.h"
namespace protector {
const char kProtectorHistogramDefaultSearchProvider[] =
"Protector.DefaultSearchProvider";
const char kProtectorHistogramPrefs[] =
"Protector.Preferences";
const char kProtectorHistogramSearchProviderApplied[] =
"Protector.SearchProvider.Applied";
const char kProtectorHistogramSearchProviderCorrupt[] =
"Protector.SearchProvider.Corrupt";
const char kProtectorHistogramSearchProviderDiscarded[] =
"Protector.SearchProvider.Discarded";
const char kProtectorHistogramSearchProviderFallback[] =
"Protector.SearchProvider.Fallback";
const char kProtectorHistogramSearchProviderHijacked[] =
"Protector.SearchProvider.Hijacked";
const char kProtectorHistogramSearchProviderMissing[] =
"Protector.SearchProvider.Missing";
const char kProtectorHistogramSearchProviderRestored[] =
"Protector.SearchProvider.Restored";
const char kProtectorHistogramSearchProviderTimeout[] =
"Protector.SearchProvider.Timeout";
const char kProtectorHistogramStartupSettingsApplied[] =
"Protector.StartupSettings.Applied";
const char kProtectorHistogramStartupSettingsChanged[] =
"Protector.StartupSettings.Changed";
const char kProtectorHistogramStartupSettingsDiscarded[] =
"Protector.StartupSettings.Discarded";
const char kProtectorHistogramStartupSettingsTimeout[] =
"Protector.StartupSettings.Timeout";
const int kProtectorMaxSearchProviderID = SEARCH_ENGINE_MAX;
int GetSearchProviderHistogramID(const TemplateURL* t_url) {
return (t_url && t_url->url()) ?
TemplateURLPrepopulateData::GetEngineType(t_url->url()->url()) :
SEARCH_ENGINE_NONE;
}
} // namespace protector
|