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 CHROME_BROWSER_BROWSING_DATA_BROWSING_DATA_COOKIE_HELPER_H_ | 5 #ifndef CHROME_BROWSER_BROWSING_DATA_BROWSING_DATA_COOKIE_HELPER_H_ |
6 #define CHROME_BROWSER_BROWSING_DATA_BROWSING_DATA_COOKIE_HELPER_H_ | 6 #define CHROME_BROWSER_BROWSING_DATA_BROWSING_DATA_COOKIE_HELPER_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 | 58 |
59 // Notifies the completion callback. This must be called in the UI thread. | 59 // Notifies the completion callback. This must be called in the UI thread. |
60 void NotifyInUIThread(const net::CookieList& cookies); | 60 void NotifyInUIThread(const net::CookieList& cookies); |
61 | 61 |
62 // Delete a single cookie. This must be called in IO thread. | 62 // Delete a single cookie. This must be called in IO thread. |
63 void DeleteCookieOnIOThread(const net::CanonicalCookie& cookie); | 63 void DeleteCookieOnIOThread(const net::CanonicalCookie& cookie); |
64 | 64 |
65 // Indicates whether or not we're currently fetching information: | 65 // Indicates whether or not we're currently fetching information: |
66 // it's true when StartFetching() is called in the UI thread, and it's reset | 66 // it's true when StartFetching() is called in the UI thread, and it's reset |
67 // after we notify the callback in the UI thread. | 67 // after we notify the callback in the UI thread. |
68 // This only mutates on the UI thread. | 68 // This member is only mutated on the UI thread. |
69 bool is_fetching_; | 69 bool is_fetching_; |
70 | 70 |
71 scoped_refptr<net::URLRequestContextGetter> request_context_getter_; | 71 scoped_refptr<net::URLRequestContextGetter> request_context_getter_; |
72 | 72 |
73 // This only mutates on the UI thread. | 73 // This member is only mutated on the UI thread. |
74 base::Callback<void(const net::CookieList& cookies)> completion_callback_; | 74 base::Callback<void(const net::CookieList& cookies)> completion_callback_; |
75 | 75 |
76 DISALLOW_COPY_AND_ASSIGN(BrowsingDataCookieHelper); | 76 DISALLOW_COPY_AND_ASSIGN(BrowsingDataCookieHelper); |
77 }; | 77 }; |
78 | 78 |
79 // This class is a thin wrapper around BrowsingDataCookieHelper that does not | 79 // This class is a thin wrapper around BrowsingDataCookieHelper that does not |
80 // fetch its information from the persistent cookie store. It is a simple | 80 // fetch its information from the persistent cookie store. It is a simple |
81 // container for CanonicalCookies. Clients that use this container can add | 81 // container for CanonicalCookies. Clients that use this container can add |
82 // cookies that are sent to a server via the AddReadCookies method and cookies | 82 // cookies that are sent to a server via the AddReadCookies method and cookies |
83 // that are received from a server or set via JavaScript using the method | 83 // that are received from a server or set via JavaScript using the method |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
158 void AddCookie(const GURL& frame_url, | 158 void AddCookie(const GURL& frame_url, |
159 const net::CanonicalCookie& cookie); | 159 const net::CanonicalCookie& cookie); |
160 | 160 |
161 // Map that contains the cookie lists for all frame origins. | 161 // Map that contains the cookie lists for all frame origins. |
162 OriginCookieListMap origin_cookie_list_map_; | 162 OriginCookieListMap origin_cookie_list_map_; |
163 | 163 |
164 DISALLOW_COPY_AND_ASSIGN(CannedBrowsingDataCookieHelper); | 164 DISALLOW_COPY_AND_ASSIGN(CannedBrowsingDataCookieHelper); |
165 }; | 165 }; |
166 | 166 |
167 #endif // CHROME_BROWSER_BROWSING_DATA_BROWSING_DATA_COOKIE_HELPER_H_ | 167 #endif // CHROME_BROWSER_BROWSING_DATA_BROWSING_DATA_COOKIE_HELPER_H_ |
OLD | NEW |