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

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

Issue 6250088: Cleanup everything but net/ for our first clang plugins. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 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 | Annotate | Revision Log
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/form_structure.h" 5 #include "chrome/browser/autofill/form_structure.h"
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/sha1.h" 9 #include "base/sha1.h"
10 #include "base/string_number_conversions.h" 10 #include "base/string_number_conversions.h"
(...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after
324 const AutoFillField* FormStructure::field(int index) const { 324 const AutoFillField* FormStructure::field(int index) const {
325 return fields_[index]; 325 return fields_[index];
326 } 326 }
327 327
328 size_t FormStructure::field_count() const { 328 size_t FormStructure::field_count() const {
329 // Don't count the NULL terminator. 329 // Don't count the NULL terminator.
330 size_t field_size = fields_.size(); 330 size_t field_size = fields_.size();
331 return (field_size == 0) ? 0 : field_size - 1; 331 return (field_size == 0) ? 0 : field_size - 1;
332 } 332 }
333 333
334 std::string FormStructure::server_experiment_id() const {
335 return server_experiment_id_;
336 }
337
334 bool FormStructure::operator==(const FormData& form) const { 338 bool FormStructure::operator==(const FormData& form) const {
335 // TODO(jhawkins): Is this enough to differentiate a form? 339 // TODO(jhawkins): Is this enough to differentiate a form?
336 if (form_name_ == form.name && 340 if (form_name_ == form.name &&
337 source_url_ == form.origin && 341 source_url_ == form.origin &&
338 target_url_ == form.action) { 342 target_url_ == form.action) {
339 return true; 343 return true;
340 } 344 }
341 345
342 // TODO(jhawkins): Compare field names, IDs and labels once we have labels 346 // TODO(jhawkins): Compare field names, IDs and labels once we have labels
343 // set up. 347 // set up.
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
478 } 482 }
479 483
480 // Print all meaningfull bytes into the string. 484 // Print all meaningfull bytes into the string.
481 for (size_t i = 0; i < data_end; ++i) { 485 for (size_t i = 0; i < data_end; ++i) {
482 base::StringAppendF(&data_presence, "%02x", presence_bitfield[i]); 486 base::StringAppendF(&data_presence, "%02x", presence_bitfield[i]);
483 } 487 }
484 488
485 return data_presence; 489 return data_presence;
486 } 490 }
487 491
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698