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

Unified Diff: components/device_event_log/device_event_log_impl.cc

Issue 2889683003: Rename TaskRunner::RunsTasksOnCurrentThread() in //components (Closed)
Patch Set: rebase Created 3 years, 6 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_impl.cc
diff --git a/components/device_event_log/device_event_log_impl.cc b/components/device_event_log/device_event_log_impl.cc
index 5ea67e9e20b47124904eafa24f49ed159faf5aa1..db7eb5b6adbf077514f5f09308574bb1ce303b79 100644
--- a/components/device_event_log/device_event_log_impl.cc
+++ b/components/device_event_log/device_event_log_impl.cc
@@ -259,7 +259,7 @@ void DeviceEventLogImpl::AddEntry(const char* file,
LogLevel log_level,
const std::string& event) {
LogEntry entry(file, file_line, log_type, log_level, event);
- if (!task_runner_->RunsTasksOnCurrentThread()) {
+ if (!task_runner_->RunsTasksInCurrentSequence()) {
task_runner_->PostTask(FROM_HERE,
base::Bind(&DeviceEventLogImpl::AddLogEntry,
weak_ptr_factory_.GetWeakPtr(), entry));
@@ -269,7 +269,7 @@ void DeviceEventLogImpl::AddEntry(const char* file,
}
void DeviceEventLogImpl::AddLogEntry(const LogEntry& entry) {
- DCHECK(task_runner_->RunsTasksOnCurrentThread());
+ DCHECK(task_runner_->RunsTasksInCurrentSequence());
if (!entries_.empty()) {
LogEntry& last = entries_.back();
if (LogEntryMatches(last, entry)) {
@@ -307,7 +307,7 @@ std::string DeviceEventLogImpl::GetAsString(StringOrder order,
const std::string& types,
LogLevel max_level,
size_t max_events) {
- DCHECK(task_runner_->RunsTasksOnCurrentThread());
+ DCHECK(task_runner_->RunsTasksInCurrentSequence());
if (entries_.empty())
return "No Log Entries.";
« no previous file with comments | « components/component_updater/default_component_installer.cc ('k') | components/domain_reliability/monitor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698