Index: trunk/src/chrome/browser/ui/ash/launcher/shell_window_launcher_controller.cc |
=================================================================== |
--- trunk/src/chrome/browser/ui/ash/launcher/shell_window_launcher_controller.cc (revision 226578) |
+++ trunk/src/chrome/browser/ui/ash/launcher/shell_window_launcher_controller.cc (working copy) |
@@ -7,6 +7,7 @@ |
#include "apps/shell_window.h" |
#include "ash/shell.h" |
#include "ash/wm/window_util.h" |
+#include "base/stl_util.h" |
#include "base/strings/stringprintf.h" |
#include "chrome/browser/profiles/profile.h" |
#include "chrome/browser/ui/ash/launcher/chrome_launcher_controller.h" |
@@ -41,6 +42,7 @@ |
} |
} |
+ |
ShellWindowLauncherController::~ShellWindowLauncherController() { |
registry_->RemoveObserver(this); |
if (activation_client_) |
@@ -50,6 +52,8 @@ |
iter != window_to_app_launcher_id_map_.end(); ++iter) { |
iter->first->RemoveObserver(this); |
} |
+ STLDeleteContainerPairSecondPointers( |
+ app_controller_map_.begin(), app_controller_map_.end()); |
} |
void ShellWindowLauncherController::OnShellWindowAdded( |
@@ -134,6 +138,7 @@ |
ash::LauncherID launcher_id = controller->launcher_id(); |
owner_->CloseLauncherItem(launcher_id); |
app_controller_map_.erase(iter2); |
+ delete controller; |
} |
} |