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

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

Issue 2693373004: Use Smart Lock preference instead of Chrome Password manager preference. (Closed)
Patch Set: 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 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 driver_factory_ = 157 driver_factory_ =
158 ContentPasswordManagerDriverFactory::FromWebContents(web_contents); 158 ContentPasswordManagerDriverFactory::FromWebContents(web_contents);
159 log_manager_ = password_manager::LogManager::Create( 159 log_manager_ = password_manager::LogManager::Create(
160 password_manager::PasswordManagerInternalsServiceFactory:: 160 password_manager::PasswordManagerInternalsServiceFactory::
161 GetForBrowserContext(profile_), 161 GetForBrowserContext(profile_),
162 base::Bind( 162 base::Bind(
163 &ContentPasswordManagerDriverFactory::RequestSendLoggingAvailability, 163 &ContentPasswordManagerDriverFactory::RequestSendLoggingAvailability,
164 base::Unretained(driver_factory_))); 164 base::Unretained(driver_factory_)));
165 165
166 saving_and_filling_passwords_enabled_.Init( 166 saving_and_filling_passwords_enabled_.Init(
167 password_manager::prefs::kPasswordManagerSavingEnabled, GetPrefs()); 167 password_manager::prefs::kCredentialsEnableService, GetPrefs());
168 ReportMetrics(*saving_and_filling_passwords_enabled_, this, profile_); 168 ReportMetrics(*saving_and_filling_passwords_enabled_, this, profile_);
169 driver_factory_->RequestSendLoggingAvailability(); 169 driver_factory_->RequestSendLoggingAvailability();
170 } 170 }
171 171
172 ChromePasswordManagerClient::~ChromePasswordManagerClient() {} 172 ChromePasswordManagerClient::~ChromePasswordManagerClient() {}
173 173
174 bool ChromePasswordManagerClient::IsAutomaticPasswordSavingEnabled() const { 174 bool ChromePasswordManagerClient::IsAutomaticPasswordSavingEnabled() const {
175 return base::FeatureList::IsEnabled( 175 return base::FeatureList::IsEnabled(
176 password_manager::features::kEnableAutomaticPasswordSaving) && 176 password_manager::features::kEnableAutomaticPasswordSaving) &&
177 chrome::GetChannel() == version_info::Channel::UNKNOWN; 177 chrome::GetChannel() == version_info::Channel::UNKNOWN;
(...skipping 462 matching lines...) Expand 10 before | Expand all | Expand 10 after
640 ChromePasswordManagerClient::FromWebContents(web_contents); 640 ChromePasswordManagerClient::FromWebContents(web_contents);
641 641
642 // Try to bind to the driver, but if driver is not available for this render 642 // Try to bind to the driver, but if driver is not available for this render
643 // frame host, the request will be just dropped. This will cause the message 643 // frame host, the request will be just dropped. This will cause the message
644 // pipe to be closed, which will raise a connection error on the peer side. 644 // pipe to be closed, which will raise a connection error on the peer side.
645 if (!instance) 645 if (!instance)
646 return; 646 return;
647 647
648 instance->credential_manager_impl_.BindRequest(std::move(request)); 648 instance->credential_manager_impl_.BindRequest(std::move(request));
649 } 649 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698