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

Unified Diff: chrome/browser/net/nss_context_chromeos.cc

Issue 1117613003: [chrome/browser/net] favor DCHECK_CURRENTLY_ON for better logs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 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 | « chrome/browser/net/nss_context.cc ('k') | chrome/browser/net/nss_context_linux.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/net/nss_context_chromeos.cc
diff --git a/chrome/browser/net/nss_context_chromeos.cc b/chrome/browser/net/nss_context_chromeos.cc
index 414d19688d360adea17db51c9013e17781d96fb1..d68f02d0ea78908e3afcf04431673a22b7aecb28 100644
--- a/chrome/browser/net/nss_context_chromeos.cc
+++ b/chrome/browser/net/nss_context_chromeos.cc
@@ -21,7 +21,7 @@ class NSSCertDatabaseChromeOSManager : public base::SupportsUserData::Data {
GetNSSCertDatabaseCallback;
explicit NSSCertDatabaseChromeOSManager(const std::string& username_hash)
: username_hash_(username_hash), weak_ptr_factory_(this) {
- DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::IO));
+ DCHECK_CURRENTLY_ON(content::BrowserThread::IO);
crypto::ScopedPK11Slot private_slot(crypto::GetPrivateSlotForChromeOSUser(
username_hash,
base::Bind(&NSSCertDatabaseChromeOSManager::DidGetPrivateSlot,
@@ -31,12 +31,12 @@ class NSSCertDatabaseChromeOSManager : public base::SupportsUserData::Data {
}
~NSSCertDatabaseChromeOSManager() override {
- DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::IO));
+ DCHECK_CURRENTLY_ON(content::BrowserThread::IO);
}
net::NSSCertDatabaseChromeOS* GetNSSCertDatabase(
const GetNSSCertDatabaseCallback& callback) {
- DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::IO));
+ DCHECK_CURRENTLY_ON(content::BrowserThread::IO);
if (nss_cert_database_)
return nss_cert_database_.get();
@@ -49,7 +49,7 @@ class NSSCertDatabaseChromeOSManager : public base::SupportsUserData::Data {
typedef std::vector<GetNSSCertDatabaseCallback> ReadyCallbackList;
void DidGetPrivateSlot(crypto::ScopedPK11Slot private_slot) {
- DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::IO));
+ DCHECK_CURRENTLY_ON(content::BrowserThread::IO);
nss_cert_database_.reset(new net::NSSCertDatabaseChromeOS(
crypto::GetPublicSlotForChromeOSUser(username_hash_),
private_slot.Pass()));
@@ -79,7 +79,7 @@ net::NSSCertDatabaseChromeOS* GetNSSCertDatabaseChromeOS(
content::ResourceContext* context,
const NSSCertDatabaseChromeOSManager::GetNSSCertDatabaseCallback&
callback) {
- DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::IO));
+ DCHECK_CURRENTLY_ON(content::BrowserThread::IO);
NSSCertDatabaseChromeOSManager* manager =
static_cast<NSSCertDatabaseChromeOSManager*>(
context->GetUserData(kDatabaseManagerKey));
@@ -116,14 +116,14 @@ void SetSystemSlotOfDBForResourceContext(content::ResourceContext* context,
crypto::ScopedPK11Slot GetPublicNSSKeySlotForResourceContext(
content::ResourceContext* context) {
- DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::IO));
+ DCHECK_CURRENTLY_ON(content::BrowserThread::IO);
return crypto::GetPublicSlotForChromeOSUser(GetUsername(context));
}
crypto::ScopedPK11Slot GetPrivateNSSKeySlotForResourceContext(
content::ResourceContext* context,
const base::Callback<void(crypto::ScopedPK11Slot)>& callback) {
- DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::IO));
+ DCHECK_CURRENTLY_ON(content::BrowserThread::IO);
return crypto::GetPrivateSlotForChromeOSUser(GetUsername(context), callback);
}
@@ -136,7 +136,7 @@ net::NSSCertDatabase* GetNSSCertDatabaseForResourceContext(
void EnableNSSSystemKeySlotForResourceContext(
content::ResourceContext* context) {
- DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::IO));
+ DCHECK_CURRENTLY_ON(content::BrowserThread::IO);
base::Callback<void(crypto::ScopedPK11Slot)> callback =
base::Bind(&SetSystemSlotOfDBForResourceContext, context);
crypto::ScopedPK11Slot system_slot = crypto::GetSystemNSSKeySlot(callback);
« no previous file with comments | « chrome/browser/net/nss_context.cc ('k') | chrome/browser/net/nss_context_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698