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

Unified Diff: ios/chrome/browser/ui/dialogs/javascript_dialog_blocking_util.mm

Issue 2853443002: 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
« no previous file with comments | « ios/chrome/browser/tabs/tab_model_list.mm ('k') | ios/chrome/browser/web/dom_altering_lock.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/chrome/browser/ui/dialogs/javascript_dialog_blocking_util.mm
diff --git a/ios/chrome/browser/ui/dialogs/javascript_dialog_blocking_util.mm b/ios/chrome/browser/ui/dialogs/javascript_dialog_blocking_util.mm
index 2acd84fcfde1c7c53c6a665eaaa3699f275aa8d6..c88c094f79b7a9ab2eb2f0461c93b685561e62ce 100644
--- a/ios/chrome/browser/ui/dialogs/javascript_dialog_blocking_util.mm
+++ b/ios/chrome/browser/ui/dialogs/javascript_dialog_blocking_util.mm
@@ -7,6 +7,7 @@
#import <objc/runtime.h>
#include "base/logging.h"
+#include "base/memory/ptr_util.h"
#include "ios/web/public/web_state/web_state.h"
#include "ios/web/public/web_state/web_state_observer.h"
@@ -53,7 +54,7 @@ class JavaScriptDialogBlockingStateWrapper
explicit JavaScriptDialogBlockingStateWrapper(web::WebState* web_state)
sdefresne 2017/04/28 10:07:05 Can you change this constructor to not take the we
: state_(nullptr) {
DCHECK(web_state);
- web_state->SetUserData(kBlockingStateKey, this);
+ web_state->SetUserData(kBlockingStateKey, base::WrapUnique(this));
}
};
« no previous file with comments | « ios/chrome/browser/tabs/tab_model_list.mm ('k') | ios/chrome/browser/web/dom_altering_lock.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698