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

Unified Diff: chrome/browser/chromeos/file_manager/file_manager_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/chromeos/file_manager/file_manager_browsertest.cc
diff --git a/chrome/browser/chromeos/file_manager/file_manager_browsertest.cc b/chrome/browser/chromeos/file_manager/file_manager_browsertest.cc
index 1aa481fd72f4e56d3ff50ef88f195bce3b5457de..f4aab53c5719d2228332d718442e774c5cc33c87 100644
--- a/chrome/browser/chromeos/file_manager/file_manager_browsertest.cc
+++ b/chrome/browser/chromeos/file_manager/file_manager_browsertest.cc
@@ -681,13 +681,15 @@ void FileManagerBrowserTestBase::OnMessage(const std::string& name,
if (name == "getRootPaths") {
// Pass the root paths.
- const scoped_ptr<base::DictionaryValue> res(new base::DictionaryValue());
- res->SetString("downloads",
- "/" + util::GetDownloadsMountPointName(profile()));
- res->SetString("drive",
- "/" + drive::util::GetDriveMountPointPath(profile()
- ).BaseName().AsUTF8Unsafe() + "/root");
- base::JSONWriter::Write(res.get(), output);
+ base::DictionaryValue res;
+ res.SetString("downloads",
+ "/" + util::GetDownloadsMountPointName(profile()));
+ res.SetString("drive", "/" +
+ drive::util::GetDriveMountPointPath(profile())
+ .BaseName()
+ .AsUTF8Unsafe() +
+ "/root");
+ base::JSONWriter::Write(res, output);
return;
}
@@ -707,10 +709,10 @@ void FileManagerBrowserTestBase::OnMessage(const std::string& name,
if (*origin.rbegin() == '/')
origin.resize(origin.length() - 1);
- const scoped_ptr<base::DictionaryValue> res(new base::DictionaryValue());
- res->SetString("url", url.spec());
- res->SetString("origin", origin);
- base::JSONWriter::Write(res.get(), output);
+ base::DictionaryValue res;
+ res.SetString("url", url.spec());
+ res.SetString("origin", origin);
+ base::JSONWriter::Write(res, output);
return;
}
« no previous file with comments | « chrome/browser/chromeos/extensions/accessibility_features_apitest.cc ('k') | chrome/browser/chromeos/file_manager/url_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698