summaryrefslogtreecommitdiffstats
path: root/chrome/browser
diff options
context:
space:
mode:
authorpkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-06-02 16:43:19 +0000
committerpkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-06-02 16:43:19 +0000
commite9b3528e6a8d79f465fcdd2e44477f1eb9275539 (patch)
tree35056a3c6b0d2b7e070b7979eb7f2da4f32e31d3 /chrome/browser
parentfb4c4b4cc8f9391f382bd6429efc66c60444c63e (diff)
downloadchromium_src-e9b3528e6a8d79f465fcdd2e44477f1eb9275539.zip
chromium_src-e9b3528e6a8d79f465fcdd2e44477f1eb9275539.tar.gz
chromium_src-e9b3528e6a8d79f465fcdd2e44477f1eb9275539.tar.bz2
Misc. small cleanups I ran into while working on other changes.
BUG=none TEST=none Review URL: http://codereview.chromium.org/2486004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@48730 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser')
-rw-r--r--chrome/browser/geolocation/geolocation_permission_context.cc3
-rw-r--r--chrome/browser/gtk/options/passwords_exceptions_page_gtk.cc5
-rw-r--r--chrome/browser/gtk/options/passwords_page_gtk.cc8
-rw-r--r--chrome/browser/toolbar_model.cc9
-rw-r--r--chrome/browser/views/bookmark_editor_view.cc3
5 files changed, 10 insertions, 18 deletions
diff --git a/chrome/browser/geolocation/geolocation_permission_context.cc b/chrome/browser/geolocation/geolocation_permission_context.cc
index a0e76f8..4659fef 100644
--- a/chrome/browser/geolocation/geolocation_permission_context.cc
+++ b/chrome/browser/geolocation/geolocation_permission_context.cc
@@ -126,8 +126,7 @@ class GeolocationConfirmInfoBarDelegate : public ConfirmInfoBarDelegate {
virtual std::wstring GetMessageText() const {
return l10n_util::GetStringF(
IDS_GEOLOCATION_INFOBAR_QUESTION,
- net::FormatUrl(requesting_frame_url_.GetOrigin(), display_languages_,
- true, UnescapeRule::SPACES, NULL, NULL, NULL));
+ net::FormatUrl(requesting_frame_url_.GetOrigin(), display_languages_));
}
virtual SkBitmap* GetIcon() const {
return ResourceBundle::GetSharedInstance().GetBitmapNamed(
diff --git a/chrome/browser/gtk/options/passwords_exceptions_page_gtk.cc b/chrome/browser/gtk/options/passwords_exceptions_page_gtk.cc
index a5bf522..25d35c9 100644
--- a/chrome/browser/gtk/options/passwords_exceptions_page_gtk.cc
+++ b/chrome/browser/gtk/options/passwords_exceptions_page_gtk.cc
@@ -115,11 +115,10 @@ void PasswordsExceptionsPageGtk::SetExceptionList(
exception_list_.resize(result.size());
for (size_t i = 0; i < result.size(); ++i) {
exception_list_[i] = *result[i];
- std::wstring formatted = net::FormatUrl(result[i]->origin, languages);
- std::string site = WideToUTF8(formatted);
GtkTreeIter iter;
gtk_list_store_insert_with_values(exception_list_store_, &iter, (gint) i,
- COL_SITE, site.c_str(), -1);
+ COL_SITE,
+ WideToUTF8(net::FormatUrl(result[i]->origin, languages)).c_str(), -1);
}
gtk_widget_set_sensitive(remove_all_button_, result.size() > 0);
}
diff --git a/chrome/browser/gtk/options/passwords_page_gtk.cc b/chrome/browser/gtk/options/passwords_page_gtk.cc
index 90cd7b6..39a92e3 100644
--- a/chrome/browser/gtk/options/passwords_page_gtk.cc
+++ b/chrome/browser/gtk/options/passwords_page_gtk.cc
@@ -159,13 +159,11 @@ void PasswordsPageGtk::SetPasswordList(
password_list_.resize(result.size());
for (size_t i = 0; i < result.size(); ++i) {
password_list_[i] = *result[i];
- std::wstring formatted = net::FormatUrl(result[i]->origin, languages);
- std::string site = WideToUTF8(formatted);
- std::string user = UTF16ToUTF8(result[i]->username_value);
GtkTreeIter iter;
gtk_list_store_insert_with_values(password_list_store_, &iter, (gint) i,
- COL_SITE, site.c_str(),
- COL_USERNAME, user.c_str(), -1);
+ COL_SITE,
+ WideToUTF8(net::FormatUrl(result[i]->origin, languages)).c_str(),
+ COL_USERNAME, UTF16ToUTF8(result[i]->username_value).c_str(), -1);
}
gtk_widget_set_sensitive(remove_all_button_, result.size() > 0);
}
diff --git a/chrome/browser/toolbar_model.cc b/chrome/browser/toolbar_model.cc
index 740bc3e9..667d43c 100644
--- a/chrome/browser/toolbar_model.cc
+++ b/chrome/browser/toolbar_model.cc
@@ -46,13 +46,8 @@ std::wstring ToolbarModel::GetText() const {
url = entry->virtual_url();
}
}
- if (url.spec().length() > chrome::kMaxURLDisplayChars) {
- if (url.IsStandard()) {
- url = url.GetOrigin();
- } else {
- url = GURL(url.scheme() + ":");
- }
- }
+ if (url.spec().length() > chrome::kMaxURLDisplayChars)
+ url = url.IsStandard() ? url.GetOrigin() : GURL(url.scheme() + ":");
// Note that we can't unescape spaces here, because if the user copies this
// and pastes it into another program, that program may think the URL ends at
// the space.
diff --git a/chrome/browser/views/bookmark_editor_view.cc b/chrome/browser/views/bookmark_editor_view.cc
index f0aa7e9..11df76f 100644
--- a/chrome/browser/views/bookmark_editor_view.cc
+++ b/chrome/browser/views/bookmark_editor_view.cc
@@ -421,7 +421,8 @@ void BookmarkEditorView::Reset() {
}
}
GURL BookmarkEditorView::GetInputURL() const {
- return GURL(URLFixerUpper::FixupURL(UTF16ToUTF8(url_tf_.text()), ""));
+ return GURL(URLFixerUpper::FixupURL(UTF16ToUTF8(url_tf_.text()),
+ std::string()));
}
std::wstring BookmarkEditorView::GetInputTitle() const {