OLD | NEW |
(Empty) | |
| 1 // Copyright 2017 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 CHROME_BROWSER_PASSWORD_MANAGER_PASSWORD_MANAGER_UTIL_H_ |
| 6 #define CHROME_BROWSER_PASSWORD_MANAGER_PASSWORD_MANAGER_UTIL_H_ |
| 7 |
| 8 #include "base/callback_forward.h" |
| 9 |
| 10 class GURL; |
| 11 class Profile; |
| 12 |
| 13 namespace password_manager_util { |
| 14 |
| 15 constexpr int kDefaultDelay = 40; |
| 16 using HSTSCallback = base::Callback<void(bool)>; |
| 17 // Checks asynchronously whether HTTP Strict Transport Security (HSTS) is active |
| 18 // for the host of the given origin for a given profile. Notifies |callback| |
| 19 // with the result on the calling thread. |
| 20 void PostHSTSQueryForHostAndProfile(const GURL& origin, |
| 21 Profile* profile, |
| 22 const HSTSCallback& callback); |
| 23 |
| 24 // Cleans all obsolete HTTP data for a given profile. HTTP data is considered |
| 25 // obsolete, when the corresponding site has migrated to HTTPS and HSTS is |
| 26 // enabled. Data that will be cleaned includes passwords, blacklisted origins |
| 27 // and site statistics. This is guarded by a preference and will be a no-op if |
| 28 // the task was run for the profile in the past. |
| 29 void DelayCleanObsoleteHttpDataForProfile(Profile* profile, |
| 30 int delay_in_seconds = kDefaultDelay); |
| 31 |
| 32 } // namespace password_manager_util |
| 33 |
| 34 #endif // CHROME_BROWSER_PASSWORD_MANAGER_PASSWORD_MANAGER_UTIL_H_ |
OLD | NEW |