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

Side by Side Diff: components/autofill/core/browser/webdata/autofill_entry.cc

Issue 2646783002: Fixed synchronization autocomplete unrecoverable error. (Closed)
Patch Set: Added const for local variables. Created 3 years, 11 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "components/autofill/core/browser/webdata/autofill_entry.h" 5 #include "components/autofill/core/browser/webdata/autofill_entry.h"
6 6
7 #include <string>
7 #include <tuple> 8 #include <tuple>
8 9
9 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
10 11
11 namespace autofill { 12 namespace autofill {
12 13
13 AutofillKey::AutofillKey() {} 14 AutofillKey::AutofillKey() {}
14 15
15 AutofillKey::AutofillKey(const base::string16& name, 16 AutofillKey::AutofillKey(const base::string16& name,
16 const base::string16& value) 17 const base::string16& value)
17 : name_(name), 18 : name_(name),
18 value_(value) { 19 value_(value) {
19 } 20 }
20 21
21 AutofillKey::AutofillKey(const char* name, const char* value) 22 AutofillKey::AutofillKey(const std::string& name,
23 const std::string& value)
22 : name_(base::UTF8ToUTF16(name)), 24 : name_(base::UTF8ToUTF16(name)),
23 value_(base::UTF8ToUTF16(value)) { 25 value_(base::UTF8ToUTF16(value)) {
24 } 26 }
25 27
26 AutofillKey::AutofillKey(const AutofillKey& key) 28 AutofillKey::AutofillKey(const AutofillKey& key)
27 : name_(key.name()), 29 : name_(key.name()),
28 value_(key.value()) { 30 value_(key.value()) {
29 } 31 }
30 32
31 AutofillKey::~AutofillKey() {} 33 AutofillKey::~AutofillKey() {}
(...skipping 25 matching lines...) Expand all
57 59
58 bool AutofillEntry::operator!=(const AutofillEntry& entry) const { 60 bool AutofillEntry::operator!=(const AutofillEntry& entry) const {
59 return !(*this == entry); 61 return !(*this == entry);
60 } 62 }
61 63
62 bool AutofillEntry::operator<(const AutofillEntry& entry) const { 64 bool AutofillEntry::operator<(const AutofillEntry& entry) const {
63 return key_ < entry.key(); 65 return key_ < entry.key();
64 } 66 }
65 67
66 } // namespace autofill 68 } // namespace autofill
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698