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

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

Issue 2588323002: Revert "Remove Finch support for PasswordBranding" (Closed)
Patch Set: Created 4 years 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/common/password_manager_pref_names.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 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
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
OLDNEW
« no previous file with comments | « components/password_manager/core/common/password_manager_pref_names.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698