OLD | NEW |
---|---|
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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/activity_actions.h" | 5 #include "chrome/browser/extensions/activity_log/activity_actions.h" |
6 | 6 |
7 #include <algorithm> // for std::find. | 7 #include <algorithm> // for std::find. |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 28 matching lines...) Expand all Loading... | |
39 namespace keys = ad_injection_constants::keys; | 39 namespace keys = ad_injection_constants::keys; |
40 | 40 |
41 // The list of APIs for which we upload the URL to RAPPOR. | 41 // The list of APIs for which we upload the URL to RAPPOR. |
42 const char* kApisForRapporMetric[] = { | 42 const char* kApisForRapporMetric[] = { |
43 "HTMLIFrameElement.src", | 43 "HTMLIFrameElement.src", |
44 "HTMLEmbedElement.src", | 44 "HTMLEmbedElement.src", |
45 "HTMLAnchorElement.href", | 45 "HTMLAnchorElement.href", |
46 }; | 46 }; |
47 | 47 |
48 const char* kExtensionAdInjectionRapporMetricName = | 48 const char* kExtensionAdInjectionRapporMetricName = |
49 "Extensions.PossibleAdInjection"; | 49 "Extensions.PossibleAdInjection2"; |
Devlin
2014/05/22 23:36:45
Nit: please add a short comment stating why this i
Steven Holte
2014/05/23 21:54:05
Done.
| |
50 | 50 |
51 // The elements for which we check the 'src' attribute to look for ads. | 51 // The elements for which we check the 'src' attribute to look for ads. |
52 const char* kSrcElements[] = { | 52 const char* kSrcElements[] = { |
53 "HTMLIFrameElement", | 53 "HTMLIFrameElement", |
54 "HTMLEmbedElement" | 54 "HTMLEmbedElement" |
55 }; | 55 }; |
56 | 56 |
57 // The elements for which we check the 'href' attribute to look for ads. | 57 // The elements for which we check the 'href' attribute to look for ads. |
58 const char* kHrefElements[] = { | 58 const char* kHrefElements[] = { |
59 "HTMLAnchorElement", | 59 "HTMLAnchorElement", |
(...skipping 472 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
532 std::string rhs_other = ActivityLogPolicy::Util::Serialize(rhs->other()); | 532 std::string rhs_other = ActivityLogPolicy::Util::Serialize(rhs->other()); |
533 if (lhs_other != rhs_other) | 533 if (lhs_other != rhs_other) |
534 return lhs_other < rhs_other; | 534 return lhs_other < rhs_other; |
535 } | 535 } |
536 | 536 |
537 // All fields compare as equal if this point is reached. | 537 // All fields compare as equal if this point is reached. |
538 return false; | 538 return false; |
539 } | 539 } |
540 | 540 |
541 } // namespace extensions | 541 } // namespace extensions |
OLD | NEW |