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

Side by Side Diff: webkit/glue/form_data.cc

Issue 3226001: Detecting form locale (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: Unit test for top websites 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
« no previous file with comments | « webkit/glue/form_data.h ('k') | 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 "webkit/glue/form_data.h" 5 #include "webkit/glue/form_data.h"
6 #include "base/string_util.h"
6 7
7 namespace webkit_glue { 8 namespace webkit_glue {
8 9
9 FormData::FormData() 10 FormData::FormData()
10 : user_submitted(false) { 11 : user_submitted(false) {
11 } 12 }
12 13
13 FormData::FormData(const FormData& data) 14 FormData::FormData(const FormData& data)
14 : name(data.name), 15 : name(data.name),
15 method(data.method), 16 method(data.method),
16 origin(data.origin), 17 origin(data.origin),
17 action(data.action), 18 action(data.action),
19 locale(data.locale),
18 user_submitted(data.user_submitted), 20 user_submitted(data.user_submitted),
19 fields(data.fields) { 21 fields(data.fields) {
20 } 22 }
21 23
22 FormData::~FormData() { 24 FormData::~FormData() {
23 } 25 }
24 26
25 bool FormData::operator==(const FormData& form) const { 27 bool FormData::operator==(const FormData& form) const {
26 return (name == form.name && 28 return (name == form.name &&
27 StringToLowerASCII(method) == StringToLowerASCII(form.method) && 29 StringToLowerASCII(method) == StringToLowerASCII(form.method) &&
28 origin == form.origin && 30 origin == form.origin &&
29 action == form.action && 31 action == form.action &&
32 locale == form.locale &&
30 user_submitted == form.user_submitted && 33 user_submitted == form.user_submitted &&
31 fields == form.fields); 34 fields == form.fields);
32 } 35 }
33 36
34 } // namespace webkit_glue 37 } // namespace webkit_glue
OLDNEW
« no previous file with comments | « webkit/glue/form_data.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698