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

Side by Side Diff: chrome/browser/browsing_data/browsing_data_remover.cc

Issue 11742037: Make ServerBoundCertStore interface async, move SQLiteServerBoundCertStore load onto DB thread. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix login_utils_browsertest Created 7 years, 11 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 | Annotate | Revision Log
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 "chrome/browser/browsing_data/browsing_data_remover.h" 5 #include "chrome/browser/browsing_data/browsing_data_remover.h"
6 6
7 #include <map> 7 #include <map>
8 #include <set> 8 #include <set>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 973 matching lines...) Expand 10 before | Expand all | Expand 10 after
984 base::Bind(&BrowsingDataRemover::OnClearedCookies, 984 base::Bind(&BrowsingDataRemover::OnClearedCookies,
985 base::Unretained(this))); 985 base::Unretained(this)));
986 } 986 }
987 987
988 void BrowsingDataRemover::ClearServerBoundCertsOnIOThread( 988 void BrowsingDataRemover::ClearServerBoundCertsOnIOThread(
989 net::URLRequestContextGetter* rq_context) { 989 net::URLRequestContextGetter* rq_context) {
990 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); 990 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
991 net::ServerBoundCertService* server_bound_cert_service = 991 net::ServerBoundCertService* server_bound_cert_service =
992 rq_context->GetURLRequestContext()->server_bound_cert_service(); 992 rq_context->GetURLRequestContext()->server_bound_cert_service();
993 server_bound_cert_service->GetCertStore()->DeleteAllCreatedBetween( 993 server_bound_cert_service->GetCertStore()->DeleteAllCreatedBetween(
994 delete_begin_, delete_end_); 994 delete_begin_, delete_end_,
995 base::Bind(&BrowsingDataRemover::OnClearedServerBoundCertsOnIOThread,
996 base::Unretained(this), base::Unretained(rq_context)));
997 }
998
999 void BrowsingDataRemover::OnClearedServerBoundCertsOnIOThread(
1000 net::URLRequestContextGetter* rq_context) {
995 // Need to close open SSL connections which may be using the channel ids we 1001 // Need to close open SSL connections which may be using the channel ids we
996 // are deleting. 1002 // are deleting.
997 // TODO(mattm): http://crbug.com/166069 Make the server bound cert 1003 // TODO(mattm): http://crbug.com/166069 Make the server bound cert
998 // service/store have observers that can notify relevant things directly. 1004 // service/store have observers that can notify relevant things directly.
999 rq_context->GetURLRequestContext()->ssl_config_service()-> 1005 rq_context->GetURLRequestContext()->ssl_config_service()->
1000 NotifySSLConfigChange(); 1006 NotifySSLConfigChange();
1001 BrowserThread::PostTask( 1007 BrowserThread::PostTask(
1002 BrowserThread::UI, FROM_HERE, 1008 BrowserThread::UI, FROM_HERE,
1003 base::Bind(&BrowsingDataRemover::OnClearedServerBoundCerts, 1009 base::Bind(&BrowsingDataRemover::OnClearedServerBoundCerts,
1004 base::Unretained(this))); 1010 base::Unretained(this)));
(...skipping 11 matching lines...) Expand all
1016 BrowserThread::UI, FROM_HERE, 1022 BrowserThread::UI, FROM_HERE,
1017 base::Bind(&BrowsingDataRemover::OnClearedFormData, 1023 base::Bind(&BrowsingDataRemover::OnClearedFormData,
1018 base::Unretained(this))); 1024 base::Unretained(this)));
1019 } 1025 }
1020 1026
1021 void BrowsingDataRemover::OnClearedFormData() { 1027 void BrowsingDataRemover::OnClearedFormData() {
1022 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 1028 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
1023 waiting_for_clear_form_ = false; 1029 waiting_for_clear_form_ = false;
1024 NotifyAndDeleteIfDone(); 1030 NotifyAndDeleteIfDone();
1025 } 1031 }
OLDNEW
« no previous file with comments | « chrome/browser/browsing_data/browsing_data_remover.h ('k') | chrome/browser/browsing_data/browsing_data_remover_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698