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

Unified Diff: chrome/browser/ui/gtk/edit_search_engine_dialog.cc

Issue 9968016: Move the URL string from TemplateURLRef onto the owning TemplateURL. This will make it easier to m… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/gtk/edit_search_engine_dialog.cc
===================================================================
--- chrome/browser/ui/gtk/edit_search_engine_dialog.cc (revision 130285)
+++ chrome/browser/ui/gtk/edit_search_engine_dialog.cc (working copy)
@@ -27,10 +27,6 @@
namespace {
-std::string GetDisplayURL(const TemplateURL& turl) {
- return turl.url() ? UTF16ToUTF8(turl.url()->DisplayURL()) : std::string();
-}
-
// Forces text to lowercase when connected to an editable's "insert-text"
// signal. (Like views Textfield::STYLE_LOWERCASE.)
void LowercaseInsertTextHandler(GtkEditable *editable, const gchar *text,
@@ -153,7 +149,8 @@
UTF16ToUTF8(controller_->template_url()->keyword()).c_str());
gtk_entry_set_text(
GTK_ENTRY(url_entry_),
- GetDisplayURL(*controller_->template_url()).c_str());
+ UTF16ToUTF8(controller_->template_url()->url_ref().DisplayURL()).
+ c_str());
// We don't allow users to edit prepopulated URLs.
gtk_editable_set_editable(
GTK_EDITABLE(url_entry_),

Powered by Google App Engine
This is Rietveld 408576698