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

Unified Diff: chromeos/dbus/shill_client_unittest_base.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: chromeos/dbus/shill_client_unittest_base.cc
diff --git a/chromeos/dbus/shill_client_unittest_base.cc b/chromeos/dbus/shill_client_unittest_base.cc
index 184851a96bab7e6cf1ffd003e6978866f1912468..de82bf0b0b246344f15d532c8c69f7d8773ad79c 100644
--- a/chromeos/dbus/shill_client_unittest_base.cc
+++ b/chromeos/dbus/shill_client_unittest_base.cc
@@ -54,7 +54,7 @@ bool ValueMatcher::MatchAndExplain(const base::Value& value,
void ValueMatcher::DescribeTo(::std::ostream* os) const {
std::string expected_value_str;
- base::JSONWriter::WriteWithOptions(expected_value_.get(),
+ base::JSONWriter::WriteWithOptions(*expected_value_,
base::JSONWriter::OPTIONS_PRETTY_PRINT,
&expected_value_str);
*os << "value equals " << expected_value_str;
@@ -62,7 +62,7 @@ void ValueMatcher::DescribeTo(::std::ostream* os) const {
void ValueMatcher::DescribeNegationTo(::std::ostream* os) const {
std::string expected_value_str;
- base::JSONWriter::WriteWithOptions(expected_value_.get(),
+ base::JSONWriter::WriteWithOptions(*expected_value_,
base::JSONWriter::OPTIONS_PRETTY_PRINT,
&expected_value_str);
*os << "value does not equal " << expected_value_str;
@@ -393,9 +393,9 @@ void ShillClientUnittestBase::ExpectDictionaryValueResultWithoutStatus(
const base::DictionaryValue* expected_result,
const base::DictionaryValue& result) {
std::string expected_result_string;
- base::JSONWriter::Write(expected_result, &expected_result_string);
+ base::JSONWriter::Write(*expected_result, &expected_result_string);
std::string result_string;
- base::JSONWriter::Write(&result, &result_string);
+ base::JSONWriter::Write(result, &result_string);
EXPECT_EQ(expected_result_string, result_string);
}
« no previous file with comments | « chrome/test/chromedriver/server/http_handler_unittest.cc ('k') | chromeos/network/network_configuration_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698