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

Unified Diff: content/browser/media/webrtc_identity_store.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/webrtc_identity_store.cc
diff --git a/content/browser/media/webrtc_identity_store.cc b/content/browser/media/webrtc_identity_store.cc
index 419cb96ab7c9b507b68e7728d501e7511409f8ff..2cf8fb13c8a065d72310c64e5fa3a2588a6d2eed 100644
--- a/content/browser/media/webrtc_identity_store.cc
+++ b/content/browser/media/webrtc_identity_store.cc
@@ -83,7 +83,7 @@ class WebRTCIdentityRequest {
common_name_(common_name) {}
void Cancel(WebRTCIdentityRequestHandle* handle) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
+ DCHECK_CURRENTLY_ON(BrowserThread::IO);
if (callbacks_.find(handle) == callbacks_.end())
return;
callbacks_.erase(handle);
@@ -104,7 +104,7 @@ class WebRTCIdentityRequest {
// WebRTCIdentityStoreBackend::FindIdentity, because it needs to live longer
// than that if the identity does not exist in DB.
void Post(const WebRTCIdentityRequestResult& result) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
+ DCHECK_CURRENTLY_ON(BrowserThread::IO);
for (CallbackMap::iterator it = callbacks_.begin(); it != callbacks_.end();
++it)
it->second.Run(result.error, result.certificate, result.private_key);
@@ -136,7 +136,7 @@ class WebRTCIdentityRequestHandle {
// Cancel the request. Does nothing if the request finished or was already
// cancelled.
void Cancel() {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
+ DCHECK_CURRENTLY_ON(BrowserThread::IO);
if (!request_)
return;
@@ -149,7 +149,7 @@ class WebRTCIdentityRequestHandle {
}
void OnRequestStarted(WebRTCIdentityRequest* request) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
+ DCHECK_CURRENTLY_ON(BrowserThread::IO);
DCHECK(request);
request_ = request;
}
@@ -157,7 +157,7 @@ class WebRTCIdentityRequestHandle {
void OnRequestComplete(int error,
const std::string& certificate,
const std::string& private_key) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
+ DCHECK_CURRENTLY_ON(BrowserThread::IO);
DCHECK(request_);
request_ = NULL;
base::ResetAndReturn(&callback_).Run(error, certificate, private_key);
@@ -184,7 +184,7 @@ base::Closure WebRTCIdentityStore::RequestIdentity(
const std::string& identity_name,
const std::string& common_name,
const CompletionCallback& callback) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
+ DCHECK_CURRENTLY_ON(BrowserThread::IO);
WebRTCIdentityRequest* request =
FindRequest(origin, identity_name, common_name);
// If there is no identical request in flight, create a new one, queue it,
@@ -220,20 +220,20 @@ base::Closure WebRTCIdentityStore::RequestIdentity(
void WebRTCIdentityStore::DeleteBetween(base::Time delete_begin,
base::Time delete_end,
const base::Closure& callback) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
+ DCHECK_CURRENTLY_ON(BrowserThread::IO);
backend_->DeleteBetween(delete_begin, delete_end, callback);
}
void WebRTCIdentityStore::SetValidityPeriodForTesting(
base::TimeDelta validity_period) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
+ DCHECK_CURRENTLY_ON(BrowserThread::IO);
validity_period_ = validity_period;
backend_->SetValidityPeriodForTesting(validity_period);
}
void WebRTCIdentityStore::SetTaskRunnerForTesting(
const scoped_refptr<base::TaskRunner>& task_runner) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
+ DCHECK_CURRENTLY_ON(BrowserThread::IO);
task_runner_ = task_runner;
}
@@ -241,7 +241,7 @@ void WebRTCIdentityStore::BackendFindCallback(WebRTCIdentityRequest* request,
int error,
const std::string& certificate,
const std::string& private_key) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
+ DCHECK_CURRENTLY_ON(BrowserThread::IO);
if (error == net::OK) {
DVLOG(2) << "Identity found in DB.";
WebRTCIdentityRequestResult result(error, certificate, private_key);
@@ -270,7 +270,7 @@ void WebRTCIdentityStore::BackendFindCallback(WebRTCIdentityRequest* request,
void WebRTCIdentityStore::GenerateIdentityCallback(
WebRTCIdentityRequest* request,
WebRTCIdentityRequestResult* result) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
+ DCHECK_CURRENTLY_ON(BrowserThread::IO);
if (result->error == net::OK) {
DVLOG(2) << "New identity generated and added to the backend.";
backend_->AddIdentity(request->origin_,
@@ -285,7 +285,7 @@ void WebRTCIdentityStore::GenerateIdentityCallback(
void WebRTCIdentityStore::PostRequestResult(
WebRTCIdentityRequest* request,
const WebRTCIdentityRequestResult& result) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
+ DCHECK_CURRENTLY_ON(BrowserThread::IO);
// Removes the in flight request from the queue.
for (size_t i = 0; i < in_flight_requests_.size(); ++i) {
if (in_flight_requests_[i] == request) {
« no previous file with comments | « content/browser/media/media_internals_proxy.cc ('k') | content/browser/media/webrtc_identity_store_backend.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698