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

Unified Diff: extensions/common/value_counter.cc

Issue 1908953003: Convert //extensions/{common,shell} from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase? 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 | « extensions/common/value_counter.h ('k') | extensions/shell/app/shell_main_delegate.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/common/value_counter.cc
diff --git a/extensions/common/value_counter.cc b/extensions/common/value_counter.cc
index a4e49e0aab15b066786513803c7a97197face641..4bf04e138e0573d0563fe05d3bed744316287ead 100644
--- a/extensions/common/value_counter.cc
+++ b/extensions/common/value_counter.cc
@@ -5,17 +5,19 @@
#include "extensions/common/value_counter.h"
#include <algorithm>
+#include <memory>
#include <utility>
+#include "base/memory/ptr_util.h"
#include "base/values.h"
namespace extensions {
struct ValueCounter::Entry {
- explicit Entry(scoped_ptr<base::Value> value)
+ explicit Entry(std::unique_ptr<base::Value> value)
: value(std::move(value)), count(1) {}
- scoped_ptr<base::Value> value;
+ std::unique_ptr<base::Value> value;
int count;
};
@@ -32,7 +34,7 @@ bool ValueCounter::Add(const base::Value& value) {
return false;
}
}
- entries_.push_back(make_scoped_ptr(new Entry(value.CreateDeepCopy())));
+ entries_.push_back(base::WrapUnique(new Entry(value.CreateDeepCopy())));
return true;
}
« no previous file with comments | « extensions/common/value_counter.h ('k') | extensions/shell/app/shell_main_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698