Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(378)

Side by Side Diff: components/search_engines/template_url_prepopulate_data.cc

Issue 2487633003: Change behaivor to decide whether a search engine should be shown in the default list (Closed)
Patch Set: Update based on Peter and Nicolas's comments. Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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_prepopulate_data.h" 5 #include "components/search_engines/template_url_prepopulate_data.h"
6 6
7 #if defined(OS_POSIX) && !defined(OS_MACOSX) 7 #if defined(OS_POSIX) && !defined(OS_MACOSX)
8 #include <locale.h> 8 #include <locale.h>
9 #endif 9 #endif
10 10
(...skipping 991 matching lines...) Expand 10 before | Expand all | Expand 10 after
1002 data->suggestions_url = suggest_url.as_string(); 1002 data->suggestions_url = suggest_url.as_string();
1003 data->instant_url = instant_url.as_string(); 1003 data->instant_url = instant_url.as_string();
1004 data->image_url = image_url.as_string(); 1004 data->image_url = image_url.as_string();
1005 data->new_tab_url = new_tab_url.as_string(); 1005 data->new_tab_url = new_tab_url.as_string();
1006 data->contextual_search_url = contextual_search_url.as_string(); 1006 data->contextual_search_url = contextual_search_url.as_string();
1007 data->search_url_post_params = search_url_post_params.as_string(); 1007 data->search_url_post_params = search_url_post_params.as_string();
1008 data->suggestions_url_post_params = suggest_url_post_params.as_string(); 1008 data->suggestions_url_post_params = suggest_url_post_params.as_string();
1009 data->instant_url_post_params = instant_url_post_params.as_string(); 1009 data->instant_url_post_params = instant_url_post_params.as_string();
1010 data->image_url_post_params = image_url_post_params.as_string(); 1010 data->image_url_post_params = image_url_post_params.as_string();
1011 data->favicon_url = GURL(favicon_url); 1011 data->favicon_url = GURL(favicon_url);
1012 data->show_in_default_list = true;
1013 data->safe_for_autoreplace = true; 1012 data->safe_for_autoreplace = true;
1014 data->input_encodings.push_back(encoding.as_string()); 1013 data->input_encodings.push_back(encoding.as_string());
1015 data->date_created = base::Time(); 1014 data->date_created = base::Time();
1016 data->last_modified = base::Time(); 1015 data->last_modified = base::Time();
1017 data->prepopulate_id = id; 1016 data->prepopulate_id = id;
1018 for (size_t i = 0; i < alternate_urls.GetSize(); ++i) { 1017 for (size_t i = 0; i < alternate_urls.GetSize(); ++i) {
1019 std::string alternate_url; 1018 std::string alternate_url;
1020 alternate_urls.GetString(i, &alternate_url); 1019 alternate_urls.GetString(i, &alternate_url);
1021 DCHECK(!alternate_url.empty()); 1020 DCHECK(!alternate_url.empty());
1022 data->alternate_urls.push_back(alternate_url); 1021 data->alternate_urls.push_back(alternate_url);
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after
1262 locale_str.erase(0, territory_delim + 1); 1261 locale_str.erase(0, territory_delim + 1);
1263 1262
1264 // Next remove any codeset/modifier portion and uppercase. 1263 // Next remove any codeset/modifier portion and uppercase.
1265 return CountryStringToCountryID( 1264 return CountryStringToCountryID(
1266 base::ToUpperASCII(locale_str.substr(0, locale_str.find_first_of(".@")))); 1265 base::ToUpperASCII(locale_str.substr(0, locale_str.find_first_of(".@"))));
1267 } 1266 }
1268 1267
1269 #endif // OS_* 1268 #endif // OS_*
1270 1269
1271 } // namespace TemplateURLPrepopulateData 1270 } // namespace TemplateURLPrepopulateData
OLDNEW
« no previous file with comments | « components/search_engines/template_url_parser.cc ('k') | components/search_engines/template_url_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698