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

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

Issue 10795071: Merge 147060 to 1180 (M21) - PPAPI (Flash): Properly honor Pepper url requests with custom user age… (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1180/src/
Patch Set: Created 8 years, 5 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 | « content/renderer/render_view_impl.cc ('k') | webkit/glue/weburlrequest_extradata_impl.cc » ('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 #pragma once 7 #pragma once
8 8
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "third_party/WebKit/Source/Platform/chromium/public/WebReferrerPolicy.h " 10 #include "third_party/WebKit/Source/Platform/chromium/public/WebReferrerPolicy.h "
11 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebString.h"
11 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURLReques t.h" 12 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURLReques t.h"
12 #include "webkit/glue/webkit_glue_export.h" 13 #include "webkit/glue/webkit_glue_export.h"
13 14
14 namespace webkit_glue { 15 namespace webkit_glue {
15 16
16 // Base class for Chrome's implementation of the "extra data" stored in each 17 // Base class for Chrome's implementation of the "extra data" stored in each
17 // ResourceRequest. 18 // ResourceRequest.
18 class WEBKIT_GLUE_EXPORT WebURLRequestExtraDataImpl : 19 class WEBKIT_GLUE_EXPORT WebURLRequestExtraDataImpl :
19 NON_EXPORTED_BASE(public WebKit::WebURLRequest::ExtraData) { 20 NON_EXPORTED_BASE(public WebKit::WebURLRequest::ExtraData) {
20 public: 21 public:
22 // |custom_user_agent| is used to communicate an overriding custom user agent
23 // to |RenderViewImpl::willSendRequest()|; set to a null string to indicate no
24 // override and an empty string to indicate that there should be no user
25 // agent. This needs to be here, instead of content's |RequestExtraData| since
26 // ppb_url_request_info_impl.cc needs to be able to set it.
21 explicit WebURLRequestExtraDataImpl( 27 explicit WebURLRequestExtraDataImpl(
22 WebKit::WebReferrerPolicy referrer_policy); 28 WebKit::WebReferrerPolicy referrer_policy,
29 const WebKit::WebString& custom_user_agent);
23 virtual ~WebURLRequestExtraDataImpl(); 30 virtual ~WebURLRequestExtraDataImpl();
24 31
25 WebKit::WebReferrerPolicy referrer_policy() const { return referrer_policy_; } 32 WebKit::WebReferrerPolicy referrer_policy() const { return referrer_policy_; }
33 const WebKit::WebString& custom_user_agent() const {
34 return custom_user_agent_;
35 }
26 36
27 private: 37 private:
28 WebKit::WebReferrerPolicy referrer_policy_; 38 WebKit::WebReferrerPolicy referrer_policy_;
39 WebKit::WebString custom_user_agent_;
29 40
30 DISALLOW_COPY_AND_ASSIGN(WebURLRequestExtraDataImpl); 41 DISALLOW_COPY_AND_ASSIGN(WebURLRequestExtraDataImpl);
31 }; 42 };
32 43
33 } // namespace webkit_glue 44 } // namespace webkit_glue
34 45
35 #endif // WEBKIT_GLUE_WEBURLREQUEST_EXTRADATA_IMPL_H_ 46 #endif // WEBKIT_GLUE_WEBURLREQUEST_EXTRADATA_IMPL_H_
OLDNEW
« no previous file with comments | « content/renderer/render_view_impl.cc ('k') | webkit/glue/weburlrequest_extradata_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698