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

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

Issue 2396553002: [ARC] Converts part of ios/web/ui to ARC.
Patch Set: co Created 4 years, 2 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 2015 The Chromium Authors. All rights reserved. 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 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 "ios/web/public/web_state/js/credential_util.h" 5 #include "ios/web/public/web_state/js/credential_util.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/strings/string16.h" 8 #include "base/strings/string16.h"
9 #include "base/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
10 #include "base/values.h" 10 #include "base/values.h"
11 #include "ios/web/public/web_state/credential.h" 11 #include "ios/web/public/web_state/credential.h"
12 #include "url/gurl.h" 12 #include "url/gurl.h"
13 #include "url/origin.h" 13 #include "url/origin.h"
14 14
15 #if !defined(__has_feature) || !__has_feature(objc_arc)
16 #error "This file requires ARC support."
17 #endif
18
15 namespace { 19 namespace {
16 20
17 // "type" value for a DictionaryValue representation of PasswordCredential. 21 // "type" value for a DictionaryValue representation of PasswordCredential.
18 const char* kPasswordCredentialType = "PasswordCredential"; 22 const char* kPasswordCredentialType = "PasswordCredential";
19 23
20 // "type" value for a DictionaryValue representation of FederatedCredential. 24 // "type" value for a DictionaryValue representation of FederatedCredential.
21 const char* kFederatedCredentialType = "FederatedCredential"; 25 const char* kFederatedCredentialType = "FederatedCredential";
22 26
23 } // namespace 27 } // namespace
24 28
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 break; 102 break;
99 default: 103 default:
100 NOTREACHED(); 104 NOTREACHED();
101 } 105 }
102 value->SetString("id", credential.id); 106 value->SetString("id", credential.id);
103 value->SetString("name", credential.name); 107 value->SetString("name", credential.name);
104 value->SetString("avatarURL", credential.avatar_url.spec()); 108 value->SetString("avatarURL", credential.avatar_url.spec());
105 } 109 }
106 110
107 } // web 111 } // web
OLDNEW
« no previous file with comments | « ios/web/web_state/global_web_state_event_tracker.mm ('k') | ios/web/web_state/js/crw_js_injection_manager.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698