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

Unified Diff: extensions/common/extension_api.cc

Issue 1308013005: Add scoped_ptr-safe base::Value to Dictionary/List conversion functions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Made conversions static members. Created 5 years, 3 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/api_test_utils.cc ('k') | extensions/common/features/json_feature_provider_source.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/common/extension_api.cc
diff --git a/extensions/common/extension_api.cc b/extensions/common/extension_api.cc
index 81ca72ae5697f3da5fa45a0d7bde0febee023d94..ec6fa1802ffb0c61bf9d1de891dc848da5b718d7 100644
--- a/extensions/common/extension_api.cc
+++ b/extensions/common/extension_api.cc
@@ -60,8 +60,7 @@ scoped_ptr<base::ListValue> LoadSchemaList(const std::string& name,
CHECK(result.get()) << error_message << " for schema " << schema;
CHECK(result->IsType(base::Value::TYPE_LIST)) << " for schema " << schema;
- return scoped_ptr<base::ListValue>(static_cast<base::ListValue*>(
- result.release()));
+ return base::ListValue::From(result.Pass());
}
const base::DictionaryValue* FindListItem(const base::ListValue* list,
« no previous file with comments | « extensions/browser/api_test_utils.cc ('k') | extensions/common/features/json_feature_provider_source.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698