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

Unified Diff: chrome/browser/autocomplete/shortcuts_backend_factory.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
« no previous file with comments | « base/supports_user_data.cc ('k') | chrome/browser/banners/app_banner_manager_desktop.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/autocomplete/shortcuts_backend_factory.cc
diff --git a/chrome/browser/autocomplete/shortcuts_backend_factory.cc b/chrome/browser/autocomplete/shortcuts_backend_factory.cc
index 36c64cd55aa2b99df18f3d0413c5157fabe9810a..1e32b7a075641ae09ed18c9db2f7e50899c8b341 100644
--- a/chrome/browser/autocomplete/shortcuts_backend_factory.cc
+++ b/chrome/browser/autocomplete/shortcuts_backend_factory.cc
@@ -101,9 +101,10 @@ scoped_refptr<ShortcutsBackend> ShortcutsBackendFactory::CreateShortcutsBackend(
content::BrowserThread::DB),
profile->GetPath().Append(kShortcutsDatabaseName), suppress_db));
#if BUILDFLAG(ENABLE_EXTENSIONS)
- ShortcutsExtensionsManager* extensions_manager =
- new ShortcutsExtensionsManager(profile);
- profile->SetUserData(kShortcutsExtensionsManagerKey, extensions_manager);
+ auto extensions_manager =
+ base::MakeUnique<ShortcutsExtensionsManager>(profile);
+ profile->SetUserData(kShortcutsExtensionsManagerKey,
+ std::move(extensions_manager));
#endif
return backend->Init() ? backend : nullptr;
}
« no previous file with comments | « base/supports_user_data.cc ('k') | chrome/browser/banners/app_banner_manager_desktop.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698