diff options
author | thakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-09-25 20:09:00 +0000 |
---|---|---|
committer | thakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-09-25 20:09:00 +0000 |
commit | 2bf5a6a82f3ac8adbf25f57f0f3f7f2648842c2f (patch) | |
tree | 3a5778fb416aa101303b06bc73a96b63b87f779f | |
parent | 5d4c422a0fbbc4393b4e816d4f0f3b6472cd0377 (diff) | |
download | chromium_src-2bf5a6a82f3ac8adbf25f57f0f3f7f2648842c2f.zip chromium_src-2bf5a6a82f3ac8adbf25f57f0f3f7f2648842c2f.tar.gz chromium_src-2bf5a6a82f3ac8adbf25f57f0f3f7f2648842c2f.tar.bz2 |
Clean up a few unused globals.
Found by clang's new -Wunused-const-variable.
BUG=290204
R=akalin@chromium.org, brettw@chromium.org, sergeyu@chromium.org, thestig@chromium.org
Review URL: https://codereview.chromium.org/24616002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@225235 0039d316-1c4b-4281-b951-d872f2087c98
35 files changed, 30 insertions, 279 deletions
diff --git a/base/file_util.cc b/base/file_util.cc index e980676..308b150 100644 --- a/base/file_util.cc +++ b/base/file_util.cc @@ -23,8 +23,6 @@ namespace base { namespace { -const FilePath::CharType kExtensionSeparator = FILE_PATH_LITERAL('.'); - // The maximum number of 'uniquified' files we will try to create. // This is used when the filename we're trying to download is already in use, // so we create a new unique filename by appending " (nnn)" before the @@ -157,7 +155,6 @@ namespace file_util { using base::FileEnumerator; using base::FilePath; -using base::kExtensionSeparator; using base::kMaxUniqueFiles; bool IsDirectoryEmpty(const FilePath& dir_path) { diff --git a/base/file_util_unittest.cc b/base/file_util_unittest.cc index 787b6d5..1ca70b4 100644 --- a/base/file_util_unittest.cc +++ b/base/file_util_unittest.cc @@ -244,108 +244,6 @@ uint64 FileTimeAsUint64(const FILETIME& ft) { } #endif -const struct append_case { - const wchar_t* path; - const wchar_t* ending; - const wchar_t* result; -} append_cases[] = { -#if defined(OS_WIN) - {L"c:\\colon\\backslash", L"path", L"c:\\colon\\backslash\\path"}, - {L"c:\\colon\\backslash\\", L"path", L"c:\\colon\\backslash\\path"}, - {L"c:\\colon\\backslash\\\\", L"path", L"c:\\colon\\backslash\\\\path"}, - {L"c:\\colon\\backslash\\", L"", L"c:\\colon\\backslash\\"}, - {L"c:\\colon\\backslash", L"", L"c:\\colon\\backslash\\"}, - {L"", L"path", L"\\path"}, - {L"", L"", L"\\"}, -#elif defined(OS_POSIX) - {L"/foo/bar", L"path", L"/foo/bar/path"}, - {L"/foo/bar/", L"path", L"/foo/bar/path"}, - {L"/foo/bar//", L"path", L"/foo/bar//path"}, - {L"/foo/bar/", L"", L"/foo/bar/"}, - {L"/foo/bar", L"", L"/foo/bar/"}, - {L"", L"path", L"/path"}, - {L"", L"", L"/"}, -#endif -}; - -static const struct filename_case { - const wchar_t* path; - const wchar_t* filename; -} filename_cases[] = { -#if defined(OS_WIN) - {L"c:\\colon\\backslash", L"backslash"}, - {L"c:\\colon\\backslash\\", L""}, - {L"\\\\filename.exe", L"filename.exe"}, - {L"filename.exe", L"filename.exe"}, - {L"", L""}, - {L"\\\\\\", L""}, - {L"c:/colon/backslash", L"backslash"}, - {L"c:/colon/backslash/", L""}, - {L"//////", L""}, - {L"///filename.exe", L"filename.exe"}, -#elif defined(OS_POSIX) - {L"/foo/bar", L"bar"}, - {L"/foo/bar/", L""}, - {L"/filename.exe", L"filename.exe"}, - {L"filename.exe", L"filename.exe"}, - {L"", L""}, - {L"/", L""}, -#endif -}; - -// Test finding the file type from a path name -static const struct extension_case { - const wchar_t* path; - const wchar_t* extension; -} extension_cases[] = { -#if defined(OS_WIN) - {L"C:\\colon\\backslash\\filename.extension", L"extension"}, - {L"C:\\colon\\backslash\\filename.", L""}, - {L"C:\\colon\\backslash\\filename", L""}, - {L"C:\\colon\\backslash\\", L""}, - {L"C:\\colon\\backslash.\\", L""}, - {L"C:\\colon\\backslash\filename.extension.extension2", L"extension2"}, -#elif defined(OS_POSIX) - {L"/foo/bar/filename.extension", L"extension"}, - {L"/foo/bar/filename.", L""}, - {L"/foo/bar/filename", L""}, - {L"/foo/bar/", L""}, - {L"/foo/bar./", L""}, - {L"/foo/bar/filename.extension.extension2", L"extension2"}, - {L".", L""}, - {L"..", L""}, - {L"./foo", L""}, - {L"./foo.extension", L"extension"}, - {L"/foo.extension1/bar.extension2", L"extension2"}, -#endif -}; - -// Test finding the directory component of a path -static const struct dir_case { - const wchar_t* full_path; - const wchar_t* directory; -} dir_cases[] = { -#if defined(OS_WIN) - {L"C:\\WINDOWS\\system32\\gdi32.dll", L"C:\\WINDOWS\\system32"}, - {L"C:\\WINDOWS\\system32\\not_exist_thx_1138", L"C:\\WINDOWS\\system32"}, - {L"C:\\WINDOWS\\system32\\", L"C:\\WINDOWS\\system32"}, - {L"C:\\WINDOWS\\system32\\\\", L"C:\\WINDOWS\\system32"}, - {L"C:\\WINDOWS\\system32", L"C:\\WINDOWS"}, - {L"C:\\WINDOWS\\system32.\\", L"C:\\WINDOWS\\system32."}, - {L"C:\\", L"C:\\"}, -#elif defined(OS_POSIX) - {L"/foo/bar/gdi32.dll", L"/foo/bar"}, - {L"/foo/bar/not_exist_thx_1138", L"/foo/bar"}, - {L"/foo/bar/", L"/foo/bar"}, - {L"/foo/bar//", L"/foo/bar"}, - {L"/foo/bar", L"/foo"}, - {L"/foo/bar./", L"/foo/bar."}, - {L"/", L"/"}, - {L".", L"."}, - {L"..", L"."}, // yes, ".." technically lives in "." -#endif -}; - TEST_F(FileUtilTest, FileAndDirectorySize) { // Create three files of 20, 30 and 3 chars (utf8). ComputeDirectorySize // should return 53 bytes. diff --git a/base/memory/shared_memory_posix.cc b/base/memory/shared_memory_posix.cc index e6745ea..efb0caf 100644 --- a/base/memory/shared_memory_posix.cc +++ b/base/memory/shared_memory_posix.cc @@ -34,10 +34,6 @@ namespace base { namespace { -// Paranoia. Semaphores and shared memory segments should live in different -// namespaces, but who knows what's out there. -const char kSemaphoreSuffix[] = "-sem"; - LazyInstance<Lock>::Leaky g_thread_lock_ = LAZY_INSTANCE_INITIALIZER; } diff --git a/base/message_loop/message_loop_unittest.cc b/base/message_loop/message_loop_unittest.cc index ab05b3c..bd464fa 100644 --- a/base/message_loop/message_loop_unittest.cc +++ b/base/message_loop/message_loop_unittest.cc @@ -609,7 +609,9 @@ void RunTest_Nesting(MessageLoop::Type message_loop_type) { EXPECT_EQ(depth, 0); } -const wchar_t* const kMessageBoxTitle = L"MessageLoop Unit Test"; +#if defined(OS_WIN) +const wchar_t kMessageBoxTitle[] = L"MessageLoop Unit Test"; +#endif // defined(OS_WIN) enum TaskType { MESSAGEBOX, diff --git a/base/process/process_util_unittest.cc b/base/process/process_util_unittest.cc index 44be9f4..3e723a3 100644 --- a/base/process/process_util_unittest.cc +++ b/base/process/process_util_unittest.cc @@ -54,12 +54,6 @@ using base::FilePath; namespace { -#if defined(OS_WIN) -const wchar_t kProcessName[] = L"base_unittests.exe"; -#else -const wchar_t kProcessName[] = L"base_unittests"; -#endif // defined(OS_WIN) - #if defined(OS_ANDROID) const char kShellPath[] = "/system/bin/sh"; const char kPosixShell[] = "sh"; @@ -69,7 +63,6 @@ const char kPosixShell[] = "bash"; #endif const char kSignalFileSlow[] = "SlowChildProcess.die"; -const char kSignalFileCrash[] = "CrashingChildProcess.die"; const char kSignalFileKill[] = "KilledChildProcess.die"; #if defined(OS_WIN) @@ -221,6 +214,7 @@ TEST_F(ProcessUtilTest, GetProcId) { // TODO(gspencer): turn this test process into a very small program // with no symbols (instead of using the multiprocess testing // framework) to reduce the ReportCrash overhead. +const char kSignalFileCrash[] = "CrashingChildProcess.die"; MULTIPROCESS_TEST_MAIN(CrashingChildProcess) { WaitToDie(ProcessUtilTest::GetSignalFilePath(kSignalFileCrash).c_str()); diff --git a/base/test/test_launcher.cc b/base/test/test_launcher.cc index 053bdbf..23fe904 100644 --- a/base/test/test_launcher.cc +++ b/base/test/test_launcher.cc @@ -564,8 +564,6 @@ const char kGTestRepeatFlag[] = "gtest_repeat"; const char kGTestRunDisabledTestsFlag[] = "gtest_also_run_disabled_tests"; const char kGTestOutputFlag[] = "gtest_output"; -const char kHelpFlag[] = "help"; - TestResult::TestResult() : status(TEST_UNKNOWN) { } diff --git a/base/time/time_mac.cc b/base/time/time_mac.cc index da46aa7..d5b6a00 100644 --- a/base/time/time_mac.cc +++ b/base/time/time_mac.cc @@ -85,8 +85,6 @@ namespace base { // irb(main):011:0> Time.at(-11644473600).getutc() // => Mon Jan 01 00:00:00 UTC 1601 static const int64 kWindowsEpochDeltaSeconds = GG_INT64_C(11644473600); -static const int64 kWindowsEpochDeltaMilliseconds = - kWindowsEpochDeltaSeconds * Time::kMillisecondsPerSecond; // static const int64 Time::kWindowsEpochDeltaMicroseconds = diff --git a/chrome/common/chrome_paths.cc b/chrome/common/chrome_paths.cc index 4f6314a..4238481 100644 --- a/chrome/common/chrome_paths.cc +++ b/chrome/common/chrome_paths.cc @@ -64,16 +64,10 @@ const base::FilePath::CharType kInternalNaClPluginFileName[] = FILE_PATH_LITERAL("libppGoogleNaClPluginChrome.so"); #endif +#if defined(OS_POSIX) && !defined(OS_MACOSX) + const base::FilePath::CharType kEffectsPluginFileName[] = -#if defined(OS_WIN) - FILE_PATH_LITERAL("pepper/libppeffects.dll"); -#elif defined(OS_MACOSX) - FILE_PATH_LITERAL("pepper/libppeffects.plugin"); -#else // Linux and Chrome OS FILE_PATH_LITERAL("pepper/libppeffects.so"); -#endif - -#if defined(OS_POSIX) && !defined(OS_MACOSX) const base::FilePath::CharType kO3DPluginFileName[] = FILE_PATH_LITERAL("pepper/libppo3dautoplugin.so"); diff --git a/chrome/common/chrome_switches.cc b/chrome/common/chrome_switches.cc index 6a735be..2a6f133 100644 --- a/chrome/common/chrome_switches.cc +++ b/chrome/common/chrome_switches.cc @@ -1134,8 +1134,10 @@ const char kPrerenderModeSwitchValueEnabled[] = "enabled"; // prefetch_only: No prerendering, but enables prefetching. const char kPrerenderModeSwitchValuePrefetchOnly[] = "prefetch_only"; +#if defined(OS_WIN) // Enable conversion from vector to raster for any page. const char kPrintRaster[] = "print-raster"; +#endif // Use IPv6 only for privet HTTP. const char kPrivetIPv6Only[] = "privet-ipv6-only"; diff --git a/chrome/common/pref_names.cc b/chrome/common/pref_names.cc index 1bb269b..1ff7bde 100644 --- a/chrome/common/pref_names.cc +++ b/chrome/common/pref_names.cc @@ -1703,33 +1703,6 @@ const char kNtpPromoDesktopSessionFound[] = "ntp.promo_desktop_session_found"; // Boolean indicating whether the web store is active for the current locale. const char kNtpWebStoreEnabled[] = "ntp.webstore_enabled"; -// The id of the last web store promo actually displayed on the NTP. -const char kNtpWebStorePromoLastId[] = "ntp.webstore_last_promo_id"; - -// The id of the current web store promo. -const char kNtpWebStorePromoId[] = "ntp.webstorepromo.id"; - -// The header line for the NTP web store promo. -const char kNtpWebStorePromoHeader[] = "ntp.webstorepromo.header"; - -// The button text for the NTP web store promo. -const char kNtpWebStorePromoButton[] = "ntp.webstorepromo.button"; - -// The button link for the NTP web store promo. -const char kNtpWebStorePromoLink[] = "ntp.webstorepromo.link"; - -// The image URL for the NTP web store promo logo. -const char kNtpWebStorePromoLogo[] = "ntp.webstorepromo.logo"; - -// The original URL for the NTP web store promo logo. -const char kNtpWebStorePromoLogoSource[] = "ntp.webstorepromo.logo_source"; - -// The "hide this" link text for the NTP web store promo. -const char kNtpWebStorePromoExpire[] = "ntp.webstorepromo.expire"; - -// Specifies what users should maximize the NTP web store promo. -const char kNtpWebStorePromoUserGroup[] = "ntp.webstorepromo.usergroup"; - // Customized app page names that appear on the New Tab Page. const char kNtpAppPageNames[] = "ntp.app_page_names"; diff --git a/chrome/installer/gcapi_mac/gcapi.mm b/chrome/installer/gcapi_mac/gcapi.mm index b5852bb..1ca5839 100644 --- a/chrome/installer/gcapi_mac/gcapi.mm +++ b/chrome/installer/gcapi_mac/gcapi.mm @@ -34,9 +34,6 @@ NSString* const kUserMasterPrefsPath = @"~~/Library/Application Support/Google/Chrome/" "Google Chrome Master Preferences"; -NSString* const kChannelKey = @"KSChannelID"; -NSString* const kVersionKey = @"KSVersion"; - // Condensed from chromium's base/mac/mac_util.mm. bool IsOSXVersionSupported() { // On 10.6, Gestalt() was observed to be able to spawn threads (see diff --git a/content/test/plugin/plugin_get_javascript_url2_test.cc b/content/test/plugin/plugin_get_javascript_url2_test.cc index a3c7c1a..e9ab445 100644 --- a/content/test/plugin/plugin_get_javascript_url2_test.cc +++ b/content/test/plugin/plugin_get_javascript_url2_test.cc @@ -11,15 +11,9 @@ // The identifier for the self url stream. #define SELF_URL_STREAM_ID 1 -// The identifier for the fetched url stream. -#define FETCHED_URL_STREAM_ID 2 - // The maximum chunk size of stream data. #define STREAM_CHUNK 197 -const int kNPNEvaluateTimerID = 100; -const int kNPNEvaluateTimerElapse = 50; - namespace NPAPIClient { ExecuteGetJavascriptUrl2Test::ExecuteGetJavascriptUrl2Test( diff --git a/content/test/plugin/plugin_get_javascript_url_test.cc b/content/test/plugin/plugin_get_javascript_url_test.cc index 185ce0f..a2f6985 100644 --- a/content/test/plugin/plugin_get_javascript_url_test.cc +++ b/content/test/plugin/plugin_get_javascript_url_test.cc @@ -12,15 +12,13 @@ // The identifier for the self url stream. #define SELF_URL_STREAM_ID 1 -// The identifier for the fetched url stream. -#define FETCHED_URL_STREAM_ID 2 - // The maximum chunk size of stream data. #define STREAM_CHUNK 197 +#if defined(OS_WIN) const int kNPNEvaluateTimerID = 100; const int kNPNEvaluateTimerElapse = 50; - +#endif namespace NPAPIClient { 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 diff --git a/ppapi/native_client/src/trusted/plugin/plugin.cc b/ppapi/native_client/src/trusted/plugin/plugin.cc index 2aa90be..8fb4c43 100644 --- a/ppapi/native_client/src/trusted/plugin/plugin.cc +++ b/ppapi/native_client/src/trusted/plugin/plugin.cc @@ -92,9 +92,6 @@ const char* const kDevAttribute = "@dev"; const char* const kChromeExtensionUriScheme = "chrome-extension"; const char* const kDataUriScheme = "data"; -// The key used to find the dictionary nexe URLs in the manifest file. -const char* const kNexesKey = "nexes"; - // Up to 20 seconds const int64_t kTimeSmallMin = 1; // in ms const int64_t kTimeSmallMax = 20000; // in ms @@ -263,8 +260,6 @@ void HistogramHTTPStatusCode(const std::string& name, int status) { } // namespace -static int const kAbiHeaderBuffer = 256; // must be at least EI_ABIVERSION + 1 - void Plugin::AddPropertyGet(const nacl::string& prop_name, Plugin::PropertyGetter getter) { PLUGIN_PRINTF(("Plugin::AddPropertyGet (prop_name='%s')\n", diff --git a/remoting/host/constants_mac.cc b/remoting/host/constants_mac.cc index 3b48ca0..7491414 100644 --- a/remoting/host/constants_mac.cc +++ b/remoting/host/constants_mac.cc @@ -17,10 +17,6 @@ namespace remoting { const char kServiceName[] = SERVICE_NAME; -const char kUpdateSucceededNotificationName[] = - SERVICE_NAME ".update_succeeded"; -const char kUpdateFailedNotificationName[] = SERVICE_NAME ".update_failed"; - const char kPrefPaneFileName[] = SERVICE_NAME ".prefPane"; const char kPrefPaneFilePath[] = PREFERENCE_PANES_DIR SERVICE_NAME ".prefPane"; |