OLD | NEW |
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 <algorithm> | 7 #include <algorithm> |
8 #include <set> | 8 #include <set> |
9 | 9 |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
11 #include "base/strings/utf_string_conversions.h" | 11 #include "base/strings/utf_string_conversions.h" |
12 | 12 |
13 namespace autofill { | 13 namespace autofill { |
14 namespace { | 14 namespace { |
15 | 15 |
16 // The period after which Autofill entries should expire in days. | 16 // The period after which Autofill entries should expire in days. |
17 const int64 kExpirationPeriodInDays = 60; | 17 const int64 kExpirationPeriodInDays = 60; |
18 | 18 |
19 } // namespace | 19 } // namespace |
20 | 20 |
21 AutofillKey::AutofillKey() {} | 21 AutofillKey::AutofillKey() {} |
22 | 22 |
23 AutofillKey::AutofillKey(const base::string16& name, | 23 AutofillKey::AutofillKey(const base::string16& name, |
24 const base::string16& value) | 24 const base::string16& value) |
25 : name_(name), | 25 : name_(name), |
26 value_(value) { | 26 value_(value) { |
27 } | 27 } |
28 | 28 |
29 AutofillKey::AutofillKey(const char* name, const char* value) | 29 AutofillKey::AutofillKey(const char* name, const char* value) |
30 : name_(UTF8ToUTF16(name)), | 30 : name_(base::UTF8ToUTF16(name)), |
31 value_(UTF8ToUTF16(value)) { | 31 value_(base::UTF8ToUTF16(value)) { |
32 } | 32 } |
33 | 33 |
34 AutofillKey::AutofillKey(const AutofillKey& key) | 34 AutofillKey::AutofillKey(const AutofillKey& key) |
35 : name_(key.name()), | 35 : name_(key.name()), |
36 value_(key.value()) { | 36 value_(key.value()) { |
37 } | 37 } |
38 | 38 |
39 AutofillKey::~AutofillKey() {} | 39 AutofillKey::~AutofillKey() {} |
40 | 40 |
41 bool AutofillKey::operator==(const AutofillKey& key) const { | 41 bool AutofillKey::operator==(const AutofillKey& key) const { |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
120 | 120 |
121 result->push_back(source.front()); | 121 result->push_back(source.front()); |
122 result->push_back(source.back()); | 122 result->push_back(source.back()); |
123 | 123 |
124 DVLOG(1) << "Culling timestamps. Current count is : " << source.size(); | 124 DVLOG(1) << "Culling timestamps. Current count is : " << source.size(); |
125 | 125 |
126 return true; | 126 return true; |
127 } | 127 } |
128 | 128 |
129 } // namespace autofill | 129 } // namespace autofill |
OLD | NEW |