| OLD | NEW |
| 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 ANDROID_WEBVIEW_BROWSER_AW_COOKIE_ACCESS_POLICY_H_ | 5 #ifndef ANDROID_WEBVIEW_BROWSER_AW_COOKIE_ACCESS_POLICY_H_ |
| 6 #define ANDROID_WEBVIEW_BROWSER_AW_COOKIE_ACCESS_POLICY_H_ | 6 #define ANDROID_WEBVIEW_BROWSER_AW_COOKIE_ACCESS_POLICY_H_ |
| 7 | 7 |
| 8 #include "base/lazy_instance.h" | 8 #include "base/lazy_instance.h" |
| 9 #include "base/macros.h" | 9 #include "base/macros.h" |
| 10 #include "base/synchronization/lock.h" | 10 #include "base/synchronization/lock.h" |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 58 int render_frame_id); | 58 int render_frame_id); |
| 59 bool AllowSetCookie(const GURL& url, | 59 bool AllowSetCookie(const GURL& url, |
| 60 const GURL& first_party, | 60 const GURL& first_party, |
| 61 const std::string& cookie_line, | 61 const std::string& cookie_line, |
| 62 content::ResourceContext* context, | 62 content::ResourceContext* context, |
| 63 int render_process_id, | 63 int render_process_id, |
| 64 int render_frame_id, | 64 int render_frame_id, |
| 65 const net::CookieOptions& options); | 65 const net::CookieOptions& options); |
| 66 | 66 |
| 67 private: | 67 private: |
| 68 friend struct base::DefaultLazyInstanceTraits<AwCookieAccessPolicy>; | 68 friend struct base::LazyInstanceTraitsBase<AwCookieAccessPolicy>; |
| 69 | 69 |
| 70 AwCookieAccessPolicy(); | 70 AwCookieAccessPolicy(); |
| 71 ~AwCookieAccessPolicy(); | 71 ~AwCookieAccessPolicy(); |
| 72 bool accept_cookies_; | 72 bool accept_cookies_; |
| 73 base::Lock lock_; | 73 base::Lock lock_; |
| 74 | 74 |
| 75 DISALLOW_COPY_AND_ASSIGN(AwCookieAccessPolicy); | 75 DISALLOW_COPY_AND_ASSIGN(AwCookieAccessPolicy); |
| 76 }; | 76 }; |
| 77 | 77 |
| 78 class AwStaticCookiePolicy { | 78 class AwStaticCookiePolicy { |
| (...skipping 24 matching lines...) Expand all Loading... |
| 103 // If ShouldAcceptCookies and ShouldAcceptThirdPartyCookies | 103 // If ShouldAcceptCookies and ShouldAcceptThirdPartyCookies |
| 104 // then allow all cookies. | 104 // then allow all cookies. |
| 105 net::StaticCookiePolicy::Type GetPolicy(const GURL& url) const; | 105 net::StaticCookiePolicy::Type GetPolicy(const GURL& url) const; |
| 106 | 106 |
| 107 DISALLOW_COPY_AND_ASSIGN(AwStaticCookiePolicy); | 107 DISALLOW_COPY_AND_ASSIGN(AwStaticCookiePolicy); |
| 108 }; | 108 }; |
| 109 | 109 |
| 110 } // namespace android_webview | 110 } // namespace android_webview |
| 111 | 111 |
| 112 #endif // ANDROID_WEBVIEW_BROWSER_AW_COOKIE_ACCESS_POLICY_H_ | 112 #endif // ANDROID_WEBVIEW_BROWSER_AW_COOKIE_ACCESS_POLICY_H_ |
| OLD | NEW |