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

Side by Side Diff: components/autofill/core/browser/autofill_profile.h

Issue 1220093003: Only UTF-8 sync tags for Wallet metadata. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Constants for strings. Created 5 years, 5 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 #ifndef COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_PROFILE_H_ 5 #ifndef COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_PROFILE_H_
6 #define COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_PROFILE_H_ 6 #define COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_PROFILE_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include <iosfwd> 10 #include <iosfwd>
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 ServerFieldType excluded_field, 153 ServerFieldType excluded_field,
154 size_t minimal_fields_shown, 154 size_t minimal_fields_shown,
155 const std::string& app_locale, 155 const std::string& app_locale,
156 std::vector<base::string16>* labels); 156 std::vector<base::string16>* labels);
157 157
158 const std::string& language_code() const { return language_code_; } 158 const std::string& language_code() const { return language_code_; }
159 void set_language_code(const std::string& language_code) { 159 void set_language_code(const std::string& language_code) {
160 language_code_ = language_code; 160 language_code_ = language_code;
161 } 161 }
162 162
163 // Nonempty only when type() == SERVER_PROFILE. 163 // Nonempty only when type() == SERVER_PROFILE. base::kSHA1Length bytes long.
164 // Not necessarily valid UTF-8.
164 const std::string& server_id() const { return server_id_; } 165 const std::string& server_id() const { return server_id_; }
165 166
166 // Creates an identifier and saves it as |server_id_|. Only used for 167 // Creates an identifier and saves it as |server_id_|. Only used for
167 // server credit cards. The server doesn't attach an identifier so Chrome 168 // server credit cards. The server doesn't attach an identifier so Chrome
168 // creates its own. The ID is a hash of the data contained in the profile. 169 // creates its own. The ID is a hash of the data contained in the profile.
169 void GenerateServerProfileIdentifier(); 170 void GenerateServerProfileIdentifier();
170 171
171 // Returns a standardized representation of the given string for comparison 172 // Returns a standardized representation of the given string for comparison
172 // purposes. The resulting string will be lower-cased with all punctuation 173 // purposes. The resulting string will be lower-cased with all punctuation
173 // substituted by spaces. Whitespace will be converted to ASCII space, and 174 // substituted by spaces. Whitespace will be converted to ASCII space, and
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
239 // a hash of the contents. 240 // a hash of the contents.
240 std::string server_id_; 241 std::string server_id_;
241 }; 242 };
242 243
243 // So we can compare AutofillProfiles with EXPECT_EQ(). 244 // So we can compare AutofillProfiles with EXPECT_EQ().
244 std::ostream& operator<<(std::ostream& os, const AutofillProfile& profile); 245 std::ostream& operator<<(std::ostream& os, const AutofillProfile& profile);
245 246
246 } // namespace autofill 247 } // namespace autofill
247 248
248 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_PROFILE_H_ 249 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_PROFILE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698