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

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

Issue 6273015: Match FormStructure DCHECK to AutoFillManager's check in OnFormSubmitted() (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
« no previous file with comments | « no previous file | chrome/browser/session_history_uitest.cc » ('j') | 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/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 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 method_ = GET; 101 method_ = GET;
102 } 102 }
103 } 103 }
104 104
105 FormStructure::~FormStructure() {} 105 FormStructure::~FormStructure() {}
106 106
107 bool FormStructure::EncodeUploadRequest(bool auto_fill_used, 107 bool FormStructure::EncodeUploadRequest(bool auto_fill_used,
108 std::string* encoded_xml) const { 108 std::string* encoded_xml) const {
109 DCHECK(encoded_xml); 109 DCHECK(encoded_xml);
110 encoded_xml->clear(); 110 encoded_xml->clear();
111 bool auto_fillable = IsAutoFillable(false); 111 bool auto_fillable = ShouldBeParsed(true);
112 DCHECK(auto_fillable); // Caller should've checked for search pages. 112 DCHECK(auto_fillable); // Caller should've checked for search pages.
113 if (!auto_fillable) 113 if (!auto_fillable)
114 return false; 114 return false;
115 115
116 buzz::XmlElement autofill_request_xml(buzz::QName("autofillupload")); 116 buzz::XmlElement autofill_request_xml(buzz::QName("autofillupload"));
117 117
118 // Attributes for the <autofillupload> element. 118 // Attributes for the <autofillupload> element.
119 // 119 //
120 // TODO(jhawkins): Work with toolbar devs to make a spec for autofill clients. 120 // TODO(jhawkins): Work with toolbar devs to make a spec for autofill clients.
121 // For now these values are hacked from the toolbar code. 121 // For now these values are hacked from the toolbar code.
(...skipping 344 matching lines...) Expand 10 before | Expand all | Expand 10 after
466 } 466 }
467 467
468 // Print all meaningfull bytes into the string. 468 // Print all meaningfull bytes into the string.
469 for (size_t i = 0; i < data_end; ++i) { 469 for (size_t i = 0; i < data_end; ++i) {
470 base::StringAppendF(&data_presence, "%02x", presence_bitfield[i]); 470 base::StringAppendF(&data_presence, "%02x", presence_bitfield[i]);
471 } 471 }
472 472
473 return data_presence; 473 return data_presence;
474 } 474 }
475 475
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/session_history_uitest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698