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

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

Issue 2593283002: [ios] Removed keyCode from FormActivityRegistered API. (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
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_agent.h" 5 #import "ios/chrome/browser/autofill/autofill_agent.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include <string> 8 #include <string>
9 9
10 #include "base/format_macros.h" 10 #include "base/format_macros.h"
(...skipping 675 matching lines...) Expand 10 before | Expand all | Expand 10 after
686 minimumRequiredFieldsCount:autofill::kRequiredFieldsForPredictionRoutines 686 minimumRequiredFieldsCount:autofill::kRequiredFieldsForPredictionRoutines
687 pageURL:pageURL 687 pageURL:pageURL
688 completionHandler:completionHandler]; 688 completionHandler:completionHandler];
689 } 689 }
690 690
691 - (void)webState:(web::WebState*)webState 691 - (void)webState:(web::WebState*)webState
692 didRegisterFormActivityWithFormNamed:(const std::string&)formName 692 didRegisterFormActivityWithFormNamed:(const std::string&)formName
693 fieldName:(const std::string&)fieldName 693 fieldName:(const std::string&)fieldName
694 type:(const std::string&)type 694 type:(const std::string&)type
695 value:(const std::string&)value 695 value:(const std::string&)value
696 keyCode:(int)keyCode
697 inputMissing:(BOOL)inputMissing { 696 inputMissing:(BOOL)inputMissing {
698 if (!browserState_->GetPrefs()->GetBoolean(autofill::prefs::kAutofillEnabled)) 697 if (!browserState_->GetPrefs()->GetBoolean(autofill::prefs::kAutofillEnabled))
699 return; 698 return;
700 web::URLVerificationTrustLevel trustLevel; 699 web::URLVerificationTrustLevel trustLevel;
701 const GURL pageURL(webState->GetCurrentURL(&trustLevel)); 700 const GURL pageURL(webState->GetCurrentURL(&trustLevel));
702 if (trustLevel != web::URLVerificationTrustLevel::kAbsolute) { 701 if (trustLevel != web::URLVerificationTrustLevel::kAbsolute) {
703 DLOG(WARNING) << "Form activity not handled on untrusted page"; 702 DLOG(WARNING) << "Form activity not handled on untrusted page";
704 return; 703 return;
705 } 704 }
706 705
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
861 } 860 }
862 predictionData.SetWithoutPathExpansion(base::UTF16ToUTF8(formData.name), 861 predictionData.SetWithoutPathExpansion(base::UTF16ToUTF8(formData.name),
863 formJSONData); 862 formJSONData);
864 } 863 }
865 std::string dataString; 864 std::string dataString;
866 base::JSONWriter::Write(predictionData, &dataString); 865 base::JSONWriter::Write(predictionData, &dataString);
867 [jsAutofillManager_ fillPredictionData:base::SysUTF8ToNSString(dataString)]; 866 [jsAutofillManager_ fillPredictionData:base::SysUTF8ToNSString(dataString)];
868 } 867 }
869 868
870 @end 869 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698