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

Side by Side Diff: components/signin/public/interfaces/account_id_traits.h

Issue 2753753007: Introduce Identity Service and its initial usage (Closed)
Patch Set: Response to reviews Created 3 years, 9 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
« no previous file with comments | « chrome/browser/profiles/profile_impl.cc ('k') | services/device/device_service.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 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_SIGNIN_PUBLIC_INTERFACES_ACCOUNT_ID_TRAITS_H_ 5 #ifndef COMPONENTS_SIGNIN_PUBLIC_INTERFACES_ACCOUNT_ID_TRAITS_H_
6 #define COMPONENTS_SIGNIN_PUBLIC_INTERFACES_ACCOUNT_ID_TRAITS_H_ 6 #define COMPONENTS_SIGNIN_PUBLIC_INTERFACES_ACCOUNT_ID_TRAITS_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "components/signin/core/account_id/account_id.h" 10 #include "components/signin/core/account_id/account_id.h"
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 // Bail if there is no user email. 93 // Bail if there is no user email.
94 if (user_email.empty()) 94 if (user_email.empty())
95 return false; 95 return false;
96 96
97 *out = AccountId::FromUserEmail(user_email); 97 *out = AccountId::FromUserEmail(user_email);
98 break; 98 break;
99 } 99 }
100 100
101 return out->is_valid(); 101 return out->is_valid();
102 } 102 }
103
104 static bool IsNull(const AccountId& input) { return !input.is_valid(); }
105
106 static void SetToNull(AccountId* output) { *output = EmptyAccountId(); }
103 }; 107 };
104 108
105 } // namespace mojo 109 } // namespace mojo
106 110
107 #endif // COMPONENTS_SIGNIN_PUBLIC_INTERFACES_ACCOUNT_ID_TRAITS_H_ 111 #endif // COMPONENTS_SIGNIN_PUBLIC_INTERFACES_ACCOUNT_ID_TRAITS_H_
OLDNEW
« no previous file with comments | « chrome/browser/profiles/profile_impl.cc ('k') | services/device/device_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698