19 #ifndef NET_INSTAWEB_REWRITER_PUBLIC_TEST_URL_NAMER_H_
20 #define NET_INSTAWEB_REWRITER_PUBLIC_TEST_URL_NAMER_H_
24 #include "pagespeed/kernel/base/basictypes.h"
25 #include "pagespeed/kernel/base/string.h"
26 #include "pagespeed/kernel/base/string_util.h"
28 namespace net_instaweb {
44 EncodeOption encode_option)
const;
46 bool Decode(
const GoogleUrl& request_url,
48 GoogleString* decoded)
const override;
50 static GoogleString EncodeUrl(
const StringPiece& original_base,
51 const StringPiece& unmapped_base,
52 const StringPiece& resolved_path,
57 virtual bool ProxyMode()
const {
return proxy_mode_; }
68 use_normal_encoding_ = yes;
71 static bool UseNormalEncoding() {
return use_normal_encoding_; }
74 bool IsOriginEncoded(
const GoogleUrl& url)
const;
75 bool IsPathEncoded(
const GoogleUrl& url)
const;
77 static bool use_normal_encoding_;
78 static bool proxy_mode_;
Definition: url_namer.h:38
virtual bool ProxyMode() const
Definition: test_url_namer.h:57
virtual GoogleString Encode(const RewriteOptions *rewrite_options, const OutputResource &output_resource, EncodeOption encode_option) const
static void SetProxyMode(bool value)
Set whether a test needs the URL namer to act in proxy mode.
Definition: test_url_namer.h:63
Definition: test_url_namer.h:37
virtual bool IsProxyEncoded(const GoogleUrl &url) const
Determines whether the specified URL has been mapped to our proxy domain.
Definition: output_resource.h:44
bool Decode(const GoogleUrl &request_url, const RewriteOptions *rewrite_options, GoogleString *decoded) const override
static void UseNormalEncoding(bool yes)
Definition: test_url_namer.h:67
Definition: rewrite_options.h:84
Definition: resource_namer.h:32