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

Side by Side Diff: chrome/browser/local_discovery/privet_notifications_unittest.cc

Issue 948283005: Added PrivetHTTPResolution::Start for service name only (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@no_start
Patch Set: Wed Feb 25 15:43:16 PST 2015 Created 5 years, 10 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
« no previous file with comments | « chrome/browser/local_discovery/privet_http_asynchronous_factory_impl.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/local_discovery/privet_http_asynchronous_factory.h" 5 #include "chrome/browser/local_discovery/privet_http_asynchronous_factory.h"
6 6
7 #include "chrome/browser/local_discovery/privet_http_impl.h" 7 #include "chrome/browser/local_discovery/privet_http_impl.h"
8 #include "chrome/browser/local_discovery/privet_notifications.h" 8 #include "chrome/browser/local_discovery/privet_notifications.h"
9 #include "net/url_request/test_url_fetcher_factory.h" 9 #include "net/url_request/test_url_fetcher_factory.h"
10 #include "net/url_request/url_request_test_util.h" 10 #include "net/url_request/url_request_test_util.h"
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 : name_(name), request_context_(request_context) {} 46 : name_(name), request_context_(request_context) {}
47 47
48 ~MockResolution() override {} 48 ~MockResolution() override {}
49 49
50 void Start(const net::HostPortPair& address, 50 void Start(const net::HostPortPair& address,
51 const ResultCallback& callback) override { 51 const ResultCallback& callback) override {
52 callback.Run(scoped_ptr<PrivetHTTPClient>(new PrivetHTTPClientImpl( 52 callback.Run(scoped_ptr<PrivetHTTPClient>(new PrivetHTTPClientImpl(
53 name_, net::HostPortPair("1.2.3.4", 8080), request_context_.get()))); 53 name_, net::HostPortPair("1.2.3.4", 8080), request_context_.get())));
54 } 54 }
55 55
56 void Start(const ResultCallback& callback) override {
57 Start(net::HostPortPair(), callback);
58 }
59
56 const std::string& GetName() override { return name_; } 60 const std::string& GetName() override { return name_; }
57 61
58 private: 62 private:
59 std::string name_; 63 std::string name_;
60 scoped_refptr<net::URLRequestContextGetter> request_context_; 64 scoped_refptr<net::URLRequestContextGetter> request_context_;
61 }; 65 };
62 66
63 explicit MockPrivetHttpFactory(net::URLRequestContextGetter* request_context) 67 explicit MockPrivetHttpFactory(net::URLRequestContextGetter* request_context)
64 : request_context_(request_context) { 68 : request_context_(request_context) {
65 } 69 }
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
203 true, 207 true,
204 kExampleDeviceName, 208 kExampleDeviceName,
205 description_); 209 description_);
206 210
207 SuccessfulResponseToInfo(kInfoResponseNoUptime); 211 SuccessfulResponseToInfo(kInfoResponseNoUptime);
208 } 212 }
209 213
210 } // namespace 214 } // namespace
211 215
212 } // namespace local_discovery 216 } // namespace local_discovery
OLDNEW
« no previous file with comments | « chrome/browser/local_discovery/privet_http_asynchronous_factory_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698