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

Unified Diff: ios/clean/chrome/app/steps/root_coordinator+application_step.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
Index: ios/clean/chrome/app/steps/root_coordinator+application_step.mm
diff --git a/ios/clean/chrome/app/steps/root_coordinator+application_step.mm b/ios/clean/chrome/app/steps/root_coordinator+application_step.mm
index a0d3af9d2e458af0f3afee55df90f331e21c3ada..c6041a24bc6528f7e8ecb661b9b540878a2c12de 100644
--- a/ios/clean/chrome/app/steps/root_coordinator+application_step.mm
+++ b/ios/clean/chrome/app/steps/root_coordinator+application_step.mm
@@ -4,6 +4,7 @@
#import "ios/clean/chrome/app/steps/root_coordinator+application_step.h"
+#include "base/memory/ptr_util.h"
#import "base/supports_user_data.h"
#include "ios/chrome/browser/browser_state/chrome_browser_state.h"
#import "ios/chrome/browser/web_state_list/web_state_list.h"
@@ -73,8 +74,9 @@ const char kRootCoordinatorContainerKey[] = "root_coordinator";
state.window.hidden = NO;
// Make sure this object stays alive.
- state.persistentState->SetUserData(kRootCoordinatorContainerKey,
- new RootCoordinatorContainer(self));
+ state.persistentState->SetUserData(
+ kRootCoordinatorContainerKey,
+ base::MakeUnique<RootCoordinatorContainer>(self));
// Add a termination step to remove this object.
[[state terminationSteps] addObject:[[StopRootCoordinator alloc] init]];

Powered by Google App Engine
This is Rietveld 408576698