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

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

Issue 10825127: Valgrind: Clean up leaks in callers to extension_function_test_utils::RunFunction. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 5 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 | « chrome/browser/extensions/extension_management_api_browsertest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/platform_app_browsertest_util.cc
===================================================================
--- chrome/browser/extensions/platform_app_browsertest_util.cc (revision 149361)
+++ chrome/browser/extensions/platform_app_browsertest_util.cc (working copy)
@@ -61,20 +61,22 @@
size_t PlatformAppBrowserTest::RunGetWindowsFunctionForExtension(
const Extension* extension) {
- GetAllWindowsFunction* function = new GetAllWindowsFunction();
+ scoped_refptr<GetAllWindowsFunction> function = new GetAllWindowsFunction();
function->set_extension(extension);
scoped_ptr<base::ListValue> result(utils::ToList(
- utils::RunFunctionAndReturnSingleResult(function, "[]", browser())));
+ utils::RunFunctionAndReturnSingleResult(function.get(),
+ "[]",
+ browser())));
return result->GetSize();
}
bool PlatformAppBrowserTest::RunGetWindowFunctionForExtension(
int window_id,
const Extension* extension) {
- GetWindowFunction* function = new GetWindowFunction();
+ scoped_refptr<GetWindowFunction> function = new GetWindowFunction();
function->set_extension(extension);
utils::RunFunction(
- function,
+ function.get(),
base::StringPrintf("[%u]", window_id),
browser(),
utils::NONE);
« no previous file with comments | « chrome/browser/extensions/extension_management_api_browsertest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698