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

Unified Diff: chrome/browser/password_manager/chrome_password_manager_client.cc

Issue 2714543006: Clean Obsolete HTTP Data from the Password Store (Closed)
Patch Set: Raw Cleaner Created 3 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/password_manager/password_store_factory.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..44e01f0a114e1de718e063e5c9a1df0752893959 100644
--- a/chrome/browser/password_manager/chrome_password_manager_client.cc
+++ b/chrome/browser/password_manager/chrome_password_manager_client.cc
@@ -35,6 +35,7 @@
#include "components/password_manager/content/browser/content_password_manager_driver.h"
#include "components/password_manager/content/browser/password_manager_internals_service_factory.h"
#include "components/password_manager/core/browser/browser_save_password_progress_logger.h"
+#include "components/password_manager/core/browser/hsts_query.h"
#include "components/password_manager/core/browser/log_manager.h"
#include "components/password_manager/core/browser/log_receiver.h"
#include "components/password_manager/core/browser/password_bubble_experiment.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::PostHSTSQueryForHostAndRequestContext(
+ origin, make_scoped_refptr(profile_->GetRequestContext()), callback);
}
bool ChromePasswordManagerClient::OnCredentialManagerUsed() {
« no previous file with comments | « no previous file | chrome/browser/password_manager/password_store_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698