#include <map>
#include <utility>
#include <vector>
#include "net/instaweb/util/public/json.h"
#include "net/instaweb/util/public/string.h"
#include "net/instaweb/util/public/string_util.h"
Go to the source code of this file.
Namespaces | |
namespace | net_instaweb |
NOLINT. | |
Typedefs | |
typedef std::map< GoogleString, const Panel * > | net_instaweb::PanelIdToSpecMap |
typedef std::multimap < GoogleString, std::pair < GoogleString, const int > > | net_instaweb::AttributesToNonCacheableValuesMap |
Functions | |
bool | net_instaweb::BlinkUtil::IsBlinkRequest (const GoogleUrl &url, const RequestHeaders *request_headers, const RewriteOptions *options, const char *user_agent, const UserAgentMatcher &user_agent_matcher_) |
Checks whether the request for 'url' is a valid blink request. | |
bool | net_instaweb::BlinkUtil::ShouldApplyBlinkFlowCriticalLine (const ResourceManager *manager, const RewriteOptions *options) |
Checks if blink critical line flow can be applied. | |
const Layout * | net_instaweb::BlinkUtil::ExtractBlinkLayout (const GoogleUrl &url, RewriteOptions *options, const StringPiece &user_agent) |
Returns a pointer to the corresponding Layout, and NULL otherwise. | |
const Layout * | net_instaweb::BlinkUtil::FindLayout (const PublisherConfig &config, const GoogleUrl &request_url) |
Finds the layout for the given request_url. | |
void | net_instaweb::BlinkUtil::SplitCritical (const Json::Value &complete_json, const PanelIdToSpecMap &panel_id_to_spec, GoogleString *critical_json_str, GoogleString *non_critical_json_str, GoogleString *pushed_images_str) |
void | net_instaweb::BlinkUtil::SplitCriticalArray (const Json::Value &complete_json, const PanelIdToSpecMap &panel_id_to_spec, Json::Value *critical_json, Json::Value *non_cacheable_json, Json::Value *non_critical_json, bool panel_valid, int num_critical_instances, Json::Value *pushed_images) |
void | net_instaweb::BlinkUtil::SplitCriticalObj (const Json::Value &json_obj, const PanelIdToSpecMap &panel_id_to_spec, Json::Value *critical_obj, Json::Value *non_cacheable_obj, Json::Value *non_critical_obj, bool panel_cacheable, Json::Value *pushed_images) |
bool | net_instaweb::BlinkUtil::IsJsonEmpty (const Json::Value &json) |
void | net_instaweb::BlinkUtil::ClearArrayIfAllEmpty (Json::Value *json) |
Clears the json array if all objects are empty. | |
void | net_instaweb::BlinkUtil::DeleteImagesFromJson (Json::Value *json) |
Deletes images from given json. | |
bool | net_instaweb::BlinkUtil::ComputePanels (const PanelSet *panel_set_, PanelIdToSpecMap *panel_id_to_spec) |
void | net_instaweb::BlinkUtil::EscapeString (GoogleString *str) |
Escapes < and > with __psa_lt; and __psa_gt; respectively. | |
bool | net_instaweb::BlinkUtil::StripTrailingNewline (GoogleString *s) |
StringPiece | net_instaweb::BlinkUtil::GetNonCacheableElements (const GoogleString &atf_non_cacheable_elements, const GoogleUrl &url) |
Gets non cacheable elements for this url. | |
void | net_instaweb::BlinkUtil::PopulateAttributeToNonCacheableValuesMap (const GoogleString &atf_non_cacheable_elements, const GoogleUrl &url, AttributesToNonCacheableValuesMap *attribute_non_cacheable_values_map, std::vector< int > *panel_number_num_instances) |
Populates the attributes to non cacheable values map. | |
int | net_instaweb::BlinkUtil::GetPanelNumberForNonCacheableElement (const AttributesToNonCacheableValuesMap &attribute_non_cacheable_values_map, const HtmlElement *element) |
Returns panel number for non cacheable element. If cacheable returns -1. | |
GoogleString | net_instaweb::BlinkUtil::GetPanelId (int panel_number, int instance_number) |
Gets panel id for the given panel instance. | |
Variables | |
const char | net_instaweb::BlinkUtil::kContiguous [] = "contiguous" |
const char | net_instaweb::BlinkUtil::kCritical [] = "critical" |
const char | net_instaweb::BlinkUtil::kPanelId [] = "panel-id" |
const char | net_instaweb::BlinkUtil::kImages [] = "images" |
const char | net_instaweb::BlinkUtil::kInstanceHtml [] = "instance_html" |
const char | net_instaweb::BlinkUtil::kStartBodyMarker [] = "<!--GooglePanel **** Start body ****-->" |
const char | net_instaweb::BlinkUtil::kEndBodyTag [] = "</body>" |
const char | net_instaweb::BlinkUtil::kLayoutMarker [] = "<!--GooglePanel **** Layout end ****-->" |
const char | net_instaweb::BlinkUtil::kJsonCachePrefix [] = "json:" |
const char | net_instaweb::BlinkUtil::kBlinkResponseCodePropertyName [] = "blink_last_response_code" |