OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_COOKIE_HELPER_H_ | 5 #ifndef CHROME_BROWSER_BROWSING_DATA_COOKIE_HELPER_H_ |
6 #define CHROME_BROWSER_BROWSING_DATA_COOKIE_HELPER_H_ | 6 #define CHROME_BROWSER_BROWSING_DATA_COOKIE_HELPER_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
105 const net::CookieOptions& options); | 105 const net::CookieOptions& options); |
106 | 106 |
107 // Clears the list of canned cookies. | 107 // Clears the list of canned cookies. |
108 void Reset(); | 108 void Reset(); |
109 | 109 |
110 // True if no cookie are currently stored. | 110 // True if no cookie are currently stored. |
111 bool empty() const; | 111 bool empty() const; |
112 | 112 |
113 // BrowsingDataCookieHelper methods. | 113 // BrowsingDataCookieHelper methods. |
114 virtual void StartFetching( | 114 virtual void StartFetching( |
115 const net::CookieMonster::GetCookieListCallback& callback); | 115 const net::CookieMonster::GetCookieListCallback& callback) OVERRIDE; |
116 virtual void CancelNotification(); | 116 virtual void CancelNotification() OVERRIDE; |
117 | 117 |
118 private: | 118 private: |
119 // Check if the cookie list contains a cookie with the same name, | 119 // Check if the cookie list contains a cookie with the same name, |
120 // domain, and path as the newly created cookie. Delete the old cookie | 120 // domain, and path as the newly created cookie. Delete the old cookie |
121 // if does. | 121 // if does. |
122 bool DeleteMetchingCookie( | 122 bool DeleteMetchingCookie( |
123 const net::CookieMonster::CanonicalCookie& add_cookie); | 123 const net::CookieMonster::CanonicalCookie& add_cookie); |
124 | 124 |
125 virtual ~CannedBrowsingDataCookieHelper(); | 125 virtual ~CannedBrowsingDataCookieHelper(); |
126 | 126 |
127 net::CookieList cookie_list_; | 127 net::CookieList cookie_list_; |
128 | 128 |
129 Profile* profile_; | 129 Profile* profile_; |
130 | 130 |
131 DISALLOW_COPY_AND_ASSIGN(CannedBrowsingDataCookieHelper); | 131 DISALLOW_COPY_AND_ASSIGN(CannedBrowsingDataCookieHelper); |
132 }; | 132 }; |
133 | 133 |
134 #endif // CHROME_BROWSER_BROWSING_DATA_COOKIE_HELPER_H_ | 134 #endif // CHROME_BROWSER_BROWSING_DATA_COOKIE_HELPER_H_ |
OLD | NEW |