17 #ifndef PAGESPEED_KERNEL_HTTP_QUERY_PARAMS_H_
18 #define PAGESPEED_KERNEL_HTTP_QUERY_PARAMS_H_
26 namespace net_instaweb {
56 bool empty()
const {
return map_.empty(); }
57 void Clear() { map_.Clear(); }
72 ConstStringStarVector* values)
const {
73 return map_.
Lookup(name, values);
97 bool Has(
const StringPiece& name)
const {
return map_.Has(name); }
109 StringPiece name(
int index)
const {
return map_.name(index); }
118 return map_.
value(index);
127 void AddEscaped(
const StringPiece& key,
const StringPiece& value) {
128 return map_.
Add(key, value);
132 map_.CopyFrom(query_param.map_);
136 StringMultiMapSensitive map_;
class GoogleUrl
Definition: google_url.h:58
Parses and rewrites URL query parameters.
Definition: query_params.h:31
void ParseFromUrl(const GoogleUrl &gurl)
bool UnescapedValue(int index, GoogleString *escaped_val) const
bool LookupEscaped(const StringPiece &name, ConstStringStarVector *values) const
Definition: query_params.h:71
bool RemoveAll(const StringPiece &key)
Remove all variables by name. Returns true if anything was removed.
Definition: query_params.h:100
void ParseFromUntrustedString(StringPiece query_param_string)
const GoogleString * EscapedValue(int index) const
Definition: query_params.h:117
void AddEscaped(const StringPiece &key, const StringPiece &value)
Add a new variable. The value can be null.
Definition: query_params.h:127
void Add(const StringPiece &key, const StringPiece &value)
Add a new variable. The value can be null.
Definition: string_multi_map.h:169
bool Lookup(const StringPiece &name, ConstStringStarVector *values) const
Definition: string_multi_map.h:69
bool RemoveAll(const StringPiece &key)
Remove all variables by name. Returns true if anything was removed.
Definition: string_multi_map.h:97
int num_values() const
Definition: string_multi_map.h:63
std::string GoogleString
PAGESPEED_KERNEL_BASE_STRING_H_.
Definition: string.h:24
bool Lookup1Unescaped(const StringPiece &name, GoogleString *escaped_value) const
const GoogleString * Lookup1Escaped(const StringPiece &name) const
Definition: query_params.h:87
const GoogleString * value(int index) const
Note that the value can be NULL.
Definition: string_multi_map.h:166
bool RemoveAllFromSortedArray(const StringPiece *names, int names_size)
Definition: query_params.h:105
const GoogleString * Lookup1(const StringPiece &name) const
Definition: string_multi_map.h:83
GoogleString ToEscapedString() const
Generates an escaped query-string.
bool RemoveAllFromSortedArray(const StringPiece *names, int names_size)
Definition: string_multi_map.h:104