summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
Diffstat (limited to 'net')
-rw-r--r--net/base/directory_lister.cc3
-rw-r--r--net/base/filter.cc6
-rw-r--r--net/base/gzip_filter_unittest.cc5
-rw-r--r--net/cert/ev_root_ca_metadata.cc3
-rw-r--r--net/cert/ev_root_ca_metadata_unittest.cc12
-rw-r--r--net/cookies/cookie_monster_unittest.cc1
-rw-r--r--net/disk_cache/simple/simple_index_file.cc3
-rw-r--r--net/disk_cache/simple/simple_version_upgrade_unittest.cc6
-rw-r--r--net/dns/dns_socket_pool.cc14
-rw-r--r--net/dns/host_resolver.cc3
-rw-r--r--net/dns/serial_worker.cc6
-rw-r--r--net/http/transport_security_state_unittest.cc32
-rw-r--r--net/proxy/proxy_config_service_mac.cc2
-rw-r--r--net/proxy/proxy_service.cc2
-rw-r--r--net/quic/crypto/aes_128_gcm_12_decrypter_nss.cc1
-rw-r--r--net/socket/socks5_client_socket.cc1
-rw-r--r--net/socket/tcp_listen_socket_unittest.cc8
-rw-r--r--net/socket/unix_domain_socket_posix_unittest.cc2
-rw-r--r--net/spdy/spdy_websocket_test_util.cc10
-rw-r--r--net/ssl/server_bound_cert_service.cc1
20 files changed, 20 insertions, 101 deletions
diff --git a/net/base/directory_lister.cc b/net/base/directory_lister.cc
index 046be32..e75e9f8 100644
--- a/net/base/directory_lister.cc
+++ b/net/base/directory_lister.cc
@@ -20,8 +20,6 @@ namespace net {
namespace {
-const int kFilesPerEvent = 8;
-
bool IsDotDot(const base::FilePath& path) {
return FILE_PATH_LITERAL("..") == path.BaseName().value();
}
@@ -169,6 +167,7 @@ void DirectoryLister::Core::StartInternal() {
should be done from JS to give more flexibility in the page. When we do
that, we can uncomment this to send incremental updates to the page.
+ const int kFilesPerEvent = 8;
if (file_data.size() < kFilesPerEvent)
continue;
diff --git a/net/base/filter.cc b/net/base/filter.cc
index 36d3014..42313fd 100644
--- a/net/base/filter.cc
+++ b/net/base/filter.cc
@@ -21,17 +21,11 @@ const char kSdch[] = "sdch";
// compress and x-compress are currently not supported. If we decide to support
// them, we'll need the same mime type compatibility hack we have for gzip. For
// more information, see Firefox's nsHttpChannel::ProcessNormal.
-const char kCompress[] = "compress";
-const char kXCompress[] = "x-compress";
-const char kIdentity[] = "identity";
-const char kUncompressed[] = "uncompressed";
// Mime types:
const char kApplicationXGzip[] = "application/x-gzip";
const char kApplicationGzip[] = "application/gzip";
const char kApplicationXGunzip[] = "application/x-gunzip";
-const char kApplicationXCompress[] = "application/x-compress";
-const char kApplicationCompress[] = "application/compress";
const char kTextHtml[] = "text/html";
// Buffer size allocated when de-compressing data.
diff --git a/net/base/gzip_filter_unittest.cc b/net/base/gzip_filter_unittest.cc
index 2ac4a3f..5e14a45 100644
--- a/net/base/gzip_filter_unittest.cc
+++ b/net/base/gzip_filter_unittest.cc
@@ -20,11 +20,6 @@ namespace {
const int kDefaultBufferSize = 4096;
const int kSmallBufferSize = 128;
-const char kApplicationOctetStream[] = "application/octet-stream";
-const char kApplicationXGzip[] = "application/x-gzip";
-const char kApplicationGzip[] = "application/gzip";
-const char kApplicationXGunzip[] = "application/x-gunzip";
-
// The GZIP header (see RFC 1952):
// +---+---+---+---+---+---+---+---+---+---+
// |ID1|ID2|CM |FLG| MTIME |XFL|OS |
diff --git a/net/cert/ev_root_ca_metadata.cc b/net/cert/ev_root_ca_metadata.cc
index 9e611a3..cdea357 100644
--- a/net/cert/ev_root_ca_metadata.cc
+++ b/net/cert/ev_root_ca_metadata.cc
@@ -21,6 +21,7 @@
namespace net {
+#if defined(USE_NSS) || defined(OS_IOS) || defined(OS_WIN)
// Raw metadata.
struct EVMetadata {
// kMaxOIDsPerCA is the number of OIDs that we can support per root CA. At
@@ -389,6 +390,8 @@ static const EVMetadata ev_root_ca_metadata[] = {
}
};
+#endif // defined(USE_NSS) || defined(OS_IOS) || defined(OS_WIN)
+
static base::LazyInstance<EVRootCAMetadata>::Leaky
g_ev_root_ca_metadata = LAZY_INSTANCE_INITIALIZER;
diff --git a/net/cert/ev_root_ca_metadata_unittest.cc b/net/cert/ev_root_ca_metadata_unittest.cc
index 2c845db..1bb5475 100644
--- a/net/cert/ev_root_ca_metadata_unittest.cc
+++ b/net/cert/ev_root_ca_metadata_unittest.cc
@@ -16,17 +16,17 @@ namespace net {
namespace {
-static const char kVerisignPolicy[] = "2.16.840.1.113733.1.7.23.6";
-static const char kThawtePolicy[] = "2.16.840.1.113733.1.7.48.1";
-static const char kFakePolicy[] = "2.16.840.1.42";
-static const SHA1HashValue kVerisignFingerprint =
+#if defined(USE_NSS) || defined(OS_WIN)
+const char kVerisignPolicy[] = "2.16.840.1.113733.1.7.23.6";
+const char kThawtePolicy[] = "2.16.840.1.113733.1.7.48.1";
+const char kFakePolicy[] = "2.16.840.1.42";
+const SHA1HashValue kVerisignFingerprint =
{ { 0x74, 0x2c, 0x31, 0x92, 0xe6, 0x07, 0xe4, 0x24, 0xeb, 0x45,
0x49, 0x54, 0x2b, 0xe1, 0xbb, 0xc5, 0x3e, 0x61, 0x74, 0xe2 } };
-static const SHA1HashValue kFakeFingerprint =
+const SHA1HashValue kFakeFingerprint =
{ { 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, 0x99,
0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, 0x99 } };
-#if defined(USE_NSS) || defined(OS_WIN)
class EVOidData {
public:
EVOidData();
diff --git a/net/cookies/cookie_monster_unittest.cc b/net/cookies/cookie_monster_unittest.cc
index 2bfe9ee..071ed1a 100644
--- a/net/cookies/cookie_monster_unittest.cc
+++ b/net/cookies/cookie_monster_unittest.cc
@@ -89,7 +89,6 @@ struct CookieMonsterTestTraits {
static const bool is_cookie_monster = true;
static const bool supports_http_only = true;
- static const bool supports_cookies_with_info = true;
static const bool supports_non_dotted_domains = true;
static const bool supports_trailing_dots = true;
static const bool filters_schemes = true;
diff --git a/net/disk_cache/simple/simple_index_file.cc b/net/disk_cache/simple/simple_index_file.cc
index c350cdd..5e1e4ba 100644
--- a/net/disk_cache/simple/simple_index_file.cc
+++ b/net/disk_cache/simple/simple_index_file.cc
@@ -30,9 +30,6 @@ const int kEntryFilesSuffixLength = 2;
const uint64 kMaxEntiresInIndex = 100000000;
-const char kIndexFileName[] = "the-real-index";
-const char kTempIndexFileName[] = "temp-index";
-
uint32 CalculatePickleCRC(const Pickle& pickle) {
return crc32(crc32(0, Z_NULL, 0),
reinterpret_cast<const Bytef*>(pickle.payload()),
diff --git a/net/disk_cache/simple/simple_version_upgrade_unittest.cc b/net/disk_cache/simple/simple_version_upgrade_unittest.cc
index c9d42f1..a5493f7 100644
--- a/net/disk_cache/simple/simple_version_upgrade_unittest.cc
+++ b/net/disk_cache/simple/simple_version_upgrade_unittest.cc
@@ -31,12 +31,6 @@ const char kFakeIndexFileName[] = "index";
// Same as |SimpleIndexFile::kIndexFileName|.
const char kIndexFileName[] = "the-real-index";
-// Same as |SimpleIndexFile::kIndexDirectory|.
-const char kIndexDirectory[] = "index-dir";
-
-// Same as |SimpleIndexFile::kTempIndexFileName|.
-const char kTempIndexFileName[] = "temp-index";
-
bool WriteFakeIndexFileV5(const base::FilePath& cache_path) {
disk_cache::FakeIndexData data;
data.version = 5;
diff --git a/net/dns/dns_socket_pool.cc b/net/dns/dns_socket_pool.cc
index 7a7ecd6..b2dd89b 100644
--- a/net/dns/dns_socket_pool.cc
+++ b/net/dns/dns_socket_pool.cc
@@ -21,8 +21,7 @@ namespace {
// When we initialize the SocketPool, we allocate kInitialPoolSize sockets.
// When we allocate a socket, we ensure we have at least kAllocateMinSize
-// sockets to choose from. When we free a socket, we retain it if we have
-// less than kRetainMaxSize sockets in the pool.
+// sockets to choose from. Freed sockets are not retained.
// On Windows, we can't request specific (random) ports, since that will
// trigger firewall prompts, so request default ones, but keep a pile of
@@ -31,12 +30,10 @@ namespace {
const DatagramSocket::BindType kBindType = DatagramSocket::DEFAULT_BIND;
const unsigned kInitialPoolSize = 256;
const unsigned kAllocateMinSize = 256;
-const unsigned kRetainMaxSize = 0;
#else
const DatagramSocket::BindType kBindType = DatagramSocket::RANDOM_BIND;
const unsigned kInitialPoolSize = 0;
const unsigned kAllocateMinSize = 1;
-const unsigned kRetainMaxSize = 0;
#endif
} // namespace
@@ -208,15 +205,6 @@ void DefaultDnsSocketPool::FreeSocket(
unsigned server_index,
scoped_ptr<DatagramClientSocket> socket) {
DCHECK_LT(server_index, pools_.size());
-
- // In some builds, kRetainMaxSize will be 0 if we never reuse sockets.
- // In that case, don't compile this code to avoid a "tautological
- // comparison" warning from clang.
-#if kRetainMaxSize > 0
- SocketVector& pool = pools_[server_index];
- if (pool.size() < kRetainMaxSize)
- pool.push_back(socket.release());
-#endif
}
void DefaultDnsSocketPool::FillPool(unsigned server_index, unsigned size) {
diff --git a/net/dns/host_resolver.cc b/net/dns/host_resolver.cc
index 9b1e331..0435091 100644
--- a/net/dns/host_resolver.cc
+++ b/net/dns/host_resolver.cc
@@ -24,9 +24,6 @@ namespace {
// that limit this to 6, so we're temporarily holding it at that level.
const size_t kDefaultMaxProcTasks = 6u;
-// When configuring from field trial, do not allow
-const size_t kSaneMaxProcTasks = 20u;
-
PrioritizedDispatcher::Limits GetDispatcherLimits(
const HostResolver::Options& options) {
PrioritizedDispatcher::Limits limits(NUM_PRIORITIES,
diff --git a/net/dns/serial_worker.cc b/net/dns/serial_worker.cc
index 394721c..4da7df9 100644
--- a/net/dns/serial_worker.cc
+++ b/net/dns/serial_worker.cc
@@ -11,11 +11,6 @@
namespace net {
-namespace {
- // Delay between calls to WorkerPool::PostTask
- const int kWorkerPoolRetryDelayMs = 100;
-}
-
SerialWorker::SerialWorker()
: message_loop_(base::MessageLoopProxy::current()),
state_(IDLE) {}
@@ -33,6 +28,7 @@ void SerialWorker::WorkNow() {
NOTREACHED() << "WorkerPool::PostTask is not expected to fail on posix";
#else
LOG(WARNING) << "Failed to WorkerPool::PostTask, will retry later";
+ const int kWorkerPoolRetryDelayMs = 100;
message_loop_->PostDelayedTask(
FROM_HERE,
base::Bind(&SerialWorker::RetryWork, this),
diff --git a/net/http/transport_security_state_unittest.cc b/net/http/transport_security_state_unittest.cc
index 936d562..a5d4035 100644
--- a/net/http/transport_security_state_unittest.cc
+++ b/net/http/transport_security_state_unittest.cc
@@ -744,38 +744,6 @@ TEST_F(TransportSecurityStateTest, OverrideBuiltins) {
EXPECT_TRUE(state.GetDomainState("www.google.com", true, &domain_state));
}
-static const uint8 kSidePinLeafSPKI[] = {
- 0x30, 0x5c, 0x30, 0x0d, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01,
- 0x01, 0x01, 0x05, 0x00, 0x03, 0x4b, 0x00, 0x30, 0x48, 0x02, 0x41, 0x00, 0xe4,
- 0x1d, 0xcc, 0xf2, 0x92, 0xe7, 0x7a, 0xc6, 0x36, 0xf7, 0x1a, 0x62, 0x31, 0x7d,
- 0x37, 0xea, 0x0d, 0xa2, 0xa8, 0x12, 0x2b, 0xc2, 0x1c, 0x82, 0x3e, 0xa5, 0x70,
- 0x4a, 0x83, 0x5d, 0x9b, 0x84, 0x82, 0x70, 0xa4, 0x88, 0x98, 0x98, 0x41, 0x29,
- 0x31, 0xcb, 0x6e, 0x2a, 0x54, 0x65, 0x14, 0x60, 0xcc, 0x00, 0xe8, 0x10, 0x30,
- 0x0a, 0x4a, 0xd1, 0xa7, 0x52, 0xfe, 0x2d, 0x31, 0x2a, 0x1d, 0x0d, 0x02, 0x03,
- 0x01, 0x00, 0x01,
-};
-
-static const uint8 kSidePinInfo[] = {
- 0x01, 0x00, 0x53, 0x50, 0x49, 0x4e, 0xa0, 0x00, 0x03, 0x00, 0x53, 0x49, 0x47,
- 0x00, 0x50, 0x55, 0x42, 0x4b, 0x41, 0x4c, 0x47, 0x4f, 0x47, 0x00, 0x41, 0x00,
- 0x04, 0x00, 0x30, 0x45, 0x02, 0x21, 0x00, 0xfb, 0x26, 0xd5, 0xe8, 0x76, 0x35,
- 0x96, 0x6d, 0x91, 0x9b, 0x5b, 0x27, 0xe6, 0x09, 0x1c, 0x7b, 0x6c, 0xcd, 0xc8,
- 0x10, 0x25, 0x95, 0xc0, 0xa5, 0xf6, 0x6c, 0x6f, 0xfb, 0x59, 0x1e, 0x2d, 0xf4,
- 0x02, 0x20, 0x33, 0x0a, 0xf8, 0x8b, 0x3e, 0xc4, 0xca, 0x75, 0x28, 0xdf, 0x5f,
- 0xab, 0xe4, 0x46, 0xa0, 0xdd, 0x2d, 0xe5, 0xad, 0xc3, 0x81, 0x44, 0x70, 0xb2,
- 0x10, 0x87, 0xe8, 0xc3, 0xd6, 0x6e, 0x12, 0x5d, 0x04, 0x67, 0x0b, 0x7d, 0xf2,
- 0x99, 0x75, 0x57, 0x99, 0x3a, 0x98, 0xf8, 0xe4, 0xdf, 0x79, 0xdf, 0x8e, 0x02,
- 0x2c, 0xbe, 0xd8, 0xfd, 0x75, 0x80, 0x18, 0xb1, 0x6f, 0x43, 0xd9, 0x8a, 0x79,
- 0xc3, 0x6e, 0x18, 0xdf, 0x79, 0xc0, 0x59, 0xab, 0xd6, 0x77, 0x37, 0x6a, 0x94,
- 0x5a, 0x7e, 0xfb, 0xa9, 0xc5, 0x54, 0x14, 0x3a, 0x7b, 0x97, 0x17, 0x2a, 0xb6,
- 0x1e, 0x59, 0x4f, 0x2f, 0xb1, 0x15, 0x1a, 0x34, 0x50, 0x32, 0x35, 0x36,
-};
-
-static const uint8 kSidePinExpectedHash[20] = {
- 0xb5, 0x91, 0x66, 0x47, 0x43, 0x16, 0x62, 0x86, 0xd4, 0x1e, 0x5d, 0x36, 0xe1,
- 0xc4, 0x09, 0x3d, 0x2d, 0x1d, 0xea, 0x1e,
-};
-
TEST_F(TransportSecurityStateTest, GooglePinnedProperties) {
EXPECT_FALSE(TransportSecurityState::IsGooglePinnedProperty(
"www.example.com", true));
diff --git a/net/proxy/proxy_config_service_mac.cc b/net/proxy/proxy_config_service_mac.cc
index c1bc533..8c2f55e 100644
--- a/net/proxy/proxy_config_service_mac.cc
+++ b/net/proxy/proxy_config_service_mac.cc
@@ -22,8 +22,6 @@ namespace net {
namespace {
-const int kPollIntervalSec = 5;
-
// Utility function to pull out a boolean value from a dictionary and return it,
// returning a default value if the key is not present.
bool GetBoolFromDictionary(CFDictionaryRef dict,
diff --git a/net/proxy/proxy_service.cc b/net/proxy/proxy_service.cc
index 33bbd49..e3b13e3 100644
--- a/net/proxy/proxy_service.cc
+++ b/net/proxy/proxy_service.cc
@@ -52,8 +52,6 @@ namespace net {
namespace {
-const size_t kMaxNumNetLogEntries = 100;
-
// When the IP address changes we don't immediately re-run proxy auto-config.
// Instead, we wait for |kDelayAfterNetworkChangesMs| before
// attempting to re-valuate proxy auto-config.
diff --git a/net/quic/crypto/aes_128_gcm_12_decrypter_nss.cc b/net/quic/crypto/aes_128_gcm_12_decrypter_nss.cc
index e3fc1b6..98e19d7 100644
--- a/net/quic/crypto/aes_128_gcm_12_decrypter_nss.cc
+++ b/net/quic/crypto/aes_128_gcm_12_decrypter_nss.cc
@@ -104,7 +104,6 @@ CK_MECHANISM_TYPE GcmSupportChecker::aes_key_mechanism_ = CKM_AES_GCM;
base::LazyInstance<GcmSupportChecker>::Leaky g_gcm_support_checker =
LAZY_INSTANCE_INITIALIZER;
-const size_t kKeySize = 16;
const size_t kNoncePrefixSize = 4;
const size_t kAESNonceSize = 12;
diff --git a/net/socket/socks5_client_socket.cc b/net/socket/socks5_client_socket.cc
index 537b584..004b67c 100644
--- a/net/socket/socks5_client_socket.cc
+++ b/net/socket/socks5_client_socket.cc
@@ -254,7 +254,6 @@ int SOCKS5ClientSocket::DoLoop(int last_io_result) {
}
const char kSOCKS5GreetWriteData[] = { 0x05, 0x01, 0x00 }; // no authentication
-const char kSOCKS5GreetReadData[] = { 0x05, 0x00 };
int SOCKS5ClientSocket::DoGreetWrite() {
// Since we only have 1 byte to send the hostname length in, if the
diff --git a/net/socket/tcp_listen_socket_unittest.cc b/net/socket/tcp_listen_socket_unittest.cc
index b122c61..2410677 100644
--- a/net/socket/tcp_listen_socket_unittest.cc
+++ b/net/socket/tcp_listen_socket_unittest.cc
@@ -18,11 +18,9 @@
namespace net {
-static const int kReadBufSize = 1024;
-static const char kHelloWorld[] = "HELLO, WORLD";
-static const int kMaxQueueSize = 20;
-static const char kLoopback[] = "127.0.0.1";
-static const int kDefaultTimeoutMs = 5000;
+const int kReadBufSize = 1024;
+const char kHelloWorld[] = "HELLO, WORLD";
+const char kLoopback[] = "127.0.0.1";
TCPListenSocketTester::TCPListenSocketTester()
: loop_(NULL),
diff --git a/net/socket/unix_domain_socket_posix_unittest.cc b/net/socket/unix_domain_socket_posix_unittest.cc
index f062d27..f63d60a 100644
--- a/net/socket/unix_domain_socket_posix_unittest.cc
+++ b/net/socket/unix_domain_socket_posix_unittest.cc
@@ -40,7 +40,6 @@ namespace net {
namespace {
const char kSocketFilename[] = "unix_domain_socket_for_testing";
-const char kFallbackSocketName[] = "unix_domain_socket_for_testing_2";
const char kInvalidSocketPath[] = "/invalid/path";
const char kMsg[] = "hello";
@@ -275,6 +274,7 @@ TEST_F(UnixDomainSocketTest, TestFallbackName) {
file_path_.value(), "", socket_delegate_.get(), MakeAuthCallback());
EXPECT_TRUE(socket_.get() == NULL);
// Now with a fallback name.
+ const char kFallbackSocketName[] = "unix_domain_socket_for_testing_2";
socket_ = UnixDomainSocket::CreateAndListenWithAbstractNamespace(
file_path_.value(),
MakeSocketPath(kFallbackSocketName),
diff --git a/net/spdy/spdy_websocket_test_util.cc b/net/spdy/spdy_websocket_test_util.cc
index 0872e3f..4c3f7df 100644
--- a/net/spdy/spdy_websocket_test_util.cc
+++ b/net/spdy/spdy_websocket_test_util.cc
@@ -9,12 +9,10 @@
namespace net {
-static const int kDefaultAssociatedStreamId = 0;
-static const bool kDefaultCompressed = false;
-static const char* const kDefaultDataPointer = NULL;
-static const uint32 kDefaultDataLength = 0;
-static const char** const kDefaultExtraHeaders = NULL;
-static const int kDefaultExtraHeaderCount = 0;
+const int kDefaultAssociatedStreamId = 0;
+const bool kDefaultCompressed = false;
+const char* const kDefaultDataPointer = NULL;
+const uint32 kDefaultDataLength = 0;
SpdyWebSocketTestUtil::SpdyWebSocketTestUtil(
NextProto protocol) : spdy_util_(protocol) {}
diff --git a/net/ssl/server_bound_cert_service.cc b/net/ssl/server_bound_cert_service.cc
index 2bbcbc7..baed056 100644
--- a/net/ssl/server_bound_cert_service.cc
+++ b/net/ssl/server_bound_cert_service.cc
@@ -35,7 +35,6 @@ namespace net {
namespace {
-const int kKeySizeInBits = 1024;
const int kValidityPeriodInDays = 365;
// When we check the system time, we add this many days to the end of the check
// so the result will still hold even after chrome has been running for a