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

Unified Diff: chrome/utility/chrome_content_utility_client.h

Issue 98603007: Launches a privileged utility process. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Cleans up ChildProcessLauncher implementations. Created 6 years, 11 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
Index: chrome/utility/chrome_content_utility_client.h
diff --git a/chrome/utility/chrome_content_utility_client.h b/chrome/utility/chrome_content_utility_client.h
index 4f8187ef044ffb62faa76e2c42726f3c1aa69211..895202fec6fd5c7855f141256286755f965e2036 100644
--- a/chrome/utility/chrome_content_utility_client.h
+++ b/chrome/utility/chrome_content_utility_client.h
@@ -40,6 +40,13 @@ class ChromeContentUtilityClient : public content::ContentUtilityClient {
static void PreSandboxStartup();
+ // Adds a message handler to the utility client. This will take ownership of
+ // the handler.
+ void AddHandler(UtilityMessageHandler* handler);
jam 2014/01/30 21:41:03 hmm, these two methods are only added for a unitte
Drew Haven 2014/01/31 20:00:12 Since this has security implications, I feel like
jam 2014/02/01 01:09:10 I understand the need to test. Perhaps there are o
Drew Haven 2014/02/04 21:25:54 Okay, that generally sounds good. Once we start a
+
+ // Adds a message type to the whitelist.
+ void AddWhitelistMessageType(int message_type);
+
private:
// IPC message handlers.
void OnUnpackExtension(const base::FilePath& extension_path,
@@ -106,6 +113,11 @@ class ChromeContentUtilityClient : public content::ContentUtilityClient {
typedef ScopedVector<UtilityMessageHandler> Handlers;
Handlers handlers_;
+ // Flag to enable whitelisting.
+ bool filter_messages_;
+ // A list of message_ids to filter.
+ std::set<int> message_id_whitelist_;
+
DISALLOW_COPY_AND_ASSIGN(ChromeContentUtilityClient);
};

Powered by Google App Engine
This is Rietveld 408576698