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

Unified Diff: ash/system/chromeos/power/tray_power_unittest.cc

Issue 1458553006: ScopedPtrMap -> std::map from apps, ash, media, ui (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix ash_unittests compile error Created 5 years, 1 month 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
« no previous file with comments | « apps/saved_files_service.cc ('k') | media/midi/midi_manager_alsa.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/system/chromeos/power/tray_power_unittest.cc
diff --git a/ash/system/chromeos/power/tray_power_unittest.cc b/ash/system/chromeos/power/tray_power_unittest.cc
index 865519c7010320ffd90bbf7889a6918b888ba0be..d0b97057125661eb290635d29a23e20876c89cf4 100644
--- a/ash/system/chromeos/power/tray_power_unittest.cc
+++ b/ash/system/chromeos/power/tray_power_unittest.cc
@@ -9,7 +9,6 @@
#include "ash/ash_switches.h"
#include "ash/test/ash_test_base.h"
-#include "base/containers/scoped_ptr_map.h"
#include "base/memory/scoped_ptr.h"
#include "chromeos/dbus/power_manager/power_supply_properties.pb.h"
#include "ui/message_center/fake_message_center.h"
@@ -30,7 +29,8 @@ class MockMessageCenter : public message_center::FakeMessageCenter {
// message_center::FakeMessageCenter overrides:
void AddNotification(scoped_ptr<Notification> notification) override {
add_count_++;
- notifications_.insert(notification->id(), notification.Pass());
+ notifications_.insert(
+ std::make_pair(notification->id(), std::move(notification)));
}
void RemoveNotification(const std::string& id, bool by_user) override {
Notification* notification = FindVisibleNotificationById(id);
@@ -42,13 +42,13 @@ class MockMessageCenter : public message_center::FakeMessageCenter {
Notification* FindVisibleNotificationById(const std::string& id) override {
auto it = notifications_.find(id);
- return it == notifications_.end() ? NULL : it->second;
+ return it == notifications_.end() ? NULL : it->second.get();
}
private:
int add_count_;
int remove_count_;
- base::ScopedPtrMap<std::string, scoped_ptr<Notification>> notifications_;
+ std::map<std::string, scoped_ptr<Notification>> notifications_;
DISALLOW_COPY_AND_ASSIGN(MockMessageCenter);
};
« no previous file with comments | « apps/saved_files_service.cc ('k') | media/midi/midi_manager_alsa.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698