OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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_controller.h" | 5 #import "ios/chrome/browser/passwords/password_controller.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <algorithm> | 9 #include <algorithm> |
10 #include <map> | 10 #include <map> |
(...skipping 844 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
855 infoBarType:(PasswordInfoBarType)type { | 855 infoBarType:(PasswordInfoBarType)type { |
856 if (!webStateObserverBridge_ || !webStateObserverBridge_->web_state()) | 856 if (!webStateObserverBridge_ || !webStateObserverBridge_->web_state()) |
857 return; | 857 return; |
858 | 858 |
859 bool isSmartLockBrandingEnabled = false; | 859 bool isSmartLockBrandingEnabled = false; |
860 if (self.browserState) { | 860 if (self.browserState) { |
861 syncer::SyncService* sync_service = | 861 syncer::SyncService* sync_service = |
862 IOSChromeProfileSyncServiceFactory::GetForBrowserState( | 862 IOSChromeProfileSyncServiceFactory::GetForBrowserState( |
863 self.browserState); | 863 self.browserState); |
864 isSmartLockBrandingEnabled = | 864 isSmartLockBrandingEnabled = |
865 password_bubble_experiment::IsSmartLockUser(sync_service); | 865 password_bubble_experiment::IsSmartLockBrandingSavePromptEnabled( |
| 866 sync_service); |
866 } | 867 } |
867 infobars::InfoBarManager* infoBarManager = | 868 infobars::InfoBarManager* infoBarManager = |
868 InfoBarManagerImpl::FromWebState(webStateObserverBridge_->web_state()); | 869 InfoBarManagerImpl::FromWebState(webStateObserverBridge_->web_state()); |
869 | 870 |
870 switch (type) { | 871 switch (type) { |
871 case PasswordInfoBarType::SAVE: | 872 case PasswordInfoBarType::SAVE: |
872 IOSChromeSavePasswordInfoBarDelegate::Create( | 873 IOSChromeSavePasswordInfoBarDelegate::Create( |
873 isSmartLockBrandingEnabled, infoBarManager, std::move(form)); | 874 isSmartLockBrandingEnabled, infoBarManager, std::move(form)); |
874 break; | 875 break; |
875 | 876 |
876 case PasswordInfoBarType::UPDATE: | 877 case PasswordInfoBarType::UPDATE: |
877 IOSChromeUpdatePasswordInfoBarDelegate::Create( | 878 IOSChromeUpdatePasswordInfoBarDelegate::Create( |
878 isSmartLockBrandingEnabled, infoBarManager, std::move(form)); | 879 isSmartLockBrandingEnabled, infoBarManager, std::move(form)); |
879 break; | 880 break; |
880 } | 881 } |
881 } | 882 } |
882 | 883 |
883 @end | 884 @end |
OLD | NEW |