Chromium Code Reviews| Index: chrome/browser/extensions/api/rtc_private/rtc_private_api.cc |
| diff --git a/chrome/browser/extensions/api/rtc_private/rtc_private_api.cc b/chrome/browser/extensions/api/rtc_private/rtc_private_api.cc |
| index 57c07a58ac79d273471aced07c56b2e8749392c6..7f0467a7b8b40c5f91ebbe8a7ef8639bcbfa2af9 100644 |
| --- a/chrome/browser/extensions/api/rtc_private/rtc_private_api.cc |
| +++ b/chrome/browser/extensions/api/rtc_private/rtc_private_api.cc |
| @@ -46,27 +46,29 @@ const char kNameIntentField[] = "name"; |
| const char kPhoneIntentField[] = "phone"; |
| const char kEmailIntentField[] = "email"; |
| -// Returns string representation of intent action. |
| -const char* GetLaunchAction(RtcPrivateEventRouter::LaunchAction action) { |
| - const char* action_str = kActivateAction; |
| +// Returns the ActionType of intent action. |
| +api::rtc_private::ActionType GetLaunchAction( |
| + RtcPrivateEventRouter::LaunchAction action) { |
| + api::rtc_private::ActionType action_type = |
| + api::rtc_private::RTC_PRIVATE_ACTION_TYPE_NONE; |
| switch (action) { |
| case RtcPrivateEventRouter::LAUNCH_ACTIVATE: |
| - action_str = kActivateAction; |
| + action_type = api::rtc_private::RTC_PRIVATE_ACTION_TYPE_NONE; |
|
not at google - send to devlin
2012/09/24 22:46:29
why does this map to NONE not ACTIVATE?
cduvall
2012/09/24 22:51:47
In the IDL file there is only "chat", "voice", and
not at google - send to devlin
2012/09/24 22:54:14
Bizarre. I don't know how the code works as is, th
zel
2012/09/24 23:00:57
That's fine as it is right now. We will modify C++
|
| break; |
| case RtcPrivateEventRouter::LAUNCH_CHAT: |
| - action_str = kChatAction; |
| + action_type = api::rtc_private::RTC_PRIVATE_ACTION_TYPE_CHAT; |
| break; |
| case RtcPrivateEventRouter::LAUNCH_VOICE: |
| - action_str = kVoiceAction; |
| + action_type = api::rtc_private::RTC_PRIVATE_ACTION_TYPE_VOICE; |
| break; |
| case RtcPrivateEventRouter::LAUNCH_VIDEO: |
| - action_str = kVideoAction; |
| + action_type = api::rtc_private::RTC_PRIVATE_ACTION_TYPE_VIDEO; |
| break; |
| default: |
| NOTREACHED() << "Unknown action " << action; |
| break; |
|
not at google - send to devlin
2012/09/24 22:46:29
this method could be more concise by returning the
cduvall
2012/09/24 22:51:47
Done.
|
| } |
| - return action_str; |
| + return action_type; |
| } |
| // Creates JSON payload string for contact web intent data. |