diff options
author | machenbach@chromium.org <machenbach@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-04-29 13:11:30 +0000 |
---|---|---|
committer | machenbach@chromium.org <machenbach@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-04-29 13:11:30 +0000 |
commit | 99030190fefdd1ee983b3b14c746bba79cfcb5d1 (patch) | |
tree | baf5721a7e774b5a0cbaabbd1f68ce9e12e0f9b0 /chrome/browser/ui/passwords | |
parent | e666611c906a03b76d740f36dfdb7eda9836c55e (diff) | |
download | chromium_src-99030190fefdd1ee983b3b14c746bba79cfcb5d1.zip chromium_src-99030190fefdd1ee983b3b14c746bba79cfcb5d1.tar.gz chromium_src-99030190fefdd1ee983b3b14c746bba79cfcb5d1.tar.bz2 |
Revert of Password bubble: Introduce a command to open the bubble. (https://codereview.chromium.org/246393004/)
Reason for revert:
This is causing leaks on linux asan lsan:
http://build.chromium.org/p/chromium.memory/builders/Linux%20ASan%20LSan%20Tests%20%283%29/builds/2361
Original issue's description:
> Password bubble: ManagePasswordsIconView is now a BubbleIconView.
>
> This CL introduces a new browser command to open the Manage Passwords bubble,
> and converts the ManagePasswordsIconView class into a subclass of
> BubbleIconView, which uses the new command to control the bubble's state.
> This allows us to more easily test the view and the UI controller, as each
> object's job is now more clearly defined (and the view is now doing a good
> deal less work), and to independently verify that the command is doing the
> right thing.
>
> After this CL, we'll (finally!) have something approaching reasonable test
> coverage for the core of the views code.
>
> BUG=365678
> TBR=cpu@chromium.org
>
> Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=266859
TBR=markusheintz@chromium.org,vabr@chromium.org,cpu@chromium.org,pkasting@chromium.org,mkwst@chromium.org
NOTREECHECKS=true
NOTRY=true
BUG=365678
Review URL: https://codereview.chromium.org/256333003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@266862 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/ui/passwords')
5 files changed, 5 insertions, 9 deletions
diff --git a/chrome/browser/ui/passwords/manage_passwords_bubble_ui_controller.cc b/chrome/browser/ui/passwords/manage_passwords_bubble_ui_controller.cc index 88c76e6..987077b 100644 --- a/chrome/browser/ui/passwords/manage_passwords_bubble_ui_controller.cc +++ b/chrome/browser/ui/passwords/manage_passwords_bubble_ui_controller.cc @@ -170,8 +170,6 @@ void ManagePasswordsBubbleUIController::UpdateIconAndBubbleState( if (manage_passwords_bubble_needs_showing_) { DCHECK(state == ManagePasswordsIcon::PENDING_STATE); - // TODO(mkwst): Replace this with execution of a browser command once we - // can pipe a CommandUpdater down here. icon->ShowBubbleWithoutUserInteraction(); manage_passwords_bubble_needs_showing_ = false; } diff --git a/chrome/browser/ui/passwords/manage_passwords_icon.cc b/chrome/browser/ui/passwords/manage_passwords_icon.cc index c9758b5..0914bba 100644 --- a/chrome/browser/ui/passwords/manage_passwords_icon.cc +++ b/chrome/browser/ui/passwords/manage_passwords_icon.cc @@ -14,5 +14,5 @@ void ManagePasswordsIcon::SetState(State state) { if (state_ == state) return; state_ = state; - UpdateVisibleUI(); + SetStateInternal(state); } diff --git a/chrome/browser/ui/passwords/manage_passwords_icon.h b/chrome/browser/ui/passwords/manage_passwords_icon.h index 004c8cd..0a44406 100644 --- a/chrome/browser/ui/passwords/manage_passwords_icon.h +++ b/chrome/browser/ui/passwords/manage_passwords_icon.h @@ -42,9 +42,8 @@ class ManagePasswordsIcon { ManagePasswordsIcon(); ~ManagePasswordsIcon(); - // Called from SetState() iff the icon's state has changed in order to do - // whatever platform-specific UI work is necessary given the new state. - virtual void UpdateVisibleUI() = 0; + // Called from SetState() iff the icon's state has changed. + virtual void SetStateInternal(State state) = 0; private: State state_; diff --git a/chrome/browser/ui/passwords/manage_passwords_icon_mock.cc b/chrome/browser/ui/passwords/manage_passwords_icon_mock.cc index 4b575e8..64bdb16 100644 --- a/chrome/browser/ui/passwords/manage_passwords_icon_mock.cc +++ b/chrome/browser/ui/passwords/manage_passwords_icon_mock.cc @@ -14,5 +14,5 @@ void ManagePasswordsIconMock::ShowBubbleWithoutUserInteraction() { ++bubble_shown_count_; } -void ManagePasswordsIconMock::UpdateVisibleUI() { +void ManagePasswordsIconMock::SetStateInternal(ManagePasswordsIcon::State) { } diff --git a/chrome/browser/ui/passwords/manage_passwords_icon_mock.h b/chrome/browser/ui/passwords/manage_passwords_icon_mock.h index de4f814..3781e6a 100644 --- a/chrome/browser/ui/passwords/manage_passwords_icon_mock.h +++ b/chrome/browser/ui/passwords/manage_passwords_icon_mock.h @@ -18,8 +18,7 @@ class ManagePasswordsIconMock : public ManagePasswordsIcon { int bubble_shown_count() const { return bubble_shown_count_; } protected: - // ManagePasswordsIcon: - virtual void UpdateVisibleUI() OVERRIDE; + virtual void SetStateInternal(State state) OVERRIDE; private: int bubble_shown_count_; |