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

Unified Diff: chrome/browser/extensions/activity_log/uma_policy.cc

Issue 368133005: Fixes for re-enabling more MSVC level 4 warnings: chrome/browser/ edition (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 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/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") {

Powered by Google App Engine
This is Rietveld 408576698