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

Unified Diff: extensions/shell/browser/shell_prefs.cc

Issue 1908953003: Convert //extensions/{common,shell} from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase? Created 4 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 | « extensions/shell/browser/shell_prefs.h ('k') | extensions/shell/browser/shell_prefs_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/shell/browser/shell_prefs.cc
diff --git a/extensions/shell/browser/shell_prefs.cc b/extensions/shell/browser/shell_prefs.cc
index 82185cfcbd6633aed65a8b24facba87211a7309d..eea12aee1ef380df70b064d484ff09944e199b36 100644
--- a/extensions/shell/browser/shell_prefs.cc
+++ b/extensions/shell/browser/shell_prefs.cc
@@ -39,7 +39,7 @@ scoped_refptr<JsonPrefStore> CreateAndLoadPrefStore(const FilePath& filepath) {
JsonPrefStore::GetTaskRunnerForFile(
filepath, content::BrowserThread::GetBlockingPool());
scoped_refptr<JsonPrefStore> pref_store =
- new JsonPrefStore(filepath, task_runner, scoped_ptr<PrefFilter>());
+ new JsonPrefStore(filepath, task_runner, std::unique_ptr<PrefFilter>());
pref_store->ReadPrefs(); // Synchronous.
return pref_store;
}
@@ -48,7 +48,7 @@ scoped_refptr<JsonPrefStore> CreateAndLoadPrefStore(const FilePath& filepath) {
namespace shell_prefs {
-scoped_ptr<PrefService> CreateLocalState(const FilePath& data_dir) {
+std::unique_ptr<PrefService> CreateLocalState(const FilePath& data_dir) {
FilePath filepath = data_dir.AppendASCII("local_state.json");
scoped_refptr<JsonPrefStore> pref_store = CreateAndLoadPrefStore(filepath);
@@ -63,7 +63,7 @@ scoped_ptr<PrefService> CreateLocalState(const FilePath& data_dir) {
return factory.Create(registry);
}
-scoped_ptr<PrefService> CreateUserPrefService(
+std::unique_ptr<PrefService> CreateUserPrefService(
content::BrowserContext* browser_context) {
FilePath filepath = browser_context->GetPath().AppendASCII("user_prefs.json");
scoped_refptr<JsonPrefStore> pref_store = CreateAndLoadPrefStore(filepath);
@@ -81,7 +81,7 @@ scoped_ptr<PrefService> CreateUserPrefService(
PrefRegistrySyncable* pref_registry = new PrefRegistrySyncable;
ExtensionPrefs::RegisterProfilePrefs(pref_registry);
- scoped_ptr<PrefService> pref_service = factory.Create(pref_registry);
+ std::unique_ptr<PrefService> pref_service = factory.Create(pref_registry);
user_prefs::UserPrefs::Set(browser_context, pref_service.get());
return pref_service;
}
« no previous file with comments | « extensions/shell/browser/shell_prefs.h ('k') | extensions/shell/browser/shell_prefs_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698