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

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

Issue 329483002: [fsp] Group arguments for API methods and events in dictionaries. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Cleaned up. Created 6 years, 6 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/operation.cc
diff --git a/chrome/browser/chromeos/file_system_provider/operations/operation.cc b/chrome/browser/chromeos/file_system_provider/operations/operation.cc
index 03d6b7cd4d71b9a0f78b24291e9e4edd2d9bc4ac..8e7a88cd61ab93381b1230a856c4154bc50e9244 100644
--- a/chrome/browser/chromeos/file_system_provider/operations/operation.cc
+++ b/chrome/browser/chromeos/file_system_provider/operations/operation.cc
@@ -44,10 +44,12 @@ void Operation::SetDispatchEventImplForTesting(
bool Operation::SendEvent(int request_id,
const std::string& event_name,
- scoped_ptr<base::ListValue> event_args) {
- event_args->Insert(0,
- new base::StringValue(file_system_info_.file_system_id()));
- event_args->Insert(1, new base::FundamentalValue(request_id));
+ scoped_ptr<base::DictionaryValue> options) {
+ options->SetString("fileSystemId", file_system_info_.file_system_id());
+ options->SetInteger("requestId", request_id);
+
+ scoped_ptr<base::ListValue> event_args(new base::ListValue);
+ event_args->Append(options.release());
return dispatch_event_impl_.Run(
make_scoped_ptr(new extensions::Event(event_name, event_args.Pass())));

Powered by Google App Engine
This is Rietveld 408576698