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

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: fix platform specific stuff 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 8f64020d2c55352a9096762e1de0308f3d5ea927..77c86b2c9464ee38d4b3e8ebbbaacd27bdc64346 100644
--- a/chrome/browser/chromeos/file_manager/file_manager_browsertest.cc
+++ b/chrome/browser/chromeos/file_manager/file_manager_browsertest.cc
@@ -674,13 +674,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;
}
@@ -700,10 +702,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;
}

Powered by Google App Engine
This is Rietveld 408576698