summaryrefslogtreecommitdiffstats
path: root/extensions/browser/api_test_utils.cc
diff options
context:
space:
mode:
authordcheng <dcheng@chromium.org>2015-12-18 09:48:00 -0800
committerCommit bot <commit-bot@chromium.org>2015-12-18 17:48:52 +0000
commite59eca16010c109a5e3e4922189c8b264d34caa9 (patch)
tree838815399c6364a99a465938df9978aeaf75c766 /extensions/browser/api_test_utils.cc
parent5100baf1eac806abbdaaf8002887aacf652f34e5 (diff)
downloadchromium_src-e59eca16010c109a5e3e4922189c8b264d34caa9.zip
chromium_src-e59eca16010c109a5e3e4922189c8b264d34caa9.tar.gz
chromium_src-e59eca16010c109a5e3e4922189c8b264d34caa9.tar.bz2
Convert Pass()→std::move() in //extensions
BUG=557422 Review URL: https://codereview.chromium.org/1537893002 Cr-Commit-Position: refs/heads/master@{#366120}
Diffstat (limited to 'extensions/browser/api_test_utils.cc')
-rw-r--r--extensions/browser/api_test_utils.cc16
1 files changed, 9 insertions, 7 deletions
diff --git a/extensions/browser/api_test_utils.cc b/extensions/browser/api_test_utils.cc
index 83ed5fc..7d53624 100644
--- a/extensions/browser/api_test_utils.cc
+++ b/extensions/browser/api_test_utils.cc
@@ -4,6 +4,8 @@
#include "extensions/browser/api_test_utils.h"
+#include <utility>
+
#include "base/json/json_reader.h"
#include "base/memory/scoped_ptr.h"
#include "base/values.h"
@@ -131,7 +133,7 @@ base::Value* RunFunctionWithDelegateAndReturnSingleResult(
content::BrowserContext* context,
scoped_ptr<extensions::ExtensionFunctionDispatcher> dispatcher) {
return RunFunctionWithDelegateAndReturnSingleResult(
- function, args, context, dispatcher.Pass(), NONE);
+ function, args, context, std::move(dispatcher), NONE);
}
base::Value* RunFunctionWithDelegateAndReturnSingleResult(
@@ -143,7 +145,7 @@ base::Value* RunFunctionWithDelegateAndReturnSingleResult(
scoped_refptr<ExtensionFunction> function_owner(function);
// Without a callback the function will not generate a result.
function->set_has_callback(true);
- RunFunction(function, args, context, dispatcher.Pass(), flags);
+ RunFunction(function, args, context, std::move(dispatcher), flags);
EXPECT_TRUE(function->GetError().empty())
<< "Unexpected error: " << function->GetError();
const base::Value* single_result = NULL;
@@ -170,7 +172,7 @@ base::Value* RunFunctionAndReturnSingleResult(
new ExtensionFunctionDispatcher(context));
return RunFunctionWithDelegateAndReturnSingleResult(
- function, args, context, dispatcher.Pass(), flags);
+ function, args, context, std::move(dispatcher), flags);
}
std::string RunFunctionAndReturnError(UIThreadExtensionFunction* function,
@@ -188,7 +190,7 @@ std::string RunFunctionAndReturnError(UIThreadExtensionFunction* function,
scoped_refptr<ExtensionFunction> function_owner(function);
// Without a callback the function will not generate a result.
function->set_has_callback(true);
- RunFunction(function, args, context, dispatcher.Pass(), flags);
+ RunFunction(function, args, context, std::move(dispatcher), flags);
EXPECT_FALSE(function->GetResultList()) << "Did not expect a result";
return function->GetError();
}
@@ -198,7 +200,7 @@ bool RunFunction(UIThreadExtensionFunction* function,
content::BrowserContext* context) {
scoped_ptr<ExtensionFunctionDispatcher> dispatcher(
new ExtensionFunctionDispatcher(context));
- return RunFunction(function, args, context, dispatcher.Pass(), NONE);
+ return RunFunction(function, args, context, std::move(dispatcher), NONE);
}
bool RunFunction(UIThreadExtensionFunction* function,
@@ -209,8 +211,8 @@ bool RunFunction(UIThreadExtensionFunction* function,
scoped_ptr<base::ListValue> parsed_args = ParseList(args);
EXPECT_TRUE(parsed_args.get())
<< "Could not parse extension function arguments: " << args;
- return RunFunction(
- function, parsed_args.Pass(), context, dispatcher.Pass(), flags);
+ return RunFunction(function, std::move(parsed_args), context,
+ std::move(dispatcher), flags);
}
bool RunFunction(UIThreadExtensionFunction* function,