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

Side by Side Diff: chrome/browser/autofill/autofill_manager.cc

Issue 3287006: Remove javascript form submission security check until furthur analysis.... (Closed) Base URL: svn://svn.chromium.org/chrome/branches/472/src/
Patch Set: Created 10 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | 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 (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 #include "chrome/browser/autofill/autofill_manager.h" 5 #include "chrome/browser/autofill/autofill_manager.h"
6 6
7 #include <limits> 7 #include <limits>
8 #include <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 kAutoFillNegativeUploadRateDefaultValue); 131 kAutoFillNegativeUploadRateDefaultValue);
132 } 132 }
133 133
134 void AutoFillManager::FormSubmitted(const FormData& form) { 134 void AutoFillManager::FormSubmitted(const FormData& form) {
135 if (!IsAutoFillEnabled()) 135 if (!IsAutoFillEnabled())
136 return; 136 return;
137 137
138 if (tab_contents_->profile()->IsOffTheRecord()) 138 if (tab_contents_->profile()->IsOffTheRecord())
139 return; 139 return;
140 140
141 // FIXME(dhollowa, aarya): crbug.com/48225.
141 // Don't save data that was submitted through JavaScript. 142 // Don't save data that was submitted through JavaScript.
142 if (!form.user_submitted) 143 // if (!form.user_submitted)
143 return; 144 // return;
144 145
145 // Grab a copy of the form data. 146 // Grab a copy of the form data.
146 upload_form_structure_.reset(new FormStructure(form)); 147 upload_form_structure_.reset(new FormStructure(form));
147 148
148 if (!upload_form_structure_->IsAutoFillable()) 149 if (!upload_form_structure_->IsAutoFillable())
149 return; 150 return;
150 151
151 // Determine the possible field types and upload the form structure to the 152 // Determine the possible field types and upload the form structure to the
152 // PersonalDataManager. 153 // PersonalDataManager.
153 DeterminePossibleFieldTypes(upload_form_structure_.get()); 154 DeterminePossibleFieldTypes(upload_form_structure_.get());
(...skipping 638 matching lines...) Expand 10 before | Expand all | Expand 10 after
792 793
793 // When receiving IDs (across processes) from the renderer we unpack credit card 794 // When receiving IDs (across processes) from the renderer we unpack credit card
794 // and profile IDs from a single integer. Credit card IDs are stored in the 795 // and profile IDs from a single integer. Credit card IDs are stored in the
795 // high word and profile IDs are stored in the low word. 796 // high word and profile IDs are stored in the low word.
796 // static 797 // static
797 void AutoFillManager::UnpackIDs(int id, int* cc_id, int* profile_id) { 798 void AutoFillManager::UnpackIDs(int id, int* cc_id, int* profile_id) {
798 *cc_id = id >> std::numeric_limits<unsigned short>::digits & 799 *cc_id = id >> std::numeric_limits<unsigned short>::digits &
799 std::numeric_limits<unsigned short>::max(); 800 std::numeric_limits<unsigned short>::max();
800 *profile_id = id & std::numeric_limits<unsigned short>::max(); 801 *profile_id = id & std::numeric_limits<unsigned short>::max();
801 } 802 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698