| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |