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

Unified Diff: chrome/browser/component_updater/supervised_user_whitelist_installer_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/component_updater/supervised_user_whitelist_installer_unittest.cc
diff --git a/chrome/browser/component_updater/supervised_user_whitelist_installer_unittest.cc b/chrome/browser/component_updater/supervised_user_whitelist_installer_unittest.cc
index c6266a255f3cc2cab9e09c9489a20508c6a17fa1..c5e897f0e479731255cde3f10661f295705144df 100644
--- a/chrome/browser/component_updater/supervised_user_whitelist_installer_unittest.cc
+++ b/chrome/browser/component_updater/supervised_user_whitelist_installer_unittest.cc
@@ -51,7 +51,7 @@ std::string CrxIdToHashToCrxId(const std::string& kCrxId) {
return GetCrxComponentID(component);
}
-std::string JsonToString(const base::DictionaryValue* dict) {
+std::string JsonToString(const base::DictionaryValue& dict) {
std::string json;
base::JSONWriter::Write(dict, &json);
return json;
@@ -310,8 +310,8 @@ TEST_F(SupervisedUserWhitelistInstallerTest, InstallNewWhitelist) {
ASSERT_TRUE(base::ReadFileToString(whitelist_path_, &whitelist_contents));
EXPECT_EQ(kWhitelistContents, whitelist_contents);
- EXPECT_EQ(JsonToString(&pref_),
- JsonToString(local_state_.GetDictionary(
+ EXPECT_EQ(JsonToString(pref_),
+ JsonToString(*local_state_.GetDictionary(
prefs::kRegisteredSupervisedUserWhitelists)));
}

Powered by Google App Engine
This is Rietveld 408576698