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

Unified Diff: chrome/browser/media/webrtc_log_util.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_util.cc
===================================================================
--- chrome/browser/media/webrtc_log_util.cc (revision 273292)
+++ chrome/browser/media/webrtc_log_util.cc (working copy)
@@ -6,7 +6,9 @@
#include "base/file_util.h"
#include "base/files/file_enumerator.h"
+#include "base/files/file_path.h"
#include "base/logging.h"
+#include "base/threading/thread_restrictions.h"
#include "base/time/time.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/media/webrtc_log_list.h"
@@ -44,7 +46,7 @@
void WebRtcLogUtil::DeleteOldAndRecentWebRtcLogFiles(
const base::FilePath& log_dir,
const base::Time& delete_begin_time) {
- DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::FILE));
+ base::ThreadRestrictions::AssertIOAllowed();
if (!base::PathExists(log_dir)) {
// This will happen if no logs have been stored or uploaded.
@@ -108,8 +110,7 @@
g_browser_process->profile_manager()->GetProfileInfoCache();
size_t profiles_count = profile_cache.GetNumberOfProfiles();
for (size_t i = 0; i < profiles_count; ++i) {
- content::BrowserThread::PostTask(
- content::BrowserThread::FILE,
+ content::BrowserThread::PostBlockingPoolTask(
FROM_HERE,
base::Bind(&DeleteOldWebRtcLogFiles,
WebRtcLogList::GetWebRtcLogDirectoryForProfile(

Powered by Google App Engine
This is Rietveld 408576698