| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 } |
| OLD | NEW |