diff options
author | estade <estade@chromium.org> | 2015-05-22 09:30:13 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-05-22 16:30:52 +0000 |
commit | b09312bb5ad1bffaad8a09deea395f1aef2053df (patch) | |
tree | ea13602ed858503180cd725d1afe6a4ce73a2bd9 /components/json_schema/json_schema_validator.cc | |
parent | 2d381b0799c9fbbd33fbfa5ccf6610794d454f71 (diff) | |
download | chromium_src-b09312bb5ad1bffaad8a09deea395f1aef2053df.zip chromium_src-b09312bb5ad1bffaad8a09deea395f1aef2053df.tar.gz chromium_src-b09312bb5ad1bffaad8a09deea395f1aef2053df.tar.bz2 |
Use scoped_ptrs in JSONReader::Read functions.
There are many callers, so all could not be updated at once. The old version is renamed to JSONReader::DeprecatedRead, and a new version of JSONReader::Read that returns scoped_ptr takes its place.
Much of this patch was generated with sed. Some callsites of the form
scoped_ptr<Value> value(Read());
have been updated to
scoped_ptr<Value> value = Read();
but most Read() calls are simply converted to DeprecatedRead. Actually updating them is a TODO.
BUG=none
Review URL: https://codereview.chromium.org/1136643005
Cr-Commit-Position: refs/heads/master@{#331120}
Diffstat (limited to 'components/json_schema/json_schema_validator.cc')
-rw-r--r-- | components/json_schema/json_schema_validator.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/components/json_schema/json_schema_validator.cc b/components/json_schema/json_schema_validator.cc index 1899ad6..34ed95e 100644 --- a/components/json_schema/json_schema_validator.cc +++ b/components/json_schema/json_schema_validator.cc @@ -399,8 +399,8 @@ scoped_ptr<base::DictionaryValue> JSONSchemaValidator::IsValidSchema( int validator_options, std::string* error) { base::JSONParserOptions json_options = base::JSON_PARSE_RFC; - scoped_ptr<base::Value> json( - base::JSONReader::ReadAndReturnError(schema, json_options, NULL, error)); + scoped_ptr<base::Value> json(base::JSONReader::DeprecatedReadAndReturnError( + schema, json_options, NULL, error)); if (!json) return scoped_ptr<base::DictionaryValue>(); base::DictionaryValue* dict = NULL; |