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

Unified Diff: chrome/browser/chromeos/policy/remote_commands/device_command_screenshot_job_unittest.cc

Issue 1131113004: Convert JsonWriter::Write to taking a const ref for the in-param (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix platform specific stuff Created 5 years, 7 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
Index: chrome/browser/chromeos/policy/remote_commands/device_command_screenshot_job_unittest.cc
diff --git a/chrome/browser/chromeos/policy/remote_commands/device_command_screenshot_job_unittest.cc b/chrome/browser/chromeos/policy/remote_commands/device_command_screenshot_job_unittest.cc
index cc4b51b27cfd898f6e14b3b6214a96fd8cd5b33d..915694beb793d53a3c3cf2a53c233f4b95aef8ac 100644
--- a/chrome/browser/chromeos/policy/remote_commands/device_command_screenshot_job_unittest.cc
+++ b/chrome/browser/chromeos/policy/remote_commands/device_command_screenshot_job_unittest.cc
@@ -49,8 +49,8 @@ em::RemoteCommand GenerateScreenshotCommandProto(
command_proto.set_age_of_command(age_of_command.InMilliseconds());
std::string payload;
base::DictionaryValue root_dict;
- root_dict.Set(kUploadUrlFieldName, new base::StringValue(upload_url));
- base::JSONWriter::Write(&root_dict, &payload);
+ root_dict.SetString(kUploadUrlFieldName, upload_url);
+ base::JSONWriter::Write(root_dict, &payload);
command_proto.set_payload(payload);
return command_proto;
}
@@ -238,7 +238,7 @@ std::string DeviceCommandScreenshotTest::CreatePayloadFromResultCode(
base::DictionaryValue root_dict;
if (result_code != DeviceCommandScreenshotJob::SUCCESS)
root_dict.Set(kResultFieldName, new base::FundamentalValue(result_code));
- base::JSONWriter::Write(&root_dict, &payload);
+ base::JSONWriter::Write(root_dict, &payload);
return payload;
}

Powered by Google App Engine
This is Rietveld 408576698