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

Side by Side Diff: services/service_manager/public/cpp/lib/interface_registry.cc

Issue 2704303007: Service Manager: Reduce InterfaceProvider spec spam to DVLOG(1) (Closed)
Patch Set: Created 3 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 | « no previous file | 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 "services/service_manager/public/cpp/interface_registry.h" 5 #include "services/service_manager/public/cpp/interface_registry.h"
6 6
7 #include <iterator> 7 #include <iterator>
8 #include <sstream> 8 #include <sstream>
9 9
10 #include "base/memory/ptr_util.h" 10 #include "base/memory/ptr_util.h"
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
207 } else if (!default_binder_.is_null()) { 207 } else if (!default_binder_.is_null()) {
208 default_binder_.Run(interface_name, std::move(handle)); 208 default_binder_.Run(interface_name, std::move(handle));
209 } else { 209 } else {
210 LOG(ERROR) << "Failed to locate a binder for interface: " 210 LOG(ERROR) << "Failed to locate a binder for interface: "
211 << interface_name << " requested by: " << remote_identity_.name() 211 << interface_name << " requested by: " << remote_identity_.name()
212 << " exposed by: " << local_identity_.name() 212 << " exposed by: " << local_identity_.name()
213 << " via InterfaceProviderSpec \"" << name_ << "\"."; 213 << " via InterfaceProviderSpec \"" << name_ << "\".";
214 214
215 std::stringstream details; 215 std::stringstream details;
216 Serialize(&details); 216 Serialize(&details);
217 LOG(WARNING) << details.str(); 217 DVLOG(1) << details.str();
218 } 218 }
219 } else { 219 } else {
220 std::stringstream error; 220 std::stringstream error;
221 error << "InterfaceProviderSpec \"" << name_ << "\" prevented service: " 221 error << "InterfaceProviderSpec \"" << name_ << "\" prevented service: "
222 << remote_identity_.name() << " from binding interface: " 222 << remote_identity_.name() << " from binding interface: "
223 << interface_name << " exposed by: " << local_identity_.name(); 223 << interface_name << " exposed by: " << local_identity_.name();
224 mojo::ReportBadMessage(error.str()); 224 mojo::ReportBadMessage(error.str());
225 LOG(ERROR) << error.str(); 225 LOG(ERROR) << error.str();
226 226
227 std::stringstream details; 227 std::stringstream details;
228 Serialize(&details); 228 Serialize(&details);
229 LOG(WARNING) << details.str(); 229 DVLOG(1) << details.str();
230 } 230 }
231 } 231 }
232 232
233 bool InterfaceRegistry::SetInterfaceBinderForName( 233 bool InterfaceRegistry::SetInterfaceBinderForName(
234 std::unique_ptr<InterfaceBinder> binder, 234 std::unique_ptr<InterfaceBinder> binder,
235 const std::string& interface_name) { 235 const std::string& interface_name) {
236 if (CanBindRequestForInterface(interface_name)) { 236 if (CanBindRequestForInterface(interface_name)) {
237 RemoveInterface(interface_name); 237 RemoveInterface(interface_name);
238 name_to_binder_[interface_name] = std::move(binder); 238 name_to_binder_[interface_name] = std::move(binder);
239 return true; 239 return true;
(...skipping 19 matching lines...) Expand all
259 exposed_interfaces_.size() == 1 && exposed_interfaces_.count("*") == 1; 259 exposed_interfaces_.size() == 1 && exposed_interfaces_.count("*") == 1;
260 } 260 }
261 261
262 void InterfaceRegistry::OnConnectionError() { 262 void InterfaceRegistry::OnConnectionError() {
263 std::list<base::Closure> closures = connection_lost_closures_; 263 std::list<base::Closure> closures = connection_lost_closures_;
264 for (const auto& closure : closures) 264 for (const auto& closure : closures)
265 closure.Run(); 265 closure.Run();
266 } 266 }
267 267
268 } // namespace service_manager 268 } // namespace service_manager
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698