diff options
author | rch@chromium.org <rch@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-04-01 01:28:53 +0000 |
---|---|---|
committer | rch@chromium.org <rch@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-04-01 01:28:53 +0000 |
commit | 314b03990f31330e847c384fbb9426ca5e6c1a58 (patch) | |
tree | 52eff81fb4eb0b127ef56ace4c8e3b155e8513ed /net | |
parent | 9decc62c6eb9f834323498611f8e112ff240aa14 (diff) | |
download | chromium_src-314b03990f31330e847c384fbb9426ca5e6c1a58.zip chromium_src-314b03990f31330e847c384fbb9426ca5e6c1a58.tar.gz chromium_src-314b03990f31330e847c384fbb9426ca5e6c1a58.tar.bz2 |
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
Review URL: https://codereview.chromium.org/215023002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@260729 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net')
39 files changed, 95 insertions, 93 deletions
diff --git a/net/base/privacy_mode.h b/net/base/privacy_mode.h index 082ef26..8b09a64 100644 --- a/net/base/privacy_mode.h +++ b/net/base/privacy_mode.h @@ -10,11 +10,10 @@ 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 { - kPrivacyModeDisabled = 0, - kPrivacyModeEnabled = 1, + PRIVACY_MODE_DISABLED = 0, + PRIVACY_MODE_ENABLED = 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 ed0e1b7..3fb9ba5 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, - kPrivacyModeDisabled); + PRIVACY_MODE_DISABLED); 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, kPrivacyModeDisabled); + QuicSessionKey server_key("www.google.com", 443, true, PRIVACY_MODE_DISABLED); scoped_ptr<QuicServerInfo> quic_server_info( new DiskCacheBasedQuicServerInfo(server_key, cache.http_cache())); quic_server_info->Start(); @@ -143,7 +143,8 @@ TEST(DiskCacheBasedQuicServerInfo, UpdateDifferentPorts) { TestCompletionCallback callback; // Persist data for port 443. - QuicSessionKey server_key1("www.google.com", 443, true, kPrivacyModeDisabled); + QuicSessionKey server_key1("www.google.com", 443, true, + PRIVACY_MODE_DISABLED); scoped_ptr<QuicServerInfo> quic_server_info1( new DiskCacheBasedQuicServerInfo(server_key1, cache.http_cache())); quic_server_info1->Start(); @@ -167,7 +168,8 @@ TEST(DiskCacheBasedQuicServerInfo, UpdateDifferentPorts) { base::MessageLoop::current()->RunUntilIdle(); // Persist data for port 80. - QuicSessionKey server_key2("www.google.com", 80, false, kPrivacyModeDisabled); + QuicSessionKey server_key2("www.google.com", 80, false, + PRIVACY_MODE_DISABLED); scoped_ptr<QuicServerInfo> quic_server_info2( new DiskCacheBasedQuicServerInfo(server_key2, cache.http_cache())); quic_server_info2->Start(); @@ -230,7 +232,7 @@ TEST(DiskCacheBasedQuicServerInfo, IsReadyToPersist) { AddMockTransaction(&kHostInfoTransaction1); TestCompletionCallback callback; - QuicSessionKey server_key("www.google.com", 443, true, kPrivacyModeDisabled); + QuicSessionKey server_key("www.google.com", 443, true, PRIVACY_MODE_DISABLED); 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 3d58afd..9e80573 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 == kPrivacyModeDisabled); + (request_->privacy_mode == PRIVACY_MODE_DISABLED); 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 ca06785..02a77e4 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(), - kPrivacyModeDisabled); + PRIVACY_MODE_DISABLED); 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(), - kPrivacyModeDisabled); + PRIVACY_MODE_DISABLED); 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(), kPrivacyModeDisabled); + host_port_pair_a, ProxyServer::Direct(), PRIVACY_MODE_DISABLED); 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(), kPrivacyModeDisabled); + host_port_pair_b, ProxyServer::Direct(), PRIVACY_MODE_DISABLED); 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(), kPrivacyModeDisabled); + host_port_pair_a1, ProxyServer::Direct(), PRIVACY_MODE_DISABLED); 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 e2529f8..37ffa6d 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(), - kPrivacyModeDisabled); + PRIVACY_MODE_DISABLED); 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(), - kPrivacyModeDisabled); + PRIVACY_MODE_DISABLED); 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 9f3a652..1afdd08 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(), - kPrivacyModeDisabled, + PRIVACY_MODE_DISABLED, 0, false, false); diff --git a/net/http/http_request_info.cc b/net/http/http_request_info.cc index bffc96c..794aa1c 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(kPrivacyModeDisabled) { + privacy_mode(PRIVACY_MODE_DISABLED) { } HttpRequestInfo::~HttpRequestInfo() {} diff --git a/net/http/http_stream_factory_impl_job.cc b/net/http/http_stream_factory_impl_job.cc index 9fd4473..9feb3b7 100644 --- a/net/http/http_stream_factory_impl_job.cc +++ b/net/http/http_stream_factory_impl_job.cc @@ -1097,7 +1097,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(), - kPrivacyModeDisabled); + PRIVACY_MODE_DISABLED); direct = false; } @@ -1283,7 +1283,7 @@ void HttpStreamFactoryImpl::Job::InitSSLConfig( ssl_config->verify_ev_cert = true; // Disable Channel ID if privacy mode is enabled. - if (request_info_.privacy_mode == kPrivacyModeEnabled) + if (request_info_.privacy_mode == PRIVACY_MODE_ENABLED) 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 f2185a9..54465db 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(), - kPrivacyModeDisabled); + PRIVACY_MODE_DISABLED); 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(), - kPrivacyModeEnabled); + PRIVACY_MODE_ENABLED); HttpRequestInfo request_info; request_info.method = "GET"; request_info.url = GURL("https://www.google.com"); request_info.load_flags = 0; - request_info.privacy_mode = kPrivacyModeDisabled; + request_info.privacy_mode = PRIVACY_MODE_DISABLED; 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 = kPrivacyModeDisabled; + request_info.privacy_mode = PRIVACY_MODE_DISABLED; SSLConfig ssl_config; StreamRequestWaiter waiter; @@ -741,7 +741,7 @@ TEST_P(HttpStreamFactoryTest, PrivacyModeUsesDifferentSocketPoolGroup) { EXPECT_EQ(GetSocketPoolGroupCount(ssl_pool), 1); - request_info.privacy_mode = kPrivacyModeEnabled; + request_info.privacy_mode = PRIVACY_MODE_ENABLED; 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 79829d8..3680b77 100644 --- a/net/quic/crypto/quic_crypto_client_config_test.cc +++ b/net/quic/crypto/quic_crypto_client_config_test.cc @@ -57,7 +57,7 @@ TEST(QuicCryptoClientConfigTest, InchoateChlo) { QuicCryptoClientConfig config; QuicCryptoNegotiatedParameters params; CryptoHandshakeMessage msg; - QuicSessionKey server_key("www.google.com", 80, false, kPrivacyModeDisabled); + QuicSessionKey server_key("www.google.com", 80, false, PRIVACY_MODE_DISABLED); config.FillInchoateClientHello(server_key, QuicVersionMax(), &state, ¶ms, &msg); @@ -75,7 +75,7 @@ TEST(QuicCryptoClientConfigTest, FillClientHello) { string error_details; MockRandom rand; CryptoHandshakeMessage chlo; - QuicSessionKey server_key("www.google.com", 80, false, kPrivacyModeDisabled); + QuicSessionKey server_key("www.google.com", 80, false, PRIVACY_MODE_DISABLED); config.FillClientHello(server_key, kConnectionId, QuicVersionMax(), @@ -102,7 +102,7 @@ TEST(QuicCryptoClientConfigTest, InchoateChloSecure) { QuicCryptoClientConfig config; QuicCryptoNegotiatedParameters params; CryptoHandshakeMessage msg; - QuicSessionKey server_key("www.google.com", 443, true, kPrivacyModeDisabled); + QuicSessionKey server_key("www.google.com", 443, true, PRIVACY_MODE_DISABLED); config.FillInchoateClientHello(server_key, QuicVersionMax(), &state, ¶ms, &msg); @@ -117,7 +117,7 @@ TEST(QuicCryptoClientConfigTest, InchoateChloSecureNoEcdsa) { config.DisableEcdsa(); QuicCryptoNegotiatedParameters params; CryptoHandshakeMessage msg; - QuicSessionKey server_key("www.google.com", 443, true, kPrivacyModeDisabled); + QuicSessionKey server_key("www.google.com", 443, true, PRIVACY_MODE_DISABLED); config.FillInchoateClientHello(server_key, QuicVersionMax(), &state, ¶ms, &msg); @@ -154,14 +154,14 @@ TEST(QuicCryptoClientConfigTest, ProcessServerDowngradeAttack) { TEST(QuicCryptoClientConfigTest, InitializeFrom) { QuicCryptoClientConfig config; QuicSessionKey canonical_key1("www.google.com", 80, false, - kPrivacyModeDisabled); + PRIVACY_MODE_DISABLED); 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, kPrivacyModeDisabled); + QuicSessionKey other_key("mail.google.com", 80, false, PRIVACY_MODE_DISABLED); 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 3c8d933..99fbaf3 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, - kPrivacyModeDisabled), + PRIVACY_MODE_DISABLED), 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 a45fbfe..ea11677 100644 --- a/net/quic/quic_crypto_client_stream_test.cc +++ b/net/quic/quic_crypto_client_stream_test.cc @@ -29,7 +29,7 @@ class QuicCryptoClientStreamTest : public ::testing::Test { QuicCryptoClientStreamTest() : connection_(new PacketSavingConnection(false)), session_(new TestClientSession(connection_, DefaultQuicConfig())), - server_key_(kServerHostname, kServerPort, false, kPrivacyModeDisabled), + server_key_(kServerHostname, kServerPort, false, PRIVACY_MODE_DISABLED), stream_(new QuicCryptoClientStream( server_key_, session_.get(), NULL, &crypto_config_)) { session_->SetCryptoStream(stream_.get()); @@ -107,7 +107,7 @@ TEST_F(QuicCryptoClientStreamTest, NegotiatedParameters) { } TEST_F(QuicCryptoClientStreamTest, InvalidHostname) { - QuicSessionKey server_key("invalid", 80, false, kPrivacyModeDisabled); + QuicSessionKey server_key("invalid", 80, false, PRIVACY_MODE_DISABLED); 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 d0c87e8..49adea8 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, - kPrivacyModeDisabled); + PRIVACY_MODE_DISABLED); 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 6397866..39e48c3 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, kPrivacyModeDisabled), + false, PRIVACY_MODE_DISABLED), 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 8ffd524..2dc4165 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_ == kPrivacyModeEnabled ? "/private" : ""); + (privacy_mode_ == PRIVACY_MODE_ENABLED ? "/private" : ""); } } // namespace net diff --git a/net/quic/quic_session_key_test.cc b/net/quic/quic_session_key_test.cc index e8fd4fd..db03097 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, - kPrivacyModeDisabled); + PRIVACY_MODE_DISABLED); 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, - kPrivacyModeDisabled); + PRIVACY_MODE_DISABLED); 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, - kPrivacyModeEnabled); + PRIVACY_MODE_ENABLED); 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, - kPrivacyModeEnabled); + PRIVACY_MODE_ENABLED); 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 780c5cb..75b6e98 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, kPrivacyModeDisabled); + QuicSessionKey server_key(host_port_pair, is_https, PRIVACY_MODE_DISABLED); 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, kPrivacyModeDisabled); + QuicSessionKey server_key(host_port_pair, is_https, PRIVACY_MODE_DISABLED); 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, kPrivacyModeDisabled); + QuicSessionKey server_key(host_port_pair, is_https, PRIVACY_MODE_DISABLED); 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_(kPrivacyModeDisabled) { + privacy_mode_(PRIVACY_MODE_DISABLED) { 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 45fc5a0..6989fff 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, - kPrivacyModeDisabled); + PRIVACY_MODE_DISABLED); 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 7ade731..f81b4bc 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, - kPrivacyModeDisabled, + PRIVACY_MODE_DISABLED, 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 == kPrivacyModeEnabled) + if (privacy_mode == PRIVACY_MODE_ENABLED) 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 de315fd..2c704658 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() == kPrivacyModeEnabled + (params->privacy_mode() == PRIVACY_MODE_ENABLED ? "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 b652279..9969dfc 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_, - kPrivacyModeDisabled, + PRIVACY_MODE_DISABLED, 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(), - kPrivacyModeDisabled); + PRIVACY_MODE_DISABLED); } 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(), - kPrivacyModeDisabled); + PRIVACY_MODE_DISABLED); } MockRead reads[] = { diff --git a/net/socket_stream/socket_stream.cc b/net/socket_stream/socket_stream.cc index 5aacd4a..5979dd1 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_(kPrivacyModeDisabled), + privacy_mode_(PRIVACY_MODE_DISABLED), // 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 ? kPrivacyModeEnabled : kPrivacyModeDisabled; + privacy_mode_ = enable ? PRIVACY_MODE_ENABLED : PRIVACY_MODE_DISABLED; // 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 2142d58..d9e63f9 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(), - kPrivacyModeDisabled); + PRIVACY_MODE_DISABLED); 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(), - kPrivacyModeDisabled); + PRIVACY_MODE_DISABLED); 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(), - kPrivacyModeDisabled); + PRIVACY_MODE_DISABLED); 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(), - kPrivacyModeDisabled); + PRIVACY_MODE_DISABLED); 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(), - kPrivacyModeDisabled); + PRIVACY_MODE_DISABLED); 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(), - kPrivacyModeDisabled); + PRIVACY_MODE_DISABLED); 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(), - kPrivacyModeDisabled); + PRIVACY_MODE_DISABLED); 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 89451ea..51db006 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(), - kPrivacyModeDisabled); + PRIVACY_MODE_DISABLED); 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(), kPrivacyModeDisabled); + host_port_pair, ProxyServer::Direct(), PRIVACY_MODE_DISABLED); 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), - kPrivacyModeDisabled); + PRIVACY_MODE_DISABLED); 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 18fef79..653504d 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_, - kPrivacyModeDisabled) { + PRIVACY_MODE_DISABLED) { 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 3d6cdea..3ef95de 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_(kPrivacyModeDisabled) { +SpdySessionKey::SpdySessionKey() : privacy_mode_(PRIVACY_MODE_DISABLED) { } SpdySessionKey::SpdySessionKey(const HostPortPair& host_port_pair, diff --git a/net/spdy/spdy_session_pool.cc b/net/spdy/spdy_session_pool.cc index 6ce0a93..4747f05 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(), - kPrivacyModeDisabled); + PRIVACY_MODE_DISABLED); } return *single_domain_key; } diff --git a/net/spdy/spdy_session_pool_unittest.cc b/net/spdy/spdy_session_pool_unittest.cc index c9873fc..f246dd0 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(), - kPrivacyModeDisabled); + PRIVACY_MODE_DISABLED); 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(), - kPrivacyModeDisabled); + PRIVACY_MODE_DISABLED); 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(), - kPrivacyModeDisabled); + PRIVACY_MODE_DISABLED); 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(), - kPrivacyModeDisabled); + PRIVACY_MODE_DISABLED); 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(), - kPrivacyModeDisabled); + PRIVACY_MODE_DISABLED); 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(), - kPrivacyModeDisabled); + PRIVACY_MODE_DISABLED); } 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/"), - kPrivacyModeDisabled); + PRIVACY_MODE_DISABLED); 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 a5d9292..f3fb735 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(), - kPrivacyModeDisabled) { + PRIVACY_MODE_DISABLED) { } virtual ~SpdySessionTest() { @@ -2719,7 +2719,7 @@ TEST_P(SpdySessionTest, CloseOneIdleConnection) { // Create an idle SPDY session. SpdySessionKey key1(HostPortPair("1.com", 80), ProxyServer::Direct(), - kPrivacyModeDisabled); + PRIVACY_MODE_DISABLED); 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(), - kPrivacyModeDisabled); + PRIVACY_MODE_DISABLED); 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(), - kPrivacyModeDisabled); + PRIVACY_MODE_DISABLED); 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(), kPrivacyModeDisabled); + ProxyServer::Direct(), PRIVACY_MODE_DISABLED); 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(), - kPrivacyModeEnabled); + PRIVACY_MODE_ENABLED); SpdySessionKey key_privacy_disabled(host_port_pair, ProxyServer::Direct(), - kPrivacyModeDisabled); + PRIVACY_MODE_DISABLED); 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 cc1386d..d6bf58d 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(), - kPrivacyModeDisabled); + PRIVACY_MODE_DISABLED); return CreateInsecureSpdySession(session_, key, BoundNetLog()); } diff --git a/net/spdy/spdy_websocket_stream_unittest.cc b/net/spdy/spdy_websocket_stream_unittest.cc index 1813947..3330e59 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(), - kPrivacyModeDisabled); + PRIVACY_MODE_DISABLED); 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 b598fef..7e50cab 100644 --- a/net/tools/quic/end_to_end_test.cc +++ b/net/tools/quic/end_to_end_test.cc @@ -151,7 +151,7 @@ class EndToEndTest : public ::testing::TestWithParam<TestParams> { uint port = 0; server_address_ = IPEndPoint(ip, port); server_key_ = QuicSessionKey("example.com", port, false, - kPrivacyModeDisabled); + PRIVACY_MODE_DISABLED); client_supported_versions_ = GetParam().client_supported_versions; server_supported_versions_ = GetParam().server_supported_versions; @@ -248,7 +248,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, kPrivacyModeDisabled); + false, PRIVACY_MODE_DISABLED); 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 7f11827..0e33fa8 100644 --- a/net/tools/quic/quic_client_bin.cc +++ b/net/tools/quic/quic_client_bin.cc @@ -82,7 +82,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::kPrivacyModeDisabled), + net::PRIVACY_MODE_DISABLED), net::QuicSupportedVersions(), true, FLAGS_initial_flow_control_window); client.Initialize(); diff --git a/net/tools/quic/quic_client_session_test.cc b/net/tools/quic/quic_client_session_test.cc index 57992cd..286de4c 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, kPrivacyModeDisabled), + QuicSessionKey(kServerHostname, kPort, false, PRIVACY_MODE_DISABLED), 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 004ac8bf..37b5086 100644 --- a/net/tools/quic/quic_spdy_client_stream_test.cc +++ b/net/tools/quic/quic_spdy_client_stream_test.cc @@ -30,7 +30,8 @@ class QuicSpdyClientStreamTest : public TestWithParam<QuicVersion> { QuicSpdyClientStreamTest() : connection_(new StrictMock<MockConnection>( false, SupportedVersions(GetParam()))), - session_(QuicSessionKey("example.com", 80, false, kPrivacyModeDisabled), + session_(QuicSessionKey("example.com", 80, false, + PRIVACY_MODE_DISABLED), 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 d9fa219..eea3a50 100644 --- a/net/tools/quic/test_tools/quic_test_client.cc +++ b/net/tools/quic/test_tools/quic_test_client.cc @@ -242,7 +242,7 @@ ssize_t QuicTestClient::SendMessage(const HTTPMessage& message) { if (!url.host().empty()) { client_->set_server_key( QuicSessionKey(url.host(), url.EffectiveIntPort(), - url.SchemeIs("https"), kPrivacyModeDisabled)); + url.SchemeIs("https"), PRIVACY_MODE_DISABLED)); } } diff --git a/net/url_request/url_request_http_job.cc b/net/url_request/url_request_http_job.cc index 41b1515..78eca41 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 ? - kPrivacyModeEnabled : kPrivacyModeDisabled; + PRIVACY_MODE_ENABLED : PRIVACY_MODE_DISABLED; // 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 = kPrivacyModeDisabled; + request_info_.privacy_mode = PRIVACY_MODE_DISABLED; } DoStartTransaction(); } diff --git a/net/websockets/websocket_job.cc b/net/websockets/websocket_job.cc index 63e65a4..9ee38b7 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 - // kPrivacyModeEnabled as cookies may be server-bound and channel id + // PRIVACY_MODE_ENABLED 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 e12ddae..1363ff7 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(), - kPrivacyModeDisabled); + PRIVACY_MODE_DISABLED); session_ = CreateInsecureSpdySession( http_session_, spdy_session_key_, BoundNetLog()); } |