OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_PRERENDER_PRERENDER_COOKIE_STORE_H_ | 5 #ifndef CHROME_BROWSER_PRERENDER_PRERENDER_COOKIE_STORE_H_ |
6 #define CHROME_BROWSER_PRERENDER_PRERENDER_COOKIE_STORE_H_ | 6 #define CHROME_BROWSER_PRERENDER_PRERENDER_COOKIE_STORE_H_ |
7 | 7 |
8 #include <set> | 8 #include <set> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
94 // were updated. | 94 // were updated. |
95 void ApplyChanges(std::vector<GURL>* cookie_change_urls); | 95 void ApplyChanges(std::vector<GURL>* cookie_change_urls); |
96 | 96 |
97 // Called when a cookie for a URL is changed in the underlying default cookie | 97 // Called when a cookie for a URL is changed in the underlying default cookie |
98 // store. To be called on the IO thread. If the key corresponding to the URL | 98 // store. To be called on the IO thread. If the key corresponding to the URL |
99 // was copied or read, the prerender will be cancelled. | 99 // was copied or read, the prerender will be cancelled. |
100 void OnCookieChangedForURL(net::CookieMonster* cookie_monster, | 100 void OnCookieChangedForURL(net::CookieMonster* cookie_monster, |
101 const GURL& url); | 101 const GURL& url); |
102 | 102 |
103 net::CookieMonster* default_cookie_monster() { | 103 net::CookieMonster* default_cookie_monster() { |
104 return default_cookie_monster_; | 104 return default_cookie_monster_.get(); |
105 } | 105 } |
106 | 106 |
107 private: | 107 private: |
108 enum CookieOperationType { | 108 enum CookieOperationType { |
109 COOKIE_OP_SET_COOKIE_WITH_OPTIONS_ASYNC, | 109 COOKIE_OP_SET_COOKIE_WITH_OPTIONS_ASYNC, |
110 COOKIE_OP_GET_COOKIES_WITH_OPTIONS_ASYNC, | 110 COOKIE_OP_GET_COOKIES_WITH_OPTIONS_ASYNC, |
111 COOKIE_OP_GET_ALL_COOKIES_FOR_URL_ASYNC, | 111 COOKIE_OP_GET_ALL_COOKIES_FOR_URL_ASYNC, |
112 COOKIE_OP_DELETE_COOKIE_ASYNC, | 112 COOKIE_OP_DELETE_COOKIE_ASYNC, |
113 COOKIE_OP_MAX | 113 COOKIE_OP_MAX |
114 }; | 114 }; |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
155 | 155 |
156 // Indicates whether a cookie conflict has been detected yet. | 156 // Indicates whether a cookie conflict has been detected yet. |
157 bool cookie_conflict_; | 157 bool cookie_conflict_; |
158 | 158 |
159 DISALLOW_COPY_AND_ASSIGN(PrerenderCookieStore); | 159 DISALLOW_COPY_AND_ASSIGN(PrerenderCookieStore); |
160 }; | 160 }; |
161 | 161 |
162 } // namespace prerender | 162 } // namespace prerender |
163 | 163 |
164 #endif // CHROME_BROWSER_PRERENDER_PRERENDER_COOKIE_STORE_H_ | 164 #endif // CHROME_BROWSER_PRERENDER_PRERENDER_COOKIE_STORE_H_ |
OLD | NEW |