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

Unified Diff: chrome/browser/password_manager/chrome_password_manager_client.cc

Issue 2842833003: Update SupportsUserData uses with unique_ptr. (Closed)
Patch Set: rebase Created 3 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
Index: chrome/browser/password_manager/chrome_password_manager_client.cc
diff --git a/chrome/browser/password_manager/chrome_password_manager_client.cc b/chrome/browser/password_manager/chrome_password_manager_client.cc
index 1a14e357965f7b1db6c5fd4f3138ba20b87b009e..44fe8af10ad808e6619ca6bd475bd4c7e66d6185 100644
--- a/chrome/browser/password_manager/chrome_password_manager_client.cc
+++ b/chrome/browser/password_manager/chrome_password_manager_client.cc
@@ -10,6 +10,7 @@
#include "base/bind.h"
#include "base/bind_helpers.h"
#include "base/command_line.h"
+#include "base/memory/ptr_util.h"
#include "base/memory/ref_counted.h"
#include "base/memory/singleton.h"
#include "base/metrics/field_trial.h"
@@ -149,9 +150,9 @@ void ChromePasswordManagerClient::CreateForWebContentsWithAutofillClient(
if (FromWebContents(contents))
return;
- contents->SetUserData(
- UserDataKey(),
- new ChromePasswordManagerClient(contents, autofill_client));
+ contents->SetUserData(UserDataKey(),
+ base::WrapUnique(new ChromePasswordManagerClient(
+ contents, autofill_client)));
}
ChromePasswordManagerClient::ChromePasswordManagerClient(

Powered by Google App Engine
This is Rietveld 408576698