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

Side by Side Diff: chrome/browser/extensions/activity_log/uma_policy.cc

Issue 54953002: Adjust placement of innerHTML (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 1 month 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/extensions/activity_log/uma_policy.h" 5 #include "chrome/browser/extensions/activity_log/uma_policy.h"
6 6
7 #include "base/metrics/histogram.h" 7 #include "base/metrics/histogram.h"
8 #include "base/strings/stringprintf.h" 8 #include "base/strings/stringprintf.h"
9 #include "chrome/browser/extensions/activity_log/activity_action_constants.h" 9 #include "chrome/browser/extensions/activity_log/activity_action_constants.h"
10 #include "chrome/browser/sessions/session_id.h" 10 #include "chrome/browser/sessions/session_id.h"
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 ret_bit |= kModifiedDom; 107 ret_bit |= kModifiedDom;
108 } else if (dom_type == DomActionType::METHOD) { 108 } else if (dom_type == DomActionType::METHOD) {
109 ret_bit |= kDomMethod; 109 ret_bit |= kDomMethod;
110 } else { 110 } else {
111 return kNoStatus; 111 return kNoStatus;
112 } 112 }
113 113
114 if (action->api_name() == "HTMLDocument.write" || 114 if (action->api_name() == "HTMLDocument.write" ||
115 action->api_name() == "HTMLDocument.writeln") { 115 action->api_name() == "HTMLDocument.writeln") {
116 ret_bit |= kDocumentWrite; 116 ret_bit |= kDocumentWrite;
117 } else if (action->api_name() == "HTMLElement.innerHTML") { 117 } else if (action->api_name() == "Element.innerHTML") {
118 ret_bit |= kInnerHtml; 118 ret_bit |= kInnerHtml;
119 } else if (action->api_name() == "Document.createElement") { 119 } else if (action->api_name() == "Document.createElement") {
120 std::string arg; 120 std::string arg;
121 action->args()->GetString(0, &arg); 121 action->args()->GetString(0, &arg);
122 if (arg == "script") { 122 if (arg == "script") {
123 ret_bit |= kCreatedScript; 123 ret_bit |= kCreatedScript;
124 } else if (arg == "iframe") { 124 } else if (arg == "iframe") {
125 ret_bit |= kCreatedIframe; 125 ret_bit |= kCreatedIframe;
126 } else if (arg == "div") { 126 } else if (arg == "div") {
127 ret_bit |= kCreatedDiv; 127 ret_bit |= kCreatedDiv;
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after
354 return "CreatedObject"; 354 return "CreatedObject";
355 case NONE: 355 case NONE:
356 case MAX_STATUS: 356 case MAX_STATUS:
357 default: 357 default:
358 NOTREACHED(); 358 NOTREACHED();
359 return ""; 359 return "";
360 } 360 }
361 } 361 }
362 362
363 } // namespace extensions 363 } // namespace extensions
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698