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

Unified Diff: net/quic/core/crypto/crypto_server_test.cc

Issue 2359503003: Landing Recent QUIC changes until 9:58 AM, Sep 17, 2016 UTC (Closed)
Patch Set: Reverted flag flip. Created 4 years, 3 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 | « net/quic/core/crypto/crypto_handshake_message_test.cc ('k') | net/quic/core/crypto/proof_source.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/core/crypto/crypto_server_test.cc
diff --git a/net/quic/core/crypto/crypto_server_test.cc b/net/quic/core/crypto/crypto_server_test.cc
index 8dc07d5c4bf284c00ba22b548c79030ead2a6910..c148e9bccabd619fc82052255afd57018ae526a2 100644
--- a/net/quic/core/crypto/crypto_server_test.cc
+++ b/net/quic/core/crypto/crypto_server_test.cc
@@ -201,7 +201,7 @@ class CryptoServerTest : public ::testing::TestWithParam<TestParams> {
*called_ = false;
}
- void Run(std::unique_ptr<Result> result,
+ void Run(scoped_refptr<Result> result,
std::unique_ptr<ProofSource::Details> /* details */) override {
{
// Ensure that the strike register client lock is not held.
@@ -213,14 +213,15 @@ class CryptoServerTest : public ::testing::TestWithParam<TestParams> {
base::AutoLock lock(*m);
}
ASSERT_FALSE(*called_);
- test_->ProcessValidationResult(*result, should_succeed_, error_substr_);
+ test_->ProcessValidationResult(std::move(result), should_succeed_,
+ error_substr_);
*called_ = true;
}
private:
CryptoServerTest* test_;
- bool should_succeed_;
- const char* error_substr_;
+ const bool should_succeed_;
+ const char* const error_substr_;
bool* called_;
};
@@ -270,7 +271,7 @@ class CryptoServerTest : public ::testing::TestWithParam<TestParams> {
new ValidateCallback(this, false, error_substr, called)));
}
- void ProcessValidationResult(const ValidateCallback::Result& result,
+ void ProcessValidationResult(scoped_refptr<ValidateCallback::Result> result,
bool should_succeed,
const char* error_substr) {
IPAddress server_ip;
@@ -289,10 +290,10 @@ class CryptoServerTest : public ::testing::TestWithParam<TestParams> {
if (should_succeed) {
ASSERT_EQ(error, QUIC_NO_ERROR) << "Message failed with error "
<< error_details << ": "
- << result.client_hello.DebugString();
+ << result->client_hello.DebugString();
} else {
ASSERT_NE(error, QUIC_NO_ERROR) << "Message didn't fail: "
- << result.client_hello.DebugString();
+ << result->client_hello.DebugString();
EXPECT_TRUE(error_details.find(error_substr) != string::npos)
<< error_substr << " not in " << error_details;
« no previous file with comments | « net/quic/core/crypto/crypto_handshake_message_test.cc ('k') | net/quic/core/crypto/proof_source.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698