Page Speed Optimization Libraries  1.9.32.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
critical_line_info_finder.h
Go to the documentation of this file.
1 /*
2  * Copyright 2013 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 
21 
22 #ifndef NET_INSTAWEB_REWRITER_PUBLIC_CRITICAL_LINE_INFO_FINDER_H_
23 #define NET_INSTAWEB_REWRITER_PUBLIC_CRITICAL_LINE_INFO_FINDER_H_
24 
26 #include "net/instaweb/util/public/property_cache.h"
27 #include "pagespeed/kernel/base/basictypes.h"
28 
29 namespace net_instaweb {
30 
31 class CriticalLineInfo;
32 class RewriteDriver;
33 
38  public:
39  static const char kCriticalLineInfoPropertyName[];
40 
41  explicit CriticalLineInfoFinder(const PropertyCache::Cohort* cohort);
42  virtual ~CriticalLineInfoFinder();
43 
45  const PropertyCache::Cohort* cohort() const { return cohort_; }
46 
48  virtual const CriticalLineInfo* GetCriticalLine(RewriteDriver* driver);
49 
55  BeaconMetadata result;
56  result.status = kBeaconNoNonce;
57  return result;
58  }
59 
60  protected:
62  virtual void UpdateInDriver(RewriteDriver* driver);
63 
64  private:
65  virtual int SupportInterval() const { return 1; }
66 
67  const PropertyCache::Cohort* cohort_;
68 
69  DISALLOW_COPY_AND_ASSIGN(CriticalLineInfoFinder);
70 };
71 
72 }
73 
74 #endif
75 
virtual void UpdateInDriver(RewriteDriver *driver)
Updates the critical line information in the driver.
Definition: critical_finder_support_util.h:78
virtual BeaconMetadata PrepareForBeaconInsertion(RewriteDriver *driver)
Definition: critical_line_info_finder.h:54
virtual const CriticalLineInfo * GetCriticalLine(RewriteDriver *driver)
Populates the critical line information in the driver and return it.
Definition: rewrite_driver.h:98
Definition: critical_line_info_finder.h:37
const PropertyCache::Cohort * cohort() const
Returns the cohort in pcache which stores the critical line info.
Definition: critical_line_info_finder.h:45