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

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

Issue 152643002: Create PasswordManagerDriver and ContentPasswordManagerDriver. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Nit Created 6 years, 11 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
Index: chrome/browser/password_manager/content_password_manager_driver.cc
diff --git a/chrome/browser/password_manager/content_password_manager_driver.cc b/chrome/browser/password_manager/content_password_manager_driver.cc
new file mode 100644
index 0000000000000000000000000000000000000000..f8716c56dc6434debff7120576dc836b67912c7d
--- /dev/null
+++ b/chrome/browser/password_manager/content_password_manager_driver.cc
@@ -0,0 +1,42 @@
+// Copyright 2014 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.
+
+#include "chrome/browser/password_manager/content_password_manager_driver.h"
+
+#include "components/autofill/content/common/autofill_messages.h"
+#include "components/autofill/core/common/password_form.h"
+#include "content/public/browser/navigation_details.h"
+#include "content/public/browser/navigation_entry.h"
+#include "content/public/browser/render_view_host.h"
+#include "content/public/browser/web_contents.h"
+#include "content/public/common/page_transition_types.h"
+#include "content/public/common/ssl_status.h"
+#include "net/cert/cert_status_flags.h"
+
+ContentPasswordManagerDriver::ContentPasswordManagerDriver(
+ content::WebContents* web_contents)
+ : web_contents_(web_contents) {
+}
+
+ContentPasswordManagerDriver::~ContentPasswordManagerDriver() {
+}
+
+void ContentPasswordManagerDriver::FillPasswordForm(
+ const autofill::PasswordFormFillData& form_data) {
+ web_contents_->GetRenderViewHost()->Send(
+ new AutofillMsg_FillPasswordForm(
+ web_contents_->GetRenderViewHost()->GetRoutingID(),
+ form_data));
+}
+
+bool ContentPasswordManagerDriver::DidLastPageLoadEncounterSSLErrors() {
+ content::NavigationEntry* entry =
+ web_contents_->GetController().GetActiveEntry();
+ if (!entry) {
+ NOTREACHED();
+ return false;
+ }
+
+ return net::IsCertStatusError(entry->GetSSL().cert_status);
+}

Powered by Google App Engine
This is Rietveld 408576698