OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #ifndef CHROME_COMMON_EXTENSIONS_AD_INJECTION_CONSTANTS_H_ | 5 #ifndef CHROME_COMMON_EXTENSIONS_AD_INJECTION_CONSTANTS_H_ |
6 #define CHROME_COMMON_EXTENSIONS_AD_INJECTION_CONSTANTS_H_ | 6 #define CHROME_COMMON_EXTENSIONS_AD_INJECTION_CONSTANTS_H_ |
7 | 7 |
8 #include <string> | |
9 | |
10 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
11 | 9 |
12 namespace extensions { | 10 namespace extensions { |
13 namespace ad_injection_constants { | 11 namespace ad_injection_constants { |
14 | 12 |
15 // The keys used when serializing arguments to activity action APIs. | 13 // The keys used when serializing arguments to activity action APIs. |
16 namespace keys { | 14 namespace keys { |
17 | 15 |
18 extern const char kType[]; | 16 extern const char kType[]; |
19 extern const char kChildren[]; | 17 extern const char kChildren[]; |
20 extern const char kSrc[]; | 18 extern const char kSrc[]; |
21 extern const char kHref[]; | 19 extern const char kHref[]; |
22 | 20 |
23 } // namespace keys | 21 } // namespace keys |
24 | 22 |
25 extern const char kHtmlIframeSrcApiName[]; | 23 extern const char kHtmlIframeSrcApiName[]; |
26 extern const char kHtmlEmbedSrcApiName[]; | 24 extern const char kHtmlEmbedSrcApiName[]; |
27 extern const char kAppendChildApiSuffix[]; | 25 extern const char kAppendChildApiSuffix[]; |
28 | 26 |
29 extern const size_t kMaximumChildrenToCheck; | 27 extern const size_t kMaximumChildrenToCheck; |
30 extern const size_t kMaximumDepthToCheck; | 28 extern const size_t kMaximumDepthToCheck; |
31 | 29 |
32 // Returns true if the given |api| can potentially inject ads, and should | 30 // Returns true if the given |api| can potentially inject ads, and should |
33 // therefore be examined. | 31 // therefore be examined. |
34 bool ApiCanInjectAds(const std::string& api); | 32 bool ApiCanInjectAds(const char* api); |
35 | 33 |
36 } // namespace ad_injection_constants | 34 } // namespace ad_injection_constants |
37 } // namespace extensions | 35 } // namespace extensions |
38 | 36 |
39 #endif // CHROME_COMMON_EXTENSIONS_AD_INJECTION_CONSTANTS_H_ | 37 #endif // CHROME_COMMON_EXTENSIONS_AD_INJECTION_CONSTANTS_H_ |
OLD | NEW |