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

Unified Diff: ios/chrome/browser/browser_state/browser_state_info_cache.cc

Issue 1861593005: Convert //ios 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
Index: ios/chrome/browser/browser_state/browser_state_info_cache.cc
diff --git a/ios/chrome/browser/browser_state/browser_state_info_cache.cc b/ios/chrome/browser/browser_state/browser_state_info_cache.cc
index 95130f06b9b124cb297c7dea8afee7d4f542403a..074eb31bc5c9e254b641cbe14548bef76773f9c5 100644
--- a/ios/chrome/browser/browser_state/browser_state_info_cache.cc
+++ b/ios/chrome/browser/browser_state/browser_state_info_cache.cc
@@ -7,10 +7,10 @@
#include <stddef.h>
#include <algorithm>
+#include <memory>
#include "base/i18n/case_conversion.h"
#include "base/logging.h"
-#include "base/memory/scoped_ptr.h"
#include "base/values.h"
#include "components/prefs/pref_registry_simple.h"
#include "components/prefs/scoped_user_pref_update.h"
@@ -48,7 +48,7 @@ void BrowserStateInfoCache::AddBrowserState(
DictionaryPrefUpdate update(prefs_, prefs::kBrowserStateInfoCache);
base::DictionaryValue* cache = update.Get();
- scoped_ptr<base::DictionaryValue> info(new base::DictionaryValue);
+ std::unique_ptr<base::DictionaryValue> info(new base::DictionaryValue);
info->SetString(kGAIAIdKey, gaia_id);
info->SetString(kUserNameKey, user_name);
cache->SetWithoutPathExpansion(key, info.release());
@@ -147,7 +147,7 @@ void BrowserStateInfoCache::SetAuthInfoOfBrowserStateAtIndex(
return;
}
- scoped_ptr<base::DictionaryValue> info(
+ std::unique_ptr<base::DictionaryValue> info(
GetInfoForBrowserStateAtIndex(index)->DeepCopy());
info->SetString(kGAIAIdKey, gaia_id);
@@ -162,7 +162,7 @@ void BrowserStateInfoCache::SetBrowserStateIsAuthErrorAtIndex(size_t index,
if (value == BrowserStateIsAuthErrorAtIndex(index))
return;
- scoped_ptr<base::DictionaryValue> info(
+ std::unique_ptr<base::DictionaryValue> info(
GetInfoForBrowserStateAtIndex(index)->DeepCopy());
info->SetBoolean(kIsAuthErrorKey, value);
// This takes ownership of |info|.

Powered by Google App Engine
This is Rietveld 408576698