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

Unified Diff: extensions/browser/api_unittest.cc

Issue 1909773002: Convert //extensions/browser from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . 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
« no previous file with comments | « extensions/browser/api_unittest.h ('k') | extensions/browser/app_window/app_window.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/browser/api_unittest.cc
diff --git a/extensions/browser/api_unittest.cc b/extensions/browser/api_unittest.cc
index 2ca5e16fa23c1104ef035387d4d4e784bfa5b387..c8faa21048e94e54b5579ad45ed332c6d8c406d6 100644
--- a/extensions/browser/api_unittest.cc
+++ b/extensions/browser/api_unittest.cc
@@ -71,19 +71,19 @@ void ApiUnitTest::CreateBackgroundPage() {
}
}
-scoped_ptr<base::Value> ApiUnitTest::RunFunctionAndReturnValue(
+std::unique_ptr<base::Value> ApiUnitTest::RunFunctionAndReturnValue(
UIThreadExtensionFunction* function,
const std::string& args) {
function->set_extension(extension());
if (contents_)
function->SetRenderFrameHost(contents_->GetMainFrame());
- return scoped_ptr<base::Value>(utils::RunFunctionAndReturnSingleResult(
+ return std::unique_ptr<base::Value>(utils::RunFunctionAndReturnSingleResult(
function, args, browser_context()));
}
-scoped_ptr<base::DictionaryValue> ApiUnitTest::RunFunctionAndReturnDictionary(
- UIThreadExtensionFunction* function,
- const std::string& args) {
+std::unique_ptr<base::DictionaryValue>
+ApiUnitTest::RunFunctionAndReturnDictionary(UIThreadExtensionFunction* function,
+ const std::string& args) {
base::Value* value = RunFunctionAndReturnValue(function, args).release();
base::DictionaryValue* dict = NULL;
@@ -93,10 +93,10 @@ scoped_ptr<base::DictionaryValue> ApiUnitTest::RunFunctionAndReturnDictionary(
// We expect to either have successfuly retrieved a dictionary from the value,
// or the value to have been NULL.
EXPECT_TRUE(dict || !value);
- return scoped_ptr<base::DictionaryValue>(dict);
+ return std::unique_ptr<base::DictionaryValue>(dict);
}
-scoped_ptr<base::ListValue> ApiUnitTest::RunFunctionAndReturnList(
+std::unique_ptr<base::ListValue> ApiUnitTest::RunFunctionAndReturnList(
UIThreadExtensionFunction* function,
const std::string& args) {
base::Value* value = RunFunctionAndReturnValue(function, args).release();
@@ -108,7 +108,7 @@ scoped_ptr<base::ListValue> ApiUnitTest::RunFunctionAndReturnList(
// We expect to either have successfuly retrieved a list from the value,
// or the value to have been NULL.
EXPECT_TRUE(list || !value);
- return scoped_ptr<base::ListValue>(list);
+ return std::unique_ptr<base::ListValue>(list);
}
std::string ApiUnitTest::RunFunctionAndReturnError(
« no previous file with comments | « extensions/browser/api_unittest.h ('k') | extensions/browser/app_window/app_window.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698