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

Unified Diff: net/log/file_net_log_observer.cc

Issue 2894863002: Rename TaskRunner::RunsTasksOnCurrentThread() in //net (Closed)
Patch Set: fixed build error Created 3 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
« no previous file with comments | « net/http/transport_security_persister.cc ('k') | net/nqe/network_qualities_prefs_manager.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/log/file_net_log_observer.cc
diff --git a/net/log/file_net_log_observer.cc b/net/log/file_net_log_observer.cc
index f344556b18f046cc7bb16d1efac6e78c8582c4f2..721ae8744ccfebe53f58ea680ca4f6925127b4dd 100644
--- a/net/log/file_net_log_observer.cc
+++ b/net/log/file_net_log_observer.cc
@@ -380,7 +380,7 @@ FileNetLogObserver::BoundedFileWriter::~BoundedFileWriter() {}
void FileNetLogObserver::BoundedFileWriter::Initialize(
std::unique_ptr<base::Value> constants_value) {
- DCHECK(task_runner_->RunsTasksOnCurrentThread());
+ DCHECK(task_runner_->RunsTasksInCurrentSequence());
event_files_[current_file_idx_] = base::ScopedFILE(
base::OpenFile(directory_.AppendASCII("event_file_0.json"), "w"));
@@ -400,7 +400,7 @@ void FileNetLogObserver::BoundedFileWriter::Initialize(
void FileNetLogObserver::BoundedFileWriter::Stop(
std::unique_ptr<base::Value> polled_data) {
- DCHECK(task_runner_->RunsTasksOnCurrentThread());
+ DCHECK(task_runner_->RunsTasksInCurrentSequence());
base::ScopedFILE closing_file(
base::OpenFile(directory_.AppendASCII("end_netlog.json"), "w"));
@@ -418,7 +418,7 @@ void FileNetLogObserver::BoundedFileWriter::Stop(
}
void FileNetLogObserver::BoundedFileWriter::IncrementCurrentFile() {
- DCHECK(task_runner_->RunsTasksOnCurrentThread());
+ DCHECK(task_runner_->RunsTasksInCurrentSequence());
current_file_idx_++;
current_file_idx_ %= total_num_files_;
@@ -431,7 +431,7 @@ void FileNetLogObserver::BoundedFileWriter::IncrementCurrentFile() {
void FileNetLogObserver::BoundedFileWriter::Flush(
scoped_refptr<FileNetLogObserver::WriteQueue> write_queue) {
- DCHECK(task_runner_->RunsTasksOnCurrentThread());
+ DCHECK(task_runner_->RunsTasksInCurrentSequence());
EventQueue local_file_queue;
write_queue->SwapQueue(&local_file_queue);
@@ -455,7 +455,7 @@ void FileNetLogObserver::BoundedFileWriter::Flush(
}
void FileNetLogObserver::BoundedFileWriter::DeleteAllFiles() {
- DCHECK(task_runner_->RunsTasksOnCurrentThread());
+ DCHECK(task_runner_->RunsTasksInCurrentSequence());
// Reset |event_files_| to release all file handles so base::DeleteFile can
// safely access files.
@@ -479,7 +479,7 @@ FileNetLogObserver::UnboundedFileWriter::~UnboundedFileWriter() {}
void FileNetLogObserver::UnboundedFileWriter::Initialize(
std::unique_ptr<base::Value> constants_value) {
- DCHECK(task_runner_->RunsTasksOnCurrentThread());
+ DCHECK(task_runner_->RunsTasksInCurrentSequence());
file_.reset(base::OpenFile(file_path_, "w"));
first_event_written_ = false;
@@ -495,7 +495,7 @@ void FileNetLogObserver::UnboundedFileWriter::Initialize(
void FileNetLogObserver::UnboundedFileWriter::Stop(
std::unique_ptr<base::Value> polled_data) {
- DCHECK(task_runner_->RunsTasksOnCurrentThread());
+ DCHECK(task_runner_->RunsTasksInCurrentSequence());
std::string json;
if (polled_data)
@@ -511,7 +511,7 @@ void FileNetLogObserver::UnboundedFileWriter::Stop(
void FileNetLogObserver::UnboundedFileWriter::Flush(
scoped_refptr<FileNetLogObserver::WriteQueue> write_queue) {
- DCHECK(task_runner_->RunsTasksOnCurrentThread());
+ DCHECK(task_runner_->RunsTasksInCurrentSequence());
EventQueue local_file_queue;
write_queue->SwapQueue(&local_file_queue);
@@ -528,7 +528,7 @@ void FileNetLogObserver::UnboundedFileWriter::Flush(
}
void FileNetLogObserver::UnboundedFileWriter::DeleteAllFiles() {
- DCHECK(task_runner_->RunsTasksOnCurrentThread());
+ DCHECK(task_runner_->RunsTasksInCurrentSequence());
// Reset |file_| to release the file handle so base::DeleteFile can
// safely access it.
« no previous file with comments | « net/http/transport_security_persister.cc ('k') | net/nqe/network_qualities_prefs_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698