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

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

Issue 2388163002: [Sync] Move //components/sync to the syncer namespace, take 2. (Closed)
Patch Set: Rebase. Created 4 years, 2 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 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 828 matching lines...) Expand 10 before | Expand all | Expand 10 after
839 839
840 #pragma mark - Private methods 840 #pragma mark - Private methods
841 841
842 - (void)showInfoBarForForm:(std::unique_ptr<PasswordFormManager>)form 842 - (void)showInfoBarForForm:(std::unique_ptr<PasswordFormManager>)form
843 infoBarType:(PasswordInfoBarType)type { 843 infoBarType:(PasswordInfoBarType)type {
844 if (!webStateObserverBridge_ || !webStateObserverBridge_->web_state()) 844 if (!webStateObserverBridge_ || !webStateObserverBridge_->web_state())
845 return; 845 return;
846 846
847 bool isSmartLockBrandingEnabled = false; 847 bool isSmartLockBrandingEnabled = false;
848 if (self.browserState) { 848 if (self.browserState) {
849 sync_driver::SyncService* sync_service = 849 syncer::SyncService* sync_service =
850 IOSChromeProfileSyncServiceFactory::GetForBrowserState( 850 IOSChromeProfileSyncServiceFactory::GetForBrowserState(
851 self.browserState); 851 self.browserState);
852 isSmartLockBrandingEnabled = 852 isSmartLockBrandingEnabled =
853 password_bubble_experiment::IsSmartLockBrandingSavePromptEnabled( 853 password_bubble_experiment::IsSmartLockBrandingSavePromptEnabled(
854 sync_service); 854 sync_service);
855 } 855 }
856 infobars::InfoBarManager* infoBarManager = 856 infobars::InfoBarManager* infoBarManager =
857 InfoBarManagerImpl::FromWebState(webStateObserverBridge_->web_state()); 857 InfoBarManagerImpl::FromWebState(webStateObserverBridge_->web_state());
858 858
859 switch (type) { 859 switch (type) {
860 case PasswordInfoBarType::SAVE: 860 case PasswordInfoBarType::SAVE:
861 IOSChromeSavePasswordInfoBarDelegate::Create( 861 IOSChromeSavePasswordInfoBarDelegate::Create(
862 isSmartLockBrandingEnabled, infoBarManager, std::move(form)); 862 isSmartLockBrandingEnabled, infoBarManager, std::move(form));
863 break; 863 break;
864 864
865 case PasswordInfoBarType::UPDATE: 865 case PasswordInfoBarType::UPDATE:
866 IOSChromeUpdatePasswordInfoBarDelegate::Create( 866 IOSChromeUpdatePasswordInfoBarDelegate::Create(
867 isSmartLockBrandingEnabled, infoBarManager, std::move(form)); 867 isSmartLockBrandingEnabled, infoBarManager, std::move(form));
868 break; 868 break;
869 } 869 }
870 } 870 }
871 871
872 @end 872 @end
OLDNEW
« no previous file with comments | « ios/chrome/browser/passwords/ios_chrome_password_store_factory.cc ('k') | ios/chrome/browser/prefs/browser_prefs.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698