Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/password_manager/native_backend_kwallet_x.h" | 5 #include "chrome/browser/password_manager/native_backend_kwallet_x.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <map> | 10 #include <map> |
| (...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 270 pickle->WriteBool(form->ssl_valid); | 270 pickle->WriteBool(form->ssl_valid); |
| 271 pickle->WriteBool(form->preferred); | 271 pickle->WriteBool(form->preferred); |
| 272 pickle->WriteBool(form->blacklisted_by_user); | 272 pickle->WriteBool(form->blacklisted_by_user); |
| 273 pickle->WriteInt64(form->date_created.ToInternalValue()); | 273 pickle->WriteInt64(form->date_created.ToInternalValue()); |
| 274 pickle->WriteInt(form->type); | 274 pickle->WriteInt(form->type); |
| 275 pickle->WriteInt(form->times_used); | 275 pickle->WriteInt(form->times_used); |
| 276 autofill::SerializeFormData(form->form_data, pickle); | 276 autofill::SerializeFormData(form->form_data, pickle); |
| 277 pickle->WriteInt64(form->date_synced.ToInternalValue()); | 277 pickle->WriteInt64(form->date_synced.ToInternalValue()); |
| 278 pickle->WriteString16(form->display_name); | 278 pickle->WriteString16(form->display_name); |
| 279 pickle->WriteString(form->icon_url.spec()); | 279 pickle->WriteString(form->icon_url.spec()); |
| 280 pickle->WriteString(form->federation_origin.Serialize()); | 280 // We serialize unique origins as "", in order to make other systems that |
| 281 // read from the login database happy. https://crbug.com/591310 | |
| 282 pickle->WriteString(form->federation_origin.unique() | |
| 283 ? "" | |
|
vasilii
2016/03/02 11:45:00
string()
| |
| 284 : form->federation_origin.Serialize()); | |
| 281 pickle->WriteBool(form->skip_zero_click); | 285 pickle->WriteBool(form->skip_zero_click); |
| 282 pickle->WriteInt(form->generation_upload_status); | 286 pickle->WriteInt(form->generation_upload_status); |
| 283 } | 287 } |
| 284 } | 288 } |
| 285 | 289 |
| 286 // Moves the content of |second| to the end of |first|. | 290 // Moves the content of |second| to the end of |first|. |
| 287 void AppendSecondToFirst(ScopedVector<autofill::PasswordForm>* first, | 291 void AppendSecondToFirst(ScopedVector<autofill::PasswordForm>* first, |
| 288 ScopedVector<autofill::PasswordForm> second) { | 292 ScopedVector<autofill::PasswordForm> second) { |
| 289 first->reserve(first->size() + second.size()); | 293 first->reserve(first->size() + second.size()); |
| 290 first->insert(first->end(), second.begin(), second.end()); | 294 first->insert(first->end(), second.begin(), second.end()); |
| (...skipping 798 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1089 } | 1093 } |
| 1090 | 1094 |
| 1091 return handle; | 1095 return handle; |
| 1092 } | 1096 } |
| 1093 | 1097 |
| 1094 std::string NativeBackendKWallet::GetProfileSpecificFolderName() const { | 1098 std::string NativeBackendKWallet::GetProfileSpecificFolderName() const { |
| 1095 // Originally, the folder name was always just "Chrome Form Data". | 1099 // Originally, the folder name was always just "Chrome Form Data". |
| 1096 // Now we use it to distinguish passwords for different profiles. | 1100 // Now we use it to distinguish passwords for different profiles. |
| 1097 return base::StringPrintf("%s (%d)", kKWalletFolder, profile_id_); | 1101 return base::StringPrintf("%s (%d)", kKWalletFolder, profile_id_); |
| 1098 } | 1102 } |
| OLD | NEW |