| Index: chrome/browser/extensions/api/feedback_private/single_log_source_factory.cc
|
| diff --git a/chrome/browser/extensions/api/feedback_private/single_log_source_factory.cc b/chrome/browser/extensions/api/feedback_private/single_log_source_factory.cc
|
| index 86875ba00a684690a499e4172d9ccdfe3e38edfc..f4b2e24fa997e80bab69b1aa0f88b9acde9aa41e 100644
|
| --- a/chrome/browser/extensions/api/feedback_private/single_log_source_factory.cc
|
| +++ b/chrome/browser/extensions/api/feedback_private/single_log_source_factory.cc
|
| @@ -5,23 +5,40 @@
|
| #include "chrome/browser/extensions/api/feedback_private/single_log_source_factory.h"
|
|
|
| #include "base/memory/ptr_util.h"
|
| +#include "chrome/browser/chromeos/system_logs/single_log_file_log_source.h"
|
|
|
| namespace extensions {
|
|
|
| namespace {
|
|
|
| -using system_logs::SingleLogSource;
|
| +namespace feedback_private = api::feedback_private;
|
| +
|
| +using system_logs::SingleLogFileLogSource;
|
| +using system_logs::SystemLogsSource;
|
|
|
| SingleLogSourceFactory::CreateCallback* g_callback = nullptr;
|
|
|
| } // namespace
|
|
|
| // static
|
| -std::unique_ptr<SingleLogSource> SingleLogSourceFactory::CreateSingleLogSource(
|
| - SingleLogSource::SupportedSource type) {
|
| +std::unique_ptr<SystemLogsSource> SingleLogSourceFactory::CreateSingleLogSource(
|
| + feedback_private::LogSource source_type) {
|
| if (g_callback)
|
| - return g_callback->Run(type);
|
| - return base::MakeUnique<SingleLogSource>(type);
|
| + return g_callback->Run(source_type);
|
| +
|
| + switch (source_type) {
|
| + case feedback_private::LOG_SOURCE_MESSAGES:
|
| + return base::MakeUnique<system_logs::SingleLogFileLogSource>(
|
| + SingleLogFileLogSource::SupportedSource::kMessages);
|
| + case feedback_private::LOG_SOURCE_UILATEST:
|
| + return base::MakeUnique<system_logs::SingleLogFileLogSource>(
|
| + SingleLogFileLogSource::SupportedSource::kUiLatest);
|
| + case feedback_private::LOG_SOURCE_NONE:
|
| + default:
|
| + NOTREACHED() << "Unknown log source type.";
|
| + break;
|
| + }
|
| + return std::unique_ptr<SystemLogsSource>(nullptr);
|
| }
|
|
|
| // static
|
|
|