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

Side by Side Diff: ios/chrome/browser/autofill/autofill_controller.mm

Issue 2672623005: Record Autofill form events specially for nonsecure pages (Closed)
Patch Set: fix test added in rebase Created 3 years, 10 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/autofill/autofill_controller.h" 5 #import "ios/chrome/browser/autofill/autofill_controller.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include <memory> 9 #include <memory>
10 #include <utility> 10 #include <utility>
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 InfoBarManagerImpl::FromWebState(webState); 69 InfoBarManagerImpl::FromWebState(webState);
70 DCHECK(infobarManager); 70 DCHECK(infobarManager);
71 ios::ChromeBrowserState* originalBrowserState = 71 ios::ChromeBrowserState* originalBrowserState =
72 browserState->GetOriginalChromeBrowserState(); 72 browserState->GetOriginalChromeBrowserState();
73 std::unique_ptr<IdentityProvider> identityProvider( 73 std::unique_ptr<IdentityProvider> identityProvider(
74 new ProfileIdentityProvider( 74 new ProfileIdentityProvider(
75 ios::SigninManagerFactory::GetForBrowserState(originalBrowserState), 75 ios::SigninManagerFactory::GetForBrowserState(originalBrowserState),
76 OAuth2TokenServiceFactory::GetForBrowserState(originalBrowserState), 76 OAuth2TokenServiceFactory::GetForBrowserState(originalBrowserState),
77 base::Closure())); 77 base::Closure()));
78 _autofillClient.reset(new autofill::AutofillClientIOS( 78 _autofillClient.reset(new autofill::AutofillClientIOS(
79 browserState, infobarManager, self, passwordGenerationManager, 79 browserState, webState, infobarManager, self, passwordGenerationManager,
80 std::move(identityProvider))); 80 std::move(identityProvider)));
81 autofill::AutofillDriverIOS::CreateForWebStateAndDelegate( 81 autofill::AutofillDriverIOS::CreateForWebStateAndDelegate(
82 webState, _autofillClient.get(), self, 82 webState, _autofillClient.get(), self,
83 GetApplicationContext()->GetApplicationLocale(), 83 GetApplicationContext()->GetApplicationLocale(),
84 downloadEnabled 84 downloadEnabled
85 ? autofill::AutofillManager::ENABLE_AUTOFILL_DOWNLOAD_MANAGER 85 ? autofill::AutofillManager::ENABLE_AUTOFILL_DOWNLOAD_MANAGER
86 : autofill::AutofillManager::DISABLE_AUTOFILL_DOWNLOAD_MANAGER); 86 : autofill::AutofillManager::DISABLE_AUTOFILL_DOWNLOAD_MANAGER);
87 _autofillAgent = autofillAgent; 87 _autofillAgent = autofillAgent;
88 _autofillManager = 88 _autofillManager =
89 autofill::AutofillDriverIOS::FromWebState(webState)->autofill_manager(); 89 autofill::AutofillDriverIOS::FromWebState(webState)->autofill_manager();
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
191 } 191 }
192 192
193 - (void)sendAutofillTypePredictionsToRenderer: 193 - (void)sendAutofillTypePredictionsToRenderer:
194 (const std::vector<autofill::FormStructure*>&)forms { 194 (const std::vector<autofill::FormStructure*>&)forms {
195 NSUserDefaults* standardDefaults = [NSUserDefaults standardUserDefaults]; 195 NSUserDefaults* standardDefaults = [NSUserDefaults standardUserDefaults];
196 if ([standardDefaults boolForKey:@"ShowAutofillTypePredictions"]) 196 if ([standardDefaults boolForKey:@"ShowAutofillTypePredictions"])
197 [_autofillAgent renderAutofillTypePredictions:forms]; 197 [_autofillAgent renderAutofillTypePredictions:forms];
198 } 198 }
199 199
200 @end 200 @end
OLDNEW
« no previous file with comments | « components/password_manager/core/browser/password_autofill_manager.cc ('k') | ios/chrome/browser/ui/autofill/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698