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

Side by Side Diff: components/password_manager/content/public/cpp/credential_manager_struct_traits.cc

Issue 2253293002: Mojo C++ bindings: change the first template parameter of StructTraits and UnionTraits. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@91_extra
Patch Set: rebase Created 4 years, 4 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 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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698