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

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

Issue 2106353003: Enable Update Password UI on iOS behind a flag (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@update_controller
Patch Set: Fixes for sdefresne's comments Created 4 years, 5 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/ios_chrome_password_manager_client.h" 5 #import "ios/chrome/browser/passwords/ios_chrome_password_manager_client.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include <utility> 8 #include <utility>
9 9
10 #include "components/autofill/core/common/password_form.h" 10 #include "components/autofill/core/common/password_form.h"
11 #include "components/browser_sync/browser/profile_sync_service.h" 11 #include "components/browser_sync/browser/profile_sync_service.h"
12 #include "components/keyed_service/core/service_access_type.h" 12 #include "components/keyed_service/core/service_access_type.h"
13 #include "components/password_manager/core/browser/password_form_manager.h" 13 #include "components/password_manager/core/browser/password_form_manager.h"
14 #include "components/password_manager/core/browser/password_manager_util.h" 14 #include "components/password_manager/core/browser/password_manager_util.h"
15 #include "components/password_manager/core/common/password_manager_pref_names.h" 15 #include "components/password_manager/core/common/password_manager_pref_names.h"
16 #include "components/signin/core/browser/signin_manager_base.h" 16 #include "components/signin/core/browser/signin_manager_base.h"
17 #include "ios/chrome/browser/browser_state/chrome_browser_state.h" 17 #include "ios/chrome/browser/browser_state/chrome_browser_state.h"
18 #include "ios/chrome/browser/experimental_flags.h"
18 #include "ios/chrome/browser/passwords/ios_chrome_password_store_factory.h" 19 #include "ios/chrome/browser/passwords/ios_chrome_password_store_factory.h"
19 #include "ios/chrome/browser/signin/signin_manager_factory.h" 20 #include "ios/chrome/browser/signin/signin_manager_factory.h"
20 #include "ios/chrome/browser/sync/ios_chrome_profile_sync_service_factory.h" 21 #include "ios/chrome/browser/sync/ios_chrome_profile_sync_service_factory.h"
22
vabr (Chromium) 2016/07/05 14:30:57 nit: Why this blank line? Normally the non-system
Jackie Quinn 2016/07/05 15:12:36 user error. Fixed.
21 #include "url/gurl.h" 23 #include "url/gurl.h"
22 24
23 using password_manager::PasswordFormManager; 25 using password_manager::PasswordFormManager;
24 using password_manager::PasswordStore; 26 using password_manager::PasswordStore;
25 using password_manager::PasswordSyncState; 27 using password_manager::PasswordSyncState;
26 28
27 namespace { 29 namespace {
28 30
29 const sync_driver::SyncService* GetSyncService( 31 const sync_driver::SyncService* GetSyncService(
30 ios::ChromeBrowserState* browser_state) { 32 ios::ChromeBrowserState* browser_state) {
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 NOTIMPLEMENTED(); 69 NOTIMPLEMENTED();
68 return false; 70 return false;
69 } 71 }
70 72
71 bool IOSChromePasswordManagerClient::PromptUserToSaveOrUpdatePassword( 73 bool IOSChromePasswordManagerClient::PromptUserToSaveOrUpdatePassword(
72 std::unique_ptr<PasswordFormManager> form_to_save, 74 std::unique_ptr<PasswordFormManager> form_to_save,
73 password_manager::CredentialSourceType type, 75 password_manager::CredentialSourceType type,
74 bool update_password) { 76 bool update_password) {
75 if (form_to_save->IsBlacklisted()) 77 if (form_to_save->IsBlacklisted())
76 return false; 78 return false;
77 [delegate_ showSavePasswordInfoBar:std::move(form_to_save)]; 79
80 if (experimental_flags::IsUpdatePasswordUIEnabled() && update_password) {
81 [delegate_ showUpdatePasswordInfoBar:std::move(form_to_save)];
82 } else {
83 [delegate_ showSavePasswordInfoBar:std::move(form_to_save)];
vabr (Chromium) 2016/07/05 14:30:57 This seems like it would start showing the "save p
Jackie Quinn 2016/07/05 15:12:36 I had it this way since it was always showing the
vabr (Chromium) 2016/07/05 15:32:17 Oh, you are right, Jackie, your patch set 4 keeps
84 }
85
78 return true; 86 return true;
79 } 87 }
80 88
81 void IOSChromePasswordManagerClient::AutomaticPasswordSave( 89 void IOSChromePasswordManagerClient::AutomaticPasswordSave(
82 std::unique_ptr<PasswordFormManager> saved_form_manager) { 90 std::unique_ptr<PasswordFormManager> saved_form_manager) {
83 NOTIMPLEMENTED(); 91 NOTIMPLEMENTED();
84 } 92 }
85 93
86 bool IOSChromePasswordManagerClient::IsOffTheRecord() const { 94 bool IOSChromePasswordManagerClient::IsOffTheRecord() const {
87 return (delegate_.browserState)->IsOffTheRecord(); 95 return (delegate_.browserState)->IsOffTheRecord();
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 } 129 }
122 130
123 const GURL& IOSChromePasswordManagerClient::GetLastCommittedEntryURL() const { 131 const GURL& IOSChromePasswordManagerClient::GetLastCommittedEntryURL() const {
124 return delegate_.lastCommittedURL; 132 return delegate_.lastCommittedURL;
125 } 133 }
126 134
127 const password_manager::CredentialsFilter* 135 const password_manager::CredentialsFilter*
128 IOSChromePasswordManagerClient::GetStoreResultFilter() const { 136 IOSChromePasswordManagerClient::GetStoreResultFilter() const {
129 return &credentials_filter_; 137 return &credentials_filter_;
130 } 138 }
OLDNEW
« no previous file with comments | « ios/chrome/browser/passwords/ios_chrome_password_manager_client.h ('k') | ios/chrome/browser/passwords/password_controller.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698