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..a77f1e0c49b60e70700e1e6f815d5760d56d2623 100644 |
--- a/chrome/browser/ui/webui/identity_internals_ui.cc |
+++ b/chrome/browser/ui/webui/identity_internals_ui.cc |
@@ -4,8 +4,10 @@ |
#include "chrome/browser/ui/webui/identity_internals_ui.h" |
+#include <memory> |
#include <set> |
#include <string> |
+#include <utility> |
Dan Beam
2016/06/21 00:54:12
what's this for? i don't see a std::move() in thi
dcheng
2016/06/21 18:56:01
No clue. I'm guessing I needed it in an earlier it
|
#include "base/bind.h" |
#include "base/i18n/time_formatting.h" |
@@ -78,9 +80,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 +210,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)); |