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

Side by Side Diff: ios/chrome/browser/passwords/password_generation_agent.mm

Issue 2937033002: [Password Generation] Send a boolean flag of whether user changed generated password (Closed)
Patch Set: Changes addressed to vabr@ comments Created 3 years, 6 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
« no previous file with comments | « components/password_manager/core/browser/password_manager_unittest.cc ('k') | 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 #import "ios/chrome/browser/passwords/password_generation_agent.h" 5 #import "ios/chrome/browser/passwords/password_generation_agent.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include "base/mac/foundation_util.h" 9 #include "base/mac/foundation_util.h"
10 #include "base/mac/scoped_block.h" 10 #include "base/mac/scoped_block.h"
(...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after
349 [self hideAlert]; 349 [self hideAlert];
350 __weak PasswordGenerationAgent* weakSelf = self; 350 __weak PasswordGenerationAgent* weakSelf = self;
351 id completionHandler = ^(BOOL success) { 351 id completionHandler = ^(BOOL success) {
352 if (!success) 352 if (!success)
353 return; 353 return;
354 PasswordGenerationAgent* strongSelf = weakSelf; 354 PasswordGenerationAgent* strongSelf = weakSelf;
355 if (!strongSelf) 355 if (!strongSelf)
356 return; 356 return;
357 if (strongSelf->_passwordManager) { 357 if (strongSelf->_passwordManager) {
358 // Might be null in tests. 358 // Might be null in tests.
359 strongSelf->_passwordManager->SetHasGeneratedPasswordForForm( 359 strongSelf->_passwordManager->OnPresaveGeneratedPassword(
360 strongSelf->_passwordManagerDriver, 360 *strongSelf->_possibleAccountCreationForm);
361 *strongSelf->_possibleAccountCreationForm, true);
362 } 361 }
363 if (strongSelf->_accessoryViewReadyCompletion) { 362 if (strongSelf->_accessoryViewReadyCompletion) {
364 strongSelf->_accessoryViewReadyCompletion( 363 strongSelf->_accessoryViewReadyCompletion(
365 [strongSelf currentAccessoryView], strongSelf); 364 [strongSelf currentAccessoryView], strongSelf);
366 } 365 }
367 }; 366 };
368 [_javaScriptPasswordManager fillPasswordForm:[self passwordGenerationFormName] 367 [_javaScriptPasswordManager fillPasswordForm:[self passwordGenerationFormName]
369 withGeneratedPassword:_generatedPassword 368 withGeneratedPassword:_generatedPassword
370 completionHandler:completionHandler]; 369 completionHandler:completionHandler];
371 } 370 }
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
436 DCHECK(_accessoryViewReadyCompletion); 435 DCHECK(_accessoryViewReadyCompletion);
437 _accessoryViewReadyCompletion([self currentAccessoryView], self); 436 _accessoryViewReadyCompletion([self currentAccessoryView], self);
438 } 437 }
439 438
440 - (BOOL)getLogKeyboardAccessoryMetrics { 439 - (BOOL)getLogKeyboardAccessoryMetrics {
441 // Only store metrics for regular Autofill, not passwords. 440 // Only store metrics for regular Autofill, not passwords.
442 return NO; 441 return NO;
443 } 442 }
444 443
445 @end 444 @end
OLDNEW
« no previous file with comments | « components/password_manager/core/browser/password_manager_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698