| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "components/search_engines/template_url_service.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/auto_reset.h" | 10 #include "base/auto_reset.h" |
| 11 #include "base/command_line.h" | 11 #include "base/command_line.h" |
| 12 #include "base/compiler_specific.h" | 12 #include "base/compiler_specific.h" |
| 13 #include "base/guid.h" | 13 #include "base/guid.h" |
| 14 #include "base/i18n/case_conversion.h" | 14 #include "base/i18n/case_conversion.h" |
| 15 #include "base/memory/scoped_vector.h" | 15 #include "base/memory/scoped_vector.h" |
| 16 #include "base/metrics/histogram.h" | 16 #include "base/metrics/histogram.h" |
| 17 #include "base/prefs/pref_service.h" | 17 #include "base/prefs/pref_service.h" |
| 18 #include "base/stl_util.h" | 18 #include "base/stl_util.h" |
| 19 #include "base/strings/string_number_conversions.h" | 19 #include "base/strings/string_number_conversions.h" |
| 20 #include "base/strings/string_split.h" | 20 #include "base/strings/string_split.h" |
| 21 #include "base/strings/string_util.h" | 21 #include "base/strings/string_util.h" |
| 22 #include "base/strings/utf_string_conversions.h" | 22 #include "base/strings/utf_string_conversions.h" |
| 23 #include "base/time/time.h" | 23 #include "base/time/time.h" |
| 24 #include "chrome/browser/search_engines/search_host_to_urls_map.h" | |
| 25 #include "chrome/browser/search_engines/template_url_service_client.h" | |
| 26 #include "chrome/browser/search_engines/template_url_service_observer.h" | |
| 27 #include "chrome/browser/search_engines/util.h" | |
| 28 #include "components/rappor/rappor_service.h" | 24 #include "components/rappor/rappor_service.h" |
| 29 #include "components/search_engines/search_engines_pref_names.h" | 25 #include "components/search_engines/search_engines_pref_names.h" |
| 26 #include "components/search_engines/search_host_to_urls_map.h" |
| 30 #include "components/search_engines/search_terms_data.h" | 27 #include "components/search_engines/search_terms_data.h" |
| 31 #include "components/search_engines/template_url.h" | 28 #include "components/search_engines/template_url.h" |
| 32 #include "components/search_engines/template_url_prepopulate_data.h" | 29 #include "components/search_engines/template_url_prepopulate_data.h" |
| 30 #include "components/search_engines/template_url_service_client.h" |
| 31 #include "components/search_engines/template_url_service_observer.h" |
| 32 #include "components/search_engines/util.h" |
| 33 #include "components/url_fixer/url_fixer.h" | 33 #include "components/url_fixer/url_fixer.h" |
| 34 #include "net/base/net_util.h" | 34 #include "net/base/net_util.h" |
| 35 #include "net/base/registry_controlled_domains/registry_controlled_domain.h" | 35 #include "net/base/registry_controlled_domains/registry_controlled_domain.h" |
| 36 #include "sync/api/sync_change.h" | 36 #include "sync/api/sync_change.h" |
| 37 #include "sync/api/sync_error_factory.h" | 37 #include "sync/api/sync_error_factory.h" |
| 38 #include "sync/protocol/search_engine_specifics.pb.h" | 38 #include "sync/protocol/search_engine_specifics.pb.h" |
| 39 #include "sync/protocol/sync.pb.h" | 39 #include "sync/protocol/sync.pb.h" |
| 40 #include "url/gurl.h" | 40 #include "url/gurl.h" |
| 41 | 41 |
| 42 typedef SearchHostToURLsMap::TemplateURLSet TemplateURLSet; | 42 typedef SearchHostToURLsMap::TemplateURLSet TemplateURLSet; |
| (...skipping 2320 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2363 | 2363 |
| 2364 if (most_recently_intalled_default) { | 2364 if (most_recently_intalled_default) { |
| 2365 base::AutoReset<DefaultSearchChangeOrigin> change_origin( | 2365 base::AutoReset<DefaultSearchChangeOrigin> change_origin( |
| 2366 &dsp_change_origin_, DSP_CHANGE_OVERRIDE_SETTINGS_EXTENSION); | 2366 &dsp_change_origin_, DSP_CHANGE_OVERRIDE_SETTINGS_EXTENSION); |
| 2367 default_search_manager_.SetExtensionControlledDefaultSearchEngine( | 2367 default_search_manager_.SetExtensionControlledDefaultSearchEngine( |
| 2368 most_recently_intalled_default->data()); | 2368 most_recently_intalled_default->data()); |
| 2369 } else { | 2369 } else { |
| 2370 default_search_manager_.ClearExtensionControlledDefaultSearchEngine(); | 2370 default_search_manager_.ClearExtensionControlledDefaultSearchEngine(); |
| 2371 } | 2371 } |
| 2372 } | 2372 } |
| OLD | NEW |