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

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

Issue 2812953002: Stop passing raw pointers to base::Value API in c/b/ui (Closed)
Patch Set: Rebased Created 3 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/identity_internals_ui.cc
diff --git a/chrome/browser/ui/webui/identity_internals_ui.cc b/chrome/browser/ui/webui/identity_internals_ui.cc
index 1d6fe85271488bd6d47d6ccc4ed9030ca4ba5c6c..d519d8ab6d9ab160b56f1e397a2667a6495636d0 100644
--- a/chrome/browser/ui/webui/identity_internals_ui.cc
+++ b/chrome/browser/ui/webui/identity_internals_ui.cc
@@ -66,7 +66,7 @@ class IdentityInternalsUIMessageHandler : public content::WebUIMessageHandler {
// Gets a list of scopes specified in |token_cache_key| and returns a pointer
// to a ListValue containing the scopes. The caller gets ownership of the
// returned object.
- base::ListValue* GetScopes(
+ std::unique_ptr<base::ListValue> GetScopes(
const extensions::ExtensionTokenKey& token_cache_key);
// Gets a localized status of the access token in |token_cache_value|.
@@ -181,9 +181,9 @@ const std::string IdentityInternalsUIMessageHandler::GetExtensionName(
return extension->name();
}
-base::ListValue* IdentityInternalsUIMessageHandler::GetScopes(
+std::unique_ptr<base::ListValue> IdentityInternalsUIMessageHandler::GetScopes(
const extensions::ExtensionTokenKey& token_cache_key) {
- base::ListValue* scopes_value = new base::ListValue();
+ auto scopes_value = base::MakeUnique<base::ListValue>();
for (std::set<std::string>::const_iterator
iter = token_cache_key.scopes.begin();
iter != token_cache_key.scopes.end(); ++iter) {

Powered by Google App Engine
This is Rietveld 408576698