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

Unified Diff: chrome/browser/ui/webui/options/preferences_browsertest.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/ui/webui/options/preferences_browsertest.cc
diff --git a/chrome/browser/ui/webui/options/preferences_browsertest.cc b/chrome/browser/ui/webui/options/preferences_browsertest.cc
index 4a6511e7bf9903f8fe0a85e85a0a34dec6cbed7b..99805dc3c3cdd837f5ebf4cc555d522ffe696099 100644
--- a/chrome/browser/ui/webui/options/preferences_browsertest.cc
+++ b/chrome/browser/ui/webui/options/preferences_browsertest.cc
@@ -68,7 +68,7 @@ bool operator==(const base::Value& first, const base::Value& second) {
// Helper for pretty-printing the contents of base::Value in case of failures.
void PrintTo(const base::Value& value, std::ostream* stream) {
std::string json;
- JSONWriter::Write(&value, &json);
+ JSONWriter::Write(value, &json);
*stream << json;
}
@@ -192,7 +192,7 @@ void PreferencesBrowserTest::SetUpInProcessBrowserTestFixture() {
.WillRepeatedly(Return(true));
policy::BrowserPolicyConnector::SetPolicyProviderForTesting(
&policy_provider_);
-};
+}
void PreferencesBrowserTest::SetUserPolicies(
const std::vector<std::string>& names,
@@ -376,9 +376,8 @@ void PreferencesBrowserTest::VerifyClearPref(const std::string& name,
ExpectClearCommit(name);
else
ExpectNoCommit(name);
- scoped_ptr<base::Value> commit_ptr(new base::FundamentalValue(commit));
std::string commit_json;
- base::JSONWriter::Write(commit_ptr.get(), &commit_json);
+ base::JSONWriter::Write(base::FundamentalValue(commit), &commit_json);
std::stringstream javascript;
javascript << "testEnv.runAndReply(function() {"
<< " Preferences.clearPref("
« no previous file with comments | « chrome/browser/ui/webui/certificate_viewer_webui.cc ('k') | chrome/browser/ui/webui/options/sync_setup_handler_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698