Index: chrome/browser/password_manager/chrome_password_manager_client.cc |
diff --git a/chrome/browser/password_manager/chrome_password_manager_client.cc b/chrome/browser/password_manager/chrome_password_manager_client.cc |
index 7e02fbb29d88f53daa2f061c6b598e9c71df784a..fcc24cc46ae11c35e5282c6cfcbebdcdfba1b342 100644 |
--- a/chrome/browser/password_manager/chrome_password_manager_client.cc |
+++ b/chrome/browser/password_manager/chrome_password_manager_client.cc |
@@ -17,6 +17,7 @@ |
#include "build/build_config.h" |
#include "chrome/browser/browsing_data/browsing_data_helper.h" |
#include "chrome/browser/metrics/chrome_metrics_service_accessor.h" |
+#include "chrome/browser/password_manager/password_manager_util.h" |
#include "chrome/browser/password_manager/password_store_factory.h" |
#include "chrome/browser/prerender/prerender_contents.h" |
#include "chrome/browser/profiles/profile.h" |
@@ -62,8 +63,6 @@ |
#include "extensions/features/features.h" |
#include "google_apis/gaia/gaia_urls.h" |
#include "net/base/url_util.h" |
-#include "net/http/transport_security_state.h" |
-#include "net/url_request/url_request_context.h" |
#include "third_party/re2/src/re2/re2.h" |
#if defined(SAFE_BROWSING_DB_LOCAL) || defined(SAFE_BROWSING_DB_REMOTE) |
@@ -141,22 +140,6 @@ void ReportMetrics(bool password_manager_enabled, |
profile->GetPrefs())); |
} |
-bool IsHSTSActiveForHostAndRequestContext( |
- const GURL& origin, |
- const scoped_refptr<net::URLRequestContextGetter>& request_context) { |
- DCHECK_CURRENTLY_ON(content::BrowserThread::IO); |
- if (!origin.is_valid()) |
- return false; |
- |
- net::TransportSecurityState* security_state = |
- request_context->GetURLRequestContext()->transport_security_state(); |
- |
- if (!security_state) |
- return false; |
- |
- return security_state->ShouldUpgradeToSSL(origin.host()); |
-} |
- |
} // namespace |
// static |
@@ -261,11 +244,8 @@ bool ChromePasswordManagerClient::IsFillingEnabledForCurrentPage() const { |
void ChromePasswordManagerClient::PostHSTSQueryForHost( |
const GURL& origin, |
const HSTSCallback& callback) const { |
- content::BrowserThread::PostTaskAndReplyWithResult( |
- content::BrowserThread::IO, FROM_HERE, |
- base::Bind(&IsHSTSActiveForHostAndRequestContext, origin, |
- make_scoped_refptr(profile_->GetRequestContext())), |
- callback); |
+ password_manager_util::PostHSTSQueryForHostAndProfile(origin, profile_, |
+ callback); |
} |
bool ChromePasswordManagerClient::OnCredentialManagerUsed() { |