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

Unified Diff: chrome/browser/ui/webui/site_settings_helper.cc

Issue 1865213004: Convert //chrome/browser/ui 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: chrome/browser/ui/webui/site_settings_helper.cc
diff --git a/chrome/browser/ui/webui/site_settings_helper.cc b/chrome/browser/ui/webui/site_settings_helper.cc
index ae4ec7f1e4263a9c2efc814f6b27b06cbfb93273..6684d2d66b9fac75e46d681986788bbef1193ffd 100644
--- a/chrome/browser/ui/webui/site_settings_helper.cc
+++ b/chrome/browser/ui/webui/site_settings_helper.cc
@@ -4,6 +4,7 @@
#include "chrome/browser/ui/webui/site_settings_helper.h"
+#include "base/memory/ptr_util.h"
#include "base/values.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/common/pref_names.h"
@@ -21,7 +22,7 @@ const char kPreferencesSource[] = "preference";
// Create a DictionaryValue* that will act as a data source for a single row
// in a HostContentSettingsMap-controlled exceptions table (e.g., cookies).
-scoped_ptr<base::DictionaryValue> GetExceptionForPage(
+std::unique_ptr<base::DictionaryValue> GetExceptionForPage(
const ContentSettingsPattern& pattern,
const ContentSettingsPattern& secondary_pattern,
const ContentSetting& setting,
@@ -39,7 +40,7 @@ scoped_ptr<base::DictionaryValue> GetExceptionForPage(
exception->SetString(kSetting, setting_string);
exception->SetString(kSource, provider_name);
- return make_scoped_ptr(exception);
+ return base::WrapUnique(exception);
}
void GetExceptionsFromHostContentSettingsMap(const HostContentSettingsMap* map,
@@ -71,7 +72,7 @@ void GetExceptionsFromHostContentSettingsMap(const HostContentSettingsMap* map,
// Keep the exceptions sorted by provider so they will be displayed in
// precedence order.
- std::vector<scoped_ptr<base::DictionaryValue>>
+ std::vector<std::unique_ptr<base::DictionaryValue>>
all_provider_exceptions[HostContentSettingsMap::NUM_PROVIDER_TYPES];
// |all_patterns_settings| is sorted from the lowest precedence pattern to
@@ -135,7 +136,7 @@ void GetExceptionsFromHostContentSettingsMap(const HostContentSettingsMap* map,
void GetPolicyAllowedUrls(
ContentSettingsType type,
- std::vector<scoped_ptr<base::DictionaryValue>>* exceptions,
+ std::vector<std::unique_ptr<base::DictionaryValue>>* exceptions,
content::WebUI* web_ui) {
DCHECK(type == CONTENT_SETTINGS_TYPE_MEDIASTREAM_MIC ||
type == CONTENT_SETTINGS_TYPE_MEDIASTREAM_CAMERA);
« no previous file with comments | « chrome/browser/ui/webui/site_settings_helper.h ('k') | chrome/browser/ui/webui/supervised_user_internals_message_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698