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

Unified Diff: chrome/browser/chromeos/file_system_provider/service.cc

Issue 263633003: [fsp] Make thread checks consistent. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed. Created 6 years, 8 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
« no previous file with comments | « chrome/browser/chromeos/file_system_provider/fileapi/provider_async_file_util.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/file_system_provider/service.cc
diff --git a/chrome/browser/chromeos/file_system_provider/service.cc b/chrome/browser/chromeos/file_system_provider/service.cc
index 35d5bcb984b5edc283ecdde69f809b06e8fbbbe4..9694296201e9a0091dbe10b30ba22bb9b0d0bab2 100644
--- a/chrome/browser/chromeos/file_system_provider/service.cc
+++ b/chrome/browser/chromeos/file_system_provider/service.cc
@@ -18,6 +18,8 @@
#include "extensions/browser/extension_system.h"
#include "webkit/browser/fileapi/external_mount_points.h"
+using content::BrowserThread;
+
namespace chromeos {
namespace file_system_provider {
namespace {
@@ -85,7 +87,7 @@ void Service::SetFileSystemFactoryForTests(
int Service::MountFileSystem(const std::string& extension_id,
const std::string& file_system_name) {
- DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
// Restrict number of file systems to prevent system abusing.
if (file_system_map_.size() + 1 > kMaxFileSystems) {
@@ -151,7 +153,7 @@ int Service::MountFileSystem(const std::string& extension_id,
bool Service::UnmountFileSystem(const std::string& extension_id,
int file_system_id) {
- DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
const ProvidedFileSystemMap::iterator file_system_it =
file_system_map_.find(file_system_id);
@@ -199,7 +201,7 @@ bool Service::UnmountFileSystem(const std::string& extension_id,
}
bool Service::RequestUnmount(int file_system_id) {
- DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
ProvidedFileSystemMap::iterator file_system_it =
file_system_map_.find(file_system_id);
@@ -214,7 +216,7 @@ bool Service::RequestUnmount(int file_system_id) {
}
std::vector<ProvidedFileSystemInfo> Service::GetProvidedFileSystemInfoList() {
- DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
std::vector<ProvidedFileSystemInfo> result;
for (ProvidedFileSystemMap::const_iterator it = file_system_map_.begin();
@@ -228,7 +230,7 @@ std::vector<ProvidedFileSystemInfo> Service::GetProvidedFileSystemInfoList() {
ProvidedFileSystemInterface* Service::GetProvidedFileSystem(
const std::string& extension_id,
int file_system_id) {
- DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
const ProvidedFileSystemMap::const_iterator file_system_it =
file_system_map_.find(file_system_id);
@@ -263,7 +265,7 @@ void Service::OnExtensionUnloaded(
ProvidedFileSystemInterface* Service::GetProvidedFileSystem(
const std::string& mount_point_name) {
- DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
const MountPointNameToIdMap::const_iterator mapping_it =
mount_point_name_to_id_map_.find(mount_point_name);
« no previous file with comments | « chrome/browser/chromeos/file_system_provider/fileapi/provider_async_file_util.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698