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

Unified Diff: content/renderer/dom_automation_controller.cc

Issue 12207089: Cleanup: Remove deprecated base::Value methods from contents. Use base::Value too. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 7 years, 10 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 | « content/renderer/browser_plugin/browser_plugin.cc ('k') | content/renderer/render_view_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/dom_automation_controller.cc
===================================================================
--- content/renderer/dom_automation_controller.cc (revision 181443)
+++ content/renderer/dom_automation_controller.cc (working copy)
@@ -59,7 +59,7 @@
std::string json;
JSONStringValueSerializer serializer(&json);
- scoped_ptr<Value> value;
+ scoped_ptr<base::Value> value;
// Warning: note that JSON officially requires the root-level object to be
// an object (e.g. {foo:3}) or an array, while here we're serializing
@@ -69,15 +69,15 @@
// grabbing the 0th element to get the value out.
switch (args[0].type) {
case NPVariantType_String: {
- value.reset(Value::CreateStringValue(args[0].ToString()));
+ value.reset(new base::StringValue(args[0].ToString()));
break;
}
case NPVariantType_Bool: {
- value.reset(Value::CreateBooleanValue(args[0].ToBoolean()));
+ value.reset(new base::FundamentalValue(args[0].ToBoolean()));
break;
}
case NPVariantType_Int32: {
- value.reset(Value::CreateIntegerValue(args[0].ToInt32()));
+ value.reset(new base::FundamentalValue(args[0].ToInt32()));
break;
}
case NPVariantType_Double: {
@@ -85,7 +85,7 @@
// as a double in this binding. The reason being that KJS treats
// any number value as a double. Refer for more details,
// chrome/third_party/webkit/src/JavaScriptCore/bindings/c/c_utility.cpp
- value.reset(Value::CreateIntegerValue(args[0].ToInt32()));
+ value.reset(new base::FundamentalValue(args[0].ToInt32()));
break;
}
default: {
@@ -104,7 +104,6 @@
result->Set(succeeded);
automation_id_ = MSG_ROUTING_NONE;
-
}
void DomAutomationController::SendJSON(const CppArgumentList& args,
« no previous file with comments | « content/renderer/browser_plugin/browser_plugin.cc ('k') | content/renderer/render_view_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698