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

Unified Diff: ipc/attachment_broker_privileged.h

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, 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | ipc/attachment_broker_privileged.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ipc/attachment_broker_privileged.h
diff --git a/ipc/attachment_broker_privileged.h b/ipc/attachment_broker_privileged.h
index e8c675574c500a4766395e20bcff60e167c8e9d0..7b3975acdb2de5b599928f440c02c4e9b2c9773b 100644
--- a/ipc/attachment_broker_privileged.h
+++ b/ipc/attachment_broker_privileged.h
@@ -36,6 +36,24 @@ class IPC_EXPORT AttachmentBrokerPrivileged : public IPC::AttachmentBroker {
// Returns nullptr if no sender is found.
Sender* GetSenderWithProcessId(base::ProcessId id);
+ // Errors that can be reported by subclasses.
+ // These match tools/metrics/histograms.xml.
+ // This enum is append-only.
+ enum UMAError {
+ // The brokerable attachment had a valid destination. This is the success
+ // case.
+ DESTINATION_FOUND = 0,
+ // The brokerable attachment had a destination, but the broker did not have
+ // a channel of communication with that process.
+ DESTINATION_NOT_FOUND = 1,
+ // The brokerable attachment did not have a destination process.
+ NO_DESTINATION = 2,
+ ERROR_MAX
+ };
+
+ // Emits an UMA metric.
+ void LogError(UMAError error);
+
private:
std::vector<Endpoint*> endpoints_;
DISALLOW_COPY_AND_ASSIGN(AttachmentBrokerPrivileged);
« no previous file with comments | « no previous file | ipc/attachment_broker_privileged.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698