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

Unified Diff: components/password_manager/content/renderer/credential_manager_client.cc

Issue 1865913005: Nuke WebPassOwnPtr<T> and replace it with std::unique_ptr<T>. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | components/password_manager/content/renderer/credential_manager_client_browsertest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/password_manager/content/renderer/credential_manager_client.cc
diff --git a/components/password_manager/content/renderer/credential_manager_client.cc b/components/password_manager/content/renderer/credential_manager_client.cc
index 6c071a2f7ba298631e24267d47d259a990e67262..3c548e8adabe1f8ff2f6a0e5dd668296cc6777a7 100644
--- a/components/password_manager/content/renderer/credential_manager_client.cc
+++ b/components/password_manager/content/renderer/credential_manager_client.cc
@@ -6,6 +6,9 @@
#include <stddef.h>
+#include <memory>
+#include <utility>
+
#include "components/password_manager/content/common/credential_manager_content_utils.h"
#include "components/password_manager/content/common/credential_manager_messages.h"
#include "components/password_manager/core/common/credential_manager_types.h"
@@ -13,7 +16,6 @@
#include "third_party/WebKit/public/platform/WebCredential.h"
#include "third_party/WebKit/public/platform/WebCredentialManagerError.h"
#include "third_party/WebKit/public/platform/WebFederatedCredential.h"
-#include "third_party/WebKit/public/platform/WebPassOwnPtr.h"
#include "third_party/WebKit/public/platform/WebPasswordCredential.h"
#include "third_party/WebKit/public/web/WebView.h"
@@ -76,7 +78,7 @@ void CredentialManagerClient::OnSendCredential(int request_id,
const CredentialInfo& info) {
RequestCallbacks* callbacks = get_callbacks_.Lookup(request_id);
DCHECK(callbacks);
- std::unique_ptr<blink::WebCredential> credential = nullptr;
+ std::unique_ptr<blink::WebCredential> credential;
switch (info.type) {
case CredentialType::CREDENTIAL_TYPE_FEDERATED:
credential.reset(new blink::WebFederatedCredential(
@@ -90,7 +92,7 @@ void CredentialManagerClient::OnSendCredential(int request_id,
// Intentionally empty; we'll send nullptr to the onSuccess call below.
break;
}
- callbacks->onSuccess(adoptWebPtr(credential.release()));
+ callbacks->onSuccess(std::move(credential));
get_callbacks_.Remove(request_id);
}
« no previous file with comments | « no previous file | components/password_manager/content/renderer/credential_manager_client_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698