OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/password_manager/content/public/cpp/credential_manager_stru
ct_traits.h" | 5 #include "components/password_manager/content/public/cpp/credential_manager_stru
ct_traits.h" |
6 | 6 |
7 #include "url/mojo/origin_struct_traits.h" | 7 #include "url/mojo/origin_struct_traits.h" |
8 #include "url/mojo/url_gurl_struct_traits.h" | 8 #include "url/mojo/url_gurl_struct_traits.h" |
9 | 9 |
10 using namespace password_manager; | 10 using namespace password_manager; |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 case mojom::CredentialType::FEDERATED: | 42 case mojom::CredentialType::FEDERATED: |
43 *output = CredentialType::CREDENTIAL_TYPE_FEDERATED; | 43 *output = CredentialType::CREDENTIAL_TYPE_FEDERATED; |
44 return true; | 44 return true; |
45 } | 45 } |
46 | 46 |
47 NOTREACHED(); | 47 NOTREACHED(); |
48 return false; | 48 return false; |
49 } | 49 } |
50 | 50 |
51 // static | 51 // static |
52 bool StructTraits<mojom::CredentialInfo, CredentialInfo>::Read( | 52 bool StructTraits<mojom::CredentialInfoDataView, CredentialInfo>::Read( |
53 mojom::CredentialInfoDataView data, | 53 mojom::CredentialInfoDataView data, |
54 CredentialInfo* out) { | 54 CredentialInfo* out) { |
55 if (data.ReadType(&out->type) && data.ReadId(&out->id) && | 55 if (data.ReadType(&out->type) && data.ReadId(&out->id) && |
56 data.ReadName(&out->name) && data.ReadIcon(&out->icon) && | 56 data.ReadName(&out->name) && data.ReadIcon(&out->icon) && |
57 data.ReadPassword(&out->password) && | 57 data.ReadPassword(&out->password) && |
58 data.ReadFederation(&out->federation)) | 58 data.ReadFederation(&out->federation)) |
59 return true; | 59 return true; |
60 | 60 |
61 return false; | 61 return false; |
62 } | 62 } |
63 | 63 |
64 } // namespace mojo | 64 } // namespace mojo |
OLD | NEW |