OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 CHROME_RENDERER_SECURITY_FILTER_PEER_H_ | 5 #ifndef CHROME_RENDERER_SECURITY_FILTER_PEER_H_ |
6 #define CHROME_RENDERER_SECURITY_FILTER_PEER_H_ | 6 #define CHROME_RENDERER_SECURITY_FILTER_PEER_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "webkit/glue/resource_loader_bridge.h" | 9 #include "webkit/glue/resource_loader_bridge.h" |
10 | 10 |
(...skipping 25 matching lines...) Expand all Loading... |
36 bool* has_new_first_party_for_cookies, | 36 bool* has_new_first_party_for_cookies, |
37 GURL* new_first_party_for_cookies) OVERRIDE; | 37 GURL* new_first_party_for_cookies) OVERRIDE; |
38 virtual void OnReceivedResponse( | 38 virtual void OnReceivedResponse( |
39 const webkit_glue::ResourceResponseInfo& info) OVERRIDE; | 39 const webkit_glue::ResourceResponseInfo& info) OVERRIDE; |
40 virtual void OnDownloadedData(int len) OVERRIDE {} | 40 virtual void OnDownloadedData(int len) OVERRIDE {} |
41 virtual void OnReceivedData(const char* data, | 41 virtual void OnReceivedData(const char* data, |
42 int data_length, | 42 int data_length, |
43 int encoded_data_length) OVERRIDE; | 43 int encoded_data_length) OVERRIDE; |
44 virtual void OnCompletedRequest( | 44 virtual void OnCompletedRequest( |
45 const net::URLRequestStatus& status, | 45 const net::URLRequestStatus& status, |
| 46 bool handled_externally, |
46 const std::string& security_info, | 47 const std::string& security_info, |
47 const base::TimeTicks& completion_time) OVERRIDE; | 48 const base::TimeTicks& completion_time) OVERRIDE; |
48 | 49 |
49 protected: | 50 protected: |
50 SecurityFilterPeer(webkit_glue::ResourceLoaderBridge* resource_loader_bridge, | 51 SecurityFilterPeer(webkit_glue::ResourceLoaderBridge* resource_loader_bridge, |
51 webkit_glue::ResourceLoaderBridge::Peer* peer); | 52 webkit_glue::ResourceLoaderBridge::Peer* peer); |
52 | 53 |
53 webkit_glue::ResourceLoaderBridge::Peer* original_peer_; | 54 webkit_glue::ResourceLoaderBridge::Peer* original_peer_; |
54 webkit_glue::ResourceLoaderBridge* resource_loader_bridge_; | 55 webkit_glue::ResourceLoaderBridge* resource_loader_bridge_; |
55 | 56 |
(...skipping 11 matching lines...) Expand all Loading... |
67 virtual ~BufferedPeer(); | 68 virtual ~BufferedPeer(); |
68 | 69 |
69 // ResourceLoaderBridge::Peer Implementation. | 70 // ResourceLoaderBridge::Peer Implementation. |
70 virtual void OnReceivedResponse( | 71 virtual void OnReceivedResponse( |
71 const webkit_glue::ResourceResponseInfo& info) OVERRIDE; | 72 const webkit_glue::ResourceResponseInfo& info) OVERRIDE; |
72 virtual void OnReceivedData(const char* data, | 73 virtual void OnReceivedData(const char* data, |
73 int data_length, | 74 int data_length, |
74 int encoded_data_length) OVERRIDE; | 75 int encoded_data_length) OVERRIDE; |
75 virtual void OnCompletedRequest( | 76 virtual void OnCompletedRequest( |
76 const net::URLRequestStatus& status, | 77 const net::URLRequestStatus& status, |
| 78 bool handled_externally, |
77 const std::string& security_info, | 79 const std::string& security_info, |
78 const base::TimeTicks& completion_time) OVERRIDE; | 80 const base::TimeTicks& completion_time) OVERRIDE; |
79 | 81 |
80 protected: | 82 protected: |
81 // Invoked when the entire request has been processed before the data is sent | 83 // Invoked when the entire request has been processed before the data is sent |
82 // to the original peer, giving an opportunity to subclasses to process the | 84 // to the original peer, giving an opportunity to subclasses to process the |
83 // data in data_. If this method returns true, the data is fed to the | 85 // data in data_. If this method returns true, the data is fed to the |
84 // original peer, if it returns false, an error is sent instead. | 86 // original peer, if it returns false, an error is sent instead. |
85 virtual bool DataReady() = 0; | 87 virtual bool DataReady() = 0; |
86 | 88 |
(...skipping 23 matching lines...) Expand all Loading... |
110 virtual ~ReplaceContentPeer(); | 112 virtual ~ReplaceContentPeer(); |
111 | 113 |
112 // ResourceLoaderBridge::Peer Implementation. | 114 // ResourceLoaderBridge::Peer Implementation. |
113 virtual void OnReceivedResponse( | 115 virtual void OnReceivedResponse( |
114 const webkit_glue::ResourceResponseInfo& info) OVERRIDE; | 116 const webkit_glue::ResourceResponseInfo& info) OVERRIDE; |
115 virtual void OnReceivedData(const char* data, | 117 virtual void OnReceivedData(const char* data, |
116 int data_length, | 118 int data_length, |
117 int encoded_data_length) OVERRIDE; | 119 int encoded_data_length) OVERRIDE; |
118 virtual void OnCompletedRequest( | 120 virtual void OnCompletedRequest( |
119 const net::URLRequestStatus& status, | 121 const net::URLRequestStatus& status, |
| 122 bool handled_externally, |
120 const std::string& security_info, | 123 const std::string& security_info, |
121 const base::TimeTicks& completion_time) OVERRIDE; | 124 const base::TimeTicks& completion_time) OVERRIDE; |
122 | 125 |
123 private: | 126 private: |
124 webkit_glue::ResourceResponseInfo response_info_; | 127 webkit_glue::ResourceResponseInfo response_info_; |
125 std::string mime_type_; | 128 std::string mime_type_; |
126 std::string data_; | 129 std::string data_; |
127 | 130 |
128 DISALLOW_COPY_AND_ASSIGN(ReplaceContentPeer); | 131 DISALLOW_COPY_AND_ASSIGN(ReplaceContentPeer); |
129 }; | 132 }; |
130 | 133 |
131 #endif // CHROME_RENDERER_SECURITY_FILTER_PEER_H_ | 134 #endif // CHROME_RENDERER_SECURITY_FILTER_PEER_H_ |
OLD | NEW |