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

Unified Diff: ios/chrome/browser/browser_state/test_chrome_browser_state.h

Issue 1861593005: Convert //ios from scoped_ptr to std::unique_ptr. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add header 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
Index: ios/chrome/browser/browser_state/test_chrome_browser_state.h
diff --git a/ios/chrome/browser/browser_state/test_chrome_browser_state.h b/ios/chrome/browser/browser_state/test_chrome_browser_state.h
index 93a4ad209953eaa4c12c00297a0b6ef43428e3f8..fb40e754a4f82dca6d02f6c88edca52c68f72cc6 100644
--- a/ios/chrome/browser/browser_state/test_chrome_browser_state.h
+++ b/ios/chrome/browser/browser_state/test_chrome_browser_state.h
@@ -5,10 +5,11 @@
#ifndef IOS_CHROME_BROWSER_BROWSER_STATE_TEST_CHROME_BROWSER_STATE_H_
#define IOS_CHROME_BROWSER_BROWSER_STATE_TEST_CHROME_BROWSER_STATE_H_
+#include <memory>
+
#include "base/files/file_path.h"
#include "base/files/scoped_temp_dir.h"
#include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
#include "components/keyed_service/ios/browser_state_keyed_service_factory.h"
#include "components/keyed_service/ios/refcounted_browser_state_keyed_service_factory.h"
#include "ios/chrome/browser/browser_state/chrome_browser_state.h"
@@ -109,10 +110,11 @@ class TestChromeBrowserState : public ios::ChromeBrowserState {
void SetPath(const base::FilePath& path);
// Sets the PrefService to be used by the ChromeBrowserState.
- void SetPrefService(scoped_ptr<syncable_prefs::PrefServiceSyncable> prefs);
+ void SetPrefService(
+ std::unique_ptr<syncable_prefs::PrefServiceSyncable> prefs);
// Creates the TestChromeBrowserState using previously-set settings.
- scoped_ptr<TestChromeBrowserState> Build();
+ std::unique_ptr<TestChromeBrowserState> Build();
private:
// If true, Build() has been called.
@@ -120,7 +122,7 @@ class TestChromeBrowserState : public ios::ChromeBrowserState {
// Various staging variables where values are held until Build() is invoked.
base::FilePath state_path_;
- scoped_ptr<syncable_prefs::PrefServiceSyncable> pref_service_;
+ std::unique_ptr<syncable_prefs::PrefServiceSyncable> pref_service_;
TestingFactories testing_factories_;
RefcountedTestingFactories refcounted_testing_factories_;
@@ -132,7 +134,7 @@ class TestChromeBrowserState : public ios::ChromeBrowserState {
// Used to create the principal TestChromeBrowserState.
TestChromeBrowserState(
const base::FilePath& path,
- scoped_ptr<syncable_prefs::PrefServiceSyncable> prefs,
+ std::unique_ptr<syncable_prefs::PrefServiceSyncable> prefs,
const TestingFactories& testing_factories,
const RefcountedTestingFactories& refcounted_testing_factories);
@@ -158,12 +160,12 @@ class TestChromeBrowserState : public ios::ChromeBrowserState {
// If non-null, |testing_prefs_| points to |prefs_|. It is there to avoid
// casting as |prefs_| may not be a TestingPrefServiceSyncable.
- scoped_ptr<syncable_prefs::PrefServiceSyncable> prefs_;
+ std::unique_ptr<syncable_prefs::PrefServiceSyncable> prefs_;
syncable_prefs::TestingPrefServiceSyncable* testing_prefs_;
// The incognito ChromeBrowserState instance that is associated with this
// non-incognito ChromeBrowserState instance.
- scoped_ptr<TestChromeBrowserState> otr_browser_state_;
+ std::unique_ptr<TestChromeBrowserState> otr_browser_state_;
TestChromeBrowserState* original_browser_state_;
DISALLOW_COPY_AND_ASSIGN(TestChromeBrowserState);

Powered by Google App Engine
This is Rietveld 408576698