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

Side by Side Diff: net/cookies/cookie_store.h

Issue 1893083002: Change scoped_ptr to std::unique_ptr in //net. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: scopedptr-net-all: iwyu Created 4 years, 8 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
« no previous file with comments | « net/cookies/cookie_monster_unittest.cc ('k') | net/cookies/cookie_store_test_helpers.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 // Brought to you by number 42. 5 // Brought to you by number 42.
6 6
7 #ifndef NET_COOKIES_COOKIE_STORE_H_ 7 #ifndef NET_COOKIES_COOKIE_STORE_H_
8 #define NET_COOKIES_COOKIE_STORE_H_ 8 #define NET_COOKIES_COOKIE_STORE_H_
9 9
10 #include <memory>
10 #include <string> 11 #include <string>
11 #include <vector> 12 #include <vector>
12 13
13 #include "base/callback_forward.h" 14 #include "base/callback_forward.h"
14 #include "base/callback_list.h" 15 #include "base/callback_list.h"
15 #include "base/memory/scoped_ptr.h"
16 #include "base/time/time.h" 16 #include "base/time/time.h"
17 #include "net/base/net_export.h" 17 #include "net/base/net_export.h"
18 #include "net/cookies/canonical_cookie.h" 18 #include "net/cookies/canonical_cookie.h"
19 #include "net/cookies/cookie_options.h" 19 #include "net/cookies/cookie_options.h"
20 20
21 class GURL; 21 class GURL;
22 22
23 namespace net { 23 namespace net {
24 24
25 class CookieMonster; 25 class CookieMonster;
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
191 // cookies and a boolean indicating if the cookies was removed or not. 191 // cookies and a boolean indicating if the cookies was removed or not.
192 // 192 //
193 // Note that |callback| is called twice when a cookie is updated: once for 193 // Note that |callback| is called twice when a cookie is updated: once for
194 // the removal of the existing cookie and once for the adding the new cookie. 194 // the removal of the existing cookie and once for the adding the new cookie.
195 // 195 //
196 // Note that this method consumes memory and CPU per (url, name) pair ever 196 // Note that this method consumes memory and CPU per (url, name) pair ever
197 // registered that are still consumed even after all subscriptions for that 197 // registered that are still consumed even after all subscriptions for that
198 // (url, name) pair are removed. If this method ever needs to support an 198 // (url, name) pair are removed. If this method ever needs to support an
199 // unbounded amount of such pairs, this contract needs to change and 199 // unbounded amount of such pairs, this contract needs to change and
200 // implementors need to be improved to not behave this way. 200 // implementors need to be improved to not behave this way.
201 virtual scoped_ptr<CookieChangedSubscription> AddCallbackForCookie( 201 virtual std::unique_ptr<CookieChangedSubscription> AddCallbackForCookie(
202 const GURL& url, 202 const GURL& url,
203 const std::string& name, 203 const std::string& name,
204 const CookieChangedCallback& callback) = 0; 204 const CookieChangedCallback& callback) = 0;
205 205
206 // Returns true if this cookie store is ephemeral, and false if it is backed 206 // Returns true if this cookie store is ephemeral, and false if it is backed
207 // by some sort of persistence layer. 207 // by some sort of persistence layer.
208 // TODO(nharper): Remove this method once crbug.com/548423 has been closed. 208 // TODO(nharper): Remove this method once crbug.com/548423 has been closed.
209 virtual bool IsEphemeral() = 0; 209 virtual bool IsEphemeral() = 0;
210 void SetChannelIDServiceID(int id); 210 void SetChannelIDServiceID(int id);
211 int GetChannelIDServiceID(); 211 int GetChannelIDServiceID();
212 212
213 protected: 213 protected:
214 CookieStore(); 214 CookieStore();
215 int channel_id_service_id_; 215 int channel_id_service_id_;
216 }; 216 };
217 217
218 } // namespace net 218 } // namespace net
219 219
220 #endif // NET_COOKIES_COOKIE_STORE_H_ 220 #endif // NET_COOKIES_COOKIE_STORE_H_
OLDNEW
« no previous file with comments | « net/cookies/cookie_monster_unittest.cc ('k') | net/cookies/cookie_store_test_helpers.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698