summaryrefslogtreecommitdiffstats
path: root/components
diff options
context:
space:
mode:
Diffstat (limited to 'components')
-rw-r--r--components/crash/browser/crash_dump_manager_android.cc4
-rw-r--r--components/crash/browser/crash_handler_host_linux.cc2
-rw-r--r--components/feedback/feedback_data.cc12
-rw-r--r--components/metrics/profiler/tracking_synchronizer.cc28
-rw-r--r--components/nacl/browser/nacl_file_host.cc2
-rw-r--r--components/nacl/browser/pnacl_host.cc2
-rw-r--r--components/navigation_interception/intercept_navigation_delegate.cc2
-rw-r--r--components/navigation_interception/intercept_navigation_resource_throttle.cc4
-rw-r--r--components/precache/content/precache_manager.cc14
-rw-r--r--components/storage_monitor/media_storage_util.cc2
-rw-r--r--components/storage_monitor/storage_monitor_chromeos.cc6
-rw-r--r--components/storage_monitor/storage_monitor_linux.cc22
-rw-r--r--components/storage_monitor/volume_mount_watcher_win.cc16
-rw-r--r--components/wallpaper/wallpaper_manager_base.cc10
14 files changed, 63 insertions, 63 deletions
diff --git a/components/crash/browser/crash_dump_manager_android.cc b/components/crash/browser/crash_dump_manager_android.cc
index b7d2378..4814afd 100644
--- a/components/crash/browser/crash_dump_manager_android.cc
+++ b/components/crash/browser/crash_dump_manager_android.cc
@@ -35,7 +35,7 @@ CrashDumpManager* CrashDumpManager::GetInstance() {
CrashDumpManager::CrashDumpManager(const base::FilePath& crash_dump_dir)
: crash_dump_dir_(crash_dump_dir) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
DCHECK(!instance_);
instance_ = this;
@@ -83,7 +83,7 @@ base::File CrashDumpManager::CreateMinidumpFile(int child_process_id) {
// static
void CrashDumpManager::ProcessMinidump(const base::FilePath& minidump_path,
base::ProcessHandle pid) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
+ DCHECK_CURRENTLY_ON(BrowserThread::FILE);
CHECK(instance_);
int64 file_size = 0;
int r = base::GetFileSize(minidump_path, &file_size);
diff --git a/components/crash/browser/crash_handler_host_linux.cc b/components/crash/browser/crash_handler_host_linux.cc
index 7811a048..2c5841b 100644
--- a/components/crash/browser/crash_handler_host_linux.cc
+++ b/components/crash/browser/crash_handler_host_linux.cc
@@ -402,7 +402,7 @@ void CrashHandlerHostLinux::WriteDumpFile(scoped_ptr<BreakpadInfo> info,
void CrashHandlerHostLinux::QueueCrashDumpTask(scoped_ptr<BreakpadInfo> info,
int signal_fd) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
+ DCHECK_CURRENTLY_ON(BrowserThread::IO);
// Send the done signal to the process: it can exit now.
struct msghdr msg = {0};
diff --git a/components/feedback/feedback_data.cc b/components/feedback/feedback_data.cc
index 6b2fc49..5c424d9 100644
--- a/components/feedback/feedback_data.cc
+++ b/components/feedback/feedback_data.cc
@@ -44,7 +44,7 @@ void FeedbackData::OnFeedbackPageDataComplete() {
void FeedbackData::SetAndCompressSystemInfo(
scoped_ptr<FeedbackData::SystemLogsMap> sys_info) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
if (trace_id_ != 0) {
TracingManager* manager = TracingManager::Get();
@@ -70,7 +70,7 @@ void FeedbackData::SetAndCompressSystemInfo(
void FeedbackData::SetAndCompressHistograms(
scoped_ptr<std::string> histograms) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
if (!histograms.get())
return;
@@ -87,7 +87,7 @@ void FeedbackData::SetAndCompressHistograms(
void FeedbackData::AttachAndCompressFileData(
scoped_ptr<std::string> attached_filedata) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
if (!attached_filedata.get() || attached_filedata->empty())
return;
@@ -107,7 +107,7 @@ void FeedbackData::AttachAndCompressFileData(
void FeedbackData::OnGetTraceData(
int trace_id,
scoped_refptr<base::RefCountedString> trace_data) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
TracingManager* manager = TracingManager::Get();
if (manager)
manager->DiscardTraceData(trace_id);
@@ -124,7 +124,7 @@ void FeedbackData::OnGetTraceData(
}
void FeedbackData::OnCompressComplete() {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
--pending_op_count_;
SendReport();
}
@@ -134,7 +134,7 @@ bool FeedbackData::IsDataComplete() {
}
void FeedbackData::SendReport() {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
if (IsDataComplete() && !report_sent_) {
report_sent_ = true;
send_report_.Run(this);
diff --git a/components/metrics/profiler/tracking_synchronizer.cc b/components/metrics/profiler/tracking_synchronizer.cc
index 8d53bd2..327c94d 100644
--- a/components/metrics/profiler/tracking_synchronizer.cc
+++ b/components/metrics/profiler/tracking_synchronizer.cc
@@ -54,23 +54,23 @@ class TrackingSynchronizer::RequestContext {
~RequestContext() {}
void SetReceivedProcessGroupCount(bool done) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
received_process_group_count_ = done;
}
// Methods for book keeping of processes_pending_.
void IncrementProcessesPending() {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
++processes_pending_;
}
void AddProcessesPending(int processes_pending) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
processes_pending_ += processes_pending;
}
void DecrementProcessesPending() {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
--processes_pending_;
}
@@ -79,7 +79,7 @@ class TrackingSynchronizer::RequestContext {
// |processes_pending_| are zero, then delete the current object by calling
// Unregister.
void DeleteIfAllDone() {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
if (processes_pending_ <= 0 && received_process_group_count_)
RequestContext::Unregister(sequence_number_);
@@ -90,7 +90,7 @@ class TrackingSynchronizer::RequestContext {
static RequestContext* Register(
int sequence_number,
const base::WeakPtr<TrackingSynchronizerObserver>& callback_object) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
RequestContext* request = new RequestContext(
callback_object, sequence_number);
@@ -102,7 +102,7 @@ class TrackingSynchronizer::RequestContext {
// Find the |RequestContext| in |outstanding_requests_| map for the given
// |sequence_number|.
static RequestContext* GetRequestContext(int sequence_number) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
RequestContextMap::iterator it =
outstanding_requests_.Get().find(sequence_number);
@@ -118,7 +118,7 @@ class TrackingSynchronizer::RequestContext {
// |outstanding_requests_| map. This method is called when all changes have
// been acquired, or when the wait time expires (whichever is sooner).
static void Unregister(int sequence_number) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
RequestContextMap::iterator it =
outstanding_requests_.Get().find(sequence_number);
@@ -198,7 +198,7 @@ TrackingSynchronizer::~TrackingSynchronizer() {
// static
void TrackingSynchronizer::FetchProfilerDataAsynchronously(
const base::WeakPtr<TrackingSynchronizerObserver>& callback_object) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
if (!g_tracking_synchronizer) {
// System teardown is happening.
@@ -219,7 +219,7 @@ void TrackingSynchronizer::FetchProfilerDataAsynchronously(
void TrackingSynchronizer::OnPendingProcesses(int sequence_number,
int pending_processes,
bool end) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
RequestContext* request = RequestContext::GetRequestContext(sequence_number);
if (!request)
@@ -233,14 +233,14 @@ void TrackingSynchronizer::OnProfilerDataCollected(
int sequence_number,
const tracked_objects::ProcessDataSnapshot& profiler_data,
int process_type) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
DecrementPendingProcessesAndSendData(sequence_number, profiler_data,
process_type);
}
int TrackingSynchronizer::RegisterAndNotifyAllProcesses(
const base::WeakPtr<TrackingSynchronizerObserver>& callback_object) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
int sequence_number = GetNextAvailableSequenceNumber();
@@ -266,7 +266,7 @@ void TrackingSynchronizer::DecrementPendingProcessesAndSendData(
int sequence_number,
const tracked_objects::ProcessDataSnapshot& profiler_data,
int process_type) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
RequestContext* request = RequestContext::GetRequestContext(sequence_number);
if (!request)
@@ -283,7 +283,7 @@ void TrackingSynchronizer::DecrementPendingProcessesAndSendData(
}
int TrackingSynchronizer::GetNextAvailableSequenceNumber() {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
++last_used_sequence_number_;
diff --git a/components/nacl/browser/nacl_file_host.cc b/components/nacl/browser/nacl_file_host.cc
index 2410e11..f384910 100644
--- a/components/nacl/browser/nacl_file_host.cc
+++ b/components/nacl/browser/nacl_file_host.cc
@@ -49,7 +49,7 @@ void DoRegisterOpenedNaClExecutableFile(
IPC::Message* reply_msg,
WriteFileInfoReply write_reply_message) {
// IO thread owns the NaClBrowser singleton.
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
+ DCHECK_CURRENTLY_ON(BrowserThread::IO);
nacl::NaClBrowser* nacl_browser = nacl::NaClBrowser::GetInstance();
uint64 file_token_lo = 0;
diff --git a/components/nacl/browser/pnacl_host.cc b/components/nacl/browser/pnacl_host.cc
index 2069385..bae7e97d 100644
--- a/components/nacl/browser/pnacl_host.cc
+++ b/components/nacl/browser/pnacl_host.cc
@@ -147,7 +147,7 @@ void PnaclHost::OnCacheInitialized(int net_error) {
void PnaclHost::Init() {
// Extra check that we're on the real IO thread since this version of
// Init isn't used in unit tests.
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
+ DCHECK_CURRENTLY_ON(BrowserThread::IO);
DCHECK(thread_checker_.CalledOnValidThread());
base::FilePath cache_path(GetCachePath());
if (cache_path.empty() || cache_state_ != CacheUninitialized)
diff --git a/components/navigation_interception/intercept_navigation_delegate.cc b/components/navigation_interception/intercept_navigation_delegate.cc
index aec92e7..7de30a5 100644
--- a/components/navigation_interception/intercept_navigation_delegate.cc
+++ b/components/navigation_interception/intercept_navigation_delegate.cc
@@ -32,7 +32,7 @@ const void* kInterceptNavigationDelegateUserDataKey =
bool CheckIfShouldIgnoreNavigationOnUIThread(WebContents* source,
const NavigationParams& params) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
DCHECK(source);
InterceptNavigationDelegate* intercept_navigation_delegate =
diff --git a/components/navigation_interception/intercept_navigation_resource_throttle.cc b/components/navigation_interception/intercept_navigation_resource_throttle.cc
index 675c060..05741e6 100644
--- a/components/navigation_interception/intercept_navigation_resource_throttle.cc
+++ b/components/navigation_interception/intercept_navigation_resource_throttle.cc
@@ -73,7 +73,7 @@ InterceptNavigationResourceThrottle::InterceptNavigationResourceThrottle(
}
InterceptNavigationResourceThrottle::~InterceptNavigationResourceThrottle() {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
+ DCHECK_CURRENTLY_ON(BrowserThread::IO);
}
void InterceptNavigationResourceThrottle::WillStartRequest(bool* defer) {
@@ -134,7 +134,7 @@ bool InterceptNavigationResourceThrottle::CheckIfShouldIgnoreNavigation(
void InterceptNavigationResourceThrottle::OnResultObtained(
bool should_ignore_navigation) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
+ DCHECK_CURRENTLY_ON(BrowserThread::IO);
if (should_ignore_navigation) {
controller()->CancelAndIgnore();
diff --git a/components/precache/content/precache_manager.cc b/components/precache/content/precache_manager.cc
index 62cf590..08f9cb8 100644
--- a/components/precache/content/precache_manager.cc
+++ b/components/precache/content/precache_manager.cc
@@ -55,7 +55,7 @@ bool PrecacheManager::IsPrecachingEnabled() {
}
bool PrecacheManager::IsPrecachingAllowed() {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
return user_prefs::UserPrefs::Get(browser_context_)->GetBoolean(
data_reduction_proxy::prefs::kDataReductionProxyEnabled);
}
@@ -63,7 +63,7 @@ bool PrecacheManager::IsPrecachingAllowed() {
void PrecacheManager::StartPrecaching(
const PrecacheCompletionCallback& precache_completion_callback,
URLListProvider* url_list_provider) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
if (is_precaching_) {
DLOG(WARNING) << "Cannot start precaching because precaching is already "
@@ -84,7 +84,7 @@ void PrecacheManager::StartPrecaching(
}
void PrecacheManager::CancelPrecaching() {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
if (!is_precaching_) {
// Do nothing if precaching is not in progress.
@@ -100,7 +100,7 @@ void PrecacheManager::CancelPrecaching() {
}
bool PrecacheManager::IsPrecaching() const {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
return is_precaching_;
}
@@ -108,7 +108,7 @@ void PrecacheManager::RecordStatsForFetch(const GURL& url,
const base::Time& fetch_time,
int64 size,
bool was_cached) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
if (size == 0 || url.is_empty() || !url.SchemeIsHTTPOrHTTPS()) {
// Ignore empty responses, empty URLs, or URLs that aren't HTTP or HTTPS.
@@ -142,7 +142,7 @@ void PrecacheManager::Shutdown() {
}
void PrecacheManager::OnDone() {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
// If OnDone has been called, then we should just be finishing precaching.
DCHECK(is_precaching_);
@@ -156,7 +156,7 @@ void PrecacheManager::OnDone() {
}
void PrecacheManager::OnURLsReceived(const std::list<GURL>& urls) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
if (!is_precaching_) {
// Don't start precaching if it was canceled while waiting for the list of
diff --git a/components/storage_monitor/media_storage_util.cc b/components/storage_monitor/media_storage_util.cc
index 11cfe5e..8a39d5b 100644
--- a/components/storage_monitor/media_storage_util.cc
+++ b/components/storage_monitor/media_storage_util.cc
@@ -55,7 +55,7 @@ base::FilePath::StringType FindRemovableStorageLocationById(
}
void FilterAttachedDevicesOnFileThread(MediaStorageUtil::DeviceIdSet* devices) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
+ DCHECK_CURRENTLY_ON(BrowserThread::FILE);
MediaStorageUtil::DeviceIdSet missing_devices;
for (MediaStorageUtil::DeviceIdSet::const_iterator it = devices->begin();
diff --git a/components/storage_monitor/storage_monitor_chromeos.cc b/components/storage_monitor/storage_monitor_chromeos.cc
index a584f67..92e7cfd 100644
--- a/components/storage_monitor/storage_monitor_chromeos.cc
+++ b/components/storage_monitor/storage_monitor_chromeos.cc
@@ -115,7 +115,7 @@ void StorageMonitorCros::Init() {
}
void StorageMonitorCros::CheckExistingMountPoints() {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
const DiskMountManager::MountPointMap& mount_point_map =
DiskMountManager::GetInstance()->mount_points();
for (DiskMountManager::MountPointMap::const_iterator it =
@@ -148,7 +148,7 @@ void StorageMonitorCros::OnMountEvent(
DiskMountManager::MountEvent event,
chromeos::MountError error_code,
const DiskMountManager::MountPointInfo& mount_info) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
// Ignore mount points that are not devices.
if (mount_info.mount_type != chromeos::MOUNT_TYPE_DEVICE)
@@ -277,7 +277,7 @@ StorageMonitorCros::media_transfer_protocol_manager() {
void StorageMonitorCros::AddMountedPath(
const DiskMountManager::MountPointInfo& mount_info,
bool has_dcim) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
if (ContainsKey(mount_map_, mount_info.mount_path)) {
// CheckExistingMountPointsOnUIThread() added the mount point information
diff --git a/components/storage_monitor/storage_monitor_linux.cc b/components/storage_monitor/storage_monitor_linux.cc
index b1068e4..4363049 100644
--- a/components/storage_monitor/storage_monitor_linux.cc
+++ b/components/storage_monitor/storage_monitor_linux.cc
@@ -119,7 +119,7 @@ uint64 GetDeviceStorageSize(const base::FilePath& device_path,
// Gets the device information using udev library.
scoped_ptr<StorageInfo> GetDeviceInfo(const base::FilePath& device_path,
const base::FilePath& mount_point) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
+ DCHECK_CURRENTLY_ON(BrowserThread::FILE);
DCHECK(!device_path.empty());
scoped_ptr<StorageInfo> storage_info;
@@ -198,7 +198,7 @@ scoped_ptr<StorageInfo> GetDeviceInfo(const base::FilePath& device_path,
MtabWatcherLinux* CreateMtabWatcherLinuxOnFileThread(
const base::FilePath& mtab_path,
base::WeakPtr<MtabWatcherLinux::Delegate> delegate) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
+ DCHECK_CURRENTLY_ON(BrowserThread::FILE);
// Owned by caller.
return new MtabWatcherLinux(mtab_path, delegate);
}
@@ -206,7 +206,7 @@ MtabWatcherLinux* CreateMtabWatcherLinuxOnFileThread(
StorageMonitor::EjectStatus EjectPathOnFileThread(
const base::FilePath& path,
const base::FilePath& device) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
+ DCHECK_CURRENTLY_ON(BrowserThread::FILE);
// Note: Linux LSB says umount should exist in /bin.
static const char kUmountBinary[] = "/bin/umount";
@@ -244,11 +244,11 @@ StorageMonitorLinux::StorageMonitorLinux(const base::FilePath& path)
: mtab_path_(path),
get_device_info_callback_(base::Bind(&GetDeviceInfo)),
weak_ptr_factory_(this) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
}
StorageMonitorLinux::~StorageMonitorLinux() {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
}
void StorageMonitorLinux::Init() {
@@ -278,7 +278,7 @@ bool StorageMonitorLinux::GetStorageInfoForPath(
const base::FilePath& path,
StorageInfo* device_info) const {
DCHECK(device_info);
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
// TODO(thestig) |media_transfer_protocol_device_observer_| should always be
// valid.
@@ -359,12 +359,12 @@ void StorageMonitorLinux::EjectDevice(
}
void StorageMonitorLinux::OnMtabWatcherCreated(MtabWatcherLinux* watcher) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
mtab_watcher_.reset(watcher);
}
void StorageMonitorLinux::UpdateMtab(const MountPointDeviceMap& new_mtab) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
// Check existing mtab entries for unaccounted mount points.
// These mount points must have been removed in the new mtab.
@@ -465,14 +465,14 @@ void StorageMonitorLinux::UpdateMtab(const MountPointDeviceMap& new_mtab) {
bool StorageMonitorLinux::IsDeviceAlreadyMounted(
const base::FilePath& mount_device) const {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
return ContainsKey(mount_priority_map_, mount_device);
}
void StorageMonitorLinux::HandleDeviceMountedMultipleTimes(
const base::FilePath& mount_device,
const base::FilePath& mount_point) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
MountPriorityMap::iterator priority = mount_priority_map_.find(mount_device);
DCHECK(priority != mount_priority_map_.end());
@@ -484,7 +484,7 @@ void StorageMonitorLinux::HandleDeviceMountedMultipleTimes(
void StorageMonitorLinux::AddNewMount(const base::FilePath& mount_device,
scoped_ptr<StorageInfo> storage_info) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
if (!storage_info)
return;
diff --git a/components/storage_monitor/volume_mount_watcher_win.cc b/components/storage_monitor/volume_mount_watcher_win.cc
index 6a89e1a..bdc7634 100644
--- a/components/storage_monitor/volume_mount_watcher_win.cc
+++ b/components/storage_monitor/volume_mount_watcher_win.cc
@@ -351,7 +351,7 @@ base::FilePath VolumeMountWatcherWin::DriveNumberToFilePath(int drive_number) {
// c) Retrieve metadata on the volumes and then
// d) Notify that metadata to listeners.
void VolumeMountWatcherWin::Init() {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
// When VolumeMountWatcherWin is created, the message pumps are not running
// so a posted task from the constructor would never run. Therefore, do all
@@ -364,7 +364,7 @@ void VolumeMountWatcherWin::Init() {
void VolumeMountWatcherWin::AddDevicesOnUIThread(
std::vector<base::FilePath> removable_devices) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
for (size_t i = 0; i < removable_devices.size(); i++) {
if (ContainsKey(pending_device_checks_, removable_devices[i]))
@@ -400,7 +400,7 @@ void VolumeMountWatcherWin::RetrieveInfoForDeviceAndAdd(
void VolumeMountWatcherWin::DeviceCheckComplete(
const base::FilePath& device_path) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
pending_device_checks_.erase(device_path);
if (pending_device_checks_.size() == 0) {
@@ -421,7 +421,7 @@ VolumeMountWatcherWin::GetDeviceDetailsCallbackType
bool VolumeMountWatcherWin::GetDeviceInfo(const base::FilePath& device_path,
StorageInfo* info) const {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
DCHECK(info);
base::FilePath path(device_path);
MountPointDeviceMetadataMap::const_iterator iter =
@@ -439,7 +439,7 @@ bool VolumeMountWatcherWin::GetDeviceInfo(const base::FilePath& device_path,
}
void VolumeMountWatcherWin::OnWindowMessage(UINT event_type, LPARAM data) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
switch (event_type) {
case DBT_DEVICEARRIVAL: {
if (IsLogicalVolumeStructure(data)) {
@@ -504,7 +504,7 @@ VolumeMountWatcherWin::~VolumeMountWatcherWin() {
void VolumeMountWatcherWin::HandleDeviceAttachEventOnUIThread(
const base::FilePath& device_path,
const StorageInfo& info) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
device_metadata_[device_path] = info;
@@ -516,7 +516,7 @@ void VolumeMountWatcherWin::HandleDeviceAttachEventOnUIThread(
void VolumeMountWatcherWin::HandleDeviceDetachEventOnUIThread(
const base::string16& device_location) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
MountPointDeviceMetadataMap::const_iterator device_info =
device_metadata_.find(base::FilePath(device_location));
@@ -532,7 +532,7 @@ void VolumeMountWatcherWin::HandleDeviceDetachEventOnUIThread(
void VolumeMountWatcherWin::EjectDevice(
const std::string& device_id,
base::Callback<void(StorageMonitor::EjectStatus)> callback) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
base::FilePath device = MediaStorageUtil::FindDevicePathById(device_id);
if (device.empty()) {
callback.Run(StorageMonitor::EJECT_FAILURE);
diff --git a/components/wallpaper/wallpaper_manager_base.cc b/components/wallpaper/wallpaper_manager_base.cc
index e40ea56..3e0b014 100644
--- a/components/wallpaper/wallpaper_manager_base.cc
+++ b/components/wallpaper/wallpaper_manager_base.cc
@@ -344,7 +344,7 @@ void WallpaperManagerBase::ClearDisposableWallpaperCache() {
}
bool WallpaperManagerBase::GetLoggedInUserWallpaperInfo(WallpaperInfo* info) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
if (user_manager::UserManager::Get()->IsLoggedInAsStub()) {
info->location = current_user_wallpaper_info_.location = "";
@@ -683,7 +683,7 @@ void WallpaperManagerBase::NotifyAnimationFinished() {
bool WallpaperManagerBase::GetWallpaperFromCache(const std::string& user_id,
gfx::ImageSkia* image) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
CustomWallpaperMap::const_iterator it = wallpaper_cache_.find(user_id);
if (it != wallpaper_cache_.end() && !(*it).second.second.isNull()) {
*image = (*it).second.second;
@@ -694,7 +694,7 @@ bool WallpaperManagerBase::GetWallpaperFromCache(const std::string& user_id,
bool WallpaperManagerBase::GetPathFromCache(const std::string& user_id,
base::FilePath* path) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
CustomWallpaperMap::const_iterator it = wallpaper_cache_.find(user_id);
if (it != wallpaper_cache_.end()) {
*path = (*it).second.first;
@@ -709,7 +709,7 @@ int WallpaperManagerBase::loaded_wallpapers_for_test() const {
void WallpaperManagerBase::CacheUsersWallpapers() {
// TODO(dpolukhin): crbug.com/408734.
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
user_manager::UserList users = user_manager::UserManager::Get()->GetUsers();
if (!users.empty()) {
@@ -943,7 +943,7 @@ void WallpaperManagerBase::OnCustomizedDefaultWallpaperDecoded(
const GURL& wallpaper_url,
scoped_ptr<CustomizedWallpaperRescaledFiles> rescaled_files,
const user_manager::UserImage& wallpaper) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
// If decoded wallpaper is empty, we have probably failed to decode the file.
if (wallpaper.image().isNull()) {