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

Unified Diff: chrome/browser/ui/omnibox/omnibox_edit_model.cc

Issue 292493003: [OriginChip] Re-enable the chip as necessary when switching tabs. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/omnibox/omnibox_edit_model.cc
diff --git a/chrome/browser/ui/omnibox/omnibox_edit_model.cc b/chrome/browser/ui/omnibox/omnibox_edit_model.cc
index 2e7eb9f37076768bdf1ecc58ba9db04ee6b29221..f199c9d61386b5d3c4802e800a553289dca93982 100644
--- a/chrome/browser/ui/omnibox/omnibox_edit_model.cc
+++ b/chrome/browser/ui/omnibox/omnibox_edit_model.cc
@@ -247,8 +247,11 @@ const OmniboxEditModel::State OmniboxEditModel::GetStateForTabSwitch() {
void OmniboxEditModel::RestoreState(const State* state) {
// We need to update the permanent text correctly and revert the view
// regardless of whether there is saved state.
+ bool url_replacement_enabled = !state || state->url_replacement_enabled;
controller_->GetToolbarModel()->set_url_replacement_enabled(
- !state || state->url_replacement_enabled);
+ url_replacement_enabled);
+ controller_->GetToolbarModel()->set_origin_chip_enabled(
+ url_replacement_enabled);
permanent_text_ = controller_->GetToolbarModel()->GetText();
// Don't muck with the search term replacement state, as we've just set it
// correctly.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698