From eb7974c101cec9ae3770e10e0fb8dcec706e0d83 Mon Sep 17 00:00:00 2001 From: "mattm@chromium.org" Date: Wed, 25 Jan 2012 17:38:48 +0000 Subject: Add origin bound certs to BrowsingDataRemover and extensions clear API. BUG=107056 TEST="Delete cookies and other site and plug-in data" option in Clear Browsing Data dialog should clear origin bound certs. Review URL: https://chromiumcodereview.appspot.com/9120001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@119084 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/browser/browsing_data_remover.h | 26 +++++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) (limited to 'chrome/browser/browsing_data_remover.h') diff --git a/chrome/browser/browsing_data_remover.h b/chrome/browser/browsing_data_remover.h index 9bc68d9..7f47002 100644 --- a/chrome/browser/browsing_data_remover.h +++ b/chrome/browser/browsing_data_remover.h @@ -1,4 +1,4 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -70,12 +70,14 @@ class BrowsingDataRemover : public content::NotificationObserver, REMOVE_PLUGIN_DATA = 1 << 9, REMOVE_PASSWORDS = 1 << 10, REMOVE_WEBSQL = 1 << 11, + REMOVE_ORIGIN_BOUND_CERTS = 1 << 12, // "Site data" includes cookies, appcache, file systems, indexedDBs, local // storage, webSQL, and plugin data. REMOVE_SITE_DATA = REMOVE_APPCACHE | REMOVE_COOKIES | REMOVE_FILE_SYSTEMS | REMOVE_INDEXEDDB | REMOVE_LOCAL_STORAGE | - REMOVE_PLUGIN_DATA | REMOVE_WEBSQL + REMOVE_PLUGIN_DATA | REMOVE_WEBSQL | + REMOVE_ORIGIN_BOUND_CERTS }; // When BrowsingDataRemover successfully removes data, a notification of type @@ -208,6 +210,14 @@ class BrowsingDataRemover : public content::NotificationObserver, // Invoked on the IO thread to delete cookies. void ClearCookiesOnIOThread(net::URLRequestContextGetter* rq_context); + // Invoked on the IO thread to delete origin bound certs. + void ClearOriginBoundCertsOnIOThread( + net::URLRequestContextGetter* rq_context); + + // Callback when origin bound certs have been deleted. Invokes + // NotifyAndDeleteIfDone. + void OnClearedOriginBoundCerts(); + // Calculate the begin time for the deletion range specified by |time_period|. base::Time CalculateBeginDeleteTime(TimePeriod time_period); @@ -216,9 +226,10 @@ class BrowsingDataRemover : public content::NotificationObserver, return registrar_.IsEmpty() && !waiting_for_clear_cache_ && !waiting_for_clear_cookies_&& !waiting_for_clear_history_ && - !waiting_for_clear_quota_managed_data_ && !waiting_for_clear_networking_history_ && - !waiting_for_clear_plugin_data_; + !waiting_for_clear_origin_bound_certs_ && + !waiting_for_clear_plugin_data_ && + !waiting_for_clear_quota_managed_data_; } // Setter for removing_; DCHECKs that we can only start removing if we're not @@ -259,12 +270,13 @@ class BrowsingDataRemover : public content::NotificationObserver, // True if we're waiting for various data to be deleted. // These may only be accessed from UI thread in order to avoid races! + bool waiting_for_clear_cache_; + bool waiting_for_clear_cookies_; bool waiting_for_clear_history_; - bool waiting_for_clear_quota_managed_data_; bool waiting_for_clear_networking_history_; - bool waiting_for_clear_cookies_; - bool waiting_for_clear_cache_; + bool waiting_for_clear_origin_bound_certs_; bool waiting_for_clear_plugin_data_; + bool waiting_for_clear_quota_managed_data_; // Tracking how many origins need to be deleted, and whether we're finished // gathering origins. -- cgit v1.1