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

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

Issue 2086763002: Don't use deprecated ListValue::Append(Value*) overload. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 years, 6 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 5b8da5f6ff682a485b0c505c30829aa4126b19c3..bfbc8895cbe25c273142b32cebe86322acd4f61e 100644
--- a/chrome/browser/ui/webui/identity_internals_ui.cc
+++ b/chrome/browser/ui/webui/identity_internals_ui.cc
@@ -4,6 +4,7 @@
#include "chrome/browser/ui/webui/identity_internals_ui.h"
+#include <memory>
#include <set>
#include <string>
@@ -78,9 +79,8 @@ class IdentityInternalsUIMessageHandler : public content::WebUIMessageHandler {
// Converts a pair of |token_cache_key| and |token_cache_value| to a
// DictionaryValue object with corresponding information in a localized and
- // readable form and returns a pointer to created object. Caller gets the
- // ownership of the returned object.
- base::DictionaryValue* GetInfoForToken(
+ // readable form and returns a pointer to created object.
+ std::unique_ptr<base::DictionaryValue> GetInfoForToken(
const extensions::ExtensionTokenKey& token_cache_key,
const extensions::IdentityTokenCacheValue& token_cache_value);
@@ -209,10 +209,12 @@ const std::string IdentityInternalsUIMessageHandler::GetExpirationTime(
token_cache_value.expiration_time()));
}
-base::DictionaryValue* IdentityInternalsUIMessageHandler::GetInfoForToken(
+std::unique_ptr<base::DictionaryValue>
+IdentityInternalsUIMessageHandler::GetInfoForToken(
const extensions::ExtensionTokenKey& token_cache_key,
const extensions::IdentityTokenCacheValue& token_cache_value) {
- base::DictionaryValue* token_data = new base::DictionaryValue();
+ std::unique_ptr<base::DictionaryValue> token_data(
+ new base::DictionaryValue());
token_data->SetString(kExtensionId, token_cache_key.extension_id);
token_data->SetString(kExtensionName, GetExtensionName(token_cache_key));
token_data->Set(kScopes, GetScopes(token_cache_key));
« no previous file with comments | « chrome/browser/ui/webui/foreign_session_handler.cc ('k') | chrome/browser/ui/webui/net_internals/net_internals_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698