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

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: Review comment Created 6 years, 5 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..cf026bb2fd4168fd003fdf091d27939c85bfd8a4 100644
--- a/chrome/browser/extensions/activity_log/uma_policy.cc
+++ b/chrome/browser/extensions/activity_log/uma_policy.cc
@@ -103,33 +103,30 @@ void UmaPolicy::ProcessAction(scoped_refptr<Action> action) {
}
int UmaPolicy::MatchActionToStatus(scoped_refptr<Action> action) {
- if (action->action_type() == Action::ACTION_CONTENT_SCRIPT) {
+ 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) {
+ 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)) {
+ activity_log_constants::kActionDomVerb, &dom_verb))
return kNoStatus;
- }
int ret_bit = kNoStatus;
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") {
@@ -139,21 +136,20 @@ int UmaPolicy::MatchActionToStatus(scoped_refptr<Action> action) {
} else if (action->api_name() == "Document.createElement") {
std::string arg;
action->args()->GetString(0, &arg);
- if (arg == "script") {
+ if (arg == "script")
ret_bit |= kCreatedScript;
- } else if (arg == "iframe") {
+ else if (arg == "iframe")
ret_bit |= kCreatedIframe;
- } else if (arg == "div") {
+ else if (arg == "div")
ret_bit |= kCreatedDiv;
- } else if (arg == "a") {
+ else if (arg == "a")
ret_bit |= kCreatedLink;
- } else if (arg == "input") {
+ else if (arg == "input")
ret_bit |= kCreatedInput;
- } else if (arg == "embed") {
+ else if (arg == "embed")
ret_bit |= kCreatedEmbed;
- } else if (arg == "object") {
+ else if (arg == "object")
ret_bit |= kCreatedObject;
- }
}
const Action::InjectionType ad_injection =
« no previous file with comments | « chrome/browser/enumerate_modules_model_win.cc ('k') | chrome/browser/extensions/api/web_request/web_request_api_helpers.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698