| 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 1263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1274 data.instant_url = specifics.instant_url(); | 1274 data.instant_url = specifics.instant_url(); |
| 1275 data.image_url = specifics.image_url(); | 1275 data.image_url = specifics.image_url(); |
| 1276 data.new_tab_url = specifics.new_tab_url(); | 1276 data.new_tab_url = specifics.new_tab_url(); |
| 1277 data.search_url_post_params = specifics.search_url_post_params(); | 1277 data.search_url_post_params = specifics.search_url_post_params(); |
| 1278 data.suggestions_url_post_params = specifics.suggestions_url_post_params(); | 1278 data.suggestions_url_post_params = specifics.suggestions_url_post_params(); |
| 1279 data.instant_url_post_params = specifics.instant_url_post_params(); | 1279 data.instant_url_post_params = specifics.instant_url_post_params(); |
| 1280 data.image_url_post_params = specifics.image_url_post_params(); | 1280 data.image_url_post_params = specifics.image_url_post_params(); |
| 1281 data.favicon_url = GURL(specifics.favicon_url()); | 1281 data.favicon_url = GURL(specifics.favicon_url()); |
| 1282 data.show_in_default_list = specifics.show_in_default_list(); | 1282 data.show_in_default_list = specifics.show_in_default_list(); |
| 1283 data.safe_for_autoreplace = specifics.safe_for_autoreplace(); | 1283 data.safe_for_autoreplace = specifics.safe_for_autoreplace(); |
| 1284 base::SplitString(specifics.input_encodings(), ';', &data.input_encodings); | 1284 data.input_encodings = base::SplitString( |
| 1285 specifics.input_encodings(), ";", |
| 1286 base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); |
| 1285 // If the server data has duplicate encodings, we'll want to push an update | 1287 // If the server data has duplicate encodings, we'll want to push an update |
| 1286 // below to correct it. Note that we also fix this in | 1288 // below to correct it. Note that we also fix this in |
| 1287 // GetSearchProvidersUsingKeywordResult(), since otherwise we'd never correct | 1289 // GetSearchProvidersUsingKeywordResult(), since otherwise we'd never correct |
| 1288 // local problems for clients which have disabled search engine sync. | 1290 // local problems for clients which have disabled search engine sync. |
| 1289 bool deduped = DeDupeEncodings(&data.input_encodings); | 1291 bool deduped = DeDupeEncodings(&data.input_encodings); |
| 1290 data.date_created = base::Time::FromInternalValue(specifics.date_created()); | 1292 data.date_created = base::Time::FromInternalValue(specifics.date_created()); |
| 1291 data.last_modified = base::Time::FromInternalValue(specifics.last_modified()); | 1293 data.last_modified = base::Time::FromInternalValue(specifics.last_modified()); |
| 1292 data.prepopulate_id = specifics.prepopulate_id(); | 1294 data.prepopulate_id = specifics.prepopulate_id(); |
| 1293 data.sync_guid = specifics.sync_guid(); | 1295 data.sync_guid = specifics.sync_guid(); |
| 1294 data.alternate_urls.clear(); | 1296 data.alternate_urls.clear(); |
| (...skipping 1034 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2329 | 2331 |
| 2330 if (most_recently_intalled_default) { | 2332 if (most_recently_intalled_default) { |
| 2331 base::AutoReset<DefaultSearchChangeOrigin> change_origin( | 2333 base::AutoReset<DefaultSearchChangeOrigin> change_origin( |
| 2332 &dsp_change_origin_, DSP_CHANGE_OVERRIDE_SETTINGS_EXTENSION); | 2334 &dsp_change_origin_, DSP_CHANGE_OVERRIDE_SETTINGS_EXTENSION); |
| 2333 default_search_manager_.SetExtensionControlledDefaultSearchEngine( | 2335 default_search_manager_.SetExtensionControlledDefaultSearchEngine( |
| 2334 most_recently_intalled_default->data()); | 2336 most_recently_intalled_default->data()); |
| 2335 } else { | 2337 } else { |
| 2336 default_search_manager_.ClearExtensionControlledDefaultSearchEngine(); | 2338 default_search_manager_.ClearExtensionControlledDefaultSearchEngine(); |
| 2337 } | 2339 } |
| 2338 } | 2340 } |
| OLD | NEW |