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

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

Issue 1349783006: Cleanup: Pass std::string as const reference if possible (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Revert third_party changes Created 5 years, 3 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_IMPL_H_ 5 #ifndef NET_DNS_MDNS_CLIENT_IMPL_H_
6 #define NET_DNS_MDNS_CLIENT_IMPL_H_ 6 #define NET_DNS_MDNS_CLIENT_IMPL_H_
7 7
8 #include <map> 8 #include <map>
9 #include <queue> 9 #include <queue>
10 #include <string> 10 #include <string>
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 // invalidate the core. 115 // invalidate the core.
116 class Core : public base::SupportsWeakPtr<Core>, MDnsConnection::Delegate { 116 class Core : public base::SupportsWeakPtr<Core>, MDnsConnection::Delegate {
117 public: 117 public:
118 Core(base::Clock* clock, base::Timer* timer); 118 Core(base::Clock* clock, base::Timer* timer);
119 ~Core() override; 119 ~Core() override;
120 120
121 // Initialize the core. Returns true on success. 121 // Initialize the core. Returns true on success.
122 bool Init(MDnsSocketFactory* socket_factory); 122 bool Init(MDnsSocketFactory* socket_factory);
123 123
124 // Send a query with a specific rrtype and name. Returns true on success. 124 // Send a query with a specific rrtype and name. Returns true on success.
125 bool SendQuery(uint16 rrtype, std::string name); 125 bool SendQuery(uint16 rrtype, const std::string& name);
126 126
127 // Add/remove a listener to the list of listeners. 127 // Add/remove a listener to the list of listeners.
128 void AddListener(MDnsListenerImpl* listener); 128 void AddListener(MDnsListenerImpl* listener);
129 void RemoveListener(MDnsListenerImpl* listener); 129 void RemoveListener(MDnsListenerImpl* listener);
130 130
131 // Query the cache for records of a specific type and name. 131 // Query the cache for records of a specific type and name.
132 void QueryCache(uint16 rrtype, const std::string& name, 132 void QueryCache(uint16 rrtype, const std::string& name,
133 std::vector<const RecordParsed*>* records) const; 133 std::vector<const RecordParsed*>* records) const;
134 134
135 // Parse the response and alert relevant listeners. 135 // Parse the response and alert relevant listeners.
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
318 MDnsClientImpl* client_; 318 MDnsClientImpl* client_;
319 319
320 bool started_; 320 bool started_;
321 int flags_; 321 int flags_;
322 322
323 DISALLOW_COPY_AND_ASSIGN(MDnsTransactionImpl); 323 DISALLOW_COPY_AND_ASSIGN(MDnsTransactionImpl);
324 }; 324 };
325 325
326 } // namespace net 326 } // namespace net
327 #endif // NET_DNS_MDNS_CLIENT_IMPL_H_ 327 #endif // NET_DNS_MDNS_CLIENT_IMPL_H_
OLDNEW
« no previous file with comments | « net/cookies/cookie_monster_unittest.cc ('k') | net/dns/mdns_client_impl.cc » ('j') | url/gurl.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698