Chromium Code Reviews| Index: chrome/browser/extensions/activity_log/uma_policy.cc |
| diff --git a/chrome/browser/extensions/activity_log/uma_policy.cc b/chrome/browser/extensions/activity_log/uma_policy.cc |
| index 2fbb06411b780beea5db0d02edf9c250d4a39bd7..5a8ad7758e9f4d8e3c6bd90dcb2c72773828642a 100644 |
| --- a/chrome/browser/extensions/activity_log/uma_policy.cc |
| +++ b/chrome/browser/extensions/activity_log/uma_policy.cc |
| @@ -105,14 +105,15 @@ void UmaPolicy::ProcessAction(scoped_refptr<Action> action) { |
| int UmaPolicy::MatchActionToStatus(scoped_refptr<Action> action) { |
| if (action->action_type() == Action::ACTION_CONTENT_SCRIPT) { |
| return kContentScript; |
| - } else if (action->action_type() == Action::ACTION_API_CALL && |
| - action->api_name() == "tabs.executeScript") { |
| + } |
| + if (action->action_type() == Action::ACTION_API_CALL && |
| + action->api_name() == "tabs.executeScript") { |
| return kContentScript; |
| - } else if (action->action_type() != Action::ACTION_DOM_ACCESS) { |
| - return kNoStatus; |
| } |
|
Finnur
2014/07/03 12:17:54
nit: None of these return line need the braces (li
Peter Kasting
2014/07/07 19:15:29
Sure, I can remove these.
|
| + if (action->action_type() != Action::ACTION_DOM_ACCESS) |
| + return kNoStatus; |
| - int dom_verb; |
| + int dom_verb = DomActionType::MODIFIED; |
| if (!action->other() || |
| !action->other()->GetIntegerWithoutPathExpansion( |
| activity_log_constants::kActionDomVerb, &dom_verb)) { |
| @@ -123,13 +124,12 @@ int UmaPolicy::MatchActionToStatus(scoped_refptr<Action> action) { |
| DomActionType::Type dom_type = static_cast<DomActionType::Type>(dom_verb); |
| if (dom_type == DomActionType::GETTER) |
| return kReadDom; |
| - if (dom_type == DomActionType::SETTER) { |
| + if (dom_type == DomActionType::SETTER) |
| ret_bit |= kModifiedDom; |
| - } else if (dom_type == DomActionType::METHOD) { |
| + else if (dom_type == DomActionType::METHOD) |
| ret_bit |= kDomMethod; |
| - } else { |
| + else |
| return kNoStatus; |
| - } |
| if (action->api_name() == "HTMLDocument.write" || |
| action->api_name() == "HTMLDocument.writeln") { |