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

Unified Diff: content/browser/geolocation/geolocation_provider_impl.cc

Issue 1000373002: favor DCHECK_CURRENTLY_ON for better logs in content/browser/[f-p]* (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase on master 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: content/browser/geolocation/geolocation_provider_impl.cc
diff --git a/content/browser/geolocation/geolocation_provider_impl.cc b/content/browser/geolocation/geolocation_provider_impl.cc
index 626a52afa4fb7353a4ec70ca14f9e983cfb86700..7375d57866531634fc5c2dbf9af427fbbcde5f44 100644
--- a/content/browser/geolocation/geolocation_provider_impl.cc
+++ b/content/browser/geolocation/geolocation_provider_impl.cc
@@ -23,7 +23,7 @@ GeolocationProvider* GeolocationProvider::GetInstance() {
scoped_ptr<GeolocationProvider::Subscription>
GeolocationProviderImpl::AddLocationUpdateCallback(
const LocationUpdateCallback& callback, bool use_high_accuracy) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
scoped_ptr<GeolocationProvider::Subscription> subscription;
if (use_high_accuracy) {
subscription = high_accuracy_callbacks_.Add(callback);
@@ -41,7 +41,7 @@ GeolocationProviderImpl::AddLocationUpdateCallback(
}
void GeolocationProviderImpl::UserDidOptIntoLocationServices() {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
bool was_permission_granted = user_did_opt_into_location_services_;
user_did_opt_into_location_services_ = true;
if (IsRunning() && !was_permission_granted)
@@ -50,7 +50,7 @@ void GeolocationProviderImpl::UserDidOptIntoLocationServices() {
void GeolocationProviderImpl::OverrideLocationForTesting(
const Geoposition& position) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
ignore_location_updates_ = true;
NotifyClients(position);
}
@@ -67,7 +67,7 @@ void GeolocationProviderImpl::OnLocationUpdate(const Geoposition& position) {
}
GeolocationProviderImpl* GeolocationProviderImpl::GetInstance() {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
return Singleton<GeolocationProviderImpl>::get();
}
@@ -76,7 +76,7 @@ GeolocationProviderImpl::GeolocationProviderImpl()
user_did_opt_into_location_services_(false),
ignore_location_updates_(false),
arbitrator_(NULL) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
high_accuracy_callbacks_.set_removal_callback(
base::Bind(&GeolocationProviderImpl::OnClientsChanged,
base::Unretained(this)));
@@ -95,7 +95,7 @@ bool GeolocationProviderImpl::OnGeolocationThread() const {
}
void GeolocationProviderImpl::OnClientsChanged() {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
base::Closure task;
if (high_accuracy_callbacks_.empty() && low_accuracy_callbacks_.empty()) {
DCHECK(IsRunning());
@@ -151,7 +151,7 @@ void GeolocationProviderImpl::InformProvidersPermissionGranted() {
}
void GeolocationProviderImpl::NotifyClients(const Geoposition& position) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
DCHECK(position.Validate() ||
position.error_code != Geoposition::ERROR_CODE_NONE);
position_ = position;
« no previous file with comments | « content/browser/frame_host/render_frame_proxy_host.cc ('k') | content/browser/gpu/browser_gpu_channel_host_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698