Chromium Code Reviews| Index: net/base/network_delegate.h |
| diff --git a/net/base/network_delegate.h b/net/base/network_delegate.h |
| index baa67237d7f819ad7a5e806b9978760309f7f485..9fd921feb222275fb6ccc99a717be9c916a61fd9 100644 |
| --- a/net/base/network_delegate.h |
| +++ b/net/base/network_delegate.h |
| @@ -6,6 +6,8 @@ |
| #define NET_BASE_NETWORK_DELEGATE_H_ |
| #pragma once |
| +#include <string> |
| + |
| #include "base/callback.h" |
| #include "base/string16.h" |
| #include "base/threading/non_thread_safe.h" |
| @@ -26,6 +28,8 @@ namespace net { |
| // NOTE: It is not okay to add any compile-time dependencies on symbols outside |
| // of net/base here, because we have a net_base library. Forward declarations |
| // are ok. |
| +class CookieList; |
| +class CookieOptions; |
| class HttpRequestHeaders; |
| class HttpResponseHeaders; |
| class URLRequest; |
| @@ -73,6 +77,11 @@ class NetworkDelegate : public base::NonThreadSafe { |
| const AuthChallengeInfo& auth_info, |
| const AuthCallback& callback, |
| AuthCredentials* credentials); |
| + bool NotifyReadingCookies(const URLRequest* request, |
| + const CookieList& cookie_list); |
| + bool NotifySettingCookie(const URLRequest* request, |
| + const std::string& cookie_line, |
| + CookieOptions* options); |
| private: |
| // This is the interface for subclasses of NetworkDelegate to implement. This |
| @@ -169,6 +178,16 @@ class NetworkDelegate : public base::NonThreadSafe { |
| const AuthChallengeInfo& auth_info, |
| const AuthCallback& callback, |
| AuthCredentials* credentials) = 0; |
| + |
| + // Corresponds to URLRequestDelegate::CanGetCookies |
|
willchan no longer on Chromium
2012/03/01 20:30:10
I think the OnFoo() naming scheme works great for
|
| + virtual bool OnReadingCookies(const URLRequest* request, |
| + const CookieList& cookie_list) = 0; |
| + |
| + // Corresponds to URLRequestDelegate::CanSetCookie |
| + virtual bool OnSettingCookie(const URLRequest* request, |
| + const std::string& cookie_line, |
| + CookieOptions* options) = 0; |
| + |
| }; |
| } // namespace net |