diff options
author | tony@chromium.org <tony@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-28 21:03:17 +0000 |
---|---|---|
committer | tony@chromium.org <tony@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-28 21:03:17 +0000 |
commit | 5a3b9149085f033097663a63c90e152051fd6c56 (patch) | |
tree | 4e0ed4ceabd2ce7b7fd7ed2c9168f7641c5ad8f3 /net/base | |
parent | c5874079454b61b597de2258c4256d5008183b1a (diff) | |
download | chromium_src-5a3b9149085f033097663a63c90e152051fd6c56.zip chromium_src-5a3b9149085f033097663a63c90e152051fd6c56.tar.gz chromium_src-5a3b9149085f033097663a63c90e152051fd6c56.tar.bz2 |
Revert "Fix a ton of compiler warnings."
This reverts commit r24792.
TBR=estade
Review URL: http://codereview.chromium.org/179028
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24796 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/base')
-rw-r--r-- | net/base/directory_lister.cc | 6 | ||||
-rw-r--r-- | net/base/directory_lister.h | 11 | ||||
-rw-r--r-- | net/base/host_cache_unittest.cc | 22 | ||||
-rw-r--r-- | net/base/ssl_client_auth_cache_unittest.cc | 6 |
4 files changed, 21 insertions, 24 deletions
diff --git a/net/base/directory_lister.cc b/net/base/directory_lister.cc index 69e301e..616fc82 100644 --- a/net/base/directory_lister.cc +++ b/net/base/directory_lister.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. +// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -37,7 +37,7 @@ DirectoryLister::DirectoryLister(const FilePath& dir, : dir_(dir), delegate_(delegate), message_loop_(NULL), - thread_(0), + thread_(NULL), canceled_(false) { DCHECK(!dir.value().empty()); } @@ -70,7 +70,7 @@ void DirectoryLister::Cancel() { if (thread_) { PlatformThread::Join(thread_); - thread_ = 0; + thread_ = NULL; } } diff --git a/net/base/directory_lister.h b/net/base/directory_lister.h index 58c2cd3..cb98da6 100644 --- a/net/base/directory_lister.h +++ b/net/base/directory_lister.h @@ -1,9 +1,9 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. +// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef NET_BASE_DIRECTORY_LISTER_H_ -#define NET_BASE_DIRECTORY_LISTER_H_ +#ifndef NET_BASE_DIRECTORY_LISTER_H__ +#define NET_BASE_DIRECTORY_LISTER_H__ #include <string> @@ -32,9 +32,6 @@ class DirectoryLister : public base::RefCountedThreadSafe<DirectoryLister>, virtual void OnListFile( const file_util::FileEnumerator::FindInfo& data) = 0; virtual void OnListDone(int error) = 0; - - protected: - ~DirectoryListerDelegate() {} }; DirectoryLister(const FilePath& dir, DirectoryListerDelegate* delegate); @@ -71,4 +68,4 @@ class DirectoryLister : public base::RefCountedThreadSafe<DirectoryLister>, } // namespace net -#endif // NET_BASE_DIRECTORY_LISTER_H_ +#endif // NET_BASE_DIRECTORY_LISTER_H__ diff --git a/net/base/host_cache_unittest.cc b/net/base/host_cache_unittest.cc index bfb1860..fe01e20 100644 --- a/net/base/host_cache_unittest.cc +++ b/net/base/host_cache_unittest.cc @@ -28,7 +28,7 @@ TEST(HostCacheTest, Basic) { EXPECT_EQ(0U, cache.size()); // Add an entry for "foobar.com" at t=0. - EXPECT_TRUE(NULL == cache.Lookup("foobar.com", base::TimeTicks())); + EXPECT_EQ(NULL, cache.Lookup("foobar.com", base::TimeTicks())); cache.Set("foobar.com", OK, AddressList(), now); entry1 = cache.Lookup("foobar.com", base::TimeTicks()); EXPECT_FALSE(NULL == entry1); @@ -38,7 +38,7 @@ TEST(HostCacheTest, Basic) { now += base::TimeDelta::FromSeconds(5); // Add an entry for "foobar2.com" at t=5. - EXPECT_TRUE(NULL == cache.Lookup("foobar2.com", base::TimeTicks())); + EXPECT_EQ(NULL, cache.Lookup("foobar2.com", base::TimeTicks())); cache.Set("foobar2.com", OK, AddressList(), now); entry2 = cache.Lookup("foobar2.com", base::TimeTicks()); EXPECT_FALSE(NULL == entry1); @@ -54,7 +54,7 @@ TEST(HostCacheTest, Basic) { // Advance to t=10; entry1 is now expired. now += base::TimeDelta::FromSeconds(1); - EXPECT_TRUE(NULL == cache.Lookup("foobar.com", now)); + EXPECT_EQ(NULL, cache.Lookup("foobar.com", now)); EXPECT_EQ(entry2, cache.Lookup("foobar2.com", now)); // Update entry1, so it is no longer expired. @@ -70,8 +70,8 @@ TEST(HostCacheTest, Basic) { // Advance to t=20; both entries are now expired. now += base::TimeDelta::FromSeconds(10); - EXPECT_TRUE(NULL == cache.Lookup("foobar.com", now)); - EXPECT_TRUE(NULL == cache.Lookup("foobar2.com", now)); + EXPECT_EQ(NULL, cache.Lookup("foobar.com", now)); + EXPECT_EQ(NULL, cache.Lookup("foobar2.com", now)); } // Try caching entries for a failed resolve attempt. @@ -81,19 +81,19 @@ TEST(HostCacheTest, NegativeEntry) { // Set t=0. base::TimeTicks now; - EXPECT_TRUE(NULL == cache.Lookup("foobar.com", base::TimeTicks())); + EXPECT_EQ(NULL, cache.Lookup("foobar.com", base::TimeTicks())); cache.Set("foobar.com", ERR_NAME_NOT_RESOLVED, AddressList(), now); EXPECT_EQ(1U, cache.size()); // We disallow use of negative entries. - EXPECT_TRUE(NULL == cache.Lookup("foobar.com", now)); + EXPECT_EQ(NULL, cache.Lookup("foobar.com", now)); // Now overwrite with a valid entry, and then overwrite with negative entry // again -- the valid entry should be kicked out. cache.Set("foobar.com", OK, AddressList(), now); EXPECT_FALSE(NULL == cache.Lookup("foobar.com", now)); cache.Set("foobar.com", ERR_NAME_NOT_RESOLVED, AddressList(), now); - EXPECT_TRUE(NULL == cache.Lookup("foobar.com", now)); + EXPECT_EQ(NULL, cache.Lookup("foobar.com", now)); } TEST(HostCacheTest, Compact) { @@ -185,7 +185,7 @@ TEST(HostCacheTest, SetWithCompact) { // Adding the fourth entry will cause "expired" to be evicted. cache.Set("host3", OK, AddressList(), now); EXPECT_EQ(3U, cache.size()); - EXPECT_TRUE(NULL == cache.Lookup("expired", now)); + EXPECT_EQ(NULL, cache.Lookup("expired", now)); EXPECT_FALSE(NULL == cache.Lookup("host1", now)); EXPECT_FALSE(NULL == cache.Lookup("host2", now)); EXPECT_FALSE(NULL == cache.Lookup("host3", now)); @@ -208,9 +208,9 @@ TEST(HostCacheTest, NoCache) { base::TimeTicks now; // Lookup and Set should have no effect. - EXPECT_TRUE(NULL == cache.Lookup("foobar.com", base::TimeTicks())); + EXPECT_EQ(NULL, cache.Lookup("foobar.com", base::TimeTicks())); cache.Set("foobar.com", OK, AddressList(), now); - EXPECT_TRUE(NULL == cache.Lookup("foobar.com", base::TimeTicks())); + EXPECT_EQ(NULL, cache.Lookup("foobar.com", base::TimeTicks())); EXPECT_EQ(0U, cache.size()); } diff --git a/net/base/ssl_client_auth_cache_unittest.cc b/net/base/ssl_client_auth_cache_unittest.cc index c0697fc..33eb25f 100644 --- a/net/base/ssl_client_auth_cache_unittest.cc +++ b/net/base/ssl_client_auth_cache_unittest.cc @@ -28,7 +28,7 @@ TEST(SSLClientAuthCacheTest, LookupAddRemove) { new X509Certificate("foo3", "CA", start_date, expiration_date)); // Lookup non-existent client certificate. - EXPECT_TRUE(NULL == cache.Lookup(server1)); + EXPECT_EQ(NULL, cache.Lookup(server1)); // Add client certificate for server1. cache.Add(server1, cert1.get()); @@ -46,12 +46,12 @@ TEST(SSLClientAuthCacheTest, LookupAddRemove) { // Remove client certificate of server1. cache.Remove(server1); - EXPECT_TRUE(NULL == cache.Lookup(server1)); + EXPECT_EQ(NULL, cache.Lookup(server1)); EXPECT_EQ(cert2.get(), cache.Lookup(server2)); // Remove non-existent client certificate. cache.Remove(server1); - EXPECT_TRUE(NULL == cache.Lookup(server1)); + EXPECT_EQ(NULL, cache.Lookup(server1)); EXPECT_EQ(cert2.get(), cache.Lookup(server2)); } |