"Fossies" - the Fresh Open Source Software Archive 
As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style:
standard) with prefixed line numbers and
code folding option.
Alternatively you can here
view or
download the uninterpreted source code file.
For more information about "ads_util.h" see the
Fossies "Dox" file reference documentation and the latest
Fossies "Diffs" side-by-side code changes report:
1.13.35.2_vs_1.14.36.1.
1 /*
2 * Licensed to the Apache Software Foundation (ASF) under one
3 * or more contributor license agreements. See the NOTICE file
4 * distributed with this work for additional information
5 * regarding copyright ownership. The ASF licenses this file
6 * to you under the Apache License, Version 2.0 (the
7 * "License"); you may not use this file except in compliance
8 * with the License. You may obtain a copy of the License at
9 *
10 * http://www.apache.org/licenses/LICENSE-2.0
11 *
12 * Unless required by applicable law or agreed to in writing,
13 * software distributed under the License is distributed on an
14 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 * KIND, either express or implied. See the License for the
16 * specific language governing permissions and limitations
17 * under the License.
18 */
19
20 #ifndef PAGESPEED_KERNEL_ADS_ADS_UTIL_H_
21 #define PAGESPEED_KERNEL_ADS_ADS_UTIL_H_
22
23 #include "pagespeed/kernel/base/string_util.h"
24
25 namespace net_instaweb {
26
27 class HtmlElement;
28
29 namespace ads_util {
30
31 // Src of adsbygoogle javascripts.
32 extern const char kAdsByGoogleJavascriptSrc[];
33 // Javascript snippet that calls adsbygoogle API.
34 extern const char kAdsByGoogleApiCallJavascript[];
35 // Element class name used in adsbygoogle snippets.
36 extern const char kAdsbyGoogleClass[];
37
38 // Returns the unique publisher id in publisher_code without product prefix.
39 // publisher_code is a string concatenated from a list of prefixes and a unique
40 // id with a separator. This method returns the unique id.
41 StringPiece GetPublisherIdWithoutProductPrefix(StringPiece publisher_code);
42
43 // Returns if 'element' is a valid adsbygooogle snippet for 'publisher_id'.
44 bool IsValidAdsByGoogle(const HtmlElement& element, StringPiece publisher_id);
45
46 // Returns if 'src' is pointing to a JS used by showads to call ads JS API.
47 bool IsShowAdsApiCallJsSrc(StringPiece src);
48
49 // Returns if 'src' is pointing to the JS required by adsbygoogle snippets.
50 bool IsAdsByGoogleJsSrc(StringPiece src);
51
52 } // namespace ads_util
53 } // namespace net_instaweb
54
55 #endif // PAGESPEED_KERNEL_ADS_ADS_UTIL_H_