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

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

Issue 2846333004: Switch SupportsUserData uses to use unique_ptr. (Closed)
Patch Set: 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/password_manager_test_base.cc
diff --git a/chrome/browser/password_manager/password_manager_test_base.cc b/chrome/browser/password_manager/password_manager_test_base.cc
index 7b91a84f45ed02407f4d2cd2f2c7f8477d30df4f..8272c868f8d6df086937726efaa2d3705e47752e 100644
--- a/chrome/browser/password_manager/password_manager_test_base.cc
+++ b/chrome/browser/password_manager/password_manager_test_base.cc
@@ -7,6 +7,7 @@
#include <string>
#include "base/macros.h"
+#include "base/memory/ptr_util.h"
#include "base/memory/ref_counted.h"
#include "base/strings/stringprintf.h"
#include "chrome/browser/password_manager/chrome_password_manager_client.h"
@@ -93,7 +94,7 @@ CustomManagePasswordsUIController::CustomManagePasswordsUIController(
// Do not silently replace an existing ManagePasswordsUIController because it
// unregisters itself in WebContentsDestroyed().
EXPECT_FALSE(web_contents->GetUserData(UserDataKey()));
- web_contents->SetUserData(UserDataKey(), this);
+ web_contents->SetUserData(UserDataKey(), base::WrapUnique(this));
}
void CustomManagePasswordsUIController::WaitForState(

Powered by Google App Engine
This is Rietveld 408576698