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

Side by Side Diff: content/browser/storage_partition_impl.cc

Issue 1844243002: [CookieStore] Upgrading host-based deleting to predicate-based deleting. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added android changes 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
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 #include "content/browser/storage_partition_impl.h" 5 #include "content/browser/storage_partition_impl.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <set> 9 #include <set>
10 #include <vector> 10 #include <vector>
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 const base::Closure& callback) { 59 const base::Closure& callback) {
60 DCHECK_CURRENTLY_ON(BrowserThread::IO); 60 DCHECK_CURRENTLY_ON(BrowserThread::IO);
61 net::CookieStore* cookie_store = rq_context-> 61 net::CookieStore* cookie_store = rq_context->
62 GetURLRequestContext()->cookie_store(); 62 GetURLRequestContext()->cookie_store();
63 if (storage_origin.is_empty()) { 63 if (storage_origin.is_empty()) {
64 cookie_store->DeleteAllCreatedBetweenAsync( 64 cookie_store->DeleteAllCreatedBetweenAsync(
65 begin, 65 begin,
66 end, 66 end,
67 base::Bind(&OnClearedCookies, callback)); 67 base::Bind(&OnClearedCookies, callback));
68 } else { 68 } else {
69 cookie_store->DeleteAllCreatedBetweenForHostAsync( 69 cookie_store->DeleteAllCreatedBetweenWithPredicateAsync(
Mike West 2016/04/01 07:40:52 Why do we only clear host cookies here? I understa
dmurph 2016/04/01 23:16:45 I have no idea. I suspect that we might be able to
70 begin, 70 begin, end,
71 end, 71 net::CookieStore::CreatePredicateForHostCookies(storage_origin),
72 storage_origin, base::Bind(&OnClearedCookies, callback)); 72 base::Bind(&OnClearedCookies, callback));
73 } 73 }
74 } 74 }
75 75
76 void CheckQuotaManagedDataDeletionStatus(size_t* deletion_task_count, 76 void CheckQuotaManagedDataDeletionStatus(size_t* deletion_task_count,
77 const base::Closure& callback) { 77 const base::Closure& callback) {
78 DCHECK_CURRENTLY_ON(BrowserThread::IO); 78 DCHECK_CURRENTLY_ON(BrowserThread::IO);
79 if (*deletion_task_count == 0) { 79 if (*deletion_task_count == 0) {
80 delete deletion_task_count; 80 delete deletion_task_count;
81 callback.Run(); 81 callback.Run();
82 } 82 }
(...skipping 826 matching lines...) Expand 10 before | Expand all | Expand 10 after
909 net::URLRequestContextGetter* url_request_context) { 909 net::URLRequestContextGetter* url_request_context) {
910 url_request_context_ = url_request_context; 910 url_request_context_ = url_request_context;
911 } 911 }
912 912
913 void StoragePartitionImpl::SetMediaURLRequestContext( 913 void StoragePartitionImpl::SetMediaURLRequestContext(
914 net::URLRequestContextGetter* media_url_request_context) { 914 net::URLRequestContextGetter* media_url_request_context) {
915 media_url_request_context_ = media_url_request_context; 915 media_url_request_context_ = media_url_request_context;
916 } 916 }
917 917
918 } // namespace content 918 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698