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

Unified Diff: chrome/browser/media/webrtc_log_uploader.cc

Issue 299903002: Convert WebRtcLoggingHandlerHost to use the blocking thread pool. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 6 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: chrome/browser/media/webrtc_log_uploader.cc
===================================================================
--- chrome/browser/media/webrtc_log_uploader.cc (revision 273292)
+++ chrome/browser/media/webrtc_log_uploader.cc (working copy)
@@ -46,7 +46,7 @@
: log_count_(0),
post_data_(NULL),
shutting_down_(false) {
- file_thread_checker_.DetachFromThread();
+ blocking_sequence_checker_.DetachFromSequence();
}
WebRtcLogUploader::~WebRtcLogUploader() {
@@ -71,8 +71,7 @@
!it->second.log_path.empty()) {
base::FilePath log_list_path =
WebRtcLogList::GetWebRtcLogListFileForDirectory(it->second.log_path);
- content::BrowserThread::PostTask(
- content::BrowserThread::FILE,
+ content::BrowserThread::PostBlockingPoolTask(
FROM_HERE,
base::Bind(&WebRtcLogUploader::AddUploadedLogInfoToUploadListFile,
base::Unretained(this),
@@ -110,7 +109,7 @@
uint32 length,
const std::map<std::string, std::string>& meta_data,
const WebRtcLogUploadDoneData& upload_done_data) {
- DCHECK(file_thread_checker_.CalledOnValidThread());
+ DCHECK(blocking_sequence_checker_.CalledOnValidSequencedThread());
DCHECK(log_buffer.get());
DCHECK(!upload_done_data.log_path.empty());
@@ -315,7 +314,7 @@
void WebRtcLogUploader::WriteCompressedLogToFile(
const std::vector<uint8>& compressed_log,
const base::FilePath& log_file_path) {
- DCHECK(file_thread_checker_.CalledOnValidThread());
+ DCHECK(blocking_sequence_checker_.CalledOnValidSequencedThread());
DCHECK(!compressed_log.empty());
base::WriteFile(log_file_path,
reinterpret_cast<const char*>(&compressed_log[0]),
@@ -325,7 +324,7 @@
void WebRtcLogUploader::AddLocallyStoredLogInfoToUploadListFile(
const base::FilePath& upload_list_path,
const std::string& local_log_id) {
- DCHECK(file_thread_checker_.CalledOnValidThread());
+ DCHECK(blocking_sequence_checker_.CalledOnValidSequencedThread());
DCHECK(!upload_list_path.empty());
DCHECK(!local_log_id.empty());
@@ -369,7 +368,7 @@
const base::FilePath& upload_list_path,
const std::string& local_log_id,
const std::string& report_id) {
- DCHECK(file_thread_checker_.CalledOnValidThread());
+ DCHECK(blocking_sequence_checker_.CalledOnValidSequencedThread());
DCHECK(!upload_list_path.empty());
DCHECK(!local_log_id.empty());
DCHECK(!report_id.empty());

Powered by Google App Engine
This is Rietveld 408576698