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 841 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
852 tracked_objects::ScopedTracker tracking_profile5( | 852 tracked_objects::ScopedTracker tracking_profile5( |
853 FROM_HERE_WITH_EXPLICIT_FUNCTION( | 853 FROM_HERE_WITH_EXPLICIT_FUNCTION( |
854 "422460 TemplateURLService::OnWebDataServiceRequestDone 5")); | 854 "422460 TemplateURLService::OnWebDataServiceRequestDone 5")); |
855 | 855 |
856 UMA_HISTOGRAM_ENUMERATION( | 856 UMA_HISTOGRAM_ENUMERATION( |
857 "Search.DefaultSearchProviderType", | 857 "Search.DefaultSearchProviderType", |
858 default_search_provider_->GetEngineType(search_terms_data()), | 858 default_search_provider_->GetEngineType(search_terms_data()), |
859 SEARCH_ENGINE_MAX); | 859 SEARCH_ENGINE_MAX); |
860 | 860 |
861 if (rappor_service_) { | 861 if (rappor_service_) { |
862 rappor_service_->RecordSample( | 862 rappor_service_->RecordSampleString( |
863 "Search.DefaultSearchProvider", | 863 "Search.DefaultSearchProvider", rappor::ETLD_PLUS_ONE_RAPPOR_TYPE, |
864 rappor::ETLD_PLUS_ONE_RAPPOR_TYPE, | |
865 net::registry_controlled_domains::GetDomainAndRegistry( | 864 net::registry_controlled_domains::GetDomainAndRegistry( |
866 default_search_provider_->url_ref().GetHost(search_terms_data()), | 865 default_search_provider_->url_ref().GetHost(search_terms_data()), |
867 net::registry_controlled_domains::INCLUDE_PRIVATE_REGISTRIES)); | 866 net::registry_controlled_domains::INCLUDE_PRIVATE_REGISTRIES)); |
868 } | 867 } |
869 } | 868 } |
870 } | 869 } |
871 | 870 |
872 base::string16 TemplateURLService::GetKeywordShortName( | 871 base::string16 TemplateURLService::GetKeywordShortName( |
873 const base::string16& keyword, | 872 const base::string16& keyword, |
874 bool* is_omnibox_api_extension_keyword) { | 873 bool* is_omnibox_api_extension_keyword) { |
(...skipping 1600 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2475 | 2474 |
2476 if (most_recently_intalled_default) { | 2475 if (most_recently_intalled_default) { |
2477 base::AutoReset<DefaultSearchChangeOrigin> change_origin( | 2476 base::AutoReset<DefaultSearchChangeOrigin> change_origin( |
2478 &dsp_change_origin_, DSP_CHANGE_OVERRIDE_SETTINGS_EXTENSION); | 2477 &dsp_change_origin_, DSP_CHANGE_OVERRIDE_SETTINGS_EXTENSION); |
2479 default_search_manager_.SetExtensionControlledDefaultSearchEngine( | 2478 default_search_manager_.SetExtensionControlledDefaultSearchEngine( |
2480 most_recently_intalled_default->data()); | 2479 most_recently_intalled_default->data()); |
2481 } else { | 2480 } else { |
2482 default_search_manager_.ClearExtensionControlledDefaultSearchEngine(); | 2481 default_search_manager_.ClearExtensionControlledDefaultSearchEngine(); |
2483 } | 2482 } |
2484 } | 2483 } |
OLD | NEW |