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

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: another rebase 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 af7a240df9b00ca4707e85ce48e210deaea5f96b..8b07687e6c7d50be0246f854453f2a70077d8ffe 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;
}
@@ -246,7 +246,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