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

Unified Diff: chrome/browser/extensions/api/declarative/rules_registry_with_cache_unittest.cc

Issue 1871713002: Convert //chrome/browser/extensions from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase and fix 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: chrome/browser/extensions/api/declarative/rules_registry_with_cache_unittest.cc
diff --git a/chrome/browser/extensions/api/declarative/rules_registry_with_cache_unittest.cc b/chrome/browser/extensions/api/declarative/rules_registry_with_cache_unittest.cc
index 63d6326e5f21b3c44d9e8ebf26dc2db18c44346e..404e32251a3fca09cc1822fb748bb540a52b6c73 100644
--- a/chrome/browser/extensions/api/declarative/rules_registry_with_cache_unittest.cc
+++ b/chrome/browser/extensions/api/declarative/rules_registry_with_cache_unittest.cc
@@ -231,7 +231,8 @@ TEST_F(RulesRegistryWithCacheTest, DeclarativeRulesStored) {
const std::string rules_stored_key(
RulesCacheDelegate::GetRulesStoredKey(
event_name, profile()->IsOffTheRecord()));
- scoped_ptr<RulesCacheDelegate> cache_delegate(new RulesCacheDelegate(false));
+ std::unique_ptr<RulesCacheDelegate> cache_delegate(
+ new RulesCacheDelegate(false));
scoped_refptr<RulesRegistry> registry(
new TestRulesRegistry(profile(), event_name, content::BrowserThread::UI,
cache_delegate.get(), kRulesRegistryID));
@@ -255,7 +256,7 @@ TEST_F(RulesRegistryWithCacheTest, DeclarativeRulesStored) {
// No write yet so no store should have been created.
ASSERT_FALSE(store);
- scoped_ptr<base::ListValue> value(new base::ListValue);
+ std::unique_ptr<base::ListValue> value(new base::ListValue);
value->AppendBoolean(true);
cache_delegate->WriteToStorage(extension1_->id(), std::move(value));
EXPECT_TRUE(cache_delegate->GetDeclarativeRulesStored(extension1_->id()));
@@ -306,12 +307,14 @@ TEST_F(RulesRegistryWithCacheTest, RulesStoredFlagMultipleRegistries) {
const std::string rules_stored_key2(
RulesCacheDelegate::GetRulesStoredKey(
event_name2, profile()->IsOffTheRecord()));
- scoped_ptr<RulesCacheDelegate> cache_delegate1(new RulesCacheDelegate(false));
+ std::unique_ptr<RulesCacheDelegate> cache_delegate1(
+ new RulesCacheDelegate(false));
scoped_refptr<RulesRegistry> registry1(
new TestRulesRegistry(profile(), event_name1, content::BrowserThread::UI,
cache_delegate1.get(), kRulesRegistryID));
- scoped_ptr<RulesCacheDelegate> cache_delegate2(new RulesCacheDelegate(false));
+ std::unique_ptr<RulesCacheDelegate> cache_delegate2(
+ new RulesCacheDelegate(false));
scoped_refptr<RulesRegistry> registry2(
new TestRulesRegistry(profile(), event_name2, content::BrowserThread::UI,
cache_delegate2.get(), kRulesRegistryID));
@@ -356,7 +359,8 @@ TEST_F(RulesRegistryWithCacheTest, RulesPreservedAcrossRestart) {
env_.GetExtensionSystem()->SetReady();
// 2. First run, adding a rule for the extension.
- scoped_ptr<RulesCacheDelegate> cache_delegate(new RulesCacheDelegate(false));
+ std::unique_ptr<RulesCacheDelegate> cache_delegate(
+ new RulesCacheDelegate(false));
scoped_refptr<TestRulesRegistry> registry(
new TestRulesRegistry(profile(), "testEvent", content::BrowserThread::UI,
cache_delegate.get(), kRulesRegistryID));

Powered by Google App Engine
This is Rietveld 408576698