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

Unified Diff: chrome/browser/ui/views/location_bar/location_bar_view.cc

Issue 6306011: Remove wstring from autocomplete. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 11 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/views/location_bar/location_bar_view.cc
===================================================================
--- chrome/browser/ui/views/location_bar/location_bar_view.cc (revision 72388)
+++ chrome/browser/ui/views/location_bar/location_bar_view.cc (working copy)
@@ -447,7 +447,7 @@
int ev_bubble_width = 0;
location_icon_view_->SetVisible(false);
ev_bubble_view_->SetVisible(false);
- const std::wstring keyword(location_entry_->model()->keyword());
+ const string16 keyword(location_entry_->model()->keyword());
const bool is_keyword_hint(location_entry_->model()->is_keyword_hint());
const bool show_selected_keyword = !keyword.empty() && !is_keyword_hint;
if (show_selected_keyword) {
@@ -516,8 +516,7 @@
if (selected_keyword_view_->keyword() != keyword) {
selected_keyword_view_->SetKeyword(keyword);
const TemplateURL* template_url =
- profile_->GetTemplateURLModel()->GetTemplateURLForKeyword(
- WideToUTF16Hack(keyword));
+ profile_->GetTemplateURLModel()->GetTemplateURLForKeyword(keyword);
if (template_url && template_url->IsExtensionKeyword()) {
const SkBitmap& bitmap = profile_->GetExtensionService()->
GetOmniboxIcon(template_url->GetExtensionId());
@@ -769,11 +768,11 @@
update_instant_ = false;
}
-bool LocationBarView::OnCommitSuggestedText(const std::wstring& typed_text) {
+bool LocationBarView::OnCommitSuggestedText(const string16& typed_text) {
InstantController* instant = delegate_->GetInstant();
if (!instant)
return false;
- std::wstring suggestion;
+ string16 suggestion;
#if defined(OS_WIN)
if (!HasValidSuggestText())
return false;
@@ -849,17 +848,17 @@
location_entry_->model()->popup_model()->IsOpen()) {
instant->Update(GetTabContentsWrapper(),
location_entry_->model()->CurrentMatch(),
- WideToUTF16(location_entry_->GetText()),
+ location_entry_->GetText(),
location_entry_->model()->UseVerbatimInstant(),
&suggested_text);
if (!instant->MightSupportInstant()) {
- location_entry_->model()->FinalizeInstantQuery(std::wstring(),
- std::wstring());
+ location_entry_->model()->FinalizeInstantQuery(string16(),
+ string16());
}
} else {
instant->DestroyPreviewContents();
- location_entry_->model()->FinalizeInstantQuery(std::wstring(),
- std::wstring());
+ location_entry_->model()->FinalizeInstantQuery(string16(),
+ string16());
}
}
@@ -895,8 +894,8 @@
return GetTabContentsFromDelegate(delegate_)->GetFavIcon();
}
-std::wstring LocationBarView::GetTitle() const {
- return UTF16ToWideHack(GetTabContentsFromDelegate(delegate_)->GetTitle());
+string16 LocationBarView::GetTitle() const {
+ return GetTabContentsFromDelegate(delegate_)->GetTitle();
}
int LocationBarView::AvailableWidth(int location_bar_width) {
@@ -1130,7 +1129,7 @@
// text.
if (!input.empty()) {
location_entry_->model()->FinalizeInstantQuery(location_entry_->GetText(),
- UTF16ToWide(input));
+ input);
}
return;
}
Property changes on: chrome/browser/ui/views/location_bar/location_bar_view.cc
___________________________________________________________________
Deleted: svn:mergeinfo

Powered by Google App Engine
This is Rietveld 408576698