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

Side by Side Diff: chrome/browser/autofill/form_structure.h

Issue 11539003: Pop up requestAutocomplete UI when autofill server hints chrome client that it is in a multipage au… (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Updated string. Pop the UI only on first page of the flow. Created 8 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 (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 #ifndef CHROME_BROWSER_AUTOFILL_FORM_STRUCTURE_H_ 5 #ifndef CHROME_BROWSER_AUTOFILL_FORM_STRUCTURE_H_
6 #define CHROME_BROWSER_AUTOFILL_FORM_STRUCTURE_H_ 6 #define CHROME_BROWSER_AUTOFILL_FORM_STRUCTURE_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 return fields_.begin(); 136 return fields_.begin();
137 } 137 }
138 std::vector<AutofillField*>::const_iterator end() const { 138 std::vector<AutofillField*>::const_iterator end() const {
139 return fields_.end(); 139 return fields_.end();
140 } 140 }
141 141
142 const GURL& source_url() const { return source_url_; } 142 const GURL& source_url() const { return source_url_; }
143 143
144 UploadRequired upload_required() const { return upload_required_; } 144 UploadRequired upload_required() const { return upload_required_; }
145 145
146 bool is_start_autofillable_flow() const { return page_no_ == 1; }
Ilya Sherman 2012/12/13 02:29:23 nit: This method is not just doing a simple variab
Raman Kakilate 2012/12/13 21:34:34 Done.
147
148 bool is_in_autofillable_flow() const { return page_no_ < total_pages_; }
149
150 void set_page_no(int page_no) { page_no_ = page_no; }
151
152 void set_total_pages(int total_pages) { total_pages_ = total_pages; }
153
146 virtual std::string server_experiment_id() const; 154 virtual std::string server_experiment_id() const;
147 155
148 // Returns a FormData containing the data this form structure knows about. 156 // Returns a FormData containing the data this form structure knows about.
149 // |user_submitted| is currently always false. 157 // |user_submitted| is currently always false.
150 FormData ToFormData() const; 158 FormData ToFormData() const;
151 159
152 bool operator==(const FormData& form) const; 160 bool operator==(const FormData& form) const;
153 bool operator!=(const FormData& form) const; 161 bool operator!=(const FormData& form) const;
154 162
155 private: 163 private:
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 // to the stored upload rates. 209 // to the stored upload rates.
202 UploadRequired upload_required_; 210 UploadRequired upload_required_;
203 211
204 // The server experiment corresponding to the server types returned for this 212 // The server experiment corresponding to the server types returned for this
205 // form. 213 // form.
206 std::string server_experiment_id_; 214 std::string server_experiment_id_;
207 215
208 // GET or POST. 216 // GET or POST.
209 RequestMethod method_; 217 RequestMethod method_;
210 218
219 // Page number of the autofill flow, this form belongs to. If this form
220 // doesn't belong to any autofill flow, it is set to 0.
221 int page_no_;
222
223 // Total number of pages in the autofill flow. If this form doesn't belong
224 // to any autofill flow, it is set to 0.
225 int total_pages_;
226
211 // Whether the form includes any field types explicitly specified by the site 227 // Whether the form includes any field types explicitly specified by the site
212 // author, via the |autocompletetype| attribute. 228 // author, via the |autocompletetype| attribute.
213 bool has_author_specified_types_; 229 bool has_author_specified_types_;
214 230
215 DISALLOW_COPY_AND_ASSIGN(FormStructure); 231 DISALLOW_COPY_AND_ASSIGN(FormStructure);
216 }; 232 };
217 233
218 #endif // CHROME_BROWSER_AUTOFILL_FORM_STRUCTURE_H_ 234 #endif // CHROME_BROWSER_AUTOFILL_FORM_STRUCTURE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698