Chromium Code Reviews| Index: third_party/WebKit/Source/platform/exported/WebCredential.cpp |
| diff --git a/third_party/WebKit/Source/platform/exported/WebCredential.cpp b/third_party/WebKit/Source/platform/exported/WebCredential.cpp |
| index 11125ecd1d40121ef026aa466818c24856aa1fee..759f9fb48d15cfbc35683c06b2402c20e46ffa5c 100644 |
| --- a/third_party/WebKit/Source/platform/exported/WebCredential.cpp |
| +++ b/third_party/WebKit/Source/platform/exported/WebCredential.cpp |
| @@ -7,23 +7,22 @@ |
| #include "platform/credentialmanager/PlatformCredential.h" |
| #include "public/platform/WebFederatedCredential.h" |
| #include "public/platform/WebPasswordCredential.h" |
| +#include "wtf/PtrUtil.h" |
| namespace blink { |
| -WebCredential WebCredential::create(PlatformCredential* credential) |
| +std::unique_ptr<WebCredential> WebCredential::create(PlatformCredential* credential) |
| { |
| if (credential->isPassword()) { |
| - WebPasswordCredential password(credential); |
| - return password; |
| + return WTF::wrapUnique(new WebPasswordCredential(credential)); |
|
Yuta Kitamura
2016/05/12 03:58:55
"WTF::" shouldn't be necessary.
|
| } |
| if (credential->isFederated()) { |
| - WebFederatedCredential federated(credential); |
| - return federated; |
| + return WTF::wrapUnique(new WebFederatedCredential(credential)); |
| } |
| ASSERT_NOT_REACHED(); |
| - return WebCredential(credential); |
| + return nullptr; |
| } |
| WebCredential::WebCredential(const WebString& id, const WebString& name, const WebURL& iconURL) |