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

Unified Diff: chrome/browser/extensions/api/file_system/file_system_api.cc

Issue 216513002: Replace DCHECK(BrowserThread::CurrentlyOn) with DCHECK_CURRENTLY_ON in extensions. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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/extensions/api/file_system/file_system_api.cc
diff --git a/chrome/browser/extensions/api/file_system/file_system_api.cc b/chrome/browser/extensions/api/file_system/file_system_api.cc
index b01b0bea01bd4ff989ddf4f2a71259b4fddea62a..2e4d2e2f993d18c594479f0f25fbf4348a9f3ba7 100644
--- a/chrome/browser/extensions/api/file_system/file_system_api.cc
+++ b/chrome/browser/extensions/api/file_system/file_system_api.cc
@@ -284,7 +284,7 @@ FileSystemEntryFunction::FileSystemEntryFunction()
void FileSystemEntryFunction::CheckWritableFiles(
const std::vector<base::FilePath>& paths) {
- DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
app_file_handler_util::CheckWritableFiles(
paths,
GetProfile(),
@@ -297,7 +297,7 @@ void FileSystemEntryFunction::CheckWritableFiles(
void FileSystemEntryFunction::RegisterFileSystemsAndSendResponse(
const std::vector<base::FilePath>& paths) {
- DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
if (!render_view_host_)
return;
@@ -346,7 +346,7 @@ void FileSystemEntryFunction::AddEntryToResponse(
void FileSystemEntryFunction::HandleWritableFileError(
const base::FilePath& error_path) {
- DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
error_ = base::StringPrintf(kWritableFileErrorFormat,
error_path.BaseName().AsUTF8Unsafe().c_str());
SendResponse(false);
@@ -383,7 +383,7 @@ bool FileSystemGetWritableEntryFunction::RunImpl() {
}
void FileSystemGetWritableEntryFunction::CheckPermissionAndSendResponse() {
- DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
if (is_directory_ &&
!extension_->HasAPIPermission(APIPermission::kFileSystemDirectory)) {
error_ = kRequiresFileSystemDirectoryError;
@@ -395,7 +395,7 @@ void FileSystemGetWritableEntryFunction::CheckPermissionAndSendResponse() {
}
void FileSystemGetWritableEntryFunction::SetIsDirectoryOnFileThread() {
- DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::FILE));
+ DCHECK_CURRENTLY_ON(content::BrowserThread::FILE);
if (base::DirectoryExists(path_)) {
is_directory_ = true;
}
@@ -639,7 +639,7 @@ void FileSystemChooseEntryFunction::RegisterTempExternalFileSystemForTest(
void FileSystemChooseEntryFunction::SetInitialPathOnFileThread(
const base::FilePath& suggested_name,
const base::FilePath& previous_path) {
- DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::FILE));
+ DCHECK_CURRENTLY_ON(content::BrowserThread::FILE);
if (!previous_path.empty() && base::DirectoryExists(previous_path)) {
initial_path_ = previous_path.Append(suggested_name);
} else {

Powered by Google App Engine
This is Rietveld 408576698