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> |
11 | 11 |
12 #include "base/command_line.h" | 12 #include "base/command_line.h" |
13 #include "base/files/file_util.h" | 13 #include "base/files/file_util.h" |
14 #include "base/json/json_writer.h" | 14 #include "base/json/json_writer.h" |
15 #include "base/lazy_instance.h" | 15 #include "base/lazy_instance.h" |
16 #include "base/logging.h" | 16 #include "base/logging.h" |
17 #include "base/memory/ptr_util.h" | 17 #include "base/memory/ptr_util.h" |
| 18 #include "base/values.h" |
18 #include "build/build_config.h" | 19 #include "build/build_config.h" |
19 #include "chrome/browser/browser_process.h" | 20 #include "chrome/browser/browser_process.h" |
20 #include "chrome/browser/download/download_prefs.h" | 21 #include "chrome/browser/download/download_prefs.h" |
21 #include "chrome/browser/extensions/api/log_private/filter_handler.h" | 22 #include "chrome/browser/extensions/api/log_private/filter_handler.h" |
22 #include "chrome/browser/extensions/api/log_private/log_parser.h" | 23 #include "chrome/browser/extensions/api/log_private/log_parser.h" |
23 #include "chrome/browser/extensions/api/log_private/syslog_parser.h" | 24 #include "chrome/browser/extensions/api/log_private/syslog_parser.h" |
24 #include "chrome/browser/feedback/system_logs/scrubbed_system_logs_fetcher.h" | 25 #include "chrome/browser/feedback/system_logs/scrubbed_system_logs_fetcher.h" |
25 #include "chrome/browser/io_thread.h" | 26 #include "chrome/browser/io_thread.h" |
26 #include "chrome/browser/profiles/profile.h" | 27 #include "chrome/browser/profiles/profile.h" |
27 #include "chrome/browser/profiles/profile_manager.h" | 28 #include "chrome/browser/profiles/profile_manager.h" |
(...skipping 508 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
536 extension(), | 537 extension(), |
537 render_frame_host()->GetProcess()->GetID(), | 538 render_frame_host()->GetProcess()->GetID(), |
538 log_path, | 539 log_path, |
539 false); | 540 false); |
540 | 541 |
541 auto entry = base::MakeUnique<base::DictionaryValue>(); | 542 auto entry = base::MakeUnique<base::DictionaryValue>(); |
542 entry->SetString("fileSystemId", file_entry.filesystem_id); | 543 entry->SetString("fileSystemId", file_entry.filesystem_id); |
543 entry->SetString("baseName", file_entry.registered_name); | 544 entry->SetString("baseName", file_entry.registered_name); |
544 entry->SetString("id", file_entry.id); | 545 entry->SetString("id", file_entry.id); |
545 entry->SetBoolean("isDirectory", false); | 546 entry->SetBoolean("isDirectory", false); |
546 base::ListValue* entry_list = new base::ListValue(); | 547 auto entry_list = base::MakeUnique<base::ListValue>(); |
547 entry_list->Append(std::move(entry)); | 548 entry_list->Append(std::move(entry)); |
548 response->Set("entries", entry_list); | 549 response->Set("entries", std::move(entry_list)); |
549 response->SetBoolean("multiple", false); | 550 response->SetBoolean("multiple", false); |
550 SetResult(std::move(response)); | 551 SetResult(std::move(response)); |
551 SendResponse(succeeded); | 552 SendResponse(succeeded); |
552 } | 553 } |
553 | 554 |
554 } // namespace extensions | 555 } // namespace extensions |
OLD | NEW |