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

Unified Diff: chrome/browser/ui/views/omnibox/omnibox_view_views.cc

Issue 7067015: An edit for SetText needs to be merged with previous edit for omnibox. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: " Created 9 years, 7 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/omnibox/omnibox_view_views.cc
diff --git a/chrome/browser/ui/views/omnibox/omnibox_view_views.cc b/chrome/browser/ui/views/omnibox/omnibox_view_views.cc
index ad04876f65e3be351d3333fe739628d41328cf9d..e694fc70395476299f0e4694ebbc6a1e8e5de2ff 100644
--- a/chrome/browser/ui/views/omnibox/omnibox_view_views.cc
+++ b/chrome/browser/ui/views/omnibox/omnibox_view_views.cc
@@ -303,7 +303,6 @@ void OmniboxViewViews::Update(const TabContents* contents) {
// NOTE: We're getting the URL text here from the ToolbarModel.
bool visibly_changed_permanent_text =
model_->UpdatePermanentText(WideToUTF16Hack(toolbar_model_->GetText()));
-
ToolbarModel::SecurityLevel security_level =
toolbar_model_->GetSecurityLevel();
bool changed_security_level = (security_level != security_level_);
@@ -322,6 +321,9 @@ void OmniboxViewViews::Update(const TabContents* contents) {
// Move the marks for the cursor and the other end of the selection to
// the previously-saved offsets (but preserve PRIMARY).
textfield_->SelectRange(state->view_state.selection_range);
+ // We do not carry over the current edit history to another tab.
+ // TODO(oshima): consider saving/restoring edit history.
+ textfield_->ClearEditHistory();
}
} else if (visibly_changed_permanent_text) {
RevertAll();

Powered by Google App Engine
This is Rietveld 408576698