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

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

Issue 10440014: Correctly whitelist ftp directory listings. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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
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_WEBURLRESPONSE_EXTRADATA_IMPL_H_ 5 #ifndef WEBKIT_GLUE_WEBURLRESPONSE_EXTRADATA_IMPL_H_
6 #define WEBKIT_GLUE_WEBURLRESPONSE_EXTRADATA_IMPL_H_ 6 #define WEBKIT_GLUE_WEBURLRESPONSE_EXTRADATA_IMPL_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 10
11 #include "base/basictypes.h" 11 #include "base/basictypes.h"
12 #include "base/compiler_specific.h" 12 #include "base/compiler_specific.h"
13 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURLRespon se.h" 13 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURLRespon se.h"
14 #include "webkit/glue/webkit_glue_export.h" 14 #include "webkit/glue/webkit_glue_export.h"
15 15
16 namespace webkit_glue { 16 namespace webkit_glue {
17 17
18 // Base class for Chrome's implementation of the "extra data". 18 // Base class for Chrome's implementation of the "extra data".
19 class WEBKIT_GLUE_EXPORT WebURLResponseExtraDataImpl 19 class WEBKIT_GLUE_EXPORT WebURLResponseExtraDataImpl
20 : NON_EXPORTED_BASE(public WebKit::WebURLResponse::ExtraData) { 20 : NON_EXPORTED_BASE(public WebKit::WebURLResponse::ExtraData) {
21 public: 21 public:
22 explicit WebURLResponseExtraDataImpl( 22 explicit WebURLResponseExtraDataImpl(
23 const std::string& npn_negotiated_protocol); 23 const std::string& npn_negotiated_protocol);
24 virtual ~WebURLResponseExtraDataImpl(); 24 virtual ~WebURLResponseExtraDataImpl();
25 25
26 const std::string& npn_negotiated_protocol() const { 26 const std::string& npn_negotiated_protocol() const {
27 return npn_negotiated_protocol_; 27 return npn_negotiated_protocol_;
28 } 28 }
29 bool is_multipart_payload() const { return is_multipart_payload_; }
30 void set_is_multipart_payload(bool is_multipart_payload) {
31 is_multipart_payload_ = is_multipart_payload;
32 }
33 bool is_ftp_directory_listing() const { return is_ftp_directory_listing_; }
34 void set_is_ftp_directory_listing(bool is_ftp_directory_listing) {
35 is_ftp_directory_listing_ = is_ftp_directory_listing;
36 }
37
29 38
30 private: 39 private:
31 std::string npn_negotiated_protocol_; 40 std::string npn_negotiated_protocol_;
41 bool is_multipart_payload_;
42 bool is_ftp_directory_listing_;
32 43
33 DISALLOW_COPY_AND_ASSIGN(WebURLResponseExtraDataImpl); 44 DISALLOW_COPY_AND_ASSIGN(WebURLResponseExtraDataImpl);
34 }; 45 };
35 46
36 } // namespace webkit_glue 47 } // namespace webkit_glue
37 48
38 #endif // WEBKIT_GLUE_WEBURLRESPONSE_EXTRADATA_IMPL_H_ 49 #endif // WEBKIT_GLUE_WEBURLRESPONSE_EXTRADATA_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698