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

Unified Diff: extensions/browser/value_store/value_store_unittest.cc

Issue 2294653002: Some linked_ptr -> unique_ptr conversion in extensions/browser. (Closed)
Patch Set: address comments Created 4 years, 4 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/browser/updater/request_queue.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/browser/value_store/value_store_unittest.cc
diff --git a/extensions/browser/value_store/value_store_unittest.cc b/extensions/browser/value_store/value_store_unittest.cc
index a6858b2aec185771b9f34bed780cfe7ee57aee72..3da52eef84cc382843bab580e8cb88492047f6c7 100644
--- a/extensions/browser/value_store/value_store_unittest.cc
+++ b/extensions/browser/value_store/value_store_unittest.cc
@@ -7,7 +7,7 @@
#include <utility>
#include "base/json/json_writer.h"
-#include "base/memory/linked_ptr.h"
+#include "base/memory/ptr_util.h"
#include "base/values.h"
using content::BrowserThread;
@@ -88,12 +88,9 @@ testing::AssertionResult ChangesEq(
" but was " << actual.size();
}
- std::map<std::string, linked_ptr<ValueStoreChange> > expected_as_map;
- for (ValueStoreChangeList::const_iterator it = expected.begin();
- it != expected.end(); ++it) {
- expected_as_map[it->key()] =
- linked_ptr<ValueStoreChange>(new ValueStoreChange(*it));
- }
+ std::map<std::string, std::unique_ptr<ValueStoreChange>> expected_as_map;
+ for (const ValueStoreChange& change : expected)
+ expected_as_map[change.key()] = base::MakeUnique<ValueStoreChange>(change);
std::set<std::string> keys_seen;
« no previous file with comments | « extensions/browser/updater/request_queue.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698