Index: chrome/browser/extensions/api/feedback_private/log_source_access_manager_chromeos_unittest.cc |
diff --git a/chrome/browser/extensions/api/feedback_private/log_source_access_manager_chromeos_unittest.cc b/chrome/browser/extensions/api/feedback_private/log_source_access_manager_chromeos_unittest.cc |
index 05780e1555c8375613469c88ff282600a6265769..575293da41acdc7b4344258e1c823208ff0c2d38 100644 |
--- a/chrome/browser/extensions/api/feedback_private/log_source_access_manager_chromeos_unittest.cc |
+++ b/chrome/browser/extensions/api/feedback_private/log_source_access_manager_chromeos_unittest.cc |
@@ -19,10 +19,10 @@ namespace { |
using api::feedback_private::LOG_SOURCE_MESSAGES; |
using api::feedback_private::LOG_SOURCE_UILATEST; |
+using api::feedback_private::LogSource; |
using api::feedback_private::ReadLogSourceResult; |
using api::feedback_private::ReadLogSourceParams; |
-using system_logs::SingleLogSource; |
-using SupportedSource = system_logs::SingleLogSource::SupportedSource; |
+using system_logs::SystemLogsSource; |
std::unique_ptr<KeyedService> ApiResourceManagerTestFactory( |
content::BrowserContext* context) { |
@@ -32,11 +32,12 @@ std::unique_ptr<KeyedService> ApiResourceManagerTestFactory( |
// Dummy function used as a callback for FetchFromSource(). |
void OnFetchedFromSource(const ReadLogSourceResult& result) {} |
-// A dummy SingleLogSource that does not require real system logs to be |
+// A dummy SystemLogsSource that does not require real system logs to be |
// available during testing. Always returns an empty result. |
-class EmptySingleLogSource : public SingleLogSource { |
+class EmptySingleLogSource : public system_logs::SystemLogsSource { |
public: |
- explicit EmptySingleLogSource(SupportedSource type) : SingleLogSource(type) {} |
+ explicit EmptySingleLogSource(LogSource type) |
+ : SystemLogsSource(api::feedback_private::ToString(type)) {} |
~EmptySingleLogSource() override = default; |
@@ -47,7 +48,7 @@ class EmptySingleLogSource : public SingleLogSource { |
// Do not directly pass the result to the callback, because that's not how |
// log sources actually work. Instead, simulate the asynchronous operation |
- // of a SingleLogSource by invoking the callback separately. |
+ // of a SystemLogsSource by invoking the callback separately. |
base::ThreadTaskRunnerHandle::Get()->PostTask( |
FROM_HERE, base::Bind(callback, base::Owned(result_map))); |
} |
@@ -55,8 +56,8 @@ class EmptySingleLogSource : public SingleLogSource { |
// Instantiates a new instance of this class. Does not retain ownership. Used |
// to create a Callback that can be used to override the default behavior of |
// SingleLogSourceFactory. |
- static std::unique_ptr<SingleLogSource> Create(SupportedSource type) { |
- return base::MakeUnique<EmptySingleLogSource>(type); |
+ static std::unique_ptr<SystemLogsSource> Create(LogSource type) { |
+ return std::unique_ptr<SystemLogsSource>(new EmptySingleLogSource(type)); |
afakhry
2017/06/24 00:10:16
By the way MakeUnique<EmptySingleLogSource> should
Simon Que
2017/07/10 14:10:13
Done.
|
} |
private: |