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

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

Issue 2874973002: Flush Channel IDs when Cookies get saved to a persistent backend (Closed)
Patch Set: Add missing background task runners Created 3 years, 7 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 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 background_task_runner, 166 background_task_runner,
167 (config.session_cookie_mode == 167 (config.session_cookie_mode ==
168 CookieStoreConfig::RESTORED_SESSION_COOKIES), 168 CookieStoreConfig::RESTORED_SESSION_COOKIES),
169 config.crypto_delegate)); 169 config.crypto_delegate));
170 170
171 QuotaPolicyCookieStore* persistent_store = 171 QuotaPolicyCookieStore* persistent_store =
172 new QuotaPolicyCookieStore( 172 new QuotaPolicyCookieStore(
173 sqlite_store.get(), 173 sqlite_store.get(),
174 config.storage_policy.get()); 174 config.storage_policy.get());
175 175
176 cookie_monster.reset( 176 cookie_monster.reset(new net::CookieMonster(persistent_store,
177 new net::CookieMonster(persistent_store, config.cookie_delegate.get())); 177 config.cookie_delegate.get(),
178 config.channel_id_service));
178 if ((config.session_cookie_mode == 179 if ((config.session_cookie_mode ==
179 CookieStoreConfig::PERSISTANT_SESSION_COOKIES) || 180 CookieStoreConfig::PERSISTANT_SESSION_COOKIES) ||
180 (config.session_cookie_mode == 181 (config.session_cookie_mode ==
181 CookieStoreConfig::RESTORED_SESSION_COOKIES)) { 182 CookieStoreConfig::RESTORED_SESSION_COOKIES)) {
182 cookie_monster->SetPersistSessionCookies(true); 183 cookie_monster->SetPersistSessionCookies(true);
183 } 184 }
184 } 185 }
185 186
186 if (!config.cookieable_schemes.empty()) 187 if (!config.cookieable_schemes.empty())
187 cookie_monster->SetCookieableSchemes(config.cookieable_schemes); 188 cookie_monster->SetCookieableSchemes(config.cookieable_schemes);
188 189
189 return std::move(cookie_monster); 190 return std::move(cookie_monster);
190 } 191 }
191 192
192 } // namespace content 193 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698