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

Side by Side Diff: dbus/object_proxy.cc

Issue 2837943004: dbus: Stop collecting DBus.RejectedSignalCount histogram (Closed)
Patch Set: Created 3 years, 8 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 | dbus/signal_sender_verification_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "dbus/object_proxy.h" 5 #include "dbus/object_proxy.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 485 matching lines...) Expand 10 before | Expand all | Expand 10 after
496 MethodTable::const_iterator iter = method_table_.find(absolute_signal_name); 496 MethodTable::const_iterator iter = method_table_.find(absolute_signal_name);
497 if (iter == method_table_.end()) { 497 if (iter == method_table_.end()) {
498 // Don't know about the signal. 498 // Don't know about the signal.
499 return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; 499 return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
500 } 500 }
501 VLOG(1) << "Signal received: " << signal->ToString(); 501 VLOG(1) << "Signal received: " << signal->ToString();
502 502
503 std::string sender = signal->GetSender(); 503 std::string sender = signal->GetSender();
504 if (service_name_owner_ != sender) { 504 if (service_name_owner_ != sender) {
505 LOG(ERROR) << "Rejecting a message from a wrong sender."; 505 LOG(ERROR) << "Rejecting a message from a wrong sender.";
506 UMA_HISTOGRAM_COUNTS("DBus.RejectedSignalCount", 1);
507 return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; 506 return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
508 } 507 }
509 508
510 const base::TimeTicks start_time = base::TimeTicks::Now(); 509 const base::TimeTicks start_time = base::TimeTicks::Now();
511 if (bus_->HasDBusThread()) { 510 if (bus_->HasDBusThread()) {
512 // Post a task to run the method in the origin thread. 511 // Post a task to run the method in the origin thread.
513 // Transfer the ownership of |signal| to RunMethod(). 512 // Transfer the ownership of |signal| to RunMethod().
514 // |released_signal| will be deleted in RunMethod(). 513 // |released_signal| will be deleted in RunMethod().
515 Signal* released_signal = signal.release(); 514 Signal* released_signal = signal.release();
516 bus_->GetOriginTaskRunner()->PostTask(FROM_HERE, 515 bus_->GetOriginTaskRunner()->PostTask(FROM_HERE,
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
708 bool service_is_available) { 707 bool service_is_available) {
709 bus_->AssertOnOriginThread(); 708 bus_->AssertOnOriginThread();
710 709
711 std::vector<WaitForServiceToBeAvailableCallback> callbacks; 710 std::vector<WaitForServiceToBeAvailableCallback> callbacks;
712 callbacks.swap(wait_for_service_to_be_available_callbacks_); 711 callbacks.swap(wait_for_service_to_be_available_callbacks_);
713 for (size_t i = 0; i < callbacks.size(); ++i) 712 for (size_t i = 0; i < callbacks.size(); ++i)
714 callbacks[i].Run(service_is_available); 713 callbacks[i].Run(service_is_available);
715 } 714 }
716 715
717 } // namespace dbus 716 } // namespace dbus
OLDNEW
« no previous file with comments | « no previous file | dbus/signal_sender_verification_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698