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

Unified Diff: chrome/browser/extensions/convert_user_script.cc

Issue 22885002: c/b/extensions, json_schema_compiler: Do not use Value::Create*. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Removed C-style casts. Created 7 years, 4 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 | « chrome/browser/extensions/browser_event_router.cc ('k') | chrome/browser/extensions/convert_web_app.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/convert_user_script.cc
diff --git a/chrome/browser/extensions/convert_user_script.cc b/chrome/browser/extensions/convert_user_script.cc
index f6fbea77ede911cbb837cd2a3fc78f3439885ef8..16ab729be0520f8ad98b4b9638f512898de44c78 100644
--- a/chrome/browser/extensions/convert_user_script.cc
+++ b/chrome/browser/extensions/convert_user_script.cc
@@ -102,7 +102,7 @@ scoped_refptr<Extension> ConvertUserScriptToExtension(
root->SetBoolean(keys::kConvertedFromUserScript, true);
base::ListValue* js_files = new base::ListValue();
- js_files->Append(Value::CreateStringValue("script.js"));
+ js_files->Append(new base::StringValue("script.js"));
// If the script provides its own match patterns, we use those. Otherwise, we
// generate some using the include globs.
@@ -110,12 +110,12 @@ scoped_refptr<Extension> ConvertUserScriptToExtension(
if (!script.url_patterns().is_empty()) {
for (URLPatternSet::const_iterator i = script.url_patterns().begin();
i != script.url_patterns().end(); ++i) {
- matches->Append(Value::CreateStringValue(i->GetAsString()));
+ matches->Append(new base::StringValue(i->GetAsString()));
}
} else {
// TODO(aa): Derive tighter matches where possible.
- matches->Append(Value::CreateStringValue("http://*/*"));
- matches->Append(Value::CreateStringValue("https://*/*"));
+ matches->Append(new base::StringValue("http://*/*"));
+ matches->Append(new base::StringValue("https://*/*"));
}
// Read the exclude matches, if any are present.
@@ -124,17 +124,17 @@ scoped_refptr<Extension> ConvertUserScriptToExtension(
for (URLPatternSet::const_iterator i =
script.exclude_url_patterns().begin();
i != script.exclude_url_patterns().end(); ++i) {
- exclude_matches->Append(Value::CreateStringValue(i->GetAsString()));
+ exclude_matches->Append(new base::StringValue(i->GetAsString()));
}
}
base::ListValue* includes = new base::ListValue();
for (size_t i = 0; i < script.globs().size(); ++i)
- includes->Append(Value::CreateStringValue(script.globs().at(i)));
+ includes->Append(new base::StringValue(script.globs().at(i)));
base::ListValue* excludes = new base::ListValue();
for (size_t i = 0; i < script.exclude_globs().size(); ++i)
- excludes->Append(Value::CreateStringValue(script.exclude_globs().at(i)));
+ excludes->Append(new base::StringValue(script.exclude_globs().at(i)));
DictionaryValue* content_script = new DictionaryValue();
content_script->Set(keys::kMatches, matches);
« no previous file with comments | « chrome/browser/extensions/browser_event_router.cc ('k') | chrome/browser/extensions/convert_web_app.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698