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

Unified Diff: chrome/browser/devtools/devtools_file_helper.cc

Issue 1030263002: favor DCHECK_CURRENTLY_ON for better logs in chrome/browser/devtools (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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: chrome/browser/devtools/devtools_file_helper.cc
diff --git a/chrome/browser/devtools/devtools_file_helper.cc b/chrome/browser/devtools/devtools_file_helper.cc
index 78bc9a4ca3ff8e2629b4a983e3b6e5433b4bd2ff..11f270bb9231f5f0d8e7eb4269bbb7a4e08b4dee 100644
--- a/chrome/browser/devtools/devtools_file_helper.cc
+++ b/chrome/browser/devtools/devtools_file_helper.cc
@@ -118,21 +118,21 @@ class SelectFileDialog : public ui::SelectFileDialog::Listener,
};
void WriteToFile(const base::FilePath& path, const std::string& content) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
+ DCHECK_CURRENTLY_ON(BrowserThread::FILE);
DCHECK(!path.empty());
base::WriteFile(path, content.c_str(), content.length());
}
void AppendToFile(const base::FilePath& path, const std::string& content) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
+ DCHECK_CURRENTLY_ON(BrowserThread::FILE);
DCHECK(!path.empty());
base::AppendToFile(path, content.c_str(), content.size());
}
storage::IsolatedContext* isolated_context() {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
storage::IsolatedContext* isolated_context =
storage::IsolatedContext::GetInstance();
DCHECK(isolated_context);
@@ -142,7 +142,7 @@ storage::IsolatedContext* isolated_context() {
std::string RegisterFileSystem(WebContents* web_contents,
const base::FilePath& path,
std::string* registered_name) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
CHECK(web_contents->GetURL().SchemeIs(content::kChromeDevToolsScheme));
std::string file_system_id = isolated_context()->RegisterFileSystemForPath(
storage::kFileSystemTypeNativeLocal,
@@ -410,7 +410,7 @@ void DevToolsFileHelper::RequestFileSystems(
}
void DevToolsFileHelper::RemoveFileSystem(const std::string& file_system_path) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
base::FilePath path = base::FilePath::FromUTF8Unsafe(file_system_path);
isolated_context()->RevokeFileSystemByPath(path);
@@ -422,7 +422,7 @@ void DevToolsFileHelper::RemoveFileSystem(const std::string& file_system_path) {
bool DevToolsFileHelper::IsFileSystemAdded(
const std::string& file_system_path) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
set<std::string> file_system_paths = GetAddedFileSystemPaths(profile_);
return file_system_paths.find(file_system_path) != file_system_paths.end();
}

Powered by Google App Engine
This is Rietveld 408576698