Page Speed Optimization Libraries  1.13.35.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
usage_data_reporter.h
Go to the documentation of this file.
1 /*
2  * Copyright 2012 Google Inc.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http:///www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
18 
19 #ifndef NET_INSTAWEB_REWRITER_PUBLIC_USAGE_DATA_REPORTER_H_
20 #define NET_INSTAWEB_REWRITER_PUBLIC_USAGE_DATA_REPORTER_H_
21 
25 
26 namespace net_instaweb {
27 
28 class GoogleUrl;
29 struct ContentType;
30 
36  public:
38  virtual ~UsageDataReporter();
39 
44  virtual void ReportCsiBeacon(const GoogleUrl& url) {}
45 
47  virtual void ReportResponseData(const GoogleUrl& url, int32 response_code,
48  const GoogleString& reason_phrase,
49  const ContentType* content_type,
50  int64 time_taken,
51  const GoogleString& ip,
52  const GoogleString& user_agent) {}
53 
55  virtual void ReportFetchErrors(const GoogleString& host,
56  const GoogleString& url,
57  int32 error_code,
58  const StringPiece& fetch_error) {}
59 
60 
62  virtual void ReportWarning(const GoogleUrl& url, int32 warning_code,
63  const StringPiece& warning_message) {}
64 
66  virtual void ReportBandwidth(int64 project_id, const GoogleUrl& url,
67  int64 bandwidth, StringPiece referer) {}
68 
69  private:
70 
71 };
72 
73 }
74 
75 #endif
class GoogleUrl
Definition: google_url.h:58
virtual void ReportBandwidth(int64 project_id, const GoogleUrl &url, int64 bandwidth, StringPiece referer)
Report bandwidth.
Definition: usage_data_reporter.h:66
std::string GoogleString
PAGESPEED_KERNEL_BASE_STRING_H_.
Definition: string.h:24
virtual void ReportWarning(const GoogleUrl &url, int32 warning_code, const StringPiece &warning_message)
Report a warning.
Definition: usage_data_reporter.h:62
virtual void ReportFetchErrors(const GoogleString &host, const GoogleString &url, int32 error_code, const StringPiece &fetch_error)
Reports fetch errors.
Definition: usage_data_reporter.h:55
Definition: content_type.h:31
Definition: usage_data_reporter.h:35
virtual void ReportCsiBeacon(const GoogleUrl &url)
Definition: usage_data_reporter.h:44
virtual void ReportResponseData(const GoogleUrl &url, int32 response_code, const GoogleString &reason_phrase, const ContentType *content_type, int64 time_taken, const GoogleString &ip, const GoogleString &user_agent)
Reports all useful response data.
Definition: usage_data_reporter.h:47