ExternalProvider/Loader: Use DCHECK instead of CHECK for thread checking.

It seems all of the thread checking in external loader/provider code
was done using CHECKs. There isn't any compelling reason to do so, and
it likely happened due to copy-paste spread.

Turn these into DCHECKs. This will reduce any runtime overhead from
release builds.

Bug: None
Test: None
Change-Id: I1370c15fb17acef1c4dd36bc52edd49afc609db0
Reviewed-on: https://chromium-review.googlesource.com/650988
Commit-Queue: Istiaque Ahmed <[email protected]>
Reviewed-by: Devlin <[email protected]>
Cr-Commit-Position: refs/heads/master@{#500731}
diff --git a/chrome/browser/extensions/extension_service.cc b/chrome/browser/extensions/extension_service.cc
index 43515ce4..0c27d53 100644
--- a/chrome/browser/extensions/extension_service.cc
+++ b/chrome/browser/extensions/extension_service.cc
@@ -206,7 +206,7 @@
 bool ExtensionService::OnExternalExtensionUpdateUrlFound(
     const ExternalInstallInfoUpdateUrl& info,
     bool is_initial_load) {
-  CHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+  DCHECK_CURRENTLY_ON(BrowserThread::UI);
   CHECK(crx_file::id_util::IdIsValid(info.extension_id));
 
   if (Manifest::IsExternalLocation(info.download_location)) {
@@ -1329,7 +1329,7 @@
 
 void ExtensionService::OnExternalProviderReady(
     const ExternalProviderInterface* provider) {
-  CHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+  DCHECK_CURRENTLY_ON(BrowserThread::UI);
   CHECK(provider->IsReady());
 
   // An external provider has finished loading.  We only take action
@@ -1347,7 +1347,7 @@
 }
 
 void ExtensionService::OnAllExternalProvidersReady() {
-  CHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+  DCHECK_CURRENTLY_ON(BrowserThread::UI);
   base::TimeDelta elapsed = base::Time::Now() - profile_->GetStartTime();
   UMA_HISTOGRAM_TIMES("Extension.ExternalProvidersReadyAfter", elapsed);
 
@@ -2076,7 +2076,7 @@
 
 bool ExtensionService::OnExternalExtensionFileFound(
     const ExternalInstallInfoFile& info) {
-  CHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+  DCHECK_CURRENTLY_ON(BrowserThread::UI);
   CHECK(crx_file::id_util::IdIsValid(info.extension_id));
   if (extension_prefs_->IsExternalExtensionUninstalled(info.extension_id))
     return false;