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

Unified Diff: chrome/browser/ui/ash/launcher/browser_status_monitor.cc

Issue 2318303002: Remove stl_util's STLDeleteContainerPairSecondPointers. (Closed)
Patch Set: fix Created 4 years, 3 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
Index: chrome/browser/ui/ash/launcher/browser_status_monitor.cc
diff --git a/chrome/browser/ui/ash/launcher/browser_status_monitor.cc b/chrome/browser/ui/ash/launcher/browser_status_monitor.cc
index 119bad52220375722e530bc12056e194fb54cd93..6e1bafbd556dc278bd5a949c79f5ae0ab626e639 100644
--- a/chrome/browser/ui/ash/launcher/browser_status_monitor.cc
+++ b/chrome/browser/ui/ash/launcher/browser_status_monitor.cc
@@ -11,7 +11,7 @@
#include "ash/shell.h"
#include "ash/wm/window_util.h"
#include "base/macros.h"
-#include "base/stl_util.h"
+#include "base/memory/ptr_util.h"
#include "chrome/browser/ui/ash/launcher/browser_shortcut_launcher_item_controller.h"
#include "chrome/browser/ui/ash/launcher/chrome_launcher_controller.h"
#include "chrome/browser/ui/ash/launcher/chrome_launcher_controller_util.h"
@@ -125,9 +125,6 @@ BrowserStatusMonitor::~BrowserStatusMonitor() {
settings_window_observer_.get());
browser_tab_strip_tracker_.StopObservingAndSendOnBrowserRemoved();
-
- base::STLDeleteContainerPairSecondPointers(
- webcontents_to_observer_map_.begin(), webcontents_to_observer_map_.end());
}
void BrowserStatusMonitor::UpdateAppItemState(
@@ -310,7 +307,7 @@ void BrowserStatusMonitor::AddWebContentsObserver(
if (webcontents_to_observer_map_.find(contents) ==
webcontents_to_observer_map_.end()) {
webcontents_to_observer_map_[contents] =
- new LocalWebContentsObserver(contents, this);
+ base::MakeUnique<LocalWebContentsObserver>(contents, this);
}
}
@@ -318,7 +315,6 @@ void BrowserStatusMonitor::RemoveWebContentsObserver(
content::WebContents* contents) {
DCHECK(webcontents_to_observer_map_.find(contents) !=
webcontents_to_observer_map_.end());
- delete webcontents_to_observer_map_[contents];
webcontents_to_observer_map_.erase(contents);
}
« no previous file with comments | « chrome/browser/ui/ash/launcher/browser_status_monitor.h ('k') | components/syncable_prefs/pref_model_associator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698