| 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 {
|
|
|