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

Side by Side Diff: content/browser/net/quota_policy_cookie_store.cc

Issue 2383393002: Remove stl_util's deletion functions from net/cookies/ and net/extras/. (Closed)
Patch Set: removing Created 4 years, 2 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 #include "content/browser/net/quota_policy_cookie_store.h" 5 #include "content/browser/net/quota_policy_cookie_store.h"
6 6
7 #include <list> 7 #include <list>
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 void QuotaPolicyCookieStore::SetForceKeepSessionState() { 90 void QuotaPolicyCookieStore::SetForceKeepSessionState() {
91 special_storage_policy_ = nullptr; 91 special_storage_policy_ = nullptr;
92 } 92 }
93 93
94 void QuotaPolicyCookieStore::Flush(const base::Closure& callback) { 94 void QuotaPolicyCookieStore::Flush(const base::Closure& callback) {
95 persistent_store_->Flush(callback); 95 persistent_store_->Flush(callback);
96 } 96 }
97 97
98 void QuotaPolicyCookieStore::OnLoad( 98 void QuotaPolicyCookieStore::OnLoad(
99 const LoadedCallback& loaded_callback, 99 const LoadedCallback& loaded_callback,
100 const std::vector<net::CanonicalCookie*>& cookies) { 100 std::vector<std::unique_ptr<net::CanonicalCookie>> cookies) {
101 for (auto* cookie : cookies) { 101 for (const auto& cookie : cookies) {
102 net::SQLitePersistentCookieStore::CookieOrigin origin( 102 net::SQLitePersistentCookieStore::CookieOrigin origin(
103 cookie->Domain(), cookie->IsSecure()); 103 cookie->Domain(), cookie->IsSecure());
104 ++cookies_per_origin_[origin]; 104 ++cookies_per_origin_[origin];
105 } 105 }
106 106
107 loaded_callback.Run(cookies); 107 loaded_callback.Run(std::move(cookies));
108 } 108 }
109 109
110 CookieStoreConfig::CookieStoreConfig() 110 CookieStoreConfig::CookieStoreConfig()
111 : session_cookie_mode(EPHEMERAL_SESSION_COOKIES), 111 : session_cookie_mode(EPHEMERAL_SESSION_COOKIES),
112 crypto_delegate(nullptr) { 112 crypto_delegate(nullptr) {
113 // Default to an in-memory cookie store. 113 // Default to an in-memory cookie store.
114 } 114 }
115 115
116 CookieStoreConfig::CookieStoreConfig( 116 CookieStoreConfig::CookieStoreConfig(
117 const base::FilePath& path, 117 const base::FilePath& path,
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 } 182 }
183 } 183 }
184 184
185 if (!config.cookieable_schemes.empty()) 185 if (!config.cookieable_schemes.empty())
186 cookie_monster->SetCookieableSchemes(config.cookieable_schemes); 186 cookie_monster->SetCookieableSchemes(config.cookieable_schemes);
187 187
188 return std::move(cookie_monster); 188 return std::move(cookie_monster);
189 } 189 }
190 190
191 } // namespace content 191 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/net/quota_policy_cookie_store.h ('k') | content/browser/net/quota_policy_cookie_store_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698