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

Side by Side Diff: ios/web/web_state/js/credential_util.h

Issue 1107083002: Upstream more leaf files in ios/web/web_state (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@web-resync
Patch Set: Created 5 years, 7 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 | « ios/web/web_state/credential.cc ('k') | ios/web/web_state/js/credential_util.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef IOS_WEB_WEB_STATE_JS_CREDENTIAL_UTIL_H_
6 #define IOS_WEB_WEB_STATE_JS_CREDENTIAL_UTIL_H_
7
8 namespace base {
9 class DictionaryValue;
10 } // namespace base
11
12 namespace web {
13
14 struct Credential;
15
16 // Populates |credential| from |value|, returning true if successful and false
17 // otherwise. |value| must contain the following string->string key/value
18 // pairs:
19 //
20 // "type": one of "LocalCredential" of "FederatedCredential"
21 // "id": a string (possibly empty)
22 //
23 // The following pairs are optional:
24 //
25 // "name": a string (possibly empty)
26 // "avatarURL": a valid URL as a string
27 //
28 // If "type" is "LocalCredential", then |value| must contain
29 //
30 // "password" a string (possibly empty)
31 //
32 // If "type" is "FederatedCredential", then |value| must contain
33 //
34 // "federation": a valid URL as a string
35 //
36 // If passed a |value| that doesn't meet these restrictions, |credential| will
37 // not be modified and false will be returned. |credential| must not be null.
38 bool DictionaryValueToCredential(const base::DictionaryValue& value,
39 Credential* credential);
40
41 // Serializes |credential| to |value|.
42 void CredentialToDictionaryValue(const Credential& credential,
43 base::DictionaryValue* value);
44
45 } // namespace web
46
47 #endif // IOS_WEB_WEB_STATE_JS_CREDENTIAL_UTIL_H_
OLDNEW
« no previous file with comments | « ios/web/web_state/credential.cc ('k') | ios/web/web_state/js/credential_util.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698