diff options
author | anujk.sharma <anujk.sharma@samsung.com> | 2014-10-09 05:16:30 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-10-09 12:16:49 +0000 |
commit | ef612ee574ecdff8d6d691f613cd6dac033db85c (patch) | |
tree | fb6f8bf87705671a0d4777b15a2b884e710927ec /chrome/common | |
parent | c345bef7a71167b58d51172047365dade2ef1002 (diff) | |
download | chromium_src-ef612ee574ecdff8d6d691f613cd6dac033db85c.zip chromium_src-ef612ee574ecdff8d6d691f613cd6dac033db85c.tar.gz chromium_src-ef612ee574ecdff8d6d691f613cd6dac033db85c.tar.bz2 |
Apply automatic range checks to content enum types across IPC.
This is part of a long-running background task to remove the remaining
uses of the unchecked IPC_ENUM_TRAITS() macro.
BUG=246708
Review URL: https://codereview.chromium.org/638013002
Cr-Commit-Position: refs/heads/master@{#298853}
Diffstat (limited to 'chrome/common')
-rw-r--r-- | chrome/common/omnibox_focus_state.h | 4 | ||||
-rw-r--r-- | chrome/common/render_messages.h | 5 |
2 files changed, 7 insertions, 2 deletions
diff --git a/chrome/common/omnibox_focus_state.h b/chrome/common/omnibox_focus_state.h index cddcf96..593399d 100644 --- a/chrome/common/omnibox_focus_state.h +++ b/chrome/common/omnibox_focus_state.h @@ -18,6 +18,8 @@ enum OmniboxFocusState { // Omnibox will not look focused visibly but any user key strokes will go to // the omnibox. OMNIBOX_FOCUS_INVISIBLE, + + OMNIBOX_FOCUS_STATE_LAST = OMNIBOX_FOCUS_INVISIBLE }; // Reasons why the Omnibox focus state could change. @@ -33,6 +35,8 @@ enum OmniboxFocusChangeReason { // Focus changed because user started typing. This only happens when focus // state is INVISIBLE (and this results in a change to VISIBLE). OMNIBOX_FOCUS_CHANGE_TYPING, + + OMNIBOX_FOCUS_CHANGE_REASON_LAST = OMNIBOX_FOCUS_CHANGE_TYPING }; #endif // CHROME_COMMON_OMNIBOX_FOCUS_STATE_H_ diff --git a/chrome/common/render_messages.h b/chrome/common/render_messages.h index 550c29d..3583f89 100644 --- a/chrome/common/render_messages.h +++ b/chrome/common/render_messages.h @@ -82,8 +82,9 @@ struct ParamTraits<ContentSettingsPattern> { IPC_ENUM_TRAITS_MAX_VALUE(ChromeViewHostMsg_GetPluginInfo_Status::Value, ChromeViewHostMsg_GetPluginInfo_Status::kUnauthorized) -IPC_ENUM_TRAITS(OmniboxFocusChangeReason) -IPC_ENUM_TRAITS(OmniboxFocusState) +IPC_ENUM_TRAITS_MAX_VALUE(OmniboxFocusChangeReason, + OMNIBOX_FOCUS_CHANGE_REASON_LAST) +IPC_ENUM_TRAITS_MAX_VALUE(OmniboxFocusState, OMNIBOX_FOCUS_STATE_LAST) IPC_ENUM_TRAITS_MAX_VALUE(search_provider::OSDDType, search_provider::OSDD_TYPE_LAST) IPC_ENUM_TRAITS(search_provider::InstallState) |