| 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 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 125 | 125 |
| 126 // Clears the list of canned cookies. | 126 // Clears the list of canned cookies. |
| 127 void Reset(); | 127 void Reset(); |
| 128 | 128 |
| 129 // True if no cookie are currently stored. | 129 // True if no cookie are currently stored. |
| 130 bool empty() const; | 130 bool empty() const; |
| 131 | 131 |
| 132 // BrowsingDataCookieHelper methods. | 132 // BrowsingDataCookieHelper methods. |
| 133 virtual void StartFetching( | 133 virtual void StartFetching( |
| 134 const net::CookieMonster::GetCookieListCallback& callback) OVERRIDE; | 134 const net::CookieMonster::GetCookieListCallback& callback) OVERRIDE; |
| 135 virtual void DeleteCookie(const net::CanonicalCookie& cookie) OVERRIDE; |
| 135 | 136 |
| 136 // Returns the number of stored cookies. | 137 // Returns the number of stored cookies. |
| 137 size_t GetCookieCount() const; | 138 size_t GetCookieCount() const; |
| 138 | 139 |
| 139 // Returns the map that contains the cookie lists for all frame urls. | 140 // Returns the map that contains the cookie lists for all frame urls. |
| 140 const OriginCookieListMap& origin_cookie_list_map() { | 141 const OriginCookieListMap& origin_cookie_list_map() { |
| 141 return origin_cookie_list_map_; | 142 return origin_cookie_list_map_; |
| 142 } | 143 } |
| 143 | 144 |
| 144 private: | 145 private: |
| (...skipping 12 matching lines...) Expand all Loading... |
| 157 void AddCookie(const GURL& frame_url, | 158 void AddCookie(const GURL& frame_url, |
| 158 const net::CanonicalCookie& cookie); | 159 const net::CanonicalCookie& cookie); |
| 159 | 160 |
| 160 // Map that contains the cookie lists for all frame origins. | 161 // Map that contains the cookie lists for all frame origins. |
| 161 OriginCookieListMap origin_cookie_list_map_; | 162 OriginCookieListMap origin_cookie_list_map_; |
| 162 | 163 |
| 163 DISALLOW_COPY_AND_ASSIGN(CannedBrowsingDataCookieHelper); | 164 DISALLOW_COPY_AND_ASSIGN(CannedBrowsingDataCookieHelper); |
| 164 }; | 165 }; |
| 165 | 166 |
| 166 #endif // CHROME_BROWSER_BROWSING_DATA_BROWSING_DATA_COOKIE_HELPER_H_ | 167 #endif // CHROME_BROWSER_BROWSING_DATA_BROWSING_DATA_COOKIE_HELPER_H_ |
| OLD | NEW |