OLD | NEW |
| (Empty) |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef WEBKIT_CHILD_WEBURLREQUEST_EXTRADATA_IMPL_H_ | |
6 #define WEBKIT_CHILD_WEBURLREQUEST_EXTRADATA_IMPL_H_ | |
7 | |
8 #include "base/compiler_specific.h" | |
9 #include "third_party/WebKit/public/platform/WebString.h" | |
10 #include "third_party/WebKit/public/platform/WebURLRequest.h" | |
11 #include "webkit/child/webkit_child_export.h" | |
12 | |
13 namespace webkit_glue { | |
14 | |
15 // Base class for Chrome's implementation of the "extra data" stored in each | |
16 // ResourceRequest. | |
17 class WEBKIT_CHILD_EXPORT WebURLRequestExtraDataImpl : | |
18 public NON_EXPORTED_BASE(blink::WebURLRequest::ExtraData) { | |
19 public: | |
20 // |custom_user_agent| is used to communicate an overriding custom user agent | |
21 // to |RenderViewImpl::willSendRequest()|; set to a null string to indicate no | |
22 // override and an empty string to indicate that there should be no user | |
23 // agent. This needs to be here, instead of content's |RequestExtraData| since | |
24 // ppb_url_request_info_impl.cc needs to be able to set it. | |
25 explicit WebURLRequestExtraDataImpl( | |
26 const blink::WebString& custom_user_agent, | |
27 bool was_after_preconnect_request); | |
28 virtual ~WebURLRequestExtraDataImpl(); | |
29 | |
30 const blink::WebString& custom_user_agent() const { | |
31 return custom_user_agent_; | |
32 } | |
33 bool was_after_preconnect_request() { return was_after_preconnect_request_; } | |
34 | |
35 private: | |
36 blink::WebString custom_user_agent_; | |
37 bool was_after_preconnect_request_; | |
38 | |
39 DISALLOW_COPY_AND_ASSIGN(WebURLRequestExtraDataImpl); | |
40 }; | |
41 | |
42 } // namespace webkit_glue | |
43 | |
44 #endif // WEBKIT_CHILD_WEBURLREQUEST_EXTRADATA_IMPL_H_ | |
OLD | NEW |