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

Unified Diff: ui/app_list/app_list_item_list.h

Issue 1868363002: Replace scoped_ptr with std::unique_ptr in //ui (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@scopedptrcc
Patch Set: scopedptrui: rebase-make_scoped_ptr Created 4 years, 8 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 | « ui/app_list/app_list_folder_item.h ('k') | ui/app_list/app_list_item_list.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/app_list/app_list_item_list.h
diff --git a/ui/app_list/app_list_item_list.h b/ui/app_list/app_list_item_list.h
index 30f8d6f84af92699ae1f9b8bff626b4264b72e9f..90c1f989a6b60258c3f3e178bca0d2ccffc98dba 100644
--- a/ui/app_list/app_list_item_list.h
+++ b/ui/app_list/app_list_item_list.h
@@ -7,10 +7,10 @@
#include <stddef.h>
+#include <memory>
#include <string>
#include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
#include "base/memory/scoped_vector.h"
#include "base/observer_list.h"
#include "sync/api/string_ordinal.h"
@@ -77,7 +77,7 @@ class APP_LIST_EXPORT AppListItemList {
// Adds |item| to the end of |app_list_items_|. Takes ownership of |item|.
// Triggers observers_.OnListItemAdded(). Returns a pointer to the added item
// that is safe to use (e.g. after releasing a scoped ptr).
- AppListItem* AddItem(scoped_ptr<AppListItem> item_ptr);
+ AppListItem* AddItem(std::unique_ptr<AppListItem> item_ptr);
// Finds item matching |id| in |app_list_items_| (linear search) and deletes
// it. Triggers observers_.OnListItemRemoved() after removing the item from
@@ -86,11 +86,11 @@ class APP_LIST_EXPORT AppListItemList {
// Removes the item with matching |id| in |app_list_items_| without deleting
// it. Returns a scoped pointer containing the removed item.
- scoped_ptr<AppListItem> RemoveItem(const std::string& id);
+ std::unique_ptr<AppListItem> RemoveItem(const std::string& id);
// Removes the item at |index| from |app_list_items_| without deleting it.
// Returns a scoped pointer containing the removed item.
- scoped_ptr<AppListItem> RemoveItemAt(size_t index);
+ std::unique_ptr<AppListItem> RemoveItemAt(size_t index);
// Deletes item at |index| and signals observers.
void DeleteItemAt(size_t index);
« no previous file with comments | « ui/app_list/app_list_folder_item.h ('k') | ui/app_list/app_list_item_list.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698