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

Unified Diff: content/browser/geolocation/network_location_provider.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/network_location_provider.cc
diff --git a/content/browser/geolocation/network_location_provider.cc b/content/browser/geolocation/network_location_provider.cc
index 13a6504d006dc1aadebc9d51747a0d6d94db14a7..5db43fa6784175a589ab714861bfd6f9dead7c31 100644
--- a/content/browser/geolocation/network_location_provider.cc
+++ b/content/browser/geolocation/network_location_provider.cc
@@ -5,7 +5,10 @@
#include "content/browser/geolocation/network_location_provider.h"
#include "base/bind.h"
+#include "base/location.h"
+#include "base/single_thread_task_runner.h"
#include "base/strings/utf_string_conversions.h"
+#include "base/thread_task_runner_handle.h"
#include "base/time/time.h"
#include "content/public/browser/access_token_store.h"
@@ -199,10 +202,9 @@ bool NetworkLocationProvider::StartProvider(bool high_accuracy) {
wifi_data_provider_manager_ =
WifiDataProviderManager::Register(&wifi_data_update_callback_);
- base::MessageLoop::current()->PostDelayedTask(
- FROM_HERE,
- base::Bind(&NetworkLocationProvider::RequestPosition,
- weak_factory_.GetWeakPtr()),
+ base::ThreadTaskRunnerHandle::Get()->PostDelayedTask(
+ FROM_HERE, base::Bind(&NetworkLocationProvider::RequestPosition,
+ weak_factory_.GetWeakPtr()),
base::TimeDelta::FromSeconds(kDataCompleteWaitSeconds));
// Get the wifi data.
is_wifi_data_complete_ = wifi_data_provider_manager_->GetData(&wifi_data_);
« no previous file with comments | « content/browser/geolocation/mock_location_provider.cc ('k') | content/browser/geolocation/wifi_data_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698