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

Unified Diff: chrome/browser/sync/test/integration/extension_settings_helper.cc

Issue 1882243004: Convert //chrome/browser/sync from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address feedback 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/sync/test/integration/extension_settings_helper.cc
diff --git a/chrome/browser/sync/test/integration/extension_settings_helper.cc b/chrome/browser/sync/test/integration/extension_settings_helper.cc
index f9c09d041fe767e3660f5896a68623596bf35a14..15dc763d30516d670748770983621660b199e2b9 100644
--- a/chrome/browser/sync/test/integration/extension_settings_helper.cc
+++ b/chrome/browser/sync/test/integration/extension_settings_helper.cc
@@ -4,10 +4,11 @@
#include "chrome/browser/sync/test/integration/extension_settings_helper.h"
+#include <memory>
+
#include "base/bind.h"
#include "base/json/json_writer.h"
#include "base/logging.h"
-#include "base/memory/scoped_ptr.h"
#include "base/synchronization/waitable_event.h"
#include "base/values.h"
#include "chrome/browser/profiles/profile.h"
@@ -44,10 +45,10 @@ void GetAllSettingsOnFileThread(base::DictionaryValue* out,
signal->Signal();
}
-scoped_ptr<base::DictionaryValue> GetAllSettings(
- Profile* profile, const std::string& id) {
+std::unique_ptr<base::DictionaryValue> GetAllSettings(Profile* profile,
+ const std::string& id) {
base::WaitableEvent signal(false, false);
- scoped_ptr<base::DictionaryValue> settings(new base::DictionaryValue());
+ std::unique_ptr<base::DictionaryValue> settings(new base::DictionaryValue());
extensions::StorageFrontend::Get(profile)->RunWithStorage(
ExtensionRegistry::Get(profile)->enabled_extensions().GetByID(id),
extensions::settings_namespace::SYNC,
@@ -70,9 +71,9 @@ bool AreSettingsSame(Profile* expected_profile, Profile* actual_profile) {
it != extensions.end();
++it) {
const std::string& id = (*it)->id();
- scoped_ptr<base::DictionaryValue> expected(
+ std::unique_ptr<base::DictionaryValue> expected(
GetAllSettings(expected_profile, id));
- scoped_ptr<base::DictionaryValue> actual(
+ std::unique_ptr<base::DictionaryValue> actual(
GetAllSettings(actual_profile, id));
if (!expected->Equals(actual.get())) {
ADD_FAILURE() <<
« no previous file with comments | « chrome/browser/sync/test/integration/bookmarks_helper.cc ('k') | chrome/browser/sync/test/integration/preferences_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698