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

Unified Diff: net/http/http_auth_controller_unittest.cc

Issue 8990001: base::Bind: Convert most of net/http. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Clang. Created 9 years 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: net/http/http_auth_controller_unittest.cc
diff --git a/net/http/http_auth_controller_unittest.cc b/net/http/http_auth_controller_unittest.cc
index 392d9ab4a2425b9715ec5c1fa2b17289a2ef0938..a50d767f21f47928f928cbb9d743183ece089383 100644
--- a/net/http/http_auth_controller_unittest.cc
+++ b/net/http/http_auth_controller_unittest.cc
@@ -77,10 +77,10 @@ void RunSingleRoundAuthTest(HandlerRunMode run_mode,
controller->ResetAuth(AuthCredentials());
EXPECT_TRUE(controller->HaveAuth());
- TestOldCompletionCallback callback;
+ TestCompletionCallback callback;
EXPECT_EQ((run_mode == RUN_HANDLER_ASYNC)? ERR_IO_PENDING:
expected_controller_rv,
- controller->MaybeGenerateAuthToken(&request, &callback,
+ controller->MaybeGenerateAuthToken(&request, callback.callback(),
dummy_log));
if (run_mode == RUN_HANDLER_ASYNC)
EXPECT_EQ(expected_controller_rv, callback.WaitForResult());
@@ -144,7 +144,7 @@ TEST(HttpAuthControllerTest, NoExplicitCredentialsAllowed) {
virtual int GenerateAuthTokenImpl(const AuthCredentials* credentials,
const HttpRequestInfo* request,
- OldCompletionCallback* callback,
+ const CompletionCallback& callback,
std::string* auth_token) OVERRIDE {
int result =
HttpAuthHandlerMock::GenerateAuthTokenImpl(credentials,
@@ -215,7 +215,8 @@ TEST(HttpAuthControllerTest, NoExplicitCredentialsAllowed) {
EXPECT_TRUE(controller->HaveAuth());
// Should only succeed if we are using the AUTH_SCHEME_MOCK MockHandler.
- EXPECT_EQ(OK, controller->MaybeGenerateAuthToken(&request, NULL, dummy_log));
+ EXPECT_EQ(OK, controller->MaybeGenerateAuthToken(
+ &request, CompletionCallback(), dummy_log));
controller->AddAuthorizationHeader(&request_headers);
// Once a token is generated, simulate the receipt of a server response
@@ -229,7 +230,8 @@ TEST(HttpAuthControllerTest, NoExplicitCredentialsAllowed) {
EXPECT_FALSE(controller->IsAuthSchemeDisabled(HttpAuth::AUTH_SCHEME_BASIC));
// Should only succeed if we are using the AUTH_SCHEME_BASIC MockHandler.
- EXPECT_EQ(OK, controller->MaybeGenerateAuthToken(&request, NULL, dummy_log));
+ EXPECT_EQ(OK, controller->MaybeGenerateAuthToken(
+ &request, CompletionCallback(), dummy_log));
}
} // namespace net

Powered by Google App Engine
This is Rietveld 408576698