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

Side by Side Diff: chrome/browser/password_manager/chrome_password_manager_client.cc

Issue 2472363002: Remove experiment support for PasswordManagerSettingsBehaviourChange (Closed)
Patch Set: Fix punctuation Created 4 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 unified diff | Download patch
« no previous file with comments | « no previous file | chrome/browser/password_manager/chrome_password_manager_client_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/password_manager/chrome_password_manager_client.h" 5 #include "chrome/browser/password_manager/chrome_password_manager_client.h"
6 6
7 #include <string> 7 #include <string>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 200
201 bool ChromePasswordManagerClient::IsSavingAndFillingEnabledForCurrentPage() 201 bool ChromePasswordManagerClient::IsSavingAndFillingEnabledForCurrentPage()
202 const { 202 const {
203 // TODO(melandory): remove saving_and_filling_passwords_enabled_ check from 203 // TODO(melandory): remove saving_and_filling_passwords_enabled_ check from
204 // here once we decide to switch to new settings behavior for everyone. 204 // here once we decide to switch to new settings behavior for everyone.
205 return *saving_and_filling_passwords_enabled_ && !IsOffTheRecord() && 205 return *saving_and_filling_passwords_enabled_ && !IsOffTheRecord() &&
206 IsFillingEnabledForCurrentPage(); 206 IsFillingEnabledForCurrentPage();
207 } 207 }
208 208
209 bool ChromePasswordManagerClient::IsFillingEnabledForCurrentPage() const { 209 bool ChromePasswordManagerClient::IsFillingEnabledForCurrentPage() const {
210 return (!password_manager::IsSettingsBehaviorChangeActive() || 210 return !DidLastPageLoadEncounterSSLErrors() &&
211 *saving_and_filling_passwords_enabled_) &&
212 !DidLastPageLoadEncounterSSLErrors() &&
213 IsPasswordManagementEnabledForCurrentPage(); 211 IsPasswordManagementEnabledForCurrentPage();
214 } 212 }
215 213
216 bool ChromePasswordManagerClient::OnCredentialManagerUsed() { 214 bool ChromePasswordManagerClient::OnCredentialManagerUsed() {
217 prerender::PrerenderContents* prerender_contents = 215 prerender::PrerenderContents* prerender_contents =
218 prerender::PrerenderContents::FromWebContents(web_contents()); 216 prerender::PrerenderContents::FromWebContents(web_contents());
219 if (prerender_contents) { 217 if (prerender_contents) {
220 prerender_contents->Destroy(prerender::FINAL_STATUS_CREDENTIAL_MANAGER_API); 218 prerender_contents->Destroy(prerender::FINAL_STATUS_CREDENTIAL_MANAGER_API);
221 return false; 219 return false;
222 } 220 }
(...skipping 396 matching lines...) Expand 10 before | Expand all | Expand 10 after
619 ChromePasswordManagerClient::FromWebContents(web_contents); 617 ChromePasswordManagerClient::FromWebContents(web_contents);
620 618
621 // Try to bind to the driver, but if driver is not available for this render 619 // Try to bind to the driver, but if driver is not available for this render
622 // frame host, the request will be just dropped. This will cause the message 620 // frame host, the request will be just dropped. This will cause the message
623 // pipe to be closed, which will raise a connection error on the peer side. 621 // pipe to be closed, which will raise a connection error on the peer side.
624 if (!instance) 622 if (!instance)
625 return; 623 return;
626 624
627 instance->credential_manager_impl_.BindRequest(std::move(request)); 625 instance->credential_manager_impl_.BindRequest(std::move(request));
628 } 626 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/password_manager/chrome_password_manager_client_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698