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

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

Issue 9965143: Revert 130431 - Move the URL string from TemplateURLRef onto the owning TemplateURL. This will mak… (Closed) Base URL: svn://svn.chromium.org/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 130565)
+++ chrome/browser/ui/gtk/edit_search_engine_dialog.cc (working copy)
@@ -27,6 +27,10 @@
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,
@@ -149,8 +153,7 @@
UTF16ToUTF8(controller_->template_url()->keyword()).c_str());
gtk_entry_set_text(
GTK_ENTRY(url_entry_),
- UTF16ToUTF8(controller_->template_url()->url_ref().DisplayURL()).
- c_str());
+ GetDisplayURL(*controller_->template_url()).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