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

Side by Side Diff: net/dns/mdns_client.h

Issue 17922002: Add an explicit way of forcing the MDnsClient to listen on the network (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 5 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
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 #ifndef NET_DNS_MDNS_CLIENT_H_ 5 #ifndef NET_DNS_MDNS_CLIENT_H_
6 #define NET_DNS_MDNS_CLIENT_H_ 6 #define NET_DNS_MDNS_CLIENT_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 137
138 // Create a transaction that can be used to query either the MDns cache, the 138 // Create a transaction that can be used to query either the MDns cache, the
139 // network, or both for records of type |rrtype| and name |name|. |flags| is 139 // network, or both for records of type |rrtype| and name |name|. |flags| is
140 // defined by MDnsTransactionFlags. 140 // defined by MDnsTransactionFlags.
141 virtual scoped_ptr<MDnsTransaction> CreateTransaction( 141 virtual scoped_ptr<MDnsTransaction> CreateTransaction(
142 uint16 rrtype, 142 uint16 rrtype,
143 const std::string& name, 143 const std::string& name,
144 int flags, 144 int flags,
145 const MDnsTransaction::ResultCallback& callback) = 0; 145 const MDnsTransaction::ResultCallback& callback) = 0;
146 146
147 virtual bool StartListening() = 0;
148 virtual void StopListening() = 0;
szym 2013/07/02 17:27:56 Is it safe to call this from callbacks?
Noam Samuel 2013/07/02 18:08:22 No, though I think in this case it makes sense to
149 virtual bool GetListening() const = 0;
gene 2013/07/02 03:39:16 IsListening() ?
szym 2013/07/02 17:27:56 I concur it should be IsListening.
Noam Samuel 2013/07/02 18:08:22 Done.
150
147 // Lazily create and return static instance for MDnsClient. 151 // Lazily create and return static instance for MDnsClient.
148 static MDnsClient* GetInstance(); 152 static MDnsClient* GetInstance();
149 153
150 // Set the global instance (for testing). MUST be called before the first call 154 // Set the global instance (for testing). MUST be called before the first call
151 // to GetInstance. 155 // to GetInstance.
152 static void SetInstance(MDnsClient* instance); 156 static void SetInstance(MDnsClient* instance);
153 }; 157 };
154 158
155 } // namespace net 159 } // namespace net
156 #endif // NET_DNS_MDNS_CLIENT_H_ 160 #endif // NET_DNS_MDNS_CLIENT_H_
OLDNEW
« no previous file with comments | « chrome/browser/local_discovery/service_discovery_client_unittest.cc ('k') | net/dns/mdns_client_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698