diff options
author | tsepez@chromium.org <tsepez@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-10-23 23:03:35 +0000 |
---|---|---|
committer | tsepez@chromium.org <tsepez@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-10-23 23:03:35 +0000 |
commit | f950981b3d4fbd2a514558f667284c7b3d7abc48 (patch) | |
tree | a57125422fb9650185466a16eaa64dce4e9f9c09 /ipc | |
parent | cd5fff7b7e5b496e9e72f205e38d9869007b480d (diff) | |
download | chromium_src-f950981b3d4fbd2a514558f667284c7b3d7abc48.zip chromium_src-f950981b3d4fbd2a514558f667284c7b3d7abc48.tar.gz chromium_src-f950981b3d4fbd2a514558f667284c7b3d7abc48.tar.bz2 |
Move IPCMessageStart enum into it own file with security team OWNERS, so that new message files can't be added to chromium without triggering a security review.
Review URL: https://chromiumcodereview.appspot.com/11048038
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@163713 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ipc')
-rw-r--r-- | ipc/OWNERS | 9 | ||||
-rw-r--r-- | ipc/ipc.gypi | 1 | ||||
-rw-r--r-- | ipc/ipc_message_macros.h | 2 | ||||
-rw-r--r-- | ipc/ipc_message_start.h | 77 | ||||
-rw-r--r-- | ipc/ipc_message_utils.h | 70 |
5 files changed, 89 insertions, 70 deletions
@@ -7,3 +7,12 @@ tsepez@chromium.org # For NaCl-related code (ipc_channel_nacl.*) dmichael@chromium.org + +# New IPC message files require a security review to avoid introducing +# new sandbox escapes. +per-file ipc_message_start.h=set noparent +per-file ipc_message_start.h=cdn@chromium.org +per-file ipc_message_start.h=jln@chromium.org +per-file ipc_message_start.h=jschuh@chromium.org +per-file ipc_message_start.h=palmer@chromium.org +per-file ipc_message_start.h=tsepez@chromium.org diff --git a/ipc/ipc.gypi b/ipc/ipc.gypi index 1c014f8..ef986a7 100644 --- a/ipc/ipc.gypi +++ b/ipc/ipc.gypi @@ -36,6 +36,7 @@ 'ipc_message.cc', 'ipc_message.h', 'ipc_message_macros.h', + 'ipc_message_start.h', 'ipc_message_utils.cc', 'ipc_message_utils.h', 'ipc_param_traits.h', diff --git a/ipc/ipc_message_macros.h b/ipc/ipc_message_macros.h index 0fb6b182..f77abb2 100644 --- a/ipc/ipc_message_macros.h +++ b/ipc/ipc_message_macros.h @@ -15,7 +15,7 @@ // // Each XXX_messages.h file must be registered with the IPC system. This // requires adding two things: -// - An XXXMsgStart value to the IPCMessageStart enum in ipc_message_utils.h +// - An XXXMsgStart value to the IPCMessageStart enum in ipc_message_start.h // - An inclusion of XXX_messages.h file in a message generator .h file // // The XXXMsgStart value is an enumeration that ensures uniqueness for diff --git a/ipc/ipc_message_start.h b/ipc/ipc_message_start.h new file mode 100644 index 0000000..2db6616 --- /dev/null +++ b/ipc/ipc_message_start.h @@ -0,0 +1,77 @@ +// Copyright 2012 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef IPC_IPC_MESSAGE_START_H_ +#define IPC_IPC_MESSAGE_START_H_ + +// Used by IPC_BEGIN_MESSAGES so that each message class starts from a unique +// base. Messages have unique IDs across channels in order for the IPC logging +// code to figure out the message class from its ID. +enum IPCMessageStart { + AutomationMsgStart = 0, + ViewMsgStart, + PluginMsgStart, + ProfileImportMsgStart, + TestMsgStart, + DevToolsMsgStart, + WorkerMsgStart, + NaClMsgStart, + UtilityMsgStart, + GpuMsgStart, + ServiceMsgStart, + PpapiMsgStart, + FirefoxImporterUnittestMsgStart, + FileUtilitiesMsgStart, + MimeRegistryMsgStart, + DatabaseMsgStart, + DOMStorageMsgStart, + IndexedDBMsgStart, + PepperFileMsgStart, + SpeechRecognitionMsgStart, + PepperMsgStart, + AutofillMsgStart, + SafeBrowsingMsgStart, + P2PMsgStart, + SocketStreamMsgStart, + ResourceMsgStart, + FileSystemMsgStart, + ChildProcessMsgStart, + ClipboardMsgStart, + BlobMsgStart, + AppCacheMsgStart, + DeviceMotionMsgStart, + DeviceOrientationMsgStart, + DesktopNotificationMsgStart, + GeolocationMsgStart, + AudioMsgStart, + ChromeMsgStart, + DragMsgStart, + PrintMsgStart, + SpellCheckMsgStart, + ExtensionMsgStart, + VideoCaptureMsgStart, + QuotaMsgStart, + IconMsgStart, + TextInputClientMsgStart, + ChromeUtilityMsgStart, + MediaStreamMsgStart, + ChromeBenchmarkingMsgStart, + IntentsMsgStart, + JavaBridgeMsgStart, + GamepadMsgStart, + ShellMsgStart, + AccessibilityMsgStart, + PrerenderMsgStart, + ChromotingMsgStart, + OldBrowserPluginMsgStart, + BrowserPluginMsgStart, + HyphenatorMsgStart, + AndroidWebViewMsgStart, + MetroViewerMsgStart, + CCMsgStart, + MediaPlayerMsgStart, + LastIPCMsgStart // Must come last. +}; + +#endif // IPC_IPC_MESSAGE_START_H_ diff --git a/ipc/ipc_message_utils.h b/ipc/ipc_message_utils.h index 757bae4..0e4c68e 100644 --- a/ipc/ipc_message_utils.h +++ b/ipc/ipc_message_utils.h @@ -17,6 +17,7 @@ #include "base/stringprintf.h" #include "base/string_util.h" #include "base/tuple.h" +#include "ipc/ipc_message_start.h" #include "ipc/ipc_param_traits.h" #include "ipc/ipc_sync_message.h" @@ -43,75 +44,6 @@ #error "Please add the noinline property for your new compiler here." #endif -// Used by IPC_BEGIN_MESSAGES so that each message class starts from a unique -// base. Messages have unique IDs across channels in order for the IPC logging -// code to figure out the message class from its ID. -enum IPCMessageStart { - AutomationMsgStart = 0, - ViewMsgStart, - PluginMsgStart, - ProfileImportMsgStart, - TestMsgStart, - DevToolsMsgStart, - WorkerMsgStart, - NaClMsgStart, - UtilityMsgStart, - GpuMsgStart, - ServiceMsgStart, - PpapiMsgStart, - FirefoxImporterUnittestMsgStart, - FileUtilitiesMsgStart, - MimeRegistryMsgStart, - DatabaseMsgStart, - DOMStorageMsgStart, - IndexedDBMsgStart, - PepperFileMsgStart, - SpeechRecognitionMsgStart, - PepperMsgStart, - AutofillMsgStart, - SafeBrowsingMsgStart, - P2PMsgStart, - SocketStreamMsgStart, - ResourceMsgStart, - FileSystemMsgStart, - ChildProcessMsgStart, - ClipboardMsgStart, - BlobMsgStart, - AppCacheMsgStart, - DeviceMotionMsgStart, - DeviceOrientationMsgStart, - DesktopNotificationMsgStart, - GeolocationMsgStart, - AudioMsgStart, - ChromeMsgStart, - DragMsgStart, - PrintMsgStart, - SpellCheckMsgStart, - ExtensionMsgStart, - VideoCaptureMsgStart, - QuotaMsgStart, - IconMsgStart, - TextInputClientMsgStart, - ChromeUtilityMsgStart, - MediaStreamMsgStart, - ChromeBenchmarkingMsgStart, - IntentsMsgStart, - JavaBridgeMsgStart, - GamepadMsgStart, - ShellMsgStart, - AccessibilityMsgStart, - PrerenderMsgStart, - ChromotingMsgStart, - OldBrowserPluginMsgStart, - BrowserPluginMsgStart, - HyphenatorMsgStart, - AndroidWebViewMsgStart, - MetroViewerMsgStart, - CCMsgStart, - MediaPlayerMsgStart, - LastIPCMsgStart // Must come last. -}; - class FilePath; class NullableString16; |