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

Unified Diff: chrome/browser/extensions/api/debugger/debugger_apitest.cc

Issue 501263002: Remove implicit conversions from scoped_refptr to T* in chrome/browser/extensions/api/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Just in case Created 6 years, 4 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/api/debugger/debugger_apitest.cc
diff --git a/chrome/browser/extensions/api/debugger/debugger_apitest.cc b/chrome/browser/extensions/api/debugger/debugger_apitest.cc
index 300b8a2a24cfa04fba8133d77c715f968b3b9ed4..72537760e63863abe5c79bbf5b1dff31b98b8684 100644
--- a/chrome/browser/extensions/api/debugger/debugger_apitest.cc
+++ b/chrome/browser/extensions/api/debugger/debugger_apitest.cc
@@ -38,7 +38,7 @@ class DebuggerApiTest : public ExtensionApiTest {
testing::AssertionResult RunAttachFunction(const GURL& url,
const std::string& expected_error);
- const Extension* extension() const { return extension_; }
+ const Extension* extension() const { return extension_.get(); }
base::CommandLine* command_line() const { return command_line_; }
private:
@@ -75,19 +75,19 @@ testing::AssertionResult DebuggerApiTest::RunAttachFunction(
int tab_id = SessionTabHelper::IdForTab(web_contents);
scoped_refptr<DebuggerAttachFunction> attach_function =
new DebuggerAttachFunction();
- attach_function->set_extension(extension_);
+ attach_function->set_extension(extension_.get());
std::string args = base::StringPrintf("[{\"tabId\": %d}, \"1.1\"]", tab_id);
if (!expected_error.empty()) {
std::string actual_error =
extension_function_test_utils::RunFunctionAndReturnError(
- attach_function, args, browser());
+ attach_function.get(), args, browser());
if (actual_error != expected_error) {
return testing::AssertionFailure() << "Did not get correct error: "
<< "expected: " << expected_error << ", found: " << actual_error;
}
} else {
- if (!RunFunction(attach_function,
+ if (!RunFunction(attach_function.get(),
args,
browser(),
extension_function_test_utils::NONE)) {
@@ -98,8 +98,8 @@ testing::AssertionResult DebuggerApiTest::RunAttachFunction(
// Clean up and detach.
scoped_refptr<DebuggerDetachFunction> detach_function =
new DebuggerDetachFunction();
- detach_function->set_extension(extension_);
- if (!RunFunction(detach_function,
+ detach_function->set_extension(extension_.get());
+ if (!RunFunction(detach_function.get(),
base::StringPrintf("[{\"tabId\": %d}]", tab_id),
browser(),
extension_function_test_utils::NONE)) {

Powered by Google App Engine
This is Rietveld 408576698