1 // Copyright 2018 The Chromium Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 #ifndef CONTENT_PUBLIC_BROWSER_CLEAR_SITE_DATA_UTILS_H_ 6 #define CONTENT_PUBLIC_BROWSER_CLEAR_SITE_DATA_UTILS_H_ 7 8 #include "base/callback_forward.h" 9 #include "content/common/content_export.h" 10 11 namespace url { 12 class Origin; 13 } 14 15 namespace content { 16 class BrowserContext; 17 18 // Removes browsing data associated with |origin|. Used when the Clear-Site-Data 19 // header is sent. 20 // Has to be called on the UI thread and will execute |callback| on the UI 21 // thread when done. 22 CONTENT_EXPORT void ClearSiteData( 23 const base::RepeatingCallback<BrowserContext*()>& browser_context_getter, 24 const url::Origin& origin, 25 bool clear_cookies, 26 bool clear_storage, 27 bool clear_cache, 28 bool avoid_closing_connections, 29 base::OnceClosure callback); 30 31 } // namespace content 32 33 #endif // CONTENT_PUBLIC_BROWSER_CLEAR_SITE_DATA_UTILS_H_ 34