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

Unified Diff: chrome/browser/extensions/extension_function_test_utils.cc

Issue 1871713002: Convert //chrome/browser/extensions from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase and fix header Created 4 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/extensions/extension_function_test_utils.cc
diff --git a/chrome/browser/extensions/extension_function_test_utils.cc b/chrome/browser/extensions/extension_function_test_utils.cc
index 0446ff3885839512b718a53496f3c28a8b46d18f..8c5d3e09e6214bf56bb1c9f90c7eca061a9dd4c5 100644
--- a/chrome/browser/extensions/extension_function_test_utils.cc
+++ b/chrome/browser/extensions/extension_function_test_utils.cc
@@ -50,7 +50,7 @@ class TestFunctionDispatcherDelegate
namespace extension_function_test_utils {
base::ListValue* ParseList(const std::string& data) {
- scoped_ptr<base::Value> result = base::JSONReader::Read(data);
+ std::unique_ptr<base::Value> result = base::JSONReader::Read(data);
base::ListValue* list = NULL;
result->GetAsList(&list);
ignore_result(result.release());
@@ -155,7 +155,7 @@ class SendResponseDelegate
}
private:
- scoped_ptr<bool> response_;
+ std::unique_ptr<bool> response_;
bool should_post_quit_;
};
@@ -163,18 +163,18 @@ bool RunFunction(UIThreadExtensionFunction* function,
const std::string& args,
Browser* browser,
RunFunctionFlags flags) {
- scoped_ptr<base::ListValue> parsed_args(ParseList(args));
+ std::unique_ptr<base::ListValue> parsed_args(ParseList(args));
EXPECT_TRUE(parsed_args.get())
<< "Could not parse extension function arguments: " << args;
return RunFunction(function, std::move(parsed_args), browser, flags);
}
bool RunFunction(UIThreadExtensionFunction* function,
- scoped_ptr<base::ListValue> args,
+ std::unique_ptr<base::ListValue> args,
Browser* browser,
RunFunctionFlags flags) {
TestFunctionDispatcherDelegate dispatcher_delegate(browser);
- scoped_ptr<extensions::ExtensionFunctionDispatcher> dispatcher(
+ std::unique_ptr<extensions::ExtensionFunctionDispatcher> dispatcher(
new extensions::ExtensionFunctionDispatcher(browser->profile()));
dispatcher->set_delegate(&dispatcher_delegate);
// TODO(yoz): The cast is a hack; these flags should be defined in
« no previous file with comments | « chrome/browser/extensions/extension_function_test_utils.h ('k') | chrome/browser/extensions/extension_garbage_collector.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698