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

Unified Diff: chrome/browser/supervised_user/supervised_user_whitelist_service_unittest.cc

Issue 1878143002: Convert //chrome/browser/supervised_user from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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/supervised_user/supervised_user_whitelist_service_unittest.cc
diff --git a/chrome/browser/supervised_user/supervised_user_whitelist_service_unittest.cc b/chrome/browser/supervised_user/supervised_user_whitelist_service_unittest.cc
index e8704abd78e850854c961720c508e52156438143..52084ba3d8d01cdd5adb3f0136898d2bf05f51ec 100644
--- a/chrome/browser/supervised_user/supervised_user_whitelist_service_unittest.cc
+++ b/chrome/browser/supervised_user/supervised_user_whitelist_service_unittest.cc
@@ -2,13 +2,15 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include "chrome/browser/supervised_user/supervised_user_whitelist_service.h"
+
#include <map>
+#include <memory>
#include <set>
#include <string>
#include "base/bind.h"
#include "base/callback.h"
-#include "base/memory/scoped_ptr.h"
#include "base/message_loop/message_loop.h"
#include "base/path_service.h"
#include "base/run_loop.h"
@@ -17,7 +19,6 @@
#include "build/build_config.h"
#include "chrome/browser/component_updater/supervised_user_whitelist_installer.h"
#include "chrome/browser/supervised_user/supervised_user_site_list.h"
-#include "chrome/browser/supervised_user/supervised_user_whitelist_service.h"
#include "chrome/common/chrome_paths.h"
#include "chrome/common/pref_names.h"
#include "chrome/test/base/testing_profile.h"
@@ -106,7 +107,8 @@ class SupervisedUserWhitelistServiceTest : public testing::Test {
prefs::kSupervisedUserWhitelists);
base::DictionaryValue* dict = update.Get();
- scoped_ptr<base::DictionaryValue> whitelist_dict(new base::DictionaryValue);
+ std::unique_ptr<base::DictionaryValue> whitelist_dict(
+ new base::DictionaryValue);
whitelist_dict->SetString("name", "Whitelist A");
dict->Set("aaaa", whitelist_dict.release());
@@ -162,8 +164,8 @@ class SupervisedUserWhitelistServiceTest : public testing::Test {
safe_json::TestingJsonParser::ScopedFactoryOverride factory_override_;
#endif
- scoped_ptr<MockSupervisedUserWhitelistInstaller> installer_;
- scoped_ptr<SupervisedUserWhitelistService> service_;
+ std::unique_ptr<MockSupervisedUserWhitelistInstaller> installer_;
+ std::unique_ptr<SupervisedUserWhitelistService> service_;
std::vector<scoped_refptr<SupervisedUserSiteList>> site_lists_;
base::Closure site_lists_changed_callback_;
@@ -174,8 +176,8 @@ TEST_F(SupervisedUserWhitelistServiceTest, MergeEmpty) {
syncer::SyncMergeResult result = service_->MergeDataAndStartSyncing(
syncer::SUPERVISED_USER_WHITELISTS, syncer::SyncDataList(),
- scoped_ptr<syncer::SyncChangeProcessor>(),
- scoped_ptr<syncer::SyncErrorFactory>());
+ std::unique_ptr<syncer::SyncChangeProcessor>(),
+ std::unique_ptr<syncer::SyncErrorFactory>());
EXPECT_FALSE(result.error().IsSet());
EXPECT_EQ(0, result.num_items_added());
EXPECT_EQ(0, result.num_items_modified());
@@ -219,8 +221,8 @@ TEST_F(SupervisedUserWhitelistServiceTest, MergeExisting) {
"cccc", "Whitelist C"));
syncer::SyncMergeResult result = service_->MergeDataAndStartSyncing(
syncer::SUPERVISED_USER_WHITELISTS, initial_data,
- scoped_ptr<syncer::SyncChangeProcessor>(),
- scoped_ptr<syncer::SyncErrorFactory>());
+ std::unique_ptr<syncer::SyncChangeProcessor>(),
+ std::unique_ptr<syncer::SyncErrorFactory>());
EXPECT_FALSE(result.error().IsSet());
EXPECT_EQ(1, result.num_items_added());
EXPECT_EQ(1, result.num_items_modified());

Powered by Google App Engine
This is Rietveld 408576698