#include "chrome/browser/browsing_data/browsing_data_file_system_helper.h"
+#include <set>
+
#include "base/bind.h"
#include "base/compiler_specific.h"
#include "base/memory/scoped_ptr.h"
void BrowsingDataFileSystemHelperImpl::StartFetching(
const base::Callback<void(const std::list<FileSystemInfo>&)>& callback) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
DCHECK(!is_fetching_);
- DCHECK_EQ(false, callback.is_null());
+ DCHECK(!callback.is_null());
is_fetching_ = true;
completion_callback_ = callback;
file_task_runner()->PostTask(
void BrowsingDataFileSystemHelperImpl::DeleteFileSystemOrigin(
const GURL& origin) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
file_task_runner()->PostTask(
FROM_HERE,
base::Bind(
const fileapi::FileSystemType types[] = {
fileapi::kFileSystemTypeTemporary,
fileapi::kFileSystemTypePersistent,
+#if defined(ENABLE_EXTENSIONS)
fileapi::kFileSystemTypeSyncable,
+#endif
};
typedef std::map<GURL, FileSystemInfo> OriginInfoMap;
}
void BrowsingDataFileSystemHelperImpl::NotifyOnUIThread() {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
DCHECK(is_fetching_);
completion_callback_.Run(file_system_info_);
completion_callback_.Reset();
CannedBrowsingDataFileSystemHelper*
CannedBrowsingDataFileSystemHelper::Clone() {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
CannedBrowsingDataFileSystemHelper* clone =
new CannedBrowsingDataFileSystemHelper();
// This list only mutates on the UI thread, so it's safe to work with it here
void CannedBrowsingDataFileSystemHelper::AddFileSystem(
const GURL& origin, const fileapi::FileSystemType type, const int64 size) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
// This canned implementation of AddFileSystem uses an O(n^2) algorithm; which
// is fine, as it isn't meant for use in a high-volume context. If it turns
// out that we want to start using this in a context with many, many origins,
}
size_t CannedBrowsingDataFileSystemHelper::GetFileSystemCount() const {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
return file_system_info_.size();
}
void CannedBrowsingDataFileSystemHelper::StartFetching(
const base::Callback<void(const std::list<FileSystemInfo>&)>& callback) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
DCHECK(!callback.is_null());
BrowserThread::PostTask(