diff options
author | mirandac@chromium.org <mirandac@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-08-15 16:16:27 +0000 |
---|---|---|
committer | mirandac@chromium.org <mirandac@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-08-15 16:16:27 +0000 |
commit | 0d93778842822187888671cffa788a3524687864 (patch) | |
tree | 5fc9a4fd406d5319f2ec6262af9255db0b18fe42 /chrome/browser/views | |
parent | 05c8e50113e840b25745125dea309e50ddb5d800 (diff) | |
download | chromium_src-0d93778842822187888671cffa788a3524687864.zip chromium_src-0d93778842822187888671cffa788a3524687864.tar.gz chromium_src-0d93778842822187888671cffa788a3524687864.tar.bz2 |
Move some cleanup code to the destructor. If the user closes the Chrome browser window while the first run bubble is showing, the First Run Bubble will close before the cleanup code has had a chance to fire.
This change fixes that.
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/3120013
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@56165 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/views')
-rw-r--r-- | chrome/browser/views/first_run_bubble.cc | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/chrome/browser/views/first_run_bubble.cc b/chrome/browser/views/first_run_bubble.cc index 0252c8b..01457e6 100644 --- a/chrome/browser/views/first_run_bubble.cc +++ b/chrome/browser/views/first_run_bubble.cc @@ -494,9 +494,8 @@ FirstRunBubble::FirstRunBubble() } FirstRunBubble::~FirstRunBubble() { - // We should have called RevokeAll on the method factory already. - DCHECK(enable_window_method_factory_.empty()); enable_window_method_factory_.RevokeAll(); + GetFocusManager()->RemoveFocusChangeListener(view_); } void FirstRunBubble::EnableParent() { @@ -536,6 +535,4 @@ void FirstRunBubble::InfoBubbleClosing(InfoBubble* info_bubble, // Make sure our parent window is re-enabled. if (!IsWindowEnabled(GetParent())) ::EnableWindow(GetParent(), true); - enable_window_method_factory_.RevokeAll(); - GetFocusManager()->RemoveFocusChangeListener(view_); } |