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

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

Issue 1223153003: Move JoinString to the base namespace (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: windows Created 5 years, 5 months 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_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 1179 matching lines...) Expand 10 before | Expand all | Expand 10 after
1190 sync_pb::EntitySpecifics specifics; 1190 sync_pb::EntitySpecifics specifics;
1191 sync_pb::SearchEngineSpecifics* se_specifics = 1191 sync_pb::SearchEngineSpecifics* se_specifics =
1192 specifics.mutable_search_engine(); 1192 specifics.mutable_search_engine();
1193 se_specifics->set_short_name(base::UTF16ToUTF8(turl.short_name())); 1193 se_specifics->set_short_name(base::UTF16ToUTF8(turl.short_name()));
1194 se_specifics->set_keyword(base::UTF16ToUTF8(turl.keyword())); 1194 se_specifics->set_keyword(base::UTF16ToUTF8(turl.keyword()));
1195 se_specifics->set_favicon_url(turl.favicon_url().spec()); 1195 se_specifics->set_favicon_url(turl.favicon_url().spec());
1196 se_specifics->set_url(turl.url()); 1196 se_specifics->set_url(turl.url());
1197 se_specifics->set_safe_for_autoreplace(turl.safe_for_autoreplace()); 1197 se_specifics->set_safe_for_autoreplace(turl.safe_for_autoreplace());
1198 se_specifics->set_originating_url(turl.originating_url().spec()); 1198 se_specifics->set_originating_url(turl.originating_url().spec());
1199 se_specifics->set_date_created(turl.date_created().ToInternalValue()); 1199 se_specifics->set_date_created(turl.date_created().ToInternalValue());
1200 se_specifics->set_input_encodings(JoinString(turl.input_encodings(), ';')); 1200 se_specifics->set_input_encodings(
1201 base::JoinString(turl.input_encodings(), ";"));
1201 se_specifics->set_show_in_default_list(turl.show_in_default_list()); 1202 se_specifics->set_show_in_default_list(turl.show_in_default_list());
1202 se_specifics->set_suggestions_url(turl.suggestions_url()); 1203 se_specifics->set_suggestions_url(turl.suggestions_url());
1203 se_specifics->set_prepopulate_id(turl.prepopulate_id()); 1204 se_specifics->set_prepopulate_id(turl.prepopulate_id());
1204 se_specifics->set_instant_url(turl.instant_url()); 1205 se_specifics->set_instant_url(turl.instant_url());
1205 if (!turl.image_url().empty()) 1206 if (!turl.image_url().empty())
1206 se_specifics->set_image_url(turl.image_url()); 1207 se_specifics->set_image_url(turl.image_url());
1207 se_specifics->set_new_tab_url(turl.new_tab_url()); 1208 se_specifics->set_new_tab_url(turl.new_tab_url());
1208 if (!turl.search_url_post_params().empty()) 1209 if (!turl.search_url_post_params().empty())
1209 se_specifics->set_search_url_post_params(turl.search_url_post_params()); 1210 se_specifics->set_search_url_post_params(turl.search_url_post_params());
1210 if (!turl.suggestions_url_post_params().empty()) { 1211 if (!turl.suggestions_url_post_params().empty()) {
(...skipping 1116 matching lines...) Expand 10 before | Expand all | Expand 10 after
2327 2328
2328 if (most_recently_intalled_default) { 2329 if (most_recently_intalled_default) {
2329 base::AutoReset<DefaultSearchChangeOrigin> change_origin( 2330 base::AutoReset<DefaultSearchChangeOrigin> change_origin(
2330 &dsp_change_origin_, DSP_CHANGE_OVERRIDE_SETTINGS_EXTENSION); 2331 &dsp_change_origin_, DSP_CHANGE_OVERRIDE_SETTINGS_EXTENSION);
2331 default_search_manager_.SetExtensionControlledDefaultSearchEngine( 2332 default_search_manager_.SetExtensionControlledDefaultSearchEngine(
2332 most_recently_intalled_default->data()); 2333 most_recently_intalled_default->data());
2333 } else { 2334 } else {
2334 default_search_manager_.ClearExtensionControlledDefaultSearchEngine(); 2335 default_search_manager_.ClearExtensionControlledDefaultSearchEngine();
2335 } 2336 }
2336 } 2337 }
OLDNEW
« no previous file with comments | « components/search_engines/template_url.cc ('k') | components/search_engines/template_url_service_sync_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698