19 #ifndef NET_INSTAWEB_REWRITER_PUBLIC_TEST_URL_NAMER_H_
20 #define NET_INSTAWEB_REWRITER_PUBLIC_TEST_URL_NAMER_H_
28 namespace net_instaweb {
44 EncodeOption encode_option)
const;
46 virtual bool Decode(
const GoogleUrl& request_url,
48 GoogleUrl* owner_domain,
49 GoogleString* decoded)
const;
51 static GoogleString EncodeUrl(
const StringPiece& original_base,
52 const StringPiece& unmapped_base,
53 const StringPiece& resolved_path,
58 virtual bool ProxyMode()
const {
return proxy_mode_; }
69 use_normal_encoding_ = yes;
72 static bool UseNormalEncoding() {
return use_normal_encoding_; }
75 bool IsOriginEncoded(
const GoogleUrl& url)
const;
76 bool IsPathEncoded(
const GoogleUrl& url)
const;
78 static bool use_normal_encoding_;
79 static bool proxy_mode_;
81 DISALLOW_COPY_AND_ASSIGN(TestUrlNamer);
Definition: url_namer.h:37
virtual bool ProxyMode() const
Definition: test_url_namer.h:58
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:64
virtual bool Decode(const GoogleUrl &request_url, const RewriteOptions *rewrite_options, GoogleUrl *owner_domain, GoogleString *decoded) const
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
static void UseNormalEncoding(bool yes)
Definition: test_url_namer.h:68
Definition: rewrite_options.h:81
Definition: resource_namer.h:32