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

Unified Diff: chrome/browser/component_updater/swiftshader_component_installer.cc

Issue 1107963003: [chrome/browser/component_updater] favor DCHECK_CURRENTLY_ON for better logs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased the patch Created 5 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/component_updater/swiftshader_component_installer.cc
diff --git a/chrome/browser/component_updater/swiftshader_component_installer.cc b/chrome/browser/component_updater/swiftshader_component_installer.cc
index 3848393f090cee71ed78be713a2e44b78e17ec19..34355ca726cbcb48141d74d05d133d47c1e39c50 100644
--- a/chrome/browser/component_updater/swiftshader_component_installer.cc
+++ b/chrome/browser/component_updater/swiftshader_component_installer.cc
@@ -92,7 +92,7 @@ bool GetLatestSwiftShaderDirectory(base::FilePath* result,
}
void RegisterSwiftShaderWithChrome(const base::FilePath& path) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
GpuDataManager::GetInstance()->RegisterSwiftShaderPath(path);
}
@@ -171,7 +171,7 @@ bool SwiftShaderComponentInstaller::Uninstall() {
void FinishSwiftShaderUpdateRegistration(ComponentUpdateService* cus,
const Version& version) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
update_client::CrxComponent swiftshader;
swiftshader.name = "Swift Shader";
@@ -204,7 +204,7 @@ void UpdateChecker::OnGpuInfoUpdate() {
gpu_data_manager->IsFeatureBlacklisted(gpu::GPU_FEATURE_TYPE_WEBGL) ||
gpu_data_manager->ShouldUseSwiftShader()) {
gpu_data_manager->RemoveObserver(this);
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
+ DCHECK_CURRENTLY_ON(BrowserThread::FILE);
base::FilePath path = GetSwiftShaderBaseDirectory();
Version version(kNullVersion);
@@ -222,7 +222,7 @@ void UpdateChecker::OnGpuInfoUpdate() {
// Check if there already is a version of swiftshader installed,
// and if so register it.
void RegisterSwiftShaderPath(ComponentUpdateService* cus) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
+ DCHECK_CURRENTLY_ON(BrowserThread::FILE);
base::FilePath path = GetSwiftShaderBaseDirectory();
if (!base::PathExists(path)) {
if (!base::CreateDirectory(path)) {

Powered by Google App Engine
This is Rietveld 408576698