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 <string> | 7 #include <string> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 scoped_ptr<LogParser> parser(CreateLogParser(request_it->first)); | 86 scoped_ptr<LogParser> parser(CreateLogParser(request_it->first)); |
87 if (parser) { | 87 if (parser) { |
88 parser->Parse(request_it->second, output, filter_handler); | 88 parser->Parse(request_it->second, output, filter_handler); |
89 } | 89 } |
90 } | 90 } |
91 } | 91 } |
92 | 92 |
93 // Returns directory location of app-specific logs that are initiated with | 93 // Returns directory location of app-specific logs that are initiated with |
94 // logPrivate.startEventRecorder() calls - /home/chronos/user/log/apps | 94 // logPrivate.startEventRecorder() calls - /home/chronos/user/log/apps |
95 base::FilePath GetAppLogDirectory() { | 95 base::FilePath GetAppLogDirectory() { |
96 return logging::GetSessionLogDir(*CommandLine::ForCurrentProcess()) | 96 return logging::GetSessionLogDir(*base::CommandLine::ForCurrentProcess()) |
97 .Append(kAppLogsSubdir); | 97 .Append(kAppLogsSubdir); |
98 } | 98 } |
99 | 99 |
100 // Returns directory location where logs dumps initiated with chrome.dumpLogs | 100 // Returns directory location where logs dumps initiated with chrome.dumpLogs |
101 // will be stored - /home/chronos/<user_profile_dir>/Downloads/log_dumps | 101 // will be stored - /home/chronos/<user_profile_dir>/Downloads/log_dumps |
102 base::FilePath GetLogDumpDirectory(content::BrowserContext* context) { | 102 base::FilePath GetLogDumpDirectory(content::BrowserContext* context) { |
103 const DownloadPrefs* const prefs = DownloadPrefs::FromBrowserContext(context); | 103 const DownloadPrefs* const prefs = DownloadPrefs::FromBrowserContext(context); |
104 return prefs->DownloadPath().Append(kLogDumpsSubdir); | 104 return prefs->DownloadPath().Append(kLogDumpsSubdir); |
105 } | 105 } |
106 | 106 |
(...skipping 433 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
540 entry->SetBoolean("isDirectory", false); | 540 entry->SetBoolean("isDirectory", false); |
541 base::ListValue* entry_list = new base::ListValue(); | 541 base::ListValue* entry_list = new base::ListValue(); |
542 entry_list->Append(entry); | 542 entry_list->Append(entry); |
543 response->Set("entries", entry_list); | 543 response->Set("entries", entry_list); |
544 response->SetBoolean("multiple", false); | 544 response->SetBoolean("multiple", false); |
545 SetResult(response.release()); | 545 SetResult(response.release()); |
546 SendResponse(succeeded); | 546 SendResponse(succeeded); |
547 } | 547 } |
548 | 548 |
549 } // namespace extensions | 549 } // namespace extensions |
OLD | NEW |