summaryrefslogtreecommitdiffstats
path: root/net/websockets
diff options
context:
space:
mode:
authorpalmer@chromium.org <palmer@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-05-01 19:39:48 +0000
committerpalmer@chromium.org <palmer@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-05-01 19:39:48 +0000
commitf43b89f30c817107bc595f45098d908f84bf9baa (patch)
tree9b606ccecd8b30b1f72c52576c2cb034bb6c7244 /net/websockets
parent9eedb4825fd27cec7086f9be09a08eb8248ca868 (diff)
downloadchromium_src-f43b89f30c817107bc595f45098d908f84bf9baa.zip
chromium_src-f43b89f30c817107bc595f45098d908f84bf9baa.tar.gz
chromium_src-f43b89f30c817107bc595f45098d908f84bf9baa.tar.bz2
Refactor TransportSecurityState.
Do some minor "gcl lint" cleanup while here. BUG=113280, 120373 TEST=net_unittests, browser_tests, unit_tests TransportSecurityPersisterTest.* Review URL: http://codereview.chromium.org/9415040 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@134754 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/websockets')
-rw-r--r--net/websockets/websocket_job_spdy2_unittest.cc9
-rw-r--r--net/websockets/websocket_job_spdy3_unittest.cc9
2 files changed, 10 insertions, 8 deletions
diff --git a/net/websockets/websocket_job_spdy2_unittest.cc b/net/websockets/websocket_job_spdy2_unittest.cc
index ebcc72f..05731f5 100644
--- a/net/websockets/websocket_job_spdy2_unittest.cc
+++ b/net/websockets/websocket_job_spdy2_unittest.cc
@@ -174,7 +174,7 @@ class MockCookieStore : public net::CookieStore {
const net::CookieOptions& options) {
std::string result;
for (size_t i = 0; i < entries_.size(); i++) {
- Entry &entry = entries_[i];
+ Entry& entry = entries_[i];
if (url == entry.url) {
if (!result.empty()) {
result += "; ";
@@ -250,11 +250,12 @@ class MockSSLConfigService : public net::SSLConfigService {
class MockURLRequestContext : public net::URLRequestContext {
public:
explicit MockURLRequestContext(net::CookieStore* cookie_store)
- : transport_security_state_(std::string()) {
+ : transport_security_state_() {
set_cookie_store(cookie_store);
set_transport_security_state(&transport_security_state_);
net::TransportSecurityState::DomainState state;
- state.expiry = base::Time::Now() + base::TimeDelta::FromSeconds(1000);
+ state.upgrade_expiry = base::Time::Now() +
+ base::TimeDelta::FromSeconds(1000);
transport_security_state_.EnableHost("upgrademe.com", state);
}
@@ -268,7 +269,7 @@ class MockURLRequestContext : public net::URLRequestContext {
class MockHttpTransactionFactory : public net::HttpTransactionFactory {
public:
- MockHttpTransactionFactory(net::OrderedSocketData* data) {
+ explicit MockHttpTransactionFactory(net::OrderedSocketData* data) {
data_ = data;
net::MockConnect connect_data(net::SYNCHRONOUS, net::OK);
data_->set_connect_data(connect_data);
diff --git a/net/websockets/websocket_job_spdy3_unittest.cc b/net/websockets/websocket_job_spdy3_unittest.cc
index 6fd4767..9c908c8 100644
--- a/net/websockets/websocket_job_spdy3_unittest.cc
+++ b/net/websockets/websocket_job_spdy3_unittest.cc
@@ -178,7 +178,7 @@ class MockCookieStore : public net::CookieStore {
const net::CookieOptions& options) {
std::string result;
for (size_t i = 0; i < entries_.size(); i++) {
- Entry &entry = entries_[i];
+ Entry& entry = entries_[i];
if (url == entry.url) {
if (!result.empty()) {
result += "; ";
@@ -254,11 +254,12 @@ class MockSSLConfigService : public net::SSLConfigService {
class MockURLRequestContext : public net::URLRequestContext {
public:
explicit MockURLRequestContext(net::CookieStore* cookie_store)
- : transport_security_state_(std::string()) {
+ : transport_security_state_() {
set_cookie_store(cookie_store);
set_transport_security_state(&transport_security_state_);
net::TransportSecurityState::DomainState state;
- state.expiry = base::Time::Now() + base::TimeDelta::FromSeconds(1000);
+ state.upgrade_expiry = base::Time::Now() +
+ base::TimeDelta::FromSeconds(1000);
transport_security_state_.EnableHost("upgrademe.com", state);
}
@@ -272,7 +273,7 @@ class MockURLRequestContext : public net::URLRequestContext {
class MockHttpTransactionFactory : public net::HttpTransactionFactory {
public:
- MockHttpTransactionFactory(net::OrderedSocketData* data) {
+ explicit MockHttpTransactionFactory(net::OrderedSocketData* data) {
data_ = data;
net::MockConnect connect_data(net::SYNCHRONOUS, net::OK);
data_->set_connect_data(connect_data);