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

Unified Diff: chrome/browser/chromeos/file_system_provider/operations/truncate.cc

Issue 547313002: [fsp] Use auto generated methods for generating dictionaries. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased. Created 6 years, 3 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_system_provider/operations/truncate.cc
diff --git a/chrome/browser/chromeos/file_system_provider/operations/truncate.cc b/chrome/browser/chromeos/file_system_provider/operations/truncate.cc
index 8bd4519d6425713f4b9c1675826ce408eda8040d..cd5cdcf6480a875f9631a454de24aa49e5c781be 100644
--- a/chrome/browser/chromeos/file_system_provider/operations/truncate.cc
+++ b/chrome/browser/chromeos/file_system_provider/operations/truncate.cc
@@ -28,17 +28,22 @@ Truncate::~Truncate() {
}
bool Truncate::Execute(int request_id) {
+ using extensions::api::file_system_provider::TruncateRequestedOptions;
+
if (!file_system_info_.writable())
return false;
- scoped_ptr<base::DictionaryValue> values(new base::DictionaryValue);
- values->SetString("filePath", file_path_.AsUTF8Unsafe());
- values->SetDouble("length", length_);
+ TruncateRequestedOptions options;
+ options.file_system_id = file_system_info_.file_system_id();
+ options.request_id = request_id;
+ options.file_path = file_path_.AsUTF8Unsafe();
+ options.length = length_;
return SendEvent(
request_id,
extensions::api::file_system_provider::OnTruncateRequested::kEventName,
- values.Pass());
+ extensions::api::file_system_provider::OnTruncateRequested::Create(
+ options));
}
void Truncate::OnSuccess(int /* request_id */,

Powered by Google App Engine
This is Rietveld 408576698