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

Unified Diff: chrome/browser/local_discovery/privet_http_asynchronous_factory_mac.cc

Issue 195983023: Enable devices page UI on MacOSX (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@fix_dcheck
Patch Set: Created 6 years, 9 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/privet_http_asynchronous_factory_mac.cc
diff --git a/chrome/browser/local_discovery/privet_http_asynchronous_factory_mac.cc b/chrome/browser/local_discovery/privet_http_asynchronous_factory_mac.cc
new file mode 100644
index 0000000000000000000000000000000000000000..c268fe9e8ae3dcc959512009acb82bd5256cb156
--- /dev/null
+++ b/chrome/browser/local_discovery/privet_http_asynchronous_factory_mac.cc
@@ -0,0 +1,47 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "chrome/browser/local_discovery/privet_http_asynchronous_factory_mac.h"
+
+#include "chrome/browser/local_discovery/privet_http_impl.h"
+
+namespace local_discovery {
+
+PrivetHTTPAsynchronousFactoryMac::PrivetHTTPAsynchronousFactoryMac(
+ net::URLRequestContextGetter* request_context)
+ : request_context_(request_context) {}
+
+PrivetHTTPAsynchronousFactoryMac::~PrivetHTTPAsynchronousFactoryMac() {}
+
+scoped_ptr<PrivetHTTPResolution>
+PrivetHTTPAsynchronousFactoryMac::CreatePrivetHTTP(
+ const std::string& name,
+ const net::HostPortPair& address,
+ const ResultCallback& callback) {
+ return scoped_ptr<PrivetHTTPResolution>(
+ new ResolutionMac(request_context_, name, address, callback));
+}
+
+PrivetHTTPAsynchronousFactoryMac::ResolutionMac::ResolutionMac(
+ net::URLRequestContextGetter* request_context,
+ const std::string& name,
+ const net::HostPortPair& host_port,
+ const ResultCallback& callback)
+ : request_context_(request_context),
+ name_(name),
+ host_port_(host_port),
+ callback_(callback) {}
+
+PrivetHTTPAsynchronousFactoryMac::ResolutionMac::~ResolutionMac() {}
+
+void PrivetHTTPAsynchronousFactoryMac::ResolutionMac::Start() {
+ callback_.Run(scoped_ptr<PrivetHTTPClient>(
+ new PrivetHTTPClientImpl(name_, host_port_, request_context_)));
+}
+
+const std::string& PrivetHTTPAsynchronousFactoryMac::ResolutionMac::GetName() {
+ return name_;
+}
+
+} // namespace local_discovery

Powered by Google App Engine
This is Rietveld 408576698