Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(212)

Side by Side Diff: webkit/glue/weburlrequest_extradata_impl.h

Issue 14720012: Relanding this as the previous attempt failed due to build errors. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « webkit/glue/webkit_glue.gypi ('k') | webkit/glue/weburlresponse_extradata_impl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef WEBKIT_GLUE_WEBURLREQUEST_EXTRADATA_IMPL_H_ 5 #ifndef WEBKIT_GLUE_WEBURLREQUEST_EXTRADATA_IMPL_H_
6 #define WEBKIT_GLUE_WEBURLREQUEST_EXTRADATA_IMPL_H_ 6 #define WEBKIT_GLUE_WEBURLREQUEST_EXTRADATA_IMPL_H_
7 7
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "third_party/WebKit/Source/Platform/chromium/public/WebReferrerPolicy.h " 9 #include "third_party/WebKit/Source/Platform/chromium/public/WebReferrerPolicy.h "
10 #include "third_party/WebKit/Source/Platform/chromium/public/WebString.h" 10 #include "third_party/WebKit/Source/Platform/chromium/public/WebString.h"
11 #include "third_party/WebKit/Source/Platform/chromium/public/WebURLRequest.h" 11 #include "third_party/WebKit/Source/Platform/chromium/public/WebURLRequest.h"
12 #include "webkit/glue/webkit_glue_export.h"
13 12
14 namespace webkit_glue { 13 namespace webkit_glue {
15 14
16 // Base class for Chrome's implementation of the "extra data" stored in each 15 // Base class for Chrome's implementation of the "extra data" stored in each
17 // ResourceRequest. 16 // ResourceRequest.
18 class WEBKIT_GLUE_EXPORT WebURLRequestExtraDataImpl : 17 class WebURLRequestExtraDataImpl : public WebKit::WebURLRequest::ExtraData {
19 NON_EXPORTED_BASE(public WebKit::WebURLRequest::ExtraData) {
20 public: 18 public:
21 // |custom_user_agent| is used to communicate an overriding custom user agent 19 // |custom_user_agent| is used to communicate an overriding custom user agent
22 // to |RenderViewImpl::willSendRequest()|; set to a null string to indicate no 20 // to |RenderViewImpl::willSendRequest()|; set to a null string to indicate no
23 // override and an empty string to indicate that there should be no user 21 // override and an empty string to indicate that there should be no user
24 // agent. This needs to be here, instead of content's |RequestExtraData| since 22 // agent. This needs to be here, instead of content's |RequestExtraData| since
25 // ppb_url_request_info_impl.cc needs to be able to set it. 23 // ppb_url_request_info_impl.cc needs to be able to set it.
26 explicit WebURLRequestExtraDataImpl( 24 explicit WebURLRequestExtraDataImpl(
27 WebKit::WebReferrerPolicy referrer_policy, 25 WebKit::WebReferrerPolicy referrer_policy,
28 const WebKit::WebString& custom_user_agent); 26 const WebKit::WebString& custom_user_agent);
29 virtual ~WebURLRequestExtraDataImpl(); 27 virtual ~WebURLRequestExtraDataImpl();
30 28
31 WebKit::WebReferrerPolicy referrer_policy() const { return referrer_policy_; } 29 WebKit::WebReferrerPolicy referrer_policy() const { return referrer_policy_; }
32 const WebKit::WebString& custom_user_agent() const { 30 const WebKit::WebString& custom_user_agent() const {
33 return custom_user_agent_; 31 return custom_user_agent_;
34 } 32 }
35 33
36 private: 34 private:
37 WebKit::WebReferrerPolicy referrer_policy_; 35 WebKit::WebReferrerPolicy referrer_policy_;
38 WebKit::WebString custom_user_agent_; 36 WebKit::WebString custom_user_agent_;
39 37
40 DISALLOW_COPY_AND_ASSIGN(WebURLRequestExtraDataImpl); 38 DISALLOW_COPY_AND_ASSIGN(WebURLRequestExtraDataImpl);
41 }; 39 };
42 40
43 } // namespace webkit_glue 41 } // namespace webkit_glue
44 42
45 #endif // WEBKIT_GLUE_WEBURLREQUEST_EXTRADATA_IMPL_H_ 43 #endif // WEBKIT_GLUE_WEBURLREQUEST_EXTRADATA_IMPL_H_
OLDNEW
« no previous file with comments | « webkit/glue/webkit_glue.gypi ('k') | webkit/glue/weburlresponse_extradata_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698