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

Unified Diff: content/browser/download/save_package.h

Issue 2435863004: Remove stl_util's deletion function use from content/. (Closed)
Patch Set: minus service worker Created 4 years, 2 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
« no previous file with comments | « content/browser/download/save_file_manager.cc ('k') | content/browser/download/save_package.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/download/save_package.h
diff --git a/content/browser/download/save_package.h b/content/browser/download/save_package.h
index 5cafea5461f9b093d7a41b9c99a0aca7aa06a1c1..74ea31fc96e2b9f78e44d97744f13849256e5839 100644
--- a/content/browser/download/save_package.h
+++ b/content/browser/download/save_package.h
@@ -10,6 +10,7 @@
#include <deque>
#include <map>
+#include <memory>
#include <set>
#include <string>
#include <unordered_map>
@@ -134,10 +135,8 @@ class CONTENT_EXPORT SavePackage
FRIEND_TEST_ALL_PREFIXES(SavePackageBrowserTest, ExplicitCancel);
// Map from SaveItem::id() (aka save_item_id) into a SaveItem.
- using SaveItemIdMap =
- std::unordered_map<SaveItemId, SaveItem*, SaveItemId::Hasher>;
-
- using SaveItemQueue = std::deque<SaveItem*>;
+ using SaveItemIdMap = std::
+ unordered_map<SaveItemId, std::unique_ptr<SaveItem>, SaveItemId::Hasher>;
using FileNameSet = std::set<base::FilePath::StringType,
bool (*)(base::FilePath::StringPieceType,
@@ -359,7 +358,7 @@ class CONTENT_EXPORT SavePackage
const std::string& contents_mime_type);
// A queue for items we are about to start saving.
- SaveItemQueue waiting_item_queue_;
+ std::deque<std::unique_ptr<SaveItem>> waiting_item_queue_;
// Map of all saving job in in-progress state.
SaveItemIdMap in_progress_items_;
« no previous file with comments | « content/browser/download/save_file_manager.cc ('k') | content/browser/download/save_package.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698