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

Unified Diff: chrome/browser/custom_handlers/protocol_handler_registry_unittest.cc

Issue 2014103002: Remove deprecated ListValue::Append(Value*) overload on Linux. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: ADL fail Created 4 years, 3 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/custom_handlers/protocol_handler_registry_unittest.cc
diff --git a/chrome/browser/custom_handlers/protocol_handler_registry_unittest.cc b/chrome/browser/custom_handlers/protocol_handler_registry_unittest.cc
index 3806c3e142b0a0b2eab501a12b9d50438fab3b51..cbd98d3be320b0804409f9afb8ad1482c011e765 100644
--- a/chrome/browser/custom_handlers/protocol_handler_registry_unittest.cc
+++ b/chrome/browser/custom_handlers/protocol_handler_registry_unittest.cc
@@ -9,6 +9,7 @@
#include <memory>
#include <set>
+#include "base/memory/ptr_util.h"
#include "base/message_loop/message_loop.h"
#include "base/run_loop.h"
#include "base/strings/utf_string_conversions.h"
@@ -121,18 +122,21 @@ void AssertWillHandle(
base::RunLoop().RunUntilIdle();
}
-base::DictionaryValue* GetProtocolHandlerValue(std::string protocol,
- std::string url) {
- base::DictionaryValue* value = new base::DictionaryValue();
+std::unique_ptr<base::DictionaryValue> GetProtocolHandlerValue(
+ const std::string& protocol,
+ const std::string& url) {
+ auto value = base::MakeUnique<base::DictionaryValue>();
value->SetString("protocol", protocol);
value->SetString("url", url);
return value;
}
-base::DictionaryValue* GetProtocolHandlerValueWithDefault(std::string protocol,
- std::string url,
- bool is_default) {
- base::DictionaryValue* value = GetProtocolHandlerValue(protocol, url);
+std::unique_ptr<base::DictionaryValue> GetProtocolHandlerValueWithDefault(
+ const std::string& protocol,
+ const std::string& url,
+ bool is_default) {
+ std::unique_ptr<base::DictionaryValue> value =
+ GetProtocolHandlerValue(protocol, url);
value->SetBoolean("default", is_default);
return value;
}
« no previous file with comments | « chrome/browser/custom_handlers/protocol_handler_registry.cc ('k') | chrome/browser/devtools/devtools_targets_ui.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698