Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(8)

Side by Side Diff: chrome/browser/browsing_data/browsing_data_cookie_helper.h

Issue 2318303002: Remove stl_util's STLDeleteContainerPairSecondPointers. (Closed)
Patch Set: fix Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 <stddef.h> 8 #include <stddef.h>
9 9
10 #include <map> 10 #include <map>
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 // that are received from a server or set via JavaScript using the method 71 // that are received from a server or set via JavaScript using the method
72 // AddChangedCookie. 72 // AddChangedCookie.
73 // Cookies are distinguished by the tuple cookie name (called cookie-name in 73 // Cookies are distinguished by the tuple cookie name (called cookie-name in
74 // RFC 6265), cookie domain (called cookie-domain in RFC 6265), cookie path 74 // RFC 6265), cookie domain (called cookie-domain in RFC 6265), cookie path
75 // (called cookie-path in RFC 6265) and host-only-flag (see RFC 6265 section 75 // (called cookie-path in RFC 6265) and host-only-flag (see RFC 6265 section
76 // 5.3). Cookies with same tuple (cookie-name, cookie-domain, cookie-path, 76 // 5.3). Cookies with same tuple (cookie-name, cookie-domain, cookie-path,
77 // host-only-flag) as cookie that are already stored, will replace the stored 77 // host-only-flag) as cookie that are already stored, will replace the stored
78 // cookies. 78 // cookies.
79 class CannedBrowsingDataCookieHelper : public BrowsingDataCookieHelper { 79 class CannedBrowsingDataCookieHelper : public BrowsingDataCookieHelper {
80 public: 80 public:
81 typedef std::map<GURL, canonical_cookie::CookieHashSet*> OriginCookieSetMap; 81 typedef std::map<GURL, std::unique_ptr<canonical_cookie::CookieHashSet>>
82 OriginCookieSetMap;
82 83
83 explicit CannedBrowsingDataCookieHelper( 84 explicit CannedBrowsingDataCookieHelper(
84 net::URLRequestContextGetter* request_context); 85 net::URLRequestContextGetter* request_context);
85 86
86 // Adds the cookies from |cookie_list|. Current cookies that have the same 87 // Adds the cookies from |cookie_list|. Current cookies that have the same
87 // cookie name, cookie domain, cookie path, host-only-flag tuple as passed 88 // cookie name, cookie domain, cookie path, host-only-flag tuple as passed
88 // cookies are replaced by the passed cookies. 89 // cookies are replaced by the passed cookies.
89 void AddReadCookies(const GURL& frame_url, 90 void AddReadCookies(const GURL& frame_url,
90 const GURL& request_url, 91 const GURL& request_url,
91 const net::CookieList& cookie_list); 92 const net::CookieList& cookie_list);
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 void AddCookie(const GURL& frame_url, 142 void AddCookie(const GURL& frame_url,
142 const net::CanonicalCookie& cookie); 143 const net::CanonicalCookie& cookie);
143 144
144 // Map that contains the cookie sets for all frame origins. 145 // Map that contains the cookie sets for all frame origins.
145 OriginCookieSetMap origin_cookie_set_map_; 146 OriginCookieSetMap origin_cookie_set_map_;
146 147
147 DISALLOW_COPY_AND_ASSIGN(CannedBrowsingDataCookieHelper); 148 DISALLOW_COPY_AND_ASSIGN(CannedBrowsingDataCookieHelper);
148 }; 149 };
149 150
150 #endif // CHROME_BROWSER_BROWSING_DATA_BROWSING_DATA_COOKIE_HELPER_H_ 151 #endif // CHROME_BROWSER_BROWSING_DATA_BROWSING_DATA_COOKIE_HELPER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698