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

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

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/geolocation.cc
diff --git a/content/browser/geolocation/geolocation.cc b/content/browser/geolocation/geolocation.cc
index 789d9a37a94071feb4ec8b8e688cb45b045b0b5c..920ab3130d978aee16f381eea4e4c28fc37ff391 100644
--- a/content/browser/geolocation/geolocation.cc
+++ b/content/browser/geolocation/geolocation.cc
@@ -10,25 +10,17 @@
#include "base/memory/ref_counted.h"
#include "base/message_loop_proxy.h"
#include "content/browser/geolocation/geolocation_provider.h"
-#include "content/common/geoposition.h"
#include "content/public/browser/browser_thread.h"
+#include "content/public/common/geoposition.h"
namespace content {
namespace {
void OverrideLocationForTestingOnIOThread(
- double latitude,
- double longitude,
- double altitude,
+ const Geoposition& position,
const base::Closure& completion_callback,
scoped_refptr<base::MessageLoopProxy> callback_loop) {
- Geoposition position;
- position.latitude = latitude;
- position.longitude = longitude;
- position.altitude = altitude;
- position.accuracy = 0;
- position.timestamp = base::Time::Now();
GeolocationProvider::GetInstance()->OverrideLocationForTesting(position);
callback_loop->PostTask(FROM_HERE, completion_callback);
}
@@ -36,14 +28,12 @@ void OverrideLocationForTestingOnIOThread(
} // namespace
void OverrideLocationForTesting(
- double latitude,
- double longitude,
- double altitude,
+ const Geoposition& position,
const base::Closure& completion_callback) {
- base::Closure closure = base::Bind(
- &OverrideLocationForTestingOnIOThread,
- latitude, longitude, altitude, completion_callback,
- base::MessageLoopProxy::current());
+ base::Closure closure = base::Bind(&OverrideLocationForTestingOnIOThread,
+ position,
+ completion_callback,
+ base::MessageLoopProxy::current());
if (!BrowserThread::CurrentlyOn(BrowserThread::IO)) {
BrowserThread::PostTask(BrowserThread::IO, FROM_HERE, closure);
} else {
« no previous file with comments | « content/browser/geolocation/core_location_provider_mac.mm ('k') | content/browser/geolocation/geolocation_dispatcher_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698