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

Side by Side Diff: chrome/browser/autocomplete/shortcuts_backend_factory.cc

Issue 2842833003: Update SupportsUserData uses with unique_ptr. (Closed)
Patch Set: rebase Created 3 years, 7 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 unified diff | 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 »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/autocomplete/shortcuts_backend_factory.h" 5 #include "chrome/browser/autocomplete/shortcuts_backend_factory.h"
6 6
7 #include <memory> 7 #include <memory>
8 8
9 #include "base/memory/ptr_util.h" 9 #include "base/memory/ptr_util.h"
10 #include "chrome/browser/history/history_service_factory.h" 10 #include "chrome/browser/history/history_service_factory.h"
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 bool suppress_db) { 94 bool suppress_db) {
95 scoped_refptr<ShortcutsBackend> backend(new ShortcutsBackend( 95 scoped_refptr<ShortcutsBackend> backend(new ShortcutsBackend(
96 TemplateURLServiceFactory::GetForProfile(profile), 96 TemplateURLServiceFactory::GetForProfile(profile),
97 base::MakeUnique<UIThreadSearchTermsData>(profile), 97 base::MakeUnique<UIThreadSearchTermsData>(profile),
98 HistoryServiceFactory::GetForProfile(profile, 98 HistoryServiceFactory::GetForProfile(profile,
99 ServiceAccessType::EXPLICIT_ACCESS), 99 ServiceAccessType::EXPLICIT_ACCESS),
100 content::BrowserThread::GetTaskRunnerForThread( 100 content::BrowserThread::GetTaskRunnerForThread(
101 content::BrowserThread::DB), 101 content::BrowserThread::DB),
102 profile->GetPath().Append(kShortcutsDatabaseName), suppress_db)); 102 profile->GetPath().Append(kShortcutsDatabaseName), suppress_db));
103 #if BUILDFLAG(ENABLE_EXTENSIONS) 103 #if BUILDFLAG(ENABLE_EXTENSIONS)
104 ShortcutsExtensionsManager* extensions_manager = 104 auto extensions_manager =
105 new ShortcutsExtensionsManager(profile); 105 base::MakeUnique<ShortcutsExtensionsManager>(profile);
106 profile->SetUserData(kShortcutsExtensionsManagerKey, extensions_manager); 106 profile->SetUserData(kShortcutsExtensionsManagerKey,
107 std::move(extensions_manager));
107 #endif 108 #endif
108 return backend->Init() ? backend : nullptr; 109 return backend->Init() ? backend : nullptr;
109 } 110 }
OLDNEW
« 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