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/search_engines/template_url_service.h" | 5 #include "chrome/browser/search_engines/template_url_service.h" |
6 | 6 |
7 #include "base/auto_reset.h" | 7 #include "base/auto_reset.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
10 #include "base/environment.h" | 10 #include "base/environment.h" |
11 #include "base/guid.h" | 11 #include "base/guid.h" |
12 #include "base/i18n/case_conversion.h" | 12 #include "base/i18n/case_conversion.h" |
13 #include "base/memory/scoped_vector.h" | 13 #include "base/memory/scoped_vector.h" |
14 #include "base/metrics/histogram.h" | 14 #include "base/metrics/histogram.h" |
15 #include "base/prefs/pref_service.h" | 15 #include "base/prefs/pref_service.h" |
16 #include "base/stl_util.h" | 16 #include "base/stl_util.h" |
17 #include "base/strings/string_number_conversions.h" | 17 #include "base/strings/string_number_conversions.h" |
18 #include "base/strings/string_split.h" | 18 #include "base/strings/string_split.h" |
19 #include "base/strings/string_util.h" | 19 #include "base/strings/string_util.h" |
20 #include "base/strings/utf_string_conversions.h" | 20 #include "base/strings/utf_string_conversions.h" |
21 #include "base/time/time.h" | 21 #include "base/time/time.h" |
| 22 #include "chrome/browser/chrome_notification_types.h" |
22 #include "chrome/browser/google/google_url_tracker.h" | 23 #include "chrome/browser/google/google_url_tracker.h" |
23 #include "chrome/browser/history/history_notifications.h" | 24 #include "chrome/browser/history/history_notifications.h" |
24 #include "chrome/browser/history/history_service.h" | 25 #include "chrome/browser/history/history_service.h" |
25 #include "chrome/browser/history/history_service_factory.h" | 26 #include "chrome/browser/history/history_service_factory.h" |
26 #include "chrome/browser/net/url_fixer_upper.h" | 27 #include "chrome/browser/net/url_fixer_upper.h" |
27 #include "chrome/browser/profiles/profile.h" | 28 #include "chrome/browser/profiles/profile.h" |
28 #include "chrome/browser/rlz/rlz.h" | 29 #include "chrome/browser/rlz/rlz.h" |
29 #include "chrome/browser/search_engines/search_host_to_urls_map.h" | 30 #include "chrome/browser/search_engines/search_host_to_urls_map.h" |
30 #include "chrome/browser/search_engines/search_terms_data.h" | 31 #include "chrome/browser/search_engines/search_terms_data.h" |
31 #include "chrome/browser/search_engines/template_url.h" | 32 #include "chrome/browser/search_engines/template_url.h" |
32 #include "chrome/browser/search_engines/template_url_prepopulate_data.h" | 33 #include "chrome/browser/search_engines/template_url_prepopulate_data.h" |
33 #include "chrome/browser/search_engines/template_url_service_observer.h" | 34 #include "chrome/browser/search_engines/template_url_service_observer.h" |
34 #include "chrome/browser/search_engines/util.h" | 35 #include "chrome/browser/search_engines/util.h" |
35 #include "chrome/browser/webdata/web_data_service.h" | 36 #include "chrome/browser/webdata/web_data_service.h" |
36 #include "chrome/common/chrome_notification_types.h" | |
37 #include "chrome/common/chrome_switches.h" | 37 #include "chrome/common/chrome_switches.h" |
38 #include "chrome/common/env_vars.h" | 38 #include "chrome/common/env_vars.h" |
39 #include "chrome/common/pref_names.h" | 39 #include "chrome/common/pref_names.h" |
40 #include "chrome/common/url_constants.h" | 40 #include "chrome/common/url_constants.h" |
41 #include "content/public/browser/notification_service.h" | 41 #include "content/public/browser/notification_service.h" |
42 #include "extensions/common/constants.h" | 42 #include "extensions/common/constants.h" |
43 #include "net/base/net_util.h" | 43 #include "net/base/net_util.h" |
44 #include "sync/api/sync_change.h" | 44 #include "sync/api/sync_change.h" |
45 #include "sync/api/sync_error_factory.h" | 45 #include "sync/api/sync_error_factory.h" |
46 #include "sync/protocol/search_engine_specifics.pb.h" | 46 #include "sync/protocol/search_engine_specifics.pb.h" |
(...skipping 2484 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2531 // Don't log anything if the user has a NULL default search provider. A | 2531 // Don't log anything if the user has a NULL default search provider. A |
2532 // logged value of 0 indicates a custom default search provider. | 2532 // logged value of 0 indicates a custom default search provider. |
2533 if (default_search_provider_) { | 2533 if (default_search_provider_) { |
2534 UMA_HISTOGRAM_ENUMERATION( | 2534 UMA_HISTOGRAM_ENUMERATION( |
2535 kDSPHistogramName, | 2535 kDSPHistogramName, |
2536 default_search_provider_->prepopulate_id(), | 2536 default_search_provider_->prepopulate_id(), |
2537 TemplateURLPrepopulateData::kMaxPrepopulatedEngineID); | 2537 TemplateURLPrepopulateData::kMaxPrepopulatedEngineID); |
2538 } | 2538 } |
2539 } | 2539 } |
2540 } | 2540 } |
OLD | NEW |