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

Issue 8417002: Makes Launcher remove itself as an observer from any windows it's (Closed)

Created:
9 years, 1 month ago by sky
Modified:
9 years, 1 month ago
CC:
chromium-reviews
Visibility:
Public.

Description

Makes Launcher remove itself as an observer from any windows it's observing in its destructor. BUG=none TEST=none R=ben@chromium.org Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=107612

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+4 lines, -0 lines) Patch
M ui/aura_shell/launcher/launcher.cc View 1 chunk +4 lines, -0 lines 0 comments Download

Messages

Total messages: 2 (0 generated)
sky
9 years, 1 month ago (2011-10-27 17:58:58 UTC) #1
Ben Goodger (Google)
9 years, 1 month ago (2011-10-27 18:02:16 UTC) #2
LGTM

On Thu, Oct 27, 2011 at 10:58 AM, <sky@chromium.org> wrote:

> Reviewers: Ben Goodger (Google),
>
> Description:
> Makes Launcher remove itself as an observer from any windows it's
> observing in its destructor.
>
> BUG=none
> TEST=none
> R=ben@chromium.org
>
>
> Please review this at
http://codereview.chromium.**org/8417002/<http://codereview.chromium.org/8417...
>
> SVN Base:
svn://svn.chromium.org/chrome/**trunk/src<http://svn.chromium.org/chrome/trunk/src>
>
> Affected files:
>  M ui/aura_shell/launcher/**launcher.cc
>
>
> Index: ui/aura_shell/launcher/**launcher.cc
> diff --git a/ui/aura_shell/launcher/**launcher.cc
> b/ui/aura_shell/launcher/**launcher.cc
> index 4792c8d4a935b6fd0a757bc5d8b876**5775d83c51..**
> 845965605c252379a6b667b586cc26**6232d39038 100644
> --- a/ui/aura_shell/launcher/**launcher.cc
> +++ b/ui/aura_shell/launcher/**launcher.cc
> @@ -43,6 +43,10 @@ Launcher::Launcher(aura::**ToplevelWindowContainer*
> window_container)
>
>  Launcher::~Launcher() {
>   window_container_->**RemoveObserver(this);
> +  for (WindowMap::iterator i = known_windows_.begin();
> +       i != known_windows_.end(); ++i) {
> +    i->first->RemoveObserver(this)**;
> +  }
>  }
>
>  void Launcher::MaybeAdd(aura::**Window* window) {
>
>
>

Powered by Google App Engine
This is Rietveld 408576698