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

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

Issue 256003003: Enable Automatic Passwords Saving (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: custombuildonly Created 6 years, 8 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/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 c5abe8ca0315fd8f6173c6a01ea7ec6422aee277..baaaf7f0e608b1920031b31791c0513dcd1eb4e7 100644
--- a/chrome/browser/password_manager/chrome_password_manager_client.cc
+++ b/chrome/browser/password_manager/chrome_password_manager_client.cc
@@ -8,6 +8,7 @@
#include "base/command_line.h"
#include "base/memory/singleton.h"
#include "base/metrics/histogram.h"
+
vabr (Chromium) 2014/04/30 07:46:31 nit: Please remove this blank line.
rchtara 2014/04/30 09:06:40 Done.
#include "chrome/browser/password_manager/password_manager_util.h"
#include "chrome/browser/password_manager/password_store_factory.h"
#include "chrome/browser/password_manager/save_password_infobar_delegate.h"
@@ -25,6 +26,7 @@
#include "components/password_manager/core/browser/password_manager.h"
#include "components/password_manager/core/browser/password_manager_logger.h"
#include "components/password_manager/core/browser/password_manager_metrics_util.h"
+#include "components/password_manager/core/common/password_manager_switches.h"
#include "content/public/browser/render_view_host.h"
#include "content/public/browser/web_contents.h"
#include "content/public/browser/web_contents_view.h"
@@ -77,6 +79,13 @@ ChromePasswordManagerClient::ChromePasswordManagerClient(
ChromePasswordManagerClient::~ChromePasswordManagerClient() {}
+bool ChromePasswordManagerClient::IsAutomaticPasswordSavingEnabled() const {
+ return CommandLine::ForCurrentProcess()->HasSwitch(
+ password_manager::switches::kEnableAutomaticPasswordSaving) &&
+ chrome::VersionInfo::GetChannel() ==
+ chrome::VersionInfo::CHANNEL_UNKNOWN;
vabr (Chromium) 2014/04/30 07:46:31 nit: This indenting looks wrong. It should be +2 m
rchtara 2014/04/30 09:06:40 Done.
+}
+
void ChromePasswordManagerClient::PromptUserToSavePassword(
password_manager::PasswordFormManager* form_to_save) {
if (IsTheHotNewBubbleUIEnabled()) {

Powered by Google App Engine
This is Rietveld 408576698