OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/extensions/api/log_private/log_private_api.h" | 5 #include "chrome/browser/extensions/api/log_private/log_private_api.h" |
6 | 6 |
7 #include <memory> | 7 #include <memory> |
8 #include <string> | 8 #include <string> |
9 #include <utility> | 9 #include <utility> |
10 #include <vector> | 10 #include <vector> |
(...skipping 409 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
420 return true; | 420 return true; |
421 } | 421 } |
422 | 422 |
423 void LogPrivateGetHistoricalFunction::OnSystemLogsLoaded( | 423 void LogPrivateGetHistoricalFunction::OnSystemLogsLoaded( |
424 std::unique_ptr<system_logs::SystemLogsResponse> sys_info) { | 424 std::unique_ptr<system_logs::SystemLogsResponse> sys_info) { |
425 // Prepare result | 425 // Prepare result |
426 api::log_private::Result result; | 426 api::log_private::Result result; |
427 CollectLogInfo(filter_handler_.get(), sys_info.get(), &result.data); | 427 CollectLogInfo(filter_handler_.get(), sys_info.get(), &result.data); |
428 api::log_private::Filter::Populate( | 428 api::log_private::Filter::Populate( |
429 *((filter_handler_->GetFilter())->ToValue()), &result.filter); | 429 *((filter_handler_->GetFilter())->ToValue()), &result.filter); |
430 SetResult(result.ToValue().release()); | 430 SetResult(result.ToValue()); |
431 SendResponse(true); | 431 SendResponse(true); |
432 } | 432 } |
433 | 433 |
434 LogPrivateStartEventRecorderFunction::LogPrivateStartEventRecorderFunction() { | 434 LogPrivateStartEventRecorderFunction::LogPrivateStartEventRecorderFunction() { |
435 } | 435 } |
436 | 436 |
437 LogPrivateStartEventRecorderFunction::~LogPrivateStartEventRecorderFunction() { | 437 LogPrivateStartEventRecorderFunction::~LogPrivateStartEventRecorderFunction() { |
438 } | 438 } |
439 | 439 |
440 bool LogPrivateStartEventRecorderFunction::RunAsync() { | 440 bool LogPrivateStartEventRecorderFunction::RunAsync() { |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
533 | 533 |
534 base::DictionaryValue* entry = new base::DictionaryValue(); | 534 base::DictionaryValue* entry = new base::DictionaryValue(); |
535 entry->SetString("fileSystemId", file_entry.filesystem_id); | 535 entry->SetString("fileSystemId", file_entry.filesystem_id); |
536 entry->SetString("baseName", file_entry.registered_name); | 536 entry->SetString("baseName", file_entry.registered_name); |
537 entry->SetString("id", file_entry.id); | 537 entry->SetString("id", file_entry.id); |
538 entry->SetBoolean("isDirectory", false); | 538 entry->SetBoolean("isDirectory", false); |
539 base::ListValue* entry_list = new base::ListValue(); | 539 base::ListValue* entry_list = new base::ListValue(); |
540 entry_list->Append(entry); | 540 entry_list->Append(entry); |
541 response->Set("entries", entry_list); | 541 response->Set("entries", entry_list); |
542 response->SetBoolean("multiple", false); | 542 response->SetBoolean("multiple", false); |
543 SetResult(response.release()); | 543 SetResult(std::move(response)); |
544 SendResponse(succeeded); | 544 SendResponse(succeeded); |
545 } | 545 } |
546 | 546 |
547 } // namespace extensions | 547 } // namespace extensions |
OLD | NEW |