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

Unified Diff: apps/saved_files_service.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.h ('k') | ash/system/chromeos/power/tray_power_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: apps/saved_files_service.cc
diff --git a/apps/saved_files_service.cc b/apps/saved_files_service.cc
index 43a0062196f44a50f5330ed59219936bb3828ec3..e4a4fd9b70f4816b9f68fdfb0627ed951d66efdc 100644
--- a/apps/saved_files_service.cc
+++ b/apps/saved_files_service.cc
@@ -275,10 +275,9 @@ void SavedFilesService::ClearQueue(const extensions::Extension* extension) {
SavedFilesService::SavedFiles* SavedFilesService::Get(
const std::string& extension_id) const {
- base::ScopedPtrMap<std::string, scoped_ptr<SavedFiles>>::const_iterator it =
- extension_id_to_saved_files_.find(extension_id);
+ auto it = extension_id_to_saved_files_.find(extension_id);
if (it != extension_id_to_saved_files_.end())
- return it->second;
+ return it->second.get();
return NULL;
}
@@ -292,7 +291,8 @@ SavedFilesService::SavedFiles* SavedFilesService::GetOrInsert(
scoped_ptr<SavedFiles> scoped_saved_files(
new SavedFiles(profile_, extension_id));
saved_files = scoped_saved_files.get();
- extension_id_to_saved_files_.insert(extension_id, scoped_saved_files.Pass());
+ extension_id_to_saved_files_.insert(
+ std::make_pair(extension_id, std::move(scoped_saved_files)));
return saved_files;
}
« no previous file with comments | « apps/saved_files_service.h ('k') | ash/system/chromeos/power/tray_power_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698