Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(840)

Unified Diff: components/device_event_log/device_event_log.cc

Issue 1140643002: Fix device_event_log component build, make NonThreadSafe (Take 2) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: components/device_event_log/device_event_log.cc
diff --git a/components/device_event_log/device_event_log.cc b/components/device_event_log/device_event_log.cc
index 8e720c0f31d2aa56923a319b6e4f73f28d50ab6d..6e70eeb3a2bfd4e8cf77e6fde39f2824efb85651 100644
--- a/components/device_event_log/device_event_log.cc
+++ b/components/device_event_log/device_event_log.cc
@@ -7,6 +7,7 @@
#include <string>
#include "base/logging.h"
+#include "base/thread_task_runner_handle.h"
#include "components/device_event_log/device_event_log_impl.h"
namespace device_event_log {
@@ -28,7 +29,12 @@ void Initialize(size_t max_entries) {
CHECK(!g_device_event_log);
if (max_entries == 0)
max_entries = kDefaultMaxEntries;
- g_device_event_log = new DeviceEventLogImpl(max_entries);
+ g_device_event_log =
+ new DeviceEventLogImpl(base::ThreadTaskRunnerHandle::Get(), max_entries);
+}
+
+bool IsInitialized() {
+ return !!g_device_event_log;
}
void Shutdown() {
« no previous file with comments | « components/device_event_log/device_event_log.h ('k') | components/device_event_log/device_event_log_export.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698