summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrch@chromium.org <rch@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-03-28 22:12:48 +0000
committerrch@chromium.org <rch@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-03-28 22:12:48 +0000
commit23f7bf8dce02ad0bc36936a3390fbb356af57629 (patch)
treed6c001d35e8ac06014fff882f360ef44f2d30398
parent3c6f8817e537280eb59fe0a73c14ce3a46cdc7ef (diff)
downloadchromium_src-23f7bf8dce02ad0bc36936a3390fbb356af57629.zip
chromium_src-23f7bf8dce02ad0bc36936a3390fbb356af57629.tar.gz
chromium_src-23f7bf8dce02ad0bc36936a3390fbb356af57629.tar.bz2
Revert of Rename PrivateMode enum values: (https://codereview.chromium.org/215023002/)
Reason for revert: Broke build. http://build.chromium.org/p/chromium.linux/builders/Linux%20Builder%20%28dbg%29/builds/71042/steps/compile/logs/stdio#error1 Original issue's description: > Rename PrivateMode enum values: > > kPrivacyModeDisabled => PRIVACY_MODE_DISABLED > kPrivacyModeEnabled => PRIVACY_MODE_ENABLED > > To match the chromium style guide: > > Though the Google C++ Style Guide now says to use kConstantNaming for enums, > Chromium was written using MACRO_STYLE naming. Continue to use this style for consistency. > > R=mef@chromium.org > > Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=260281 TBR=mef@chromium.org,zea@chromium.org NOTREECHECKS=true NOTRY=true Review URL: https://codereview.chromium.org/217053010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@260296 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/net/preconnect.cc2
-rw-r--r--google_apis/gcm/engine/connection_factory_impl.cc2
-rw-r--r--jingle/glue/proxy_resolving_client_socket.cc2
-rw-r--r--net/base/privacy_mode.h5
-rw-r--r--net/http/disk_cache_based_quic_server_info_unittest.cc12
-rw-r--r--net/http/http_network_transaction.cc2
-rw-r--r--net/http/http_network_transaction_unittest.cc10
-rw-r--r--net/http/http_proxy_client_socket_pool.cc4
-rw-r--r--net/http/http_proxy_client_socket_pool_unittest.cc2
-rw-r--r--net/http/http_request_info.cc2
-rw-r--r--net/http/http_stream_factory_impl_job.cc4
-rw-r--r--net/http/http_stream_factory_impl_unittest.cc10
-rw-r--r--net/quic/crypto/quic_crypto_client_config_test.cc6
-rw-r--r--net/quic/quic_client_session_test.cc2
-rw-r--r--net/quic/quic_crypto_client_stream_test.cc4
-rw-r--r--net/quic/quic_crypto_server_stream_test.cc2
-rw-r--r--net/quic/quic_http_stream_test.cc2
-rw-r--r--net/quic/quic_session_key.cc2
-rw-r--r--net/quic/quic_session_key_test.cc8
-rw-r--r--net/quic/quic_stream_factory_test.cc8
-rw-r--r--net/quic/test_tools/crypto_test_utils.cc2
-rw-r--r--net/socket/client_socket_pool_manager.cc4
-rw-r--r--net/socket/ssl_client_socket_pool.cc2
-rw-r--r--net/socket/ssl_client_socket_pool_unittest.cc6
-rw-r--r--net/socket_stream/socket_stream.cc4
-rw-r--r--net/spdy/spdy_http_stream_unittest.cc14
-rw-r--r--net/spdy/spdy_network_transaction_unittest.cc6
-rw-r--r--net/spdy/spdy_proxy_client_socket_unittest.cc2
-rw-r--r--net/spdy/spdy_session_key.cc2
-rw-r--r--net/spdy/spdy_session_pool.cc2
-rw-r--r--net/spdy/spdy_session_pool_unittest.cc14
-rw-r--r--net/spdy/spdy_session_unittest.cc14
-rw-r--r--net/spdy/spdy_stream_unittest.cc2
-rw-r--r--net/spdy/spdy_websocket_stream_unittest.cc2
-rw-r--r--net/tools/quic/end_to_end_test.cc4
-rw-r--r--net/tools/quic/quic_client_bin.cc2
-rw-r--r--net/tools/quic/quic_client_session_test.cc2
-rw-r--r--net/tools/quic/quic_spdy_client_stream_test.cc3
-rw-r--r--net/tools/quic/test_tools/quic_test_client.cc2
-rw-r--r--net/url_request/url_request_http_job.cc4
-rw-r--r--net/websockets/websocket_job.cc2
-rw-r--r--net/websockets/websocket_job_test.cc2
42 files changed, 93 insertions, 95 deletions
diff --git a/chrome/browser/net/preconnect.cc b/chrome/browser/net/preconnect.cc
index ee0a669..05321a9 100644
--- a/chrome/browser/net/preconnect.cc
+++ b/chrome/browser/net/preconnect.cc
@@ -69,7 +69,7 @@ void PreconnectOnIOThread(
net::NetworkDelegate* delegate = context->network_delegate();
if (delegate->CanEnablePrivacyMode(url, first_party_for_cookies))
- request_info.privacy_mode = net::PRIVACY_MODE_ENABLED;
+ request_info.privacy_mode = net::kPrivacyModeEnabled;
// It almost doesn't matter whether we use net::LOWEST or net::HIGHEST
// priority here, as we won't make a request, and will surrender the created
diff --git a/google_apis/gcm/engine/connection_factory_impl.cc b/google_apis/gcm/engine/connection_factory_impl.cc
index c6ac8d0..deb8102 100644
--- a/google_apis/gcm/engine/connection_factory_impl.cc
+++ b/google_apis/gcm/engine/connection_factory_impl.cc
@@ -331,7 +331,7 @@ void ConnectionFactoryImpl::OnProxyResolveDone(int status) {
proxy_info_,
ssl_config,
ssl_config,
- net::PRIVACY_MODE_DISABLED,
+ net::kPrivacyModeDisabled,
bound_net_log_,
&socket_handle_,
base::Bind(&ConnectionFactoryImpl::OnConnectDone,
diff --git a/jingle/glue/proxy_resolving_client_socket.cc b/jingle/glue/proxy_resolving_client_socket.cc
index 6216906..f0b98d0 100644
--- a/jingle/glue/proxy_resolving_client_socket.cc
+++ b/jingle/glue/proxy_resolving_client_socket.cc
@@ -192,7 +192,7 @@ void ProxyResolvingClientSocket::ProcessProxyResolveDone(int status) {
// Now that we have resolved the proxy, we need to connect.
status = net::InitSocketHandleForRawConnect(
dest_host_port_pair_, network_session_.get(), proxy_info_, ssl_config_,
- ssl_config_, net::PRIVACY_MODE_DISABLED, bound_net_log_, transport_.get(),
+ ssl_config_, net::kPrivacyModeDisabled, bound_net_log_, transport_.get(),
connect_callback_);
if (status != net::ERR_IO_PENDING) {
// Since this method is always called asynchronously. it is OK to call
diff --git a/net/base/privacy_mode.h b/net/base/privacy_mode.h
index 8b09a64..082ef26 100644
--- a/net/base/privacy_mode.h
+++ b/net/base/privacy_mode.h
@@ -10,10 +10,11 @@ namespace net {
// Privacy Mode is enabled if cookies to particular site are blocked, so
// Channel ID is disabled on that connection (https or spdy).
enum PrivacyMode {
- PRIVACY_MODE_DISABLED = 0,
- PRIVACY_MODE_ENABLED = 1,
+ kPrivacyModeDisabled = 0,
+ kPrivacyModeEnabled = 1,
};
}; // namespace net
#endif // NET_BASE_PRIVACY_MODE_H_
+
diff --git a/net/http/disk_cache_based_quic_server_info_unittest.cc b/net/http/disk_cache_based_quic_server_info_unittest.cc
index 3fb9ba5..ed0e1b7 100644
--- a/net/http/disk_cache_based_quic_server_info_unittest.cc
+++ b/net/http/disk_cache_based_quic_server_info_unittest.cc
@@ -58,7 +58,7 @@ TEST(DiskCacheBasedQuicServerInfo, DeleteInCallback) {
MockBlockingBackendFactory* factory = new MockBlockingBackendFactory();
MockHttpCache cache(factory);
QuicSessionKey server_key("www.verisign.com", 443, true,
- PRIVACY_MODE_DISABLED);
+ kPrivacyModeDisabled);
scoped_ptr<QuicServerInfo> quic_server_info(
new DiskCacheBasedQuicServerInfo(server_key, cache.http_cache()));
quic_server_info->Start();
@@ -76,7 +76,7 @@ TEST(DiskCacheBasedQuicServerInfo, Update) {
AddMockTransaction(&kHostInfoTransaction1);
TestCompletionCallback callback;
- QuicSessionKey server_key("www.google.com", 443, true, PRIVACY_MODE_DISABLED);
+ QuicSessionKey server_key("www.google.com", 443, true, kPrivacyModeDisabled);
scoped_ptr<QuicServerInfo> quic_server_info(
new DiskCacheBasedQuicServerInfo(server_key, cache.http_cache()));
quic_server_info->Start();
@@ -143,8 +143,7 @@ TEST(DiskCacheBasedQuicServerInfo, UpdateDifferentPorts) {
TestCompletionCallback callback;
// Persist data for port 443.
- QuicSessionKey server_key1("www.google.com", 443, true,
- PRIVACY_MODE_DISABLED);
+ QuicSessionKey server_key1("www.google.com", 443, true, kPrivacyModeDisabled);
scoped_ptr<QuicServerInfo> quic_server_info1(
new DiskCacheBasedQuicServerInfo(server_key1, cache.http_cache()));
quic_server_info1->Start();
@@ -168,8 +167,7 @@ TEST(DiskCacheBasedQuicServerInfo, UpdateDifferentPorts) {
base::MessageLoop::current()->RunUntilIdle();
// Persist data for port 80.
- QuicSessionKey server_key2("www.google.com", 80, false,
- PRIVACY_MODE_DISABLED);
+ QuicSessionKey server_key2("www.google.com", 80, false, kPrivacyModeDisabled);
scoped_ptr<QuicServerInfo> quic_server_info2(
new DiskCacheBasedQuicServerInfo(server_key2, cache.http_cache()));
quic_server_info2->Start();
@@ -232,7 +230,7 @@ TEST(DiskCacheBasedQuicServerInfo, IsReadyToPersist) {
AddMockTransaction(&kHostInfoTransaction1);
TestCompletionCallback callback;
- QuicSessionKey server_key("www.google.com", 443, true, PRIVACY_MODE_DISABLED);
+ QuicSessionKey server_key("www.google.com", 443, true, kPrivacyModeDisabled);
scoped_ptr<QuicServerInfo> quic_server_info(
new DiskCacheBasedQuicServerInfo(server_key, cache.http_cache()));
EXPECT_FALSE(quic_server_info->IsDataReady());
diff --git a/net/http/http_network_transaction.cc b/net/http/http_network_transaction.cc
index 0c6ec5d..ba27cb7 100644
--- a/net/http/http_network_transaction.cc
+++ b/net/http/http_network_transaction.cc
@@ -196,7 +196,7 @@ int HttpNetworkTransaction::Start(const HttpRequestInfo* request_info,
// Channel ID is enabled unless --disable-tls-channel-id flag is set,
// or if privacy mode is enabled.
bool channel_id_enabled = server_ssl_config_.channel_id_enabled &&
- (request_->privacy_mode == PRIVACY_MODE_DISABLED);
+ (request_->privacy_mode == kPrivacyModeDisabled);
server_ssl_config_.channel_id_enabled = channel_id_enabled;
next_state_ = STATE_NOTIFY_BEFORE_CREATE_STREAM;
diff --git a/net/http/http_network_transaction_unittest.cc b/net/http/http_network_transaction_unittest.cc
index 02a77e4..ca06785 100644
--- a/net/http/http_network_transaction_unittest.cc
+++ b/net/http/http_network_transaction_unittest.cc
@@ -9218,7 +9218,7 @@ TEST_P(HttpNetworkTransactionTest,
// Set up an initial SpdySession in the pool to reuse.
HostPortPair host_port_pair("www.google.com", 443);
SpdySessionKey key(host_port_pair, ProxyServer::Direct(),
- PRIVACY_MODE_DISABLED);
+ kPrivacyModeDisabled);
base::WeakPtr<SpdySession> spdy_session =
CreateSecureSpdySession(session, key, BoundNetLog());
@@ -10377,7 +10377,7 @@ TEST_P(HttpNetworkTransactionTest, PreconnectWithExistingSpdySession) {
// Set up an initial SpdySession in the pool to reuse.
HostPortPair host_port_pair("www.google.com", 443);
SpdySessionKey key(host_port_pair, ProxyServer::Direct(),
- PRIVACY_MODE_DISABLED);
+ kPrivacyModeDisabled);
base::WeakPtr<SpdySession> spdy_session =
CreateInsecureSpdySession(session, key, BoundNetLog());
@@ -11735,7 +11735,7 @@ TEST_P(HttpNetworkTransactionTest, CloseIdleSpdySessionToOpenNewOne) {
HostPortPair host_port_pair_a("www.a.com", 443);
SpdySessionKey spdy_session_key_a(
- host_port_pair_a, ProxyServer::Direct(), PRIVACY_MODE_DISABLED);
+ host_port_pair_a, ProxyServer::Direct(), kPrivacyModeDisabled);
EXPECT_FALSE(
HasSpdySession(session->spdy_session_pool(), spdy_session_key_a));
@@ -11767,7 +11767,7 @@ TEST_P(HttpNetworkTransactionTest, CloseIdleSpdySessionToOpenNewOne) {
HostPortPair host_port_pair_b("www.b.com", 443);
SpdySessionKey spdy_session_key_b(
- host_port_pair_b, ProxyServer::Direct(), PRIVACY_MODE_DISABLED);
+ host_port_pair_b, ProxyServer::Direct(), kPrivacyModeDisabled);
EXPECT_FALSE(
HasSpdySession(session->spdy_session_pool(), spdy_session_key_b));
HttpRequestInfo request2;
@@ -11795,7 +11795,7 @@ TEST_P(HttpNetworkTransactionTest, CloseIdleSpdySessionToOpenNewOne) {
HostPortPair host_port_pair_a1("www.a.com", 80);
SpdySessionKey spdy_session_key_a1(
- host_port_pair_a1, ProxyServer::Direct(), PRIVACY_MODE_DISABLED);
+ host_port_pair_a1, ProxyServer::Direct(), kPrivacyModeDisabled);
EXPECT_FALSE(
HasSpdySession(session->spdy_session_pool(), spdy_session_key_a1));
HttpRequestInfo request3;
diff --git a/net/http/http_proxy_client_socket_pool.cc b/net/http/http_proxy_client_socket_pool.cc
index 37ffa6d..e2529f8 100644
--- a/net/http/http_proxy_client_socket_pool.cc
+++ b/net/http/http_proxy_client_socket_pool.cc
@@ -206,7 +206,7 @@ int HttpProxyConnectJob::DoSSLConnect() {
if (params_->tunnel()) {
SpdySessionKey key(params_->destination().host_port_pair(),
ProxyServer::Direct(),
- PRIVACY_MODE_DISABLED);
+ kPrivacyModeDisabled);
if (params_->spdy_session_pool()->FindAvailableSession(key, net_log())) {
using_spdy_ = true;
next_state_ = STATE_SPDY_PROXY_CREATE_STREAM;
@@ -302,7 +302,7 @@ int HttpProxyConnectJob::DoSpdyProxyCreateStream() {
DCHECK(params_->tunnel());
SpdySessionKey key(params_->destination().host_port_pair(),
ProxyServer::Direct(),
- PRIVACY_MODE_DISABLED);
+ kPrivacyModeDisabled);
SpdySessionPool* spdy_pool = params_->spdy_session_pool();
base::WeakPtr<SpdySession> spdy_session =
spdy_pool->FindAvailableSession(key, net_log());
diff --git a/net/http/http_proxy_client_socket_pool_unittest.cc b/net/http/http_proxy_client_socket_pool_unittest.cc
index 1afdd08..9f3a652 100644
--- a/net/http/http_proxy_client_socket_pool_unittest.cc
+++ b/net/http/http_proxy_client_socket_pool_unittest.cc
@@ -135,7 +135,7 @@ class HttpProxyClientSocketPoolTest
NULL,
HostPortPair(kHttpsProxyHost, 443),
SSLConfig(),
- PRIVACY_MODE_DISABLED,
+ kPrivacyModeDisabled,
0,
false,
false);
diff --git a/net/http/http_request_info.cc b/net/http/http_request_info.cc
index 794aa1c..bffc96c 100644
--- a/net/http/http_request_info.cc
+++ b/net/http/http_request_info.cc
@@ -10,7 +10,7 @@ HttpRequestInfo::HttpRequestInfo()
: upload_data_stream(NULL),
load_flags(0),
motivation(NORMAL_MOTIVATION),
- privacy_mode(PRIVACY_MODE_DISABLED) {
+ privacy_mode(kPrivacyModeDisabled) {
}
HttpRequestInfo::~HttpRequestInfo() {}
diff --git a/net/http/http_stream_factory_impl_job.cc b/net/http/http_stream_factory_impl_job.cc
index b23ec2a..09b58d4 100644
--- a/net/http/http_stream_factory_impl_job.cc
+++ b/net/http/http_stream_factory_impl_job.cc
@@ -1092,7 +1092,7 @@ int HttpStreamFactoryImpl::Job::DoCreateStream() {
// We never use privacy mode for connection to proxy server.
spdy_session_key = SpdySessionKey(proxy_server.host_port_pair(),
ProxyServer::Direct(),
- PRIVACY_MODE_DISABLED);
+ kPrivacyModeDisabled);
direct = false;
}
@@ -1278,7 +1278,7 @@ void HttpStreamFactoryImpl::Job::InitSSLConfig(
ssl_config->verify_ev_cert = true;
// Disable Channel ID if privacy mode is enabled.
- if (request_info_.privacy_mode == PRIVACY_MODE_ENABLED)
+ if (request_info_.privacy_mode == kPrivacyModeEnabled)
ssl_config->channel_id_enabled = false;
}
diff --git a/net/http/http_stream_factory_impl_unittest.cc b/net/http/http_stream_factory_impl_unittest.cc
index 54465db..f2185a9 100644
--- a/net/http/http_stream_factory_impl_unittest.cc
+++ b/net/http/http_stream_factory_impl_unittest.cc
@@ -550,7 +550,7 @@ TEST_P(HttpStreamFactoryTest, PreconnectDirectWithExistingSpdySession) {
// Put a SpdySession in the pool.
HostPortPair host_port_pair("www.google.com", 443);
SpdySessionKey key(host_port_pair, ProxyServer::Direct(),
- PRIVACY_MODE_DISABLED);
+ kPrivacyModeDisabled);
ignore_result(CreateFakeSpdySession(session->spdy_session_pool(), key));
CapturePreconnectsTransportSocketPool* transport_conn_pool =
@@ -661,13 +661,13 @@ TEST_P(HttpStreamFactoryTest, PrivacyModeDisablesChannelId) {
// Set an existing SpdySession in the pool.
HostPortPair host_port_pair("www.google.com", 443);
SpdySessionKey key(host_port_pair, ProxyServer::Direct(),
- PRIVACY_MODE_ENABLED);
+ kPrivacyModeEnabled);
HttpRequestInfo request_info;
request_info.method = "GET";
request_info.url = GURL("https://www.google.com");
request_info.load_flags = 0;
- request_info.privacy_mode = PRIVACY_MODE_DISABLED;
+ request_info.privacy_mode = kPrivacyModeDisabled;
SSLConfig ssl_config;
StreamRequestWaiter waiter;
@@ -720,7 +720,7 @@ TEST_P(HttpStreamFactoryTest, PrivacyModeUsesDifferentSocketPoolGroup) {
request_info.method = "GET";
request_info.url = GURL("https://www.google.com");
request_info.load_flags = 0;
- request_info.privacy_mode = PRIVACY_MODE_DISABLED;
+ request_info.privacy_mode = kPrivacyModeDisabled;
SSLConfig ssl_config;
StreamRequestWaiter waiter;
@@ -741,7 +741,7 @@ TEST_P(HttpStreamFactoryTest, PrivacyModeUsesDifferentSocketPoolGroup) {
EXPECT_EQ(GetSocketPoolGroupCount(ssl_pool), 1);
- request_info.privacy_mode = PRIVACY_MODE_ENABLED;
+ request_info.privacy_mode = kPrivacyModeEnabled;
scoped_ptr<HttpStreamRequest> request3(
session->http_stream_factory()->RequestStream(
request_info, DEFAULT_PRIORITY, ssl_config, ssl_config,
diff --git a/net/quic/crypto/quic_crypto_client_config_test.cc b/net/quic/crypto/quic_crypto_client_config_test.cc
index 63f443d..b74a37a 100644
--- a/net/quic/crypto/quic_crypto_client_config_test.cc
+++ b/net/quic/crypto/quic_crypto_client_config_test.cc
@@ -56,7 +56,7 @@ TEST(QuicCryptoClientConfigTest, InchoateChlo) {
QuicCryptoClientConfig config;
QuicCryptoNegotiatedParameters params;
CryptoHandshakeMessage msg;
- QuicSessionKey server_key("www.google.com", 80, false, PRIVACY_MODE_DISABLED);
+ QuicSessionKey server_key("www.google.com", 80, false, kPrivacyModeDisabled);
config.FillInchoateClientHello(server_key, QuicVersionMax(), &state,
&params, &msg);
@@ -131,14 +131,14 @@ TEST(QuicCryptoClientConfigTest, ProcessServerDowngradeAttack) {
TEST(QuicCryptoClientConfigTest, InitializeFrom) {
QuicCryptoClientConfig config;
QuicSessionKey canonical_key1("www.google.com", 80, false,
- PRIVACY_MODE_DISABLED);
+ kPrivacyModeDisabled);
QuicCryptoClientConfig::CachedState* state =
config.LookupOrCreate(canonical_key1);
// TODO(rch): Populate other fields of |state|.
state->set_source_address_token("TOKEN");
state->SetProofValid();
- QuicSessionKey other_key("mail.google.com", 80, false, PRIVACY_MODE_DISABLED);
+ QuicSessionKey other_key("mail.google.com", 80, false, kPrivacyModeDisabled);
config.InitializeFrom(other_key, canonical_key1, &config);
QuicCryptoClientConfig::CachedState* other = config.LookupOrCreate(other_key);
diff --git a/net/quic/quic_client_session_test.cc b/net/quic/quic_client_session_test.cc
index 99fbaf3..3c8d933 100644
--- a/net/quic/quic_client_session_test.cc
+++ b/net/quic/quic_client_session_test.cc
@@ -71,7 +71,7 @@ class QuicClientSessionTest : public ::testing::TestWithParam<QuicVersion> {
session_(connection_, GetSocket().Pass(), writer_.Pass(), NULL, NULL,
make_scoped_ptr((QuicServerInfo*)NULL),
QuicSessionKey(kServerHostname, kServerPort, false,
- PRIVACY_MODE_DISABLED),
+ kPrivacyModeDisabled),
DefaultQuicConfig(), &crypto_config_, &net_log_) {
session_.config()->SetDefaults();
crypto_config_.SetDefaults();
diff --git a/net/quic/quic_crypto_client_stream_test.cc b/net/quic/quic_crypto_client_stream_test.cc
index 71827a72..a69f126 100644
--- a/net/quic/quic_crypto_client_stream_test.cc
+++ b/net/quic/quic_crypto_client_stream_test.cc
@@ -28,7 +28,7 @@ class QuicCryptoClientStreamTest : public ::testing::Test {
QuicCryptoClientStreamTest()
: connection_(new PacketSavingConnection(false)),
session_(new TestClientSession(connection_, DefaultQuicConfig())),
- server_key_(kServerHostname, kServerPort, false, PRIVACY_MODE_DISABLED),
+ server_key_(kServerHostname, kServerPort, false, kPrivacyModeDisabled),
stream_(new QuicCryptoClientStream(
server_key_, session_.get(), NULL, &crypto_config_)) {
session_->SetCryptoStream(stream_.get());
@@ -106,7 +106,7 @@ TEST_F(QuicCryptoClientStreamTest, NegotiatedParameters) {
}
TEST_F(QuicCryptoClientStreamTest, InvalidHostname) {
- QuicSessionKey server_key("invalid", 80, false, PRIVACY_MODE_DISABLED);
+ QuicSessionKey server_key("invalid", 80, false, kPrivacyModeDisabled);
stream_.reset(new QuicCryptoClientStream(server_key, session_.get(), NULL,
&crypto_config_));
session_->SetCryptoStream(stream_.get());
diff --git a/net/quic/quic_crypto_server_stream_test.cc b/net/quic/quic_crypto_server_stream_test.cc
index 49adea8..d0c87e8 100644
--- a/net/quic/quic_crypto_server_stream_test.cc
+++ b/net/quic/quic_crypto_server_stream_test.cc
@@ -146,7 +146,7 @@ TEST_P(QuicCryptoServerStreamTest, ZeroRTT) {
client_crypto_config.SetDefaults();
QuicSessionKey server_key(kServerHostname, kServerPort, false,
- PRIVACY_MODE_DISABLED);
+ kPrivacyModeDisabled);
scoped_ptr<QuicCryptoClientStream> client(new QuicCryptoClientStream(
server_key, client_session.get(), NULL, &client_crypto_config));
client_session->SetCryptoStream(client.get());
diff --git a/net/quic/quic_http_stream_test.cc b/net/quic/quic_http_stream_test.cc
index 363bbb6..ac1f715 100644
--- a/net/quic/quic_http_stream_test.cc
+++ b/net/quic/quic_http_stream_test.cc
@@ -209,7 +209,7 @@ class QuicHttpStreamTest : public ::testing::TestWithParam<QuicVersion> {
&crypto_client_stream_factory_,
make_scoped_ptr((QuicServerInfo*)NULL),
QuicSessionKey(kServerHostname, kServerPort,
- false, PRIVACY_MODE_DISABLED),
+ false, kPrivacyModeDisabled),
DefaultQuicConfig(), &crypto_config_, NULL));
session_->GetCryptoStream()->CryptoConnect();
EXPECT_TRUE(session_->IsCryptoHandshakeConfirmed());
diff --git a/net/quic/quic_session_key.cc b/net/quic/quic_session_key.cc
index 2dc4165..8ffd524 100644
--- a/net/quic/quic_session_key.cc
+++ b/net/quic/quic_session_key.cc
@@ -45,7 +45,7 @@ bool QuicSessionKey::operator==(const QuicSessionKey& other) const {
string QuicSessionKey::ToString() const {
return (is_https_ ? "https://" : "http://") + host_port_pair_.ToString() +
- (privacy_mode_ == PRIVACY_MODE_ENABLED ? "/private" : "");
+ (privacy_mode_ == kPrivacyModeEnabled ? "/private" : "");
}
} // namespace net
diff --git a/net/quic/quic_session_key_test.cc b/net/quic/quic_session_key_test.cc
index db03097..e8fd4fd 100644
--- a/net/quic/quic_session_key_test.cc
+++ b/net/quic/quic_session_key_test.cc
@@ -16,22 +16,22 @@ TEST(QuicSessionKeyTest, ToString) {
HostPortPair google_host_port_pair("google.com", 10);
QuicSessionKey google_http_key(google_host_port_pair, false,
- PRIVACY_MODE_DISABLED);
+ kPrivacyModeDisabled);
string google_http_key_str = google_http_key.ToString();
EXPECT_EQ("http://google.com:10", google_http_key_str);
QuicSessionKey google_https_key(google_host_port_pair, true,
- PRIVACY_MODE_DISABLED);
+ kPrivacyModeDisabled);
string google_https_key_str = google_https_key.ToString();
EXPECT_EQ("https://google.com:10", google_https_key_str);
QuicSessionKey private_http_key(google_host_port_pair, false,
- PRIVACY_MODE_ENABLED);
+ kPrivacyModeEnabled);
string private_http_key_str = private_http_key.ToString();
EXPECT_EQ("http://google.com:10/private", private_http_key_str);
QuicSessionKey private_https_key(google_host_port_pair, true,
- PRIVACY_MODE_ENABLED);
+ kPrivacyModeEnabled);
string private_https_key_str = private_https_key.ToString();
EXPECT_EQ("https://google.com:10/private", private_https_key_str);
}
diff --git a/net/quic/quic_stream_factory_test.cc b/net/quic/quic_stream_factory_test.cc
index 75b6e98..780c5cb 100644
--- a/net/quic/quic_stream_factory_test.cc
+++ b/net/quic/quic_stream_factory_test.cc
@@ -48,7 +48,7 @@ class QuicStreamFactoryPeer {
static bool HasActiveSession(QuicStreamFactory* factory,
const HostPortPair& host_port_pair,
bool is_https) {
- QuicSessionKey server_key(host_port_pair, is_https, PRIVACY_MODE_DISABLED);
+ QuicSessionKey server_key(host_port_pair, is_https, kPrivacyModeDisabled);
return factory->HasActiveSession(server_key);
}
@@ -56,7 +56,7 @@ class QuicStreamFactoryPeer {
QuicStreamFactory* factory,
const HostPortPair& host_port_pair,
bool is_https) {
- QuicSessionKey server_key(host_port_pair, is_https, PRIVACY_MODE_DISABLED);
+ QuicSessionKey server_key(host_port_pair, is_https, kPrivacyModeDisabled);
DCHECK(factory->HasActiveSession(server_key));
return factory->active_sessions_[server_key];
}
@@ -66,7 +66,7 @@ class QuicStreamFactoryPeer {
const HostPortPair& host_port_pair,
bool is_https,
const BoundNetLog& net_log) {
- QuicSessionKey server_key(host_port_pair, is_https, PRIVACY_MODE_DISABLED);
+ QuicSessionKey server_key(host_port_pair, is_https, kPrivacyModeDisabled);
return factory->CreateIfSessionExists(server_key, net_log);
}
@@ -97,7 +97,7 @@ class QuicStreamFactoryTest : public ::testing::TestWithParam<QuicVersion> {
SupportedVersions(GetParam()), true, true),
host_port_pair_(kDefaultServerHostName, kDefaultServerPort),
is_https_(false),
- privacy_mode_(PRIVACY_MODE_DISABLED) {
+ privacy_mode_(kPrivacyModeDisabled) {
factory_.set_require_confirmation(false);
}
diff --git a/net/quic/test_tools/crypto_test_utils.cc b/net/quic/test_tools/crypto_test_utils.cc
index 6989fff..45fc5a0 100644
--- a/net/quic/test_tools/crypto_test_utils.cc
+++ b/net/quic/test_tools/crypto_test_utils.cc
@@ -180,7 +180,7 @@ int CryptoTestUtils::HandshakeWithFakeClient(
crypto_config.SetChannelIDSigner(ChannelIDSignerForTesting());
}
QuicSessionKey server_key(kServerHostname, kServerPort, false,
- PRIVACY_MODE_DISABLED);
+ kPrivacyModeDisabled);
QuicCryptoClientStream client(server_key, &client_session, NULL,
&crypto_config);
client_session.SetCryptoStream(&client);
diff --git a/net/socket/client_socket_pool_manager.cc b/net/socket/client_socket_pool_manager.cc
index f81b4bc..7ade731 100644
--- a/net/socket/client_socket_pool_manager.cc
+++ b/net/socket/client_socket_pool_manager.cc
@@ -181,7 +181,7 @@ int InitSocketPoolHelper(const GURL& request_url,
NULL,
*proxy_host_port.get(),
ssl_config_for_proxy,
- PRIVACY_MODE_DISABLED,
+ kPrivacyModeDisabled,
load_flags,
force_spdy_over_ssl,
want_spdy_over_npn);
@@ -215,7 +215,7 @@ int InitSocketPoolHelper(const GURL& request_url,
}
// Change group name if privacy mode is enabled.
- if (privacy_mode == PRIVACY_MODE_ENABLED)
+ if (privacy_mode == kPrivacyModeEnabled)
connection_group = "pm/" + connection_group;
// Deal with SSL - which layers on top of any given proxy.
diff --git a/net/socket/ssl_client_socket_pool.cc b/net/socket/ssl_client_socket_pool.cc
index 2c704658..de315fd 100644
--- a/net/socket/ssl_client_socket_pool.cc
+++ b/net/socket/ssl_client_socket_pool.cc
@@ -124,7 +124,7 @@ SSLConnectJob::SSLConnectJob(const std::string& group_name,
context.server_bound_cert_service,
context.transport_security_state,
context.cert_transparency_verifier,
- (params->privacy_mode() == PRIVACY_MODE_ENABLED
+ (params->privacy_mode() == kPrivacyModeEnabled
? "pm/" + context.ssl_session_cache_shard
: context.ssl_session_cache_shard)),
callback_(base::Bind(&SSLConnectJob::OnIOComplete,
diff --git a/net/socket/ssl_client_socket_pool_unittest.cc b/net/socket/ssl_client_socket_pool_unittest.cc
index 9969dfc..b652279 100644
--- a/net/socket/ssl_client_socket_pool_unittest.cc
+++ b/net/socket/ssl_client_socket_pool_unittest.cc
@@ -159,7 +159,7 @@ class SSLClientSocketPoolTest
proxy == ProxyServer::SCHEME_HTTP ? http_proxy_socket_params_ : NULL,
HostPortPair("host", 443),
ssl_config_,
- PRIVACY_MODE_DISABLED,
+ kPrivacyModeDisabled,
0,
false,
want_spdy_over_npn));
@@ -830,7 +830,7 @@ TEST_P(SSLClientSocketPoolTest, IPPooling) {
// Setup a SpdySessionKey
test_hosts[i].key = SpdySessionKey(
HostPortPair(test_hosts[i].name, kTestPort), ProxyServer::Direct(),
- PRIVACY_MODE_DISABLED);
+ kPrivacyModeDisabled);
}
MockRead reads[] = {
@@ -891,7 +891,7 @@ void SSLClientSocketPoolTest::TestIPPoolingDisabled(
// Setup a SpdySessionKey
test_hosts[i].key = SpdySessionKey(
HostPortPair(test_hosts[i].name, kTestPort), ProxyServer::Direct(),
- PRIVACY_MODE_DISABLED);
+ kPrivacyModeDisabled);
}
MockRead reads[] = {
diff --git a/net/socket_stream/socket_stream.cc b/net/socket_stream/socket_stream.cc
index 5979dd1..5aacd4a 100644
--- a/net/socket_stream/socket_stream.cc
+++ b/net/socket_stream/socket_stream.cc
@@ -100,7 +100,7 @@ SocketStream::SocketStream(const GURL& url, Delegate* delegate,
proxy_url_(url),
pac_request_(NULL),
connection_(new ClientSocketHandle),
- privacy_mode_(PRIVACY_MODE_DISABLED),
+ privacy_mode_(kPrivacyModeDisabled),
// Unretained() is required; without it, Bind() creates a circular
// dependency and the SocketStream object will not be freed.
io_callback_(base::Bind(&SocketStream::OnIOCompleted,
@@ -166,7 +166,7 @@ void SocketStream::CheckPrivacyMode() {
if (context_ && context_->network_delegate()) {
bool enable = context_->network_delegate()->CanEnablePrivacyMode(url_,
url_);
- privacy_mode_ = enable ? PRIVACY_MODE_ENABLED : PRIVACY_MODE_DISABLED;
+ privacy_mode_ = enable ? kPrivacyModeEnabled : kPrivacyModeDisabled;
// Disable Channel ID if privacy mode is enabled.
if (enable)
server_ssl_config_.channel_id_enabled = false;
diff --git a/net/spdy/spdy_http_stream_unittest.cc b/net/spdy/spdy_http_stream_unittest.cc
index d9e63f9..2142d58 100644
--- a/net/spdy/spdy_http_stream_unittest.cc
+++ b/net/spdy/spdy_http_stream_unittest.cc
@@ -143,7 +143,7 @@ TEST_P(SpdyHttpStreamTest, GetUploadProgressBeforeInitialization) {
HostPortPair host_port_pair("www.google.com", 80);
SpdySessionKey key(host_port_pair, ProxyServer::Direct(),
- PRIVACY_MODE_DISABLED);
+ kPrivacyModeDisabled);
InitSession(reads, arraysize(reads), NULL, 0, key);
SpdyHttpStream stream(session_, false);
@@ -169,7 +169,7 @@ TEST_P(SpdyHttpStreamTest, SendRequest) {
HostPortPair host_port_pair("www.google.com", 80);
SpdySessionKey key(host_port_pair, ProxyServer::Direct(),
- PRIVACY_MODE_DISABLED);
+ kPrivacyModeDisabled);
InitSession(reads, arraysize(reads), writes, arraysize(writes), key);
HttpRequestInfo request;
@@ -244,7 +244,7 @@ TEST_P(SpdyHttpStreamTest, LoadTimingTwoRequests) {
HostPortPair host_port_pair("www.google.com", 80);
SpdySessionKey key(host_port_pair, ProxyServer::Direct(),
- PRIVACY_MODE_DISABLED);
+ kPrivacyModeDisabled);
InitSessionDeterministic(reads, arraysize(reads),
writes, arraysize(writes),
key);
@@ -333,7 +333,7 @@ TEST_P(SpdyHttpStreamTest, SendChunkedPost) {
HostPortPair host_port_pair("www.google.com", 80);
SpdySessionKey key(host_port_pair, ProxyServer::Direct(),
- PRIVACY_MODE_DISABLED);
+ kPrivacyModeDisabled);
InitSession(vector_as_array(&reads), reads.size(),
vector_as_array(&writes), writes.size(),
key);
@@ -409,7 +409,7 @@ TEST_P(SpdyHttpStreamTest, DelayedSendChunkedPost) {
HostPortPair host_port_pair("www.google.com", 80);
SpdySessionKey key(host_port_pair, ProxyServer::Direct(),
- PRIVACY_MODE_DISABLED);
+ kPrivacyModeDisabled);
InitSessionDeterministic(reads, arraysize(reads),
writes, arraysize(writes),
key);
@@ -503,7 +503,7 @@ TEST_P(SpdyHttpStreamTest, SpdyURLTest) {
HostPortPair host_port_pair("www.google.com", 80);
SpdySessionKey key(host_port_pair, ProxyServer::Direct(),
- PRIVACY_MODE_DISABLED);
+ kPrivacyModeDisabled);
InitSession(reads, arraysize(reads), writes, arraysize(writes), key);
HttpRequestInfo request;
@@ -562,7 +562,7 @@ TEST_P(SpdyHttpStreamTest, DelayedSendChunkedPostWithWindowUpdate) {
HostPortPair host_port_pair("www.google.com", 80);
SpdySessionKey key(host_port_pair, ProxyServer::Direct(),
- PRIVACY_MODE_DISABLED);
+ kPrivacyModeDisabled);
InitSessionDeterministic(reads, arraysize(reads),
writes, arraysize(writes),
diff --git a/net/spdy/spdy_network_transaction_unittest.cc b/net/spdy/spdy_network_transaction_unittest.cc
index 717076c..f488ff7 100644
--- a/net/spdy/spdy_network_transaction_unittest.cc
+++ b/net/spdy/spdy_network_transaction_unittest.cc
@@ -588,7 +588,7 @@ class SpdyNetworkTransactionTest
int port = helper.test_params().ssl_type == SPDYNPN ? 443 : 80;
HostPortPair host_port_pair(url.host(), port);
SpdySessionKey key(host_port_pair, ProxyServer::Direct(),
- PRIVACY_MODE_DISABLED);
+ kPrivacyModeDisabled);
BoundNetLog log;
const scoped_refptr<HttpNetworkSession>& session = helper.session();
base::WeakPtr<SpdySession> spdy_session =
@@ -4770,12 +4770,12 @@ TEST_P(SpdyNetworkTransactionTest, DirectConnectProxyReconnect) {
// Check that the SpdySession is still in the SpdySessionPool.
HostPortPair host_port_pair("www.google.com", helper.port());
SpdySessionKey session_pool_key_direct(
- host_port_pair, ProxyServer::Direct(), PRIVACY_MODE_DISABLED);
+ host_port_pair, ProxyServer::Direct(), kPrivacyModeDisabled);
EXPECT_TRUE(HasSpdySession(spdy_session_pool, session_pool_key_direct));
SpdySessionKey session_pool_key_proxy(
host_port_pair,
ProxyServer::FromURI("www.foo.com", ProxyServer::SCHEME_HTTP),
- PRIVACY_MODE_DISABLED);
+ kPrivacyModeDisabled);
EXPECT_FALSE(HasSpdySession(spdy_session_pool, session_pool_key_proxy));
// Set up data for the proxy connection.
diff --git a/net/spdy/spdy_proxy_client_socket_unittest.cc b/net/spdy/spdy_proxy_client_socket_unittest.cc
index 653504d..18fef79 100644
--- a/net/spdy/spdy_proxy_client_socket_unittest.cc
+++ b/net/spdy/spdy_proxy_client_socket_unittest.cc
@@ -158,7 +158,7 @@ SpdyProxyClientSocketTest::SpdyProxyClientSocketTest()
proxy_(ProxyServer::SCHEME_HTTPS, proxy_host_port_),
endpoint_spdy_session_key_(endpoint_host_port_pair_,
proxy_,
- PRIVACY_MODE_DISABLED) {
+ kPrivacyModeDisabled) {
session_deps_.net_log = net_log_.bound().net_log();
}
diff --git a/net/spdy/spdy_session_key.cc b/net/spdy/spdy_session_key.cc
index 3ef95de..3d6cdea 100644
--- a/net/spdy/spdy_session_key.cc
+++ b/net/spdy/spdy_session_key.cc
@@ -8,7 +8,7 @@
namespace net {
-SpdySessionKey::SpdySessionKey() : privacy_mode_(PRIVACY_MODE_DISABLED) {
+SpdySessionKey::SpdySessionKey() : privacy_mode_(kPrivacyModeDisabled) {
}
SpdySessionKey::SpdySessionKey(const HostPortPair& host_port_pair,
diff --git a/net/spdy/spdy_session_pool.cc b/net/spdy/spdy_session_pool.cc
index 4747f05..6ce0a93 100644
--- a/net/spdy/spdy_session_pool.cc
+++ b/net/spdy/spdy_session_pool.cc
@@ -323,7 +323,7 @@ const SpdySessionKey& SpdySessionPool::NormalizeListKey(
HostPortPair single_domain = HostPortPair("singledomain.com", 80);
single_domain_key = new SpdySessionKey(single_domain,
ProxyServer::Direct(),
- PRIVACY_MODE_DISABLED);
+ kPrivacyModeDisabled);
}
return *single_domain_key;
}
diff --git a/net/spdy/spdy_session_pool_unittest.cc b/net/spdy/spdy_session_pool_unittest.cc
index f246dd0..c9873fc 100644
--- a/net/spdy/spdy_session_pool_unittest.cc
+++ b/net/spdy/spdy_session_pool_unittest.cc
@@ -96,7 +96,7 @@ TEST_P(SpdySessionPoolTest, CloseCurrentSessions) {
SpdySessionKey test_key =
SpdySessionKey(
test_host_port_pair, ProxyServer::Direct(),
- PRIVACY_MODE_DISABLED);
+ kPrivacyModeDisabled);
MockConnect connect_data(SYNCHRONOUS, OK);
MockRead reads[] = {
@@ -157,7 +157,7 @@ TEST_P(SpdySessionPoolTest, CloseCurrentIdleSessions) {
const std::string kTestHost1("http://www.a.com");
HostPortPair test_host_port_pair1(kTestHost1, 80);
SpdySessionKey key1(test_host_port_pair1, ProxyServer::Direct(),
- PRIVACY_MODE_DISABLED);
+ kPrivacyModeDisabled);
base::WeakPtr<SpdySession> session1 =
CreateInsecureSpdySession(http_session_, key1, BoundNetLog());
GURL url1(kTestHost1);
@@ -171,7 +171,7 @@ TEST_P(SpdySessionPoolTest, CloseCurrentIdleSessions) {
const std::string kTestHost2("http://www.b.com");
HostPortPair test_host_port_pair2(kTestHost2, 80);
SpdySessionKey key2(test_host_port_pair2, ProxyServer::Direct(),
- PRIVACY_MODE_DISABLED);
+ kPrivacyModeDisabled);
base::WeakPtr<SpdySession> session2 =
CreateInsecureSpdySession(http_session_, key2, BoundNetLog());
GURL url2(kTestHost2);
@@ -185,7 +185,7 @@ TEST_P(SpdySessionPoolTest, CloseCurrentIdleSessions) {
const std::string kTestHost3("http://www.c.com");
HostPortPair test_host_port_pair3(kTestHost3, 80);
SpdySessionKey key3(test_host_port_pair3, ProxyServer::Direct(),
- PRIVACY_MODE_DISABLED);
+ kPrivacyModeDisabled);
base::WeakPtr<SpdySession> session3 =
CreateInsecureSpdySession(http_session_, key3, BoundNetLog());
GURL url3(kTestHost3);
@@ -259,7 +259,7 @@ TEST_P(SpdySessionPoolTest, CloseAllSessions) {
SpdySessionKey test_key =
SpdySessionKey(
test_host_port_pair, ProxyServer::Direct(),
- PRIVACY_MODE_DISABLED);
+ kPrivacyModeDisabled);
MockConnect connect_data(SYNCHRONOUS, OK);
MockRead reads[] = {
@@ -348,7 +348,7 @@ void SpdySessionPoolTest::RunIPPoolingTest(
// Setup a SpdySessionKey
test_hosts[i].key = SpdySessionKey(
HostPortPair(test_hosts[i].name, kTestPort), ProxyServer::Direct(),
- PRIVACY_MODE_DISABLED);
+ kPrivacyModeDisabled);
}
MockConnect connect_data(SYNCHRONOUS, OK);
@@ -382,7 +382,7 @@ void SpdySessionPoolTest::RunIPPoolingTest(
// Verify that the second host, through a proxy, won't share the IP.
SpdySessionKey proxy_key(test_hosts[1].key.host_port_pair(),
ProxyServer::FromPacString("HTTP http://proxy.foo.com/"),
- PRIVACY_MODE_DISABLED);
+ kPrivacyModeDisabled);
EXPECT_FALSE(HasSpdySession(spdy_session_pool_, proxy_key));
// Overlap between 2 and 3 does is not transitive to 1.
diff --git a/net/spdy/spdy_session_unittest.cc b/net/spdy/spdy_session_unittest.cc
index f3fb735..a5d9292 100644
--- a/net/spdy/spdy_session_unittest.cc
+++ b/net/spdy/spdy_session_unittest.cc
@@ -107,7 +107,7 @@ class SpdySessionTest : public PlatformTest,
test_url_(kTestUrl),
test_host_port_pair_(kTestHost, kTestPort),
key_(test_host_port_pair_, ProxyServer::Direct(),
- PRIVACY_MODE_DISABLED) {
+ kPrivacyModeDisabled) {
}
virtual ~SpdySessionTest() {
@@ -2719,7 +2719,7 @@ TEST_P(SpdySessionTest, CloseOneIdleConnection) {
// Create an idle SPDY session.
SpdySessionKey key1(HostPortPair("1.com", 80), ProxyServer::Direct(),
- PRIVACY_MODE_DISABLED);
+ kPrivacyModeDisabled);
base::WeakPtr<SpdySession> session1 =
CreateInsecureSpdySession(http_session_, key1, BoundNetLog());
EXPECT_FALSE(pool->IsStalled());
@@ -2779,14 +2779,14 @@ TEST_P(SpdySessionTest, CloseOneIdleConnectionWithAlias) {
// Create an idle SPDY session.
SpdySessionKey key1(HostPortPair("1.com", 80), ProxyServer::Direct(),
- PRIVACY_MODE_DISABLED);
+ kPrivacyModeDisabled);
base::WeakPtr<SpdySession> session1 =
CreateInsecureSpdySession(http_session_, key1, BoundNetLog());
EXPECT_FALSE(pool->IsStalled());
// Set up an alias for the idle SPDY session, increasing its ref count to 2.
SpdySessionKey key2(HostPortPair("2.com", 80), ProxyServer::Direct(),
- PRIVACY_MODE_DISABLED);
+ kPrivacyModeDisabled);
HostResolver::RequestInfo info(key2.host_port_pair());
AddressList addresses;
// Pre-populate the DNS cache, since a synchronous resolution is required in
@@ -2867,7 +2867,7 @@ TEST_P(SpdySessionTest, CloseSessionOnIdleWhenPoolStalled) {
// Create a SPDY session.
GURL url1(kDefaultURL);
SpdySessionKey key1(HostPortPair(url1.host(), 80),
- ProxyServer::Direct(), PRIVACY_MODE_DISABLED);
+ ProxyServer::Direct(), kPrivacyModeDisabled);
base::WeakPtr<SpdySession> session1 =
CreateInsecureSpdySession(http_session_, key1, BoundNetLog());
EXPECT_FALSE(pool->IsStalled());
@@ -2928,9 +2928,9 @@ TEST_P(SpdySessionTest, SpdySessionKeyPrivacyMode) {
HostPortPair host_port_pair("www.google.com", 443);
SpdySessionKey key_privacy_enabled(host_port_pair, ProxyServer::Direct(),
- PRIVACY_MODE_ENABLED);
+ kPrivacyModeEnabled);
SpdySessionKey key_privacy_disabled(host_port_pair, ProxyServer::Direct(),
- PRIVACY_MODE_DISABLED);
+ kPrivacyModeDisabled);
EXPECT_FALSE(HasSpdySession(spdy_session_pool_, key_privacy_enabled));
EXPECT_FALSE(HasSpdySession(spdy_session_pool_, key_privacy_disabled));
diff --git a/net/spdy/spdy_stream_unittest.cc b/net/spdy/spdy_stream_unittest.cc
index d6bf58d..cc1386d 100644
--- a/net/spdy/spdy_stream_unittest.cc
+++ b/net/spdy/spdy_stream_unittest.cc
@@ -53,7 +53,7 @@ class SpdyStreamTest : public ::testing::Test,
base::WeakPtr<SpdySession> CreateDefaultSpdySession() {
SpdySessionKey key(HostPortPair("www.google.com", 80),
ProxyServer::Direct(),
- PRIVACY_MODE_DISABLED);
+ kPrivacyModeDisabled);
return CreateInsecureSpdySession(session_, key, BoundNetLog());
}
diff --git a/net/spdy/spdy_websocket_stream_unittest.cc b/net/spdy/spdy_websocket_stream_unittest.cc
index 3330e59..1813947 100644
--- a/net/spdy/spdy_websocket_stream_unittest.cc
+++ b/net/spdy/spdy_websocket_stream_unittest.cc
@@ -201,7 +201,7 @@ class SpdyWebSocketStreamTest
host_port_pair_.set_port(80);
spdy_session_key_ = SpdySessionKey(host_port_pair_,
ProxyServer::Direct(),
- PRIVACY_MODE_DISABLED);
+ kPrivacyModeDisabled);
spdy_settings_to_send_[spdy_settings_id_to_set_] =
SettingsFlagsAndValue(
diff --git a/net/tools/quic/end_to_end_test.cc b/net/tools/quic/end_to_end_test.cc
index fe4e04b..dcba71a 100644
--- a/net/tools/quic/end_to_end_test.cc
+++ b/net/tools/quic/end_to_end_test.cc
@@ -157,7 +157,7 @@ class EndToEndTest : public ::testing::TestWithParam<TestParams> {
uint port = 0;
server_address_ = IPEndPoint(ip, port);
server_key_ = QuicSessionKey("example.com", port, false,
- PRIVACY_MODE_DISABLED);
+ kPrivacyModeDisabled);
client_supported_versions_ = GetParam().client_supported_versions;
server_supported_versions_ = GetParam().server_supported_versions;
@@ -227,7 +227,7 @@ class EndToEndTest : public ::testing::TestWithParam<TestParams> {
server_address_ = IPEndPoint(server_address_.address(),
server_thread_->GetPort());
server_key_ = QuicSessionKey(server_key_.host(), server_thread_->GetPort(),
- false, PRIVACY_MODE_DISABLED);
+ false, kPrivacyModeDisabled);
QuicDispatcher* dispatcher =
QuicServerPeer::GetDispatcher(server_thread_->server());
diff --git a/net/tools/quic/quic_client_bin.cc b/net/tools/quic/quic_client_bin.cc
index e138711..8f4ad50 100644
--- a/net/tools/quic/quic_client_bin.cc
+++ b/net/tools/quic/quic_client_bin.cc
@@ -75,7 +75,7 @@ int main(int argc, char *argv[]) {
net::tools::QuicClient client(
net::IPEndPoint(addr, FLAGS_port),
net::QuicSessionKey(FLAGS_hostname, FLAGS_port, FLAGS_secure,
- net::PRIVACY_MODE_DISABLED),
+ net::kPrivacyModeDisabled),
net::QuicSupportedVersions(), true);
client.Initialize();
diff --git a/net/tools/quic/quic_client_session_test.cc b/net/tools/quic/quic_client_session_test.cc
index 286de4c..57992cd 100644
--- a/net/tools/quic/quic_client_session_test.cc
+++ b/net/tools/quic/quic_client_session_test.cc
@@ -35,7 +35,7 @@ class ToolsQuicClientSessionTest
SupportedVersions(GetParam()))) {
crypto_config_.SetDefaults();
session_.reset(new QuicClientSession(
- QuicSessionKey(kServerHostname, kPort, false, PRIVACY_MODE_DISABLED),
+ QuicSessionKey(kServerHostname, kPort, false, kPrivacyModeDisabled),
DefaultQuicConfig(), connection_, &crypto_config_));
session_->config()->SetDefaults();
}
diff --git a/net/tools/quic/quic_spdy_client_stream_test.cc b/net/tools/quic/quic_spdy_client_stream_test.cc
index e1aa283..5dd10d0 100644
--- a/net/tools/quic/quic_spdy_client_stream_test.cc
+++ b/net/tools/quic/quic_spdy_client_stream_test.cc
@@ -30,8 +30,7 @@ class QuicSpdyClientStreamTest : public TestWithParam<QuicVersion> {
QuicSpdyClientStreamTest()
: connection_(new StrictMock<MockConnection>(
false, SupportedVersions(GetParam()))),
- session_(QuicSessionKey("example.com", 80, false,
- PRIVACY_MODE_DISABLED),
+ session_(QuicSessionKey("example.com", 80, false, kPrivacyModeDisabled),
DefaultQuicConfig(),
connection_, &crypto_config_),
body_("hello world") {
diff --git a/net/tools/quic/test_tools/quic_test_client.cc b/net/tools/quic/test_tools/quic_test_client.cc
index e494461..7413202 100644
--- a/net/tools/quic/test_tools/quic_test_client.cc
+++ b/net/tools/quic/test_tools/quic_test_client.cc
@@ -215,7 +215,7 @@ ssize_t QuicTestClient::SendMessage(const HTTPMessage& message) {
if (!url.host().empty()) {
client_->set_server_key(
QuicSessionKey(url.host(), url.EffectiveIntPort(),
- url.SchemeIs("https"), PRIVACY_MODE_DISABLED));
+ url.SchemeIs("https"), kPrivacyModeDisabled));
}
}
diff --git a/net/url_request/url_request_http_job.cc b/net/url_request/url_request_http_job.cc
index 78eca41..41b1515 100644
--- a/net/url_request/url_request_http_job.cc
+++ b/net/url_request/url_request_http_job.cc
@@ -262,7 +262,7 @@ void URLRequestHttpJob::Start() {
// Privacy mode could still be disabled in OnCookiesLoaded if we are going
// to send previously saved cookies.
request_info_.privacy_mode = enable_privacy_mode ?
- PRIVACY_MODE_ENABLED : PRIVACY_MODE_DISABLED;
+ kPrivacyModeEnabled : kPrivacyModeDisabled;
// Strip Referer from request_info_.extra_headers to prevent, e.g., plugins
// from overriding headers that are controlled using other means. Otherwise a
@@ -581,7 +581,7 @@ void URLRequestHttpJob::OnCookiesLoaded(const std::string& cookie_line) {
request_info_.extra_headers.SetHeader(
HttpRequestHeaders::kCookie, cookie_line);
// Disable privacy mode as we are sending cookies anyway.
- request_info_.privacy_mode = PRIVACY_MODE_DISABLED;
+ request_info_.privacy_mode = kPrivacyModeDisabled;
}
DoStartTransaction();
}
diff --git a/net/websockets/websocket_job.cc b/net/websockets/websocket_job.cc
index 9ee38b7..63e65a4 100644
--- a/net/websockets/websocket_job.cc
+++ b/net/websockets/websocket_job.cc
@@ -388,7 +388,7 @@ void WebSocketJob::AddCookieHeaderAndSend() {
void WebSocketJob::LoadCookieCallback(const std::string& cookie) {
if (!cookie.empty())
// TODO(tyoshino): Sending cookie means that connection doesn't need
- // PRIVACY_MODE_ENABLED as cookies may be server-bound and channel id
+ // kPrivacyModeEnabled as cookies may be server-bound and channel id
// wouldn't negatively affect privacy anyway. Need to restart connection
// or refactor to determine cookie status prior to connecting.
handshake_request_->AppendHeaderIfMissing("Cookie", cookie);
diff --git a/net/websockets/websocket_job_test.cc b/net/websockets/websocket_job_test.cc
index 1363ff7..e12ddae 100644
--- a/net/websockets/websocket_job_test.cc
+++ b/net/websockets/websocket_job_test.cc
@@ -286,7 +286,7 @@ class MockHttpTransactionFactory : public HttpTransactionFactory {
host_port_pair_.set_port(80);
spdy_session_key_ = SpdySessionKey(host_port_pair_,
ProxyServer::Direct(),
- PRIVACY_MODE_DISABLED);
+ kPrivacyModeDisabled);
session_ = CreateInsecureSpdySession(
http_session_, spdy_session_key_, BoundNetLog());
}