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/content_settings | |
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/content_settings')
-rw-r--r-- | components/content_settings/core/browser/content_settings_policy_provider.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/components/content_settings/core/browser/content_settings_policy_provider.cc b/components/content_settings/core/browser/content_settings_policy_provider.cc index a398a6c..6be1a81 100644 --- a/components/content_settings/core/browser/content_settings_policy_provider.cc +++ b/components/content_settings/core/browser/content_settings_policy_provider.cc @@ -305,8 +305,8 @@ void PolicyProvider::GetAutoSelectCertificateSettingsFromPreferences( continue; } - scoped_ptr<base::Value> value(base::JSONReader::Read(pattern_filter_json, - base::JSON_ALLOW_TRAILING_COMMAS)); + scoped_ptr<base::Value> value(base::JSONReader::DeprecatedRead( + pattern_filter_json, base::JSON_ALLOW_TRAILING_COMMAS)); if (!value || !value->IsType(base::Value::TYPE_DICTIONARY)) { VLOG(1) << "Ignoring invalid certificate auto select setting. Reason:" " Invalid JSON object: " << pattern_filter_json; |