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

Unified Diff: services/catalog/instance.cc

Issue 1910673002: Convert //services from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 | « services/catalog/instance.h ('k') | services/catalog/reader.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/catalog/instance.cc
diff --git a/services/catalog/instance.cc b/services/catalog/instance.cc
index 3fd88b1081e6702de5146449fc39b2e29f761033..6673f35ab5eabd4928bde13bfad7cd187e1d2c2a 100644
--- a/services/catalog/instance.cc
+++ b/services/catalog/instance.cc
@@ -26,7 +26,7 @@ void AddEntry(const Entry& entry, mojo::Array<mojom::EntryPtr>* ary) {
////////////////////////////////////////////////////////////////////////////////
// Instance, public:
-Instance::Instance(scoped_ptr<Store> store, Reader* system_reader)
+Instance::Instance(std::unique_ptr<Store> store, Reader* system_reader)
: store_(std::move(store)),
system_reader_(system_reader),
weak_factory_(this) {}
@@ -65,7 +65,7 @@ void Instance::ResolveMojoName(const mojo::String& mojo_name,
std::string type = shell::GetNameType(mojo_name);
if (type != shell::kNameType_Mojo && type != shell::kNameType_Exe) {
- scoped_ptr<Entry> entry(new Entry(mojo_name));
+ std::unique_ptr<Entry> entry(new Entry(mojo_name));
callback.Run(shell::mojom::ResolveResult::From(*entry));
return;
}
@@ -149,7 +149,7 @@ void Instance::DeserializeCatalog() {
const base::DictionaryValue* dictionary = nullptr;
const base::Value* v = *it;
CHECK(v->GetAsDictionary(&dictionary));
- scoped_ptr<Entry> entry = Entry::Deserialize(*dictionary);
+ std::unique_ptr<Entry> entry = Entry::Deserialize(*dictionary);
// TODO(beng): user catalog.
if (entry)
(*system_cache_)[entry->name()] = std::move(entry);
@@ -158,7 +158,7 @@ void Instance::DeserializeCatalog() {
void Instance::SerializeCatalog() {
DCHECK(system_cache_);
- scoped_ptr<base::ListValue> catalog(new base::ListValue);
+ std::unique_ptr<base::ListValue> catalog(new base::ListValue);
// TODO(beng): user catalog.
for (const auto& entry : *system_cache_)
catalog->Append(entry.second->Serialize());
« no previous file with comments | « services/catalog/instance.h ('k') | services/catalog/reader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698