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

Side by Side 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "chrome/browser/local_discovery/privet_http_asynchronous_factory_mac.h"
6
7 #include "chrome/browser/local_discovery/privet_http_impl.h"
8
9 namespace local_discovery {
10
11 PrivetHTTPAsynchronousFactoryMac::PrivetHTTPAsynchronousFactoryMac(
12 net::URLRequestContextGetter* request_context)
13 : request_context_(request_context) {}
14
15 PrivetHTTPAsynchronousFactoryMac::~PrivetHTTPAsynchronousFactoryMac() {}
16
17 scoped_ptr<PrivetHTTPResolution>
18 PrivetHTTPAsynchronousFactoryMac::CreatePrivetHTTP(
19 const std::string& name,
20 const net::HostPortPair& address,
21 const ResultCallback& callback) {
22 return scoped_ptr<PrivetHTTPResolution>(
23 new ResolutionMac(request_context_, name, address, callback));
24 }
25
26 PrivetHTTPAsynchronousFactoryMac::ResolutionMac::ResolutionMac(
27 net::URLRequestContextGetter* request_context,
28 const std::string& name,
29 const net::HostPortPair& host_port,
30 const ResultCallback& callback)
31 : request_context_(request_context),
32 name_(name),
33 host_port_(host_port),
34 callback_(callback) {}
35
36 PrivetHTTPAsynchronousFactoryMac::ResolutionMac::~ResolutionMac() {}
37
38 void PrivetHTTPAsynchronousFactoryMac::ResolutionMac::Start() {
39 callback_.Run(scoped_ptr<PrivetHTTPClient>(
40 new PrivetHTTPClientImpl(name_, host_port_, request_context_)));
41 }
42
43 const std::string& PrivetHTTPAsynchronousFactoryMac::ResolutionMac::GetName() {
44 return name_;
45 }
46
47 } // namespace local_discovery
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698