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

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

Issue 217423018: [Password Generation] Don't generate passwords for custom passphrase users. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | 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 "base/bind_helpers.h" 7 #include "base/bind_helpers.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/memory/singleton.h" 9 #include "base/memory/singleton.h"
10 #include "base/metrics/histogram.h" 10 #include "base/metrics/histogram.h"
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 default: 130 default:
131 break; 131 break;
132 } 132 }
133 } 133 }
134 return enabled_probability; 134 return enabled_probability;
135 } 135 }
136 136
137 bool ChromePasswordManagerClient::IsPasswordSyncEnabled() { 137 bool ChromePasswordManagerClient::IsPasswordSyncEnabled() {
138 ProfileSyncService* sync_service = 138 ProfileSyncService* sync_service =
139 ProfileSyncServiceFactory::GetForProfile(GetProfile()); 139 ProfileSyncServiceFactory::GetForProfile(GetProfile());
140 if (sync_service && sync_service->HasSyncSetupCompleted()) 140 // Don't consider sync enabled if the user has a custom passphrase. See
141 // crbug.com/358998 for more details.
142 if (sync_service &&
143 sync_service->HasSyncSetupCompleted() &&
144 !sync_service->IsPassphraseRequired()) {
Nicolas Zea 2014/04/10 19:53:07 You should instead check !sync_service->IsUsingSec
Garrett Casto 2014/04/10 20:10:08 Fixed.
141 return sync_service->GetActiveDataTypes().Has(syncer::PASSWORDS); 145 return sync_service->GetActiveDataTypes().Has(syncer::PASSWORDS);
146 }
142 return false; 147 return false;
143 } 148 }
144 149
145 void ChromePasswordManagerClient::SetLogger( 150 void ChromePasswordManagerClient::SetLogger(
146 PasswordManagerLogger* logger) { 151 PasswordManagerLogger* logger) {
147 // We should never be replacing one logger with a different one, because that 152 // We should never be replacing one logger with a different one, because that
148 // will leave the first without further updates, and the user likely confused. 153 // will leave the first without further updates, and the user likely confused.
149 // TODO(vabr): For the reason above, before moving the internals page from 154 // TODO(vabr): For the reason above, before moving the internals page from
150 // behind the flag, make sure to restrict the number of internals page 155 // behind the flag, make sure to restrict the number of internals page
151 // instances to 1 in normal profiles, and 0 in incognito. 156 // instances to 1 in normal profiles, and 0 in incognito.
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
249 web_contents(), 254 web_contents(),
250 web_contents()->GetView()->GetNativeView()); 255 web_contents()->GetView()->GetNativeView());
251 popup_controller_->Show(false /* display_password */); 256 popup_controller_->Show(false /* display_password */);
252 #endif // #if defined(USE_AURA) 257 #endif // #if defined(USE_AURA)
253 } 258 }
254 259
255 void ChromePasswordManagerClient::CommitFillPasswordForm( 260 void ChromePasswordManagerClient::CommitFillPasswordForm(
256 autofill::PasswordFormFillData* data) { 261 autofill::PasswordFormFillData* data) {
257 driver_.FillPasswordForm(*data); 262 driver_.FillPasswordForm(*data);
258 } 263 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698