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

Unified Diff: content/browser/geolocation/core_location_provider_mac.mm

Issue 10316007: Make the Geoposition helper class public (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Fix forward-declaration of struct as class. Created 8 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
Index: content/browser/geolocation/core_location_provider_mac.mm
diff --git a/content/browser/geolocation/core_location_provider_mac.mm b/content/browser/geolocation/core_location_provider_mac.mm
index 826a42f36fb533431db847557f01fd085237f011..fa6fe1fd95539b126ba4ca09a5ed202ee90e93e4 100644
--- a/content/browser/geolocation/core_location_provider_mac.mm
+++ b/content/browser/geolocation/core_location_provider_mac.mm
@@ -36,17 +36,18 @@ void CoreLocationProviderMac::StopProvider() {
is_updating_ = false;
}
-void CoreLocationProviderMac::GetPosition(Geoposition* position) {
+void CoreLocationProviderMac::GetPosition(content::Geoposition* position) {
DCHECK(position);
*position = position_;
- DCHECK(position->IsInitialized());
+ DCHECK(position->Validate() ||
+ position->error_code != content::Geoposition::ERROR_CODE_NONE);
}
-void CoreLocationProviderMac::SetPosition(Geoposition* position) {
+void CoreLocationProviderMac::SetPosition(content::Geoposition* position) {
DCHECK(position);
position_ = *position;
- DCHECK(position->IsInitialized());
-
+ DCHECK(position->Validate() ||
+ position->error_code != content::Geoposition::ERROR_CODE_NONE);
UpdateListeners();
}
« no previous file with comments | « content/browser/geolocation/core_location_provider_mac.h ('k') | content/browser/geolocation/geolocation.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698