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

Unified Diff: chrome/browser/ui/sync/one_click_signin_helper.cc

Issue 707173004: Refactor Autofill for out of process iframes (OOPIF). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: update tests, respond to review comments, cleanup Created 6 years, 1 month 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/ui/sync/one_click_signin_helper.cc
diff --git a/chrome/browser/ui/sync/one_click_signin_helper.cc b/chrome/browser/ui/sync/one_click_signin_helper.cc
index f1e9de93dcc9ed8c11d7139799212c06fcf68178..4d80e2c3965966e71ad1ed54ecf975e5d96eb286 100644
--- a/chrome/browser/ui/sync/one_click_signin_helper.cc
+++ b/chrome/browser/ui/sync/one_click_signin_helper.cc
@@ -29,6 +29,7 @@
#include "chrome/browser/defaults.h"
#include "chrome/browser/history/history_service.h"
#include "chrome/browser/history/history_service_factory.h"
+#include "chrome/browser/password_manager/chrome_password_manager_client.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/profiles/profile_info_cache.h"
#include "chrome/browser/profiles/profile_io_data.h"
@@ -672,9 +673,7 @@ DEFINE_WEB_CONTENTS_USER_DATA_KEY(OneClickSigninHelper);
// static
const int OneClickSigninHelper::kMaxNavigationsSince = 10;
-OneClickSigninHelper::OneClickSigninHelper(
- content::WebContents* web_contents,
- password_manager::PasswordManager* password_manager)
+OneClickSigninHelper::OneClickSigninHelper(content::WebContents* web_contents)
: content::WebContentsObserver(web_contents),
showing_signin_(false),
auto_accept_(AUTO_ACCEPT_NONE),
@@ -685,9 +684,11 @@ OneClickSigninHelper::OneClickSigninHelper(
do_not_clear_pending_email_(false),
do_not_start_sync_for_testing_(false),
weak_pointer_factory_(this) {
+ ChromePasswordManagerClient* client =
+ ChromePasswordManagerClient::FromWebContents(web_contents);
// May be NULL during testing.
- if (password_manager) {
- password_manager->AddSubmissionCallback(
+ if (client) {
+ client->GetPasswordManager()->AddSubmissionCallback(
base::Bind(&OneClickSigninHelper::PasswordSubmitted,
weak_pointer_factory_.GetWeakPtr()));
}
@@ -759,16 +760,6 @@ void OneClickSigninHelper::LogHistogramValue(
}
// static
-void OneClickSigninHelper::CreateForWebContentsWithPasswordManager(
- content::WebContents* contents,
- password_manager::PasswordManager* password_manager) {
- if (!FromWebContents(contents)) {
- contents->SetUserData(UserDataKey(),
- new OneClickSigninHelper(contents, password_manager));
- }
-}
-
-// static
bool OneClickSigninHelper::CanOffer(content::WebContents* web_contents,
CanOfferFor can_offer_for,
const std::string& email,

Powered by Google App Engine
This is Rietveld 408576698