Index: chrome/browser/extensions/activity_log/activity_log.cc |
diff --git a/chrome/browser/extensions/activity_log/activity_log.cc b/chrome/browser/extensions/activity_log/activity_log.cc |
index cd6120429e48668e00b1bc0aab9362333725d0c4..5dc43b89499830d5fbec2eba9ae1d84f3ff772b6 100644 |
--- a/chrome/browser/extensions/activity_log/activity_log.cc |
+++ b/chrome/browser/extensions/activity_log/activity_log.cc |
@@ -14,6 +14,7 @@ |
#include "base/lazy_instance.h" |
#include "base/logging.h" |
#include "base/macros.h" |
+#include "base/memory/ptr_util.h" |
#include "base/strings/string_util.h" |
#include "base/strings/utf_string_conversions.h" |
#include "base/synchronization/lock.h" |
@@ -277,8 +278,8 @@ void ExtractUrls(scoped_refptr<Action> action, Profile* profile) { |
std::string url_string; |
if (action->args()->GetString(url_index, &url_string) && |
ResolveUrl(action->page_url(), url_string, &arg_url)) { |
- action->mutable_args()->Set(url_index, |
- new base::Value(kArgUrlPlaceholder)); |
+ action->mutable_args()->Set( |
+ url_index, base::MakeUnique<base::Value>(kArgUrlPlaceholder)); |
} |
break; |
} |
@@ -309,8 +310,8 @@ void ExtractUrls(scoped_refptr<Action> action, Profile* profile) { |
// Single tab ID to translate. |
GetUrlForTabId(tab_id, profile, &arg_url, &arg_incognito); |
if (arg_url.is_valid()) { |
- action->mutable_args()->Set(url_index, |
- new base::Value(kArgUrlPlaceholder)); |
+ action->mutable_args()->Set( |
+ url_index, base::MakeUnique<base::Value>(kArgUrlPlaceholder)); |
} |
} else if (action->mutable_args()->GetList(url_index, &tab_list)) { |
// A list of possible IDs to translate. Work through in reverse order |
@@ -320,12 +321,13 @@ void ExtractUrls(scoped_refptr<Action> action, Profile* profile) { |
if (tab_list->GetInteger(i, &tab_id) && |
GetUrlForTabId(tab_id, profile, &arg_url, &arg_incognito)) { |
if (!arg_incognito) |
- tab_list->Set(i, new base::Value(arg_url.spec())); |
+ tab_list->Set(i, base::MakeUnique<base::Value>(arg_url.spec())); |
extracted_index = i; |
} |
} |
if (extracted_index >= 0) { |
- tab_list->Set(extracted_index, new base::Value(kArgUrlPlaceholder)); |
+ tab_list->Set(extracted_index, |
+ base::MakeUnique<base::Value>(kArgUrlPlaceholder)); |
} |
} |
break; |