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

Unified Diff: chrome/browser/ui/browser_tab_restorer.cc

Issue 2847173004: 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/ui/browser_tab_restorer.cc
diff --git a/chrome/browser/ui/browser_tab_restorer.cc b/chrome/browser/ui/browser_tab_restorer.cc
index ad71aa64508ee27cf7343dfb0faee74af47d5622..35c440d7deb795d1cb93088125435ea928bf14a4 100644
--- a/chrome/browser/ui/browser_tab_restorer.cc
+++ b/chrome/browser/ui/browser_tab_restorer.cc
@@ -3,6 +3,7 @@
// found in the LICENSE file.
#include "base/macros.h"
+#include "base/memory/ptr_util.h"
#include "base/metrics/user_metrics.h"
#include "base/metrics/user_metrics_action.h"
#include "base/supports_user_data.h"
@@ -76,7 +77,8 @@ BrowserTabRestorer::BrowserTabRestorer(Browser* browser)
DCHECK(!tab_restore_service_->IsLoaded());
tab_restore_service_->AddObserver(this);
BrowserList::GetInstance()->AddObserver(this);
- browser_->profile()->SetUserData(kBrowserTabRestorerKey, this);
+ browser_->profile()->SetUserData(kBrowserTabRestorerKey,
+ base::WrapUnique(this));
tab_restore_service_->LoadTabsFromLastSession();
}

Powered by Google App Engine
This is Rietveld 408576698