| 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 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 173 (elem1.first < elem2.first); | 173 (elem1.first < elem2.first); |
| 174 } | 174 } |
| 175 }; | 175 }; |
| 176 | 176 |
| 177 | 177 |
| 178 // TemplateURLService --------------------------------------------------------- | 178 // TemplateURLService --------------------------------------------------------- |
| 179 | 179 |
| 180 TemplateURLService::TemplateURLService( | 180 TemplateURLService::TemplateURLService( |
| 181 PrefService* prefs, | 181 PrefService* prefs, |
| 182 scoped_ptr<SearchTermsData> search_terms_data, | 182 scoped_ptr<SearchTermsData> search_terms_data, |
| 183 KeywordWebDataService* web_data_service, | 183 const scoped_refptr<KeywordWebDataService>& web_data_service, |
| 184 scoped_ptr<TemplateURLServiceClient> client, | 184 scoped_ptr<TemplateURLServiceClient> client, |
| 185 GoogleURLTracker* google_url_tracker, | 185 GoogleURLTracker* google_url_tracker, |
| 186 rappor::RapporService* rappor_service, | 186 rappor::RapporService* rappor_service, |
| 187 const base::Closure& dsp_change_callback) | 187 const base::Closure& dsp_change_callback) |
| 188 : prefs_(prefs), | 188 : prefs_(prefs), |
| 189 search_terms_data_(search_terms_data.Pass()), | 189 search_terms_data_(search_terms_data.Pass()), |
| 190 web_data_service_(web_data_service), | 190 web_data_service_(web_data_service), |
| 191 client_(client.Pass()), | 191 client_(client.Pass()), |
| 192 google_url_tracker_(google_url_tracker), | 192 google_url_tracker_(google_url_tracker), |
| 193 rappor_service_(rappor_service), | 193 rappor_service_(rappor_service), |
| (...skipping 2175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2369 | 2369 |
| 2370 if (most_recently_intalled_default) { | 2370 if (most_recently_intalled_default) { |
| 2371 base::AutoReset<DefaultSearchChangeOrigin> change_origin( | 2371 base::AutoReset<DefaultSearchChangeOrigin> change_origin( |
| 2372 &dsp_change_origin_, DSP_CHANGE_OVERRIDE_SETTINGS_EXTENSION); | 2372 &dsp_change_origin_, DSP_CHANGE_OVERRIDE_SETTINGS_EXTENSION); |
| 2373 default_search_manager_.SetExtensionControlledDefaultSearchEngine( | 2373 default_search_manager_.SetExtensionControlledDefaultSearchEngine( |
| 2374 most_recently_intalled_default->data()); | 2374 most_recently_intalled_default->data()); |
| 2375 } else { | 2375 } else { |
| 2376 default_search_manager_.ClearExtensionControlledDefaultSearchEngine(); | 2376 default_search_manager_.ClearExtensionControlledDefaultSearchEngine(); |
| 2377 } | 2377 } |
| 2378 } | 2378 } |
| OLD | NEW |