| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/chromeos/file_manager/file_browser_handlers.h" | 5 #include "chrome/browser/chromeos/file_manager/file_browser_handlers.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <algorithm> | 8 #include <algorithm> |
| 9 #include <set> | 9 #include <set> |
| 10 #include <utility> | 10 #include <utility> |
| (...skipping 374 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 385 } | 385 } |
| 386 | 386 |
| 387 SetupHandlerHostFileAccessPermissions( | 387 SetupHandlerHostFileAccessPermissions( |
| 388 file_definition_list.get(), extension_.get(), handler_pid); | 388 file_definition_list.get(), extension_.get(), handler_pid); |
| 389 | 389 |
| 390 std::unique_ptr<base::ListValue> event_args(new base::ListValue()); | 390 std::unique_ptr<base::ListValue> event_args(new base::ListValue()); |
| 391 event_args->AppendString(action_id_); | 391 event_args->AppendString(action_id_); |
| 392 auto details = base::MakeUnique<base::DictionaryValue>(); | 392 auto details = base::MakeUnique<base::DictionaryValue>(); |
| 393 // Get file definitions. These will be replaced with Entry instances by | 393 // Get file definitions. These will be replaced with Entry instances by |
| 394 // dispatchEvent() method from event_binding.js. | 394 // dispatchEvent() method from event_binding.js. |
| 395 base::ListValue* file_entries = new base::ListValue(); | 395 auto file_entries = base::MakeUnique<base::ListValue>(); |
| 396 details->Set("entries", file_entries); | 396 details->Set("entries", std::move(file_entries)); |
| 397 event_args->Append(std::move(details)); | 397 event_args->Append(std::move(details)); |
| 398 | 398 |
| 399 for (EntryDefinitionList::const_iterator iter = | 399 for (EntryDefinitionList::const_iterator iter = |
| 400 entry_definition_list->begin(); | 400 entry_definition_list->begin(); |
| 401 iter != entry_definition_list->end(); | 401 iter != entry_definition_list->end(); |
| 402 ++iter) { | 402 ++iter) { |
| 403 auto file_def = base::MakeUnique<base::DictionaryValue>(); | 403 auto file_def = base::MakeUnique<base::DictionaryValue>(); |
| 404 file_def->SetString("fileSystemName", iter->file_system_name); | 404 file_def->SetString("fileSystemName", iter->file_system_name); |
| 405 file_def->SetString("fileSystemRoot", iter->file_system_root_url); | 405 file_def->SetString("fileSystemRoot", iter->file_system_root_url); |
| 406 file_def->SetString("fileFullPath", | 406 file_def->SetString("fileFullPath", |
| (...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 529 if (common_handlers.empty()) | 529 if (common_handlers.empty()) |
| 530 return FileBrowserHandlerList(); | 530 return FileBrowserHandlerList(); |
| 531 } | 531 } |
| 532 } | 532 } |
| 533 | 533 |
| 534 return common_handlers; | 534 return common_handlers; |
| 535 } | 535 } |
| 536 | 536 |
| 537 } // namespace file_browser_handlers | 537 } // namespace file_browser_handlers |
| 538 } // namespace file_manager | 538 } // namespace file_manager |
| OLD | NEW |