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

Side by Side Diff: net/socket_stream/socket_stream.h

Issue 19269012: Don't persist HPKP if PrivacyMode is enabled. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Disable URLRequestTestHTTP.ProcessPKP_PrivacyMode in chrome_frame_net_tests. Created 7 years, 3 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 | « net/http/transport_security_state_unittest.cc ('k') | net/socket_stream/socket_stream.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 NET_SOCKET_STREAM_SOCKET_STREAM_H_ 5 #ifndef NET_SOCKET_STREAM_SOCKET_STREAM_H_
6 #define NET_SOCKET_STREAM_SOCKET_STREAM_H_ 6 #define NET_SOCKET_STREAM_SOCKET_STREAM_H_
7 7
8 #include <deque> 8 #include <deque>
9 #include <map> 9 #include <map>
10 #include <string> 10 #include <string>
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 SocketStream(const GURL& url, Delegate* delegate); 117 SocketStream(const GURL& url, Delegate* delegate);
118 118
119 // The user data allows the clients to associate data with this job. 119 // The user data allows the clients to associate data with this job.
120 // Multiple user data values can be stored under different keys. 120 // Multiple user data values can be stored under different keys.
121 // This job will TAKE OWNERSHIP of the given data pointer, and will 121 // This job will TAKE OWNERSHIP of the given data pointer, and will
122 // delete the object if it is changed or the job is destroyed. 122 // delete the object if it is changed or the job is destroyed.
123 UserData* GetUserData(const void* key) const; 123 UserData* GetUserData(const void* key) const;
124 void SetUserData(const void* key, UserData* data); 124 void SetUserData(const void* key, UserData* data);
125 125
126 const GURL& url() const { return url_; } 126 const GURL& url() const { return url_; }
127 GURL url_for_cookies() const { return GetURLForCookies(url_); }
127 bool is_secure() const; 128 bool is_secure() const;
128 const AddressList& address_list() const { return addresses_; } 129 const AddressList& address_list() const { return addresses_; }
129 Delegate* delegate() const { return delegate_; } 130 Delegate* delegate() const { return delegate_; }
130 int max_pending_send_allowed() const { return max_pending_send_allowed_; } 131 int max_pending_send_allowed() const { return max_pending_send_allowed_; }
131 132
132 URLRequestContext* context() { return context_; } 133 URLRequestContext* context() { return context_; }
133 // There're some asynchronous operations and members that are constructed from 134 // There're some asynchronous operations and members that are constructed from
134 // |context|. Be careful when you use this for the second time or more. 135 // |context|. Be careful when you use this for the second time or more.
135 void set_context(URLRequestContext* context); 136 void set_context(URLRequestContext* context);
136 137
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 void CancelWithError(int error); 174 void CancelWithError(int error);
174 175
175 // Cancels the connection because of receiving a certificate with an error. 176 // Cancels the connection because of receiving a certificate with an error.
176 void CancelWithSSLError(const SSLInfo& ssl_info); 177 void CancelWithSSLError(const SSLInfo& ssl_info);
177 178
178 // Continues to establish the connection in spite of an error. Usually this 179 // Continues to establish the connection in spite of an error. Usually this
179 // case happens because users allow certificate with an error by manual 180 // case happens because users allow certificate with an error by manual
180 // actions on alert dialog or browser cached such kinds of user actions. 181 // actions on alert dialog or browser cached such kinds of user actions.
181 void ContinueDespiteError(); 182 void ContinueDespiteError();
182 183
184 // Replace ws(s) URL Schema with http(s) for cookie policy checking.
Ryan Sleevi 2013/09/13 22:14:48 1) Why is this public 2) The documentation describ
mef 2013/09/16 15:00:08 It is public to be accessible from SocketStreamJob
Ryan Sleevi 2013/09/17 18:53:03 // Returns the URL to be used for cookie policy ch
mef 2013/09/17 20:38:37 Done.
185 static GURL GetURLForCookies(const GURL& url);
186
183 protected: 187 protected:
184 friend class base::RefCountedThreadSafe<SocketStream>; 188 friend class base::RefCountedThreadSafe<SocketStream>;
185 virtual ~SocketStream(); 189 virtual ~SocketStream();
186 190
187 Delegate* delegate_; 191 Delegate* delegate_;
188 192
189 private: 193 private:
190 FRIEND_TEST_ALL_PREFIXES(SocketStreamTest, IOPending); 194 FRIEND_TEST_ALL_PREFIXES(SocketStreamTest, IOPending);
191 FRIEND_TEST_ALL_PREFIXES(SocketStreamTest, SwitchAfterPending); 195 FRIEND_TEST_ALL_PREFIXES(SocketStreamTest, SwitchAfterPending);
192 196
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
386 bool server_closed_; 390 bool server_closed_;
387 391
388 scoped_ptr<SocketStreamMetrics> metrics_; 392 scoped_ptr<SocketStreamMetrics> metrics_;
389 393
390 DISALLOW_COPY_AND_ASSIGN(SocketStream); 394 DISALLOW_COPY_AND_ASSIGN(SocketStream);
391 }; 395 };
392 396
393 } // namespace net 397 } // namespace net
394 398
395 #endif // NET_SOCKET_STREAM_SOCKET_STREAM_H_ 399 #endif // NET_SOCKET_STREAM_SOCKET_STREAM_H_
OLDNEW
« no previous file with comments | « net/http/transport_security_state_unittest.cc ('k') | net/socket_stream/socket_stream.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698