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

Side by Side Diff: ipc/attachment_broker_privileged.cc

Issue 1281103002: Add UMA metrics to log attachment broker errors. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Comments from isherman Created 5 years, 2 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 | « ipc/attachment_broker_privileged.h ('k') | ipc/attachment_broker_privileged_win.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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "ipc/attachment_broker_privileged.h" 5 #include "ipc/attachment_broker_privileged.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/metrics/histogram_macros.h"
9 #include "ipc/ipc_endpoint.h" 10 #include "ipc/ipc_endpoint.h"
10 11
11 namespace IPC { 12 namespace IPC {
12 13
13 AttachmentBrokerPrivileged::AttachmentBrokerPrivileged() {} 14 AttachmentBrokerPrivileged::AttachmentBrokerPrivileged() {}
14 15
15 AttachmentBrokerPrivileged::~AttachmentBrokerPrivileged() {} 16 AttachmentBrokerPrivileged::~AttachmentBrokerPrivileged() {}
16 17
17 void AttachmentBrokerPrivileged::RegisterCommunicationChannel( 18 void AttachmentBrokerPrivileged::RegisterCommunicationChannel(
18 Endpoint* endpoint) { 19 Endpoint* endpoint) {
(...skipping 11 matching lines...) Expand all
30 } 31 }
31 32
32 Sender* AttachmentBrokerPrivileged::GetSenderWithProcessId(base::ProcessId id) { 33 Sender* AttachmentBrokerPrivileged::GetSenderWithProcessId(base::ProcessId id) {
33 auto it = std::find_if(endpoints_.begin(), endpoints_.end(), 34 auto it = std::find_if(endpoints_.begin(), endpoints_.end(),
34 [id](Endpoint* c) { return c->GetPeerPID() == id; }); 35 [id](Endpoint* c) { return c->GetPeerPID() == id; });
35 if (it == endpoints_.end()) 36 if (it == endpoints_.end())
36 return nullptr; 37 return nullptr;
37 return *it; 38 return *it;
38 } 39 }
39 40
41 void AttachmentBrokerPrivileged::LogError(UMAError error) {
42 UMA_HISTOGRAM_ENUMERATION(
43 "IPC.AttachmentBrokerPrivileged.BrokerAttachmentError", error, ERROR_MAX);
44 }
45
40 } // namespace IPC 46 } // namespace IPC
OLDNEW
« no previous file with comments | « ipc/attachment_broker_privileged.h ('k') | ipc/attachment_broker_privileged_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698