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

Unified Diff: ipc/attachment_broker_privileged_mac.h

Issue 1978353003: mac: Fix an attachment broker race condition. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@temp48_windows_ab
Patch Set: Created 4 years, 7 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_mac.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ipc/attachment_broker_privileged_mac.h
diff --git a/ipc/attachment_broker_privileged_mac.h b/ipc/attachment_broker_privileged_mac.h
index 0393fe1d91aa1ad1e65a93500631aa96c093e606..9122a16d8fba38af68ccbb44c04d3d74d4ab5107 100644
--- a/ipc/attachment_broker_privileged_mac.h
+++ b/ipc/attachment_broker_privileged_mac.h
@@ -66,6 +66,7 @@ class IPC_EXPORT AttachmentBrokerPrivilegedMac
const scoped_refptr<IPC::BrokerableAttachment>& attachment,
base::ProcessId destination_process) override;
void DeregisterCommunicationChannel(Endpoint* endpoint) override;
+ void ReceivedPeerPid(base::ProcessId peer_pid) override;
// IPC::Listener overrides.
bool OnMessageReceived(const Message& message) override;
@@ -167,7 +168,10 @@ class IPC_EXPORT AttachmentBrokerPrivilegedMac
// Atempts to broker all precursors whose destination is |pid|. Has no effect
// if |port_provider_| does not have the task port for |pid|.
- void SendPrecursorsForProcess(base::ProcessId pid);
+ // If a communication channel has not been established from the destination
+ // process, and |store_on_failure| is true, then the precursor is kept for
+ // later reuse. If |store_on_failure| is false, then the precursor is deleted.
+ void SendPrecursorsForProcess(base::ProcessId pid, bool store_on_failure);
// Brokers a single precursor into the task represented by |task_port|.
// Returns |false| on irrecoverable error.
@@ -180,7 +184,10 @@ class IPC_EXPORT AttachmentBrokerPrivilegedMac
// Atempts to process all extractors whose source is |pid|. Has no effect
// if |port_provider_| does not have the task port for |pid|.
- void ProcessExtractorsForProcess(base::ProcessId pid);
+ // If a communication channel has not been established from the source
+ // process, and |store_on_failure| is true, then the extractor is kept for
+ // later reuse. If |store_on_failure| is false, then the extractor is deleted.
+ void ProcessExtractorsForProcess(base::ProcessId pid, bool store_on_failure);
// Processes a single extractor whose source pid is represented by
// |task_port|.
« no previous file with comments | « no previous file | ipc/attachment_broker_privileged_mac.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698