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

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

Issue 1273053002: Use Smart Lock preference instead of Chrome Password manager preference (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@reconcile_yolo_settings
Patch Set: Use Smart Lock preference instead of Chrome Password manager preference. Created 3 years, 10 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 unified diff | Download patch
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 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 driver_factory_ = 166 driver_factory_ =
167 ContentPasswordManagerDriverFactory::FromWebContents(web_contents); 167 ContentPasswordManagerDriverFactory::FromWebContents(web_contents);
168 log_manager_ = password_manager::LogManager::Create( 168 log_manager_ = password_manager::LogManager::Create(
169 password_manager::PasswordManagerInternalsServiceFactory:: 169 password_manager::PasswordManagerInternalsServiceFactory::
170 GetForBrowserContext(profile_), 170 GetForBrowserContext(profile_),
171 base::Bind( 171 base::Bind(
172 &ContentPasswordManagerDriverFactory::RequestSendLoggingAvailability, 172 &ContentPasswordManagerDriverFactory::RequestSendLoggingAvailability,
173 base::Unretained(driver_factory_))); 173 base::Unretained(driver_factory_)));
174 174
175 saving_and_filling_passwords_enabled_.Init( 175 saving_and_filling_passwords_enabled_.Init(
176 password_manager::prefs::kPasswordManagerSavingEnabled, GetPrefs()); 176 password_manager::prefs::kCredentialsEnableService, GetPrefs());
177 ReportMetrics(*saving_and_filling_passwords_enabled_, this, profile_); 177 ReportMetrics(*saving_and_filling_passwords_enabled_, this, profile_);
178 driver_factory_->RequestSendLoggingAvailability(); 178 driver_factory_->RequestSendLoggingAvailability();
179 } 179 }
180 180
181 ChromePasswordManagerClient::~ChromePasswordManagerClient() {} 181 ChromePasswordManagerClient::~ChromePasswordManagerClient() {}
182 182
183 bool ChromePasswordManagerClient::IsAutomaticPasswordSavingEnabled() const { 183 bool ChromePasswordManagerClient::IsAutomaticPasswordSavingEnabled() const {
184 return base::FeatureList::IsEnabled( 184 return base::FeatureList::IsEnabled(
185 password_manager::features::kEnableAutomaticPasswordSaving) && 185 password_manager::features::kEnableAutomaticPasswordSaving) &&
186 chrome::GetChannel() == version_info::Channel::UNKNOWN; 186 chrome::GetChannel() == version_info::Channel::UNKNOWN;
(...skipping 489 matching lines...) Expand 10 before | Expand all | Expand 10 after
676 // static 676 // static
677 bool ChromePasswordManagerClient::CanShowBubbleOnURL(const GURL& url) { 677 bool ChromePasswordManagerClient::CanShowBubbleOnURL(const GURL& url) {
678 std::string scheme = url.scheme(); 678 std::string scheme = url.scheme();
679 return (content::ChildProcessSecurityPolicy::GetInstance()->IsWebSafeScheme( 679 return (content::ChildProcessSecurityPolicy::GetInstance()->IsWebSafeScheme(
680 scheme) && 680 scheme) &&
681 #if BUILDFLAG(ENABLE_EXTENSIONS) 681 #if BUILDFLAG(ENABLE_EXTENSIONS)
682 scheme != extensions::kExtensionScheme && 682 scheme != extensions::kExtensionScheme &&
683 #endif 683 #endif
684 scheme != content::kChromeDevToolsScheme); 684 scheme != content::kChromeDevToolsScheme);
685 } 685 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698