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

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

Issue 1159623009: content: Remove use of MessageLoopProxy and deprecated MessageLoop APIs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Test build fix. Created 5 years, 6 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_unittest.cc
diff --git a/content/browser/geolocation/geolocation_provider_impl_unittest.cc b/content/browser/geolocation/geolocation_provider_impl_unittest.cc
index 685818b8279aa8404db55d1a8f317998ec929936..3ba4dae1baa22819d6a26dd59f59e804cef77ac6 100644
--- a/content/browser/geolocation/geolocation_provider_impl_unittest.cc
+++ b/content/browser/geolocation/geolocation_provider_impl_unittest.cc
@@ -4,9 +4,10 @@
#include "base/bind.h"
#include "base/bind_helpers.h"
+#include "base/location.h"
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
-#include "base/message_loop/message_loop.h"
+#include "base/single_thread_task_runner.h"
#include "base/strings/string16.h"
#include "base/time/time.h"
#include "content/browser/geolocation/geolocation_provider_impl.h"
@@ -140,11 +141,9 @@ bool GeolocationProviderTest::ProvidersStarted() {
DCHECK(provider_->IsRunning());
DCHECK(base::MessageLoop::current() == &message_loop_);
bool started;
- provider_->message_loop_proxy()->PostTaskAndReply(
- FROM_HERE,
- base::Bind(&GeolocationProviderTest::GetProvidersStarted,
- base::Unretained(this),
- &started),
+ provider_->task_runner()->PostTaskAndReply(
+ FROM_HERE, base::Bind(&GeolocationProviderTest::GetProvidersStarted,
+ base::Unretained(this), &started),
base::MessageLoop::QuitClosure());
message_loop_.Run();
return started;
@@ -158,11 +157,9 @@ void GeolocationProviderTest::GetProvidersStarted(bool* started) {
void GeolocationProviderTest::SendMockLocation(const Geoposition& position) {
DCHECK(provider_->IsRunning());
DCHECK(base::MessageLoop::current() == &message_loop_);
- provider_->message_loop()
- ->PostTask(FROM_HERE,
- base::Bind(&GeolocationProviderImpl::OnLocationUpdate,
- base::Unretained(provider_.get()),
- position));
+ provider_->task_runner()->PostTask(
+ FROM_HERE, base::Bind(&GeolocationProviderImpl::OnLocationUpdate,
+ base::Unretained(provider_.get()), position));
}
// Regression test for http://crbug.com/59377
« no previous file with comments | « content/browser/geolocation/geolocation_provider_impl.cc ('k') | content/browser/geolocation/location_api_adapter_android.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698