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

Unified Diff: extensions/common/manifest_test.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/manifest_test.h ('k') | extensions/common/manifest_url_handlers.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/common/manifest_test.cc
diff --git a/extensions/common/manifest_test.cc b/extensions/common/manifest_test.cc
index 771d4b3c4ad8b6b3968f23b6c12ea27ad92d89ee..2a43ed8ef25178ef8db882c3c771c82a910964e7 100644
--- a/extensions/common/manifest_test.cc
+++ b/extensions/common/manifest_test.cc
@@ -22,7 +22,7 @@ namespace extensions {
namespace {
// |manifest_path| is an absolute path to a manifest file.
-scoped_ptr<base::DictionaryValue> LoadManifestFile(
+std::unique_ptr<base::DictionaryValue> LoadManifestFile(
const base::FilePath& manifest_path,
std::string* error) {
base::FilePath extension_path = manifest_path.DirName();
@@ -31,7 +31,7 @@ scoped_ptr<base::DictionaryValue> LoadManifestFile(
"Couldn't find " << manifest_path.value();
JSONFileValueDeserializer deserializer(manifest_path);
- scoped_ptr<base::DictionaryValue> manifest =
+ std::unique_ptr<base::DictionaryValue> manifest =
base::DictionaryValue::From(deserializer.Deserialize(NULL, error));
// Most unit tests don't need localization, and they'll fail if we try to
@@ -69,13 +69,13 @@ ManifestTest::ManifestData::ManifestData(base::DictionaryValue* manifest,
}
ManifestTest::ManifestData::ManifestData(
- scoped_ptr<base::DictionaryValue> manifest)
+ std::unique_ptr<base::DictionaryValue> manifest)
: manifest_(manifest.get()), manifest_holder_(std::move(manifest)) {
CHECK(manifest_) << "Manifest NULL";
}
ManifestTest::ManifestData::ManifestData(
- scoped_ptr<base::DictionaryValue> manifest,
+ std::unique_ptr<base::DictionaryValue> manifest,
const char* name)
: name_(name),
manifest_(manifest.get()),
@@ -111,8 +111,9 @@ base::FilePath ManifestTest::GetTestDataDir() {
return path.AppendASCII("manifest_tests");
}
-scoped_ptr<base::DictionaryValue> ManifestTest::LoadManifest(
- char const* manifest_name, std::string* error) {
+std::unique_ptr<base::DictionaryValue> ManifestTest::LoadManifest(
+ char const* manifest_name,
+ std::string* error) {
base::FilePath manifest_path = GetTestDataDir().AppendASCII(manifest_name);
return LoadManifestFile(manifest_path, error);
}
« no previous file with comments | « extensions/common/manifest_test.h ('k') | extensions/common/manifest_url_handlers.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698