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

Unified Diff: chrome/browser/local_discovery/service_discovery_client_mac.h

Issue 1127553002: [chrome/browser/local_discovery] Replace MessageLoopProxy usage with ThreadTaskRunnerHandle (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed Build break : Dependency in components/wifi classes Created 5 years, 7 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: chrome/browser/local_discovery/service_discovery_client_mac.h
diff --git a/chrome/browser/local_discovery/service_discovery_client_mac.h b/chrome/browser/local_discovery/service_discovery_client_mac.h
index 17f19cf58eeec48ef9483985aa034760ace17667..28dd8b6f5e98f05be38283ec15ece8d4c4ea145d 100644
--- a/chrome/browser/local_discovery/service_discovery_client_mac.h
+++ b/chrome/browser/local_discovery/service_discovery_client_mac.h
@@ -9,6 +9,8 @@
#include "base/mac/scoped_nsobject.h"
#include "base/memory/weak_ptr.h"
+#include "base/single_thread_task_runner.h"
+#include "base/thread_task_runner_handle.h"
#include "chrome/browser/local_discovery/service_discovery_shared_client.h"
#include "content/public/browser/browser_thread.h"
@@ -60,7 +62,7 @@ class ServiceWatcherImplMac : public ServiceWatcher {
NetServiceBrowserContainer(
const std::string& service_type,
const ServiceWatcher::UpdatedCallback& callback,
- scoped_refptr<base::MessageLoopProxy> service_discovery_runner);
+ scoped_refptr<base::SingleThreadTaskRunner> service_discovery_runner);
~NetServiceBrowserContainer();
void Start();
@@ -76,15 +78,15 @@ class ServiceWatcherImplMac : public ServiceWatcher {
void DiscoverOnDiscoveryThread();
bool IsOnServiceDiscoveryThread() {
- return base::MessageLoopProxy::current() ==
+ return base::ThreadTaskRunnerHandle::Get() ==
service_discovery_runner_.get();
}
std::string service_type_;
ServiceWatcher::UpdatedCallback callback_;
- scoped_refptr<base::MessageLoopProxy> callback_runner_;
- scoped_refptr<base::MessageLoopProxy> service_discovery_runner_;
+ scoped_refptr<base::SingleThreadTaskRunner> callback_runner_;
+ scoped_refptr<base::SingleThreadTaskRunner> service_discovery_runner_;
base::scoped_nsobject<id> delegate_;
base::scoped_nsobject<NSNetServiceBrowser> browser_;
@@ -94,7 +96,7 @@ class ServiceWatcherImplMac : public ServiceWatcher {
ServiceWatcherImplMac(
const std::string& service_type,
const ServiceWatcher::UpdatedCallback& callback,
- scoped_refptr<base::MessageLoopProxy> service_discovery_runner);
+ scoped_refptr<base::SingleThreadTaskRunner> service_discovery_runner);
void OnServicesUpdate(ServiceWatcher::UpdateType update,
const std::string& service);
@@ -126,7 +128,7 @@ class ServiceResolverImplMac : public ServiceResolver {
NetServiceContainer(
const std::string& service_name,
const ServiceResolver::ResolveCompleteCallback& callback,
- scoped_refptr<base::MessageLoopProxy> service_discovery_runner);
+ scoped_refptr<base::SingleThreadTaskRunner> service_discovery_runner);
virtual ~NetServiceContainer();
@@ -142,15 +144,15 @@ class ServiceResolverImplMac : public ServiceResolver {
void StartResolvingOnDiscoveryThread();
bool IsOnServiceDiscoveryThread() {
- return base::MessageLoopProxy::current() ==
+ return base::ThreadTaskRunnerHandle::Get() ==
service_discovery_runner_.get();
}
const std::string service_name_;
ServiceResolver::ResolveCompleteCallback callback_;
- scoped_refptr<base::MessageLoopProxy> callback_runner_;
- scoped_refptr<base::MessageLoopProxy> service_discovery_runner_;
+ scoped_refptr<base::SingleThreadTaskRunner> callback_runner_;
+ scoped_refptr<base::SingleThreadTaskRunner> service_discovery_runner_;
base::scoped_nsobject<id> delegate_;
base::scoped_nsobject<NSNetService> service_;
@@ -161,7 +163,7 @@ class ServiceResolverImplMac : public ServiceResolver {
ServiceResolverImplMac(
const std::string& service_name,
const ServiceResolver::ResolveCompleteCallback& callback,
- scoped_refptr<base::MessageLoopProxy> service_discovery_runner);
+ scoped_refptr<base::SingleThreadTaskRunner> service_discovery_runner);
// Testing methods.
NetServiceContainer* GetContainerForTesting();

Powered by Google App Engine
This is Rietveld 408576698