| 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 "components/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" |
| (...skipping 809 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 820 | 820 |
| 821 if (default_search_provider_) { | 821 if (default_search_provider_) { |
| 822 // TODO(robliao): Remove ScopedTracker below once https://crbug.com/422460 | 822 // TODO(robliao): Remove ScopedTracker below once https://crbug.com/422460 |
| 823 // is fixed. | 823 // is fixed. |
| 824 tracked_objects::ScopedTracker tracking_profile5( | 824 tracked_objects::ScopedTracker tracking_profile5( |
| 825 FROM_HERE_WITH_EXPLICIT_FUNCTION( | 825 FROM_HERE_WITH_EXPLICIT_FUNCTION( |
| 826 "422460 TemplateURLService::OnWebDataServiceRequestDone 5")); | 826 "422460 TemplateURLService::OnWebDataServiceRequestDone 5")); |
| 827 | 827 |
| 828 UMA_HISTOGRAM_ENUMERATION( | 828 UMA_HISTOGRAM_ENUMERATION( |
| 829 "Search.DefaultSearchProviderType", | 829 "Search.DefaultSearchProviderType", |
| 830 TemplateURLPrepopulateData::GetEngineType( | 830 default_search_provider_->GetEngineType(search_terms_data()), |
| 831 *default_search_provider_, search_terms_data()), | |
| 832 SEARCH_ENGINE_MAX); | 831 SEARCH_ENGINE_MAX); |
| 833 | 832 |
| 834 if (rappor_service_) { | 833 if (rappor_service_) { |
| 835 rappor_service_->RecordSample( | 834 rappor_service_->RecordSample( |
| 836 "Search.DefaultSearchProvider", | 835 "Search.DefaultSearchProvider", |
| 837 rappor::ETLD_PLUS_ONE_RAPPOR_TYPE, | 836 rappor::ETLD_PLUS_ONE_RAPPOR_TYPE, |
| 838 net::registry_controlled_domains::GetDomainAndRegistry( | 837 net::registry_controlled_domains::GetDomainAndRegistry( |
| 839 default_search_provider_->url_ref().GetHost(search_terms_data()), | 838 default_search_provider_->url_ref().GetHost(search_terms_data()), |
| 840 net::registry_controlled_domains::INCLUDE_PRIVATE_REGISTRIES)); | 839 net::registry_controlled_domains::INCLUDE_PRIVATE_REGISTRIES)); |
| 841 } | 840 } |
| (...skipping 1592 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2434 | 2433 |
| 2435 if (most_recently_intalled_default) { | 2434 if (most_recently_intalled_default) { |
| 2436 base::AutoReset<DefaultSearchChangeOrigin> change_origin( | 2435 base::AutoReset<DefaultSearchChangeOrigin> change_origin( |
| 2437 &dsp_change_origin_, DSP_CHANGE_OVERRIDE_SETTINGS_EXTENSION); | 2436 &dsp_change_origin_, DSP_CHANGE_OVERRIDE_SETTINGS_EXTENSION); |
| 2438 default_search_manager_.SetExtensionControlledDefaultSearchEngine( | 2437 default_search_manager_.SetExtensionControlledDefaultSearchEngine( |
| 2439 most_recently_intalled_default->data()); | 2438 most_recently_intalled_default->data()); |
| 2440 } else { | 2439 } else { |
| 2441 default_search_manager_.ClearExtensionControlledDefaultSearchEngine(); | 2440 default_search_manager_.ClearExtensionControlledDefaultSearchEngine(); |
| 2442 } | 2441 } |
| 2443 } | 2442 } |
| OLD | NEW |