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

Unified Diff: extensions/common/extension.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/extension.h ('k') | extensions/common/extension_api.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/common/extension.cc
diff --git a/extensions/common/extension.cc b/extensions/common/extension.cc
index 227cb7e515b19c38d903bc9b3d52436ef83d34b8..fd77aa0ab207fd19af25a92c73d496578015c6ed 100644
--- a/extensions/common/extension.cc
+++ b/extensions/common/extension.cc
@@ -118,9 +118,8 @@ scoped_refptr<Extension> Extension::Create(const base::FilePath& path,
std::string* utf8_error) {
DCHECK(utf8_error);
base::string16 error;
- scoped_ptr<extensions::Manifest> manifest(
- new extensions::Manifest(
- location, scoped_ptr<base::DictionaryValue>(value.DeepCopy())));
+ std::unique_ptr<extensions::Manifest> manifest(new extensions::Manifest(
+ location, std::unique_ptr<base::DictionaryValue>(value.DeepCopy())));
if (!InitExtensionID(manifest.get(), path, explicit_id, flags, &error)) {
*utf8_error = base::UTF16ToUTF8(error);
@@ -384,7 +383,7 @@ Extension::ManifestData* Extension::GetManifestData(const std::string& key)
void Extension::SetManifestData(const std::string& key,
Extension::ManifestData* data) {
DCHECK(!finished_parsing_manifest_ && thread_checker_.CalledOnValidThread());
- manifest_data_[key] = scoped_ptr<ManifestData>(data);
+ manifest_data_[key] = std::unique_ptr<ManifestData>(data);
}
Manifest::Location Extension::location() const {
@@ -493,7 +492,7 @@ bool Extension::InitExtensionID(extensions::Manifest* manifest,
}
Extension::Extension(const base::FilePath& path,
- scoped_ptr<extensions::Manifest> manifest)
+ std::unique_ptr<extensions::Manifest> manifest)
: manifest_version_(0),
converted_from_user_script_(false),
manifest_(manifest.release()),
« no previous file with comments | « extensions/common/extension.h ('k') | extensions/common/extension_api.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698