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

Unified Diff: content/browser/media/android/media_resource_getter_impl.cc

Issue 1000373002: favor DCHECK_CURRENTLY_ON for better logs in content/browser/[f-p]* (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase on master Created 5 years, 9 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: content/browser/media/android/media_resource_getter_impl.cc
diff --git a/content/browser/media/android/media_resource_getter_impl.cc b/content/browser/media/android/media_resource_getter_impl.cc
index 99142e11398befa8f6a61586a50911e53c88ded0..457748414af7fa85f8c23e09508b96347112016a 100644
--- a/content/browser/media/android/media_resource_getter_impl.cc
+++ b/content/browser/media/android/media_resource_getter_impl.cc
@@ -49,7 +49,7 @@ static void RequestPlatformPathFromBlobURL(
const GURL& url,
ResourceContext* resource_context,
const base::Callback<void(const std::string&)>& callback) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
+ DCHECK_CURRENTLY_ON(BrowserThread::IO);
ChromeBlobStorageContext* blob_storage_context =
GetChromeBlobStorageContextForResourceContext(resource_context);
@@ -81,7 +81,7 @@ static void RequestPlaformPathFromFileSystemURL(
int render_process_id,
scoped_refptr<storage::FileSystemContext> file_system_context,
const base::Callback<void(const std::string&)>& callback) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
+ DCHECK_CURRENTLY_ON(BrowserThread::FILE);
base::FilePath platform_path;
SyncGetPlatformPath(file_system_context.get(),
render_process_id,
@@ -200,7 +200,7 @@ MediaResourceGetterTask::~MediaResourceGetterTask() {}
net::AuthCredentials MediaResourceGetterTask::RequestAuthCredentials(
const GURL& url) const {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
+ DCHECK_CURRENTLY_ON(BrowserThread::IO);
net::HttpTransactionFactory* factory =
context_getter_->GetURLRequestContext()->http_transaction_factory();
if (!factory)
@@ -224,7 +224,7 @@ net::AuthCredentials MediaResourceGetterTask::RequestAuthCredentials(
void MediaResourceGetterTask::RequestCookies(
const GURL& url, const GURL& first_party_for_cookies,
const media::MediaResourceGetter::GetCookieCB& callback) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
+ DCHECK_CURRENTLY_ON(BrowserThread::IO);
ChildProcessSecurityPolicyImpl* policy =
ChildProcessSecurityPolicyImpl::GetInstance();
if (!policy->CanAccessCookiesForOrigin(render_process_id_, url)) {
@@ -253,7 +253,7 @@ void MediaResourceGetterTask::CheckPolicyForCookies(
const GURL& url, const GURL& first_party_for_cookies,
const media::MediaResourceGetter::GetCookieCB& callback,
const net::CookieList& cookie_list) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
+ DCHECK_CURRENTLY_ON(BrowserThread::IO);
if (GetContentClient()->browser()->AllowGetCookie(
url, first_party_for_cookies, cookie_list,
resource_context_, render_process_id_, render_frame_id_)) {
@@ -283,7 +283,7 @@ MediaResourceGetterImpl::~MediaResourceGetterImpl() {}
void MediaResourceGetterImpl::GetAuthCredentials(
const GURL& url, const GetAuthCredentialsCB& callback) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
scoped_refptr<MediaResourceGetterTask> task = new MediaResourceGetterTask(
browser_context_, 0, 0);
@@ -298,7 +298,7 @@ void MediaResourceGetterImpl::GetAuthCredentials(
void MediaResourceGetterImpl::GetCookies(
const GURL& url, const GURL& first_party_for_cookies,
const GetCookieCB& callback) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
scoped_refptr<MediaResourceGetterTask> task = new MediaResourceGetterTask(
browser_context_, render_process_id_, render_frame_id_);
@@ -316,19 +316,19 @@ void MediaResourceGetterImpl::GetCookies(
void MediaResourceGetterImpl::GetAuthCredentialsCallback(
const GetAuthCredentialsCB& callback,
const net::AuthCredentials& credentials) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
callback.Run(credentials.username(), credentials.password());
}
void MediaResourceGetterImpl::GetCookiesCallback(
const GetCookieCB& callback, const std::string& cookies) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
callback.Run(cookies);
}
void MediaResourceGetterImpl::GetPlatformPathFromURL(
const GURL& url, const GetPlatformPathCB& callback) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
DCHECK(url.SchemeIsFileSystem() || url.SchemeIs(url::kBlobScheme));
GetPlatformPathCB cb =
@@ -355,14 +355,14 @@ void MediaResourceGetterImpl::GetPlatformPathFromURL(
void MediaResourceGetterImpl::GetPlatformPathCallback(
const GetPlatformPathCB& callback, const std::string& platform_path) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
callback.Run(platform_path);
}
void MediaResourceGetterImpl::ExtractMediaMetadata(
const std::string& url, const std::string& cookies,
const std::string& user_agent, const ExtractMediaMetadataCB& callback) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
base::SequencedWorkerPool* pool = content::BrowserThread::GetBlockingPool();
pool->PostWorkerTask(
FROM_HERE,
@@ -372,7 +372,7 @@ void MediaResourceGetterImpl::ExtractMediaMetadata(
void MediaResourceGetterImpl::ExtractMediaMetadata(
const int fd, const int64 offset, const int64 size,
const ExtractMediaMetadataCB& callback) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
base::SequencedWorkerPool* pool = content::BrowserThread::GetBlockingPool();
pool->PostWorkerTask(
FROM_HERE,
« no previous file with comments | « content/browser/loader/temporary_file_stream.cc ('k') | content/browser/media/capture/content_video_capture_device_core.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698