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 <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
219 | 219 |
220 if (version > 5) { | 220 if (version > 5) { |
221 if (!iter.ReadInt(&generation_upload_status)) { | 221 if (!iter.ReadInt(&generation_upload_status)) { |
222 LogDeserializationWarning(version, signon_realm, false); | 222 LogDeserializationWarning(version, signon_realm, false); |
223 } | 223 } |
224 form->generation_upload_status = | 224 form->generation_upload_status = |
225 static_cast<PasswordForm::GenerationUploadStatus>( | 225 static_cast<PasswordForm::GenerationUploadStatus>( |
226 generation_upload_status); | 226 generation_upload_status); |
227 } | 227 } |
228 | 228 |
229 converted_forms.push_back(form.release()); | 229 converted_forms.push_back(form.Pass()); |
230 } | 230 } |
231 | 231 |
232 forms->swap(converted_forms); | 232 forms->swap(converted_forms); |
233 return true; | 233 return true; |
234 } | 234 } |
235 | 235 |
236 // Serializes a list of PasswordForms to be stored in the wallet. | 236 // Serializes a list of PasswordForms to be stored in the wallet. |
237 void SerializeValue(const std::vector<autofill::PasswordForm*>& forms, | 237 void SerializeValue(const std::vector<autofill::PasswordForm*>& forms, |
238 Pickle* pickle) { | 238 Pickle* pickle) { |
239 pickle->WriteInt(kPickleVersion); | 239 pickle->WriteInt(kPickleVersion); |
(...skipping 765 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1005 } | 1005 } |
1006 | 1006 |
1007 return handle; | 1007 return handle; |
1008 } | 1008 } |
1009 | 1009 |
1010 std::string NativeBackendKWallet::GetProfileSpecificFolderName() const { | 1010 std::string NativeBackendKWallet::GetProfileSpecificFolderName() const { |
1011 // Originally, the folder name was always just "Chrome Form Data". | 1011 // Originally, the folder name was always just "Chrome Form Data". |
1012 // Now we use it to distinguish passwords for different profiles. | 1012 // Now we use it to distinguish passwords for different profiles. |
1013 return base::StringPrintf("%s (%d)", kKWalletFolder, profile_id_); | 1013 return base::StringPrintf("%s (%d)", kKWalletFolder, profile_id_); |
1014 } | 1014 } |
OLD | NEW |