summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--net/base/address_list.cc4
-rw-r--r--net/base/auth.h4
-rw-r--r--net/base/bzip2_filter.cc2
-rw-r--r--net/base/escape.cc6
-rw-r--r--net/base/gzip_filter.cc4
-rw-r--r--net/base/gzip_header.cc6
-rw-r--r--net/base/net_errors.h2
7 files changed, 13 insertions, 15 deletions
diff --git a/net/base/address_list.cc b/net/base/address_list.cc
index f365fb6..6ba6450 100644
--- a/net/base/address_list.cc
+++ b/net/base/address_list.cc
@@ -29,8 +29,12 @@
#include "net/base/address_list.h"
+#ifdef OS_WIN
#include <ws2tcpip.h>
#include <wspiapi.h> // Needed for Win2k compat.
+#else
+#include <netdb.h>
+#endif
namespace net {
diff --git a/net/base/auth.h b/net/base/auth.h
index 2cff79d..dedd282 100644
--- a/net/base/auth.h
+++ b/net/base/auth.h
@@ -48,7 +48,7 @@ class AuthChallengeInfo :
std::wstring realm; // the realm provided by the server, if there is one.
private:
- friend base::RefCountedThreadSafe<AuthChallengeInfo>;
+ friend class base::RefCountedThreadSafe<AuthChallengeInfo>;
~AuthChallengeInfo() {}
};
@@ -71,7 +71,7 @@ class AuthData : public base::RefCountedThreadSafe<AuthData> {
AuthData() : state(AUTH_STATE_NEED_AUTH) {}
private:
- friend base::RefCountedThreadSafe<AuthData>;
+ friend class base::RefCountedThreadSafe<AuthData>;
~AuthData() {}
};
diff --git a/net/base/bzip2_filter.cc b/net/base/bzip2_filter.cc
index 4ebcba6..cec85b8 100644
--- a/net/base/bzip2_filter.cc
+++ b/net/base/bzip2_filter.cc
@@ -27,8 +27,6 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#include <minmax.h>
-
#include "base/logging.h"
#include "net/base/bzip2_filter.h"
diff --git a/net/base/escape.cc b/net/base/escape.cc
index 330a3ed..b13bb9d 100644
--- a/net/base/escape.cc
+++ b/net/base/escape.cc
@@ -270,7 +270,7 @@ void AppendEscapedCharForHTMLImpl(typename str::value_type c, str* output) {
{ '\'', "&#39;" },
};
size_t k;
- for (k = 0; k < arraysize(kCharsToEscape); ++k) {
+ for (k = 0; k < ARRAYSIZE_UNSAFE(kCharsToEscape); ++k) {
if (c == kCharsToEscape[k].key) {
const char* p = kCharsToEscape[k].replacement;
while (*p)
@@ -278,7 +278,7 @@ void AppendEscapedCharForHTMLImpl(typename str::value_type c, str* output) {
break;
}
}
- if (k == arraysize(kCharsToEscape))
+ if (k == ARRAYSIZE_UNSAFE(kCharsToEscape))
output->push_back(c);
}
@@ -295,7 +295,7 @@ str EscapeForHTMLImpl(const str& input) {
str result;
result.reserve(input.size()); // optimize for no escaping
- for (str::const_iterator it = input.begin(); it != input.end(); ++it)
+ for (typename str::const_iterator it = input.begin(); it != input.end(); ++it)
AppendEscapedCharForHTMLImpl(*it, &result);
return result;
diff --git a/net/base/gzip_filter.cc b/net/base/gzip_filter.cc
index 6c009ac..b01e3e8 100644
--- a/net/base/gzip_filter.cc
+++ b/net/base/gzip_filter.cc
@@ -27,8 +27,6 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#include <minmax.h>
-
#include "net/base/gzip_filter.h"
#include "base/logging.h"
@@ -292,7 +290,7 @@ bool GZipFilter::InsertZlibHeader() {
void GZipFilter::SkipGZipFooter() {
int footer_bytes_expected = kGZipFooterSize - gzip_footer_bytes_;
if (footer_bytes_expected > 0) {
- int footer_byte_avail = min(footer_bytes_expected, stream_data_len_);
+ int footer_byte_avail = std::min(footer_bytes_expected, stream_data_len_);
stream_data_len_ -= footer_byte_avail;
next_stream_data_ += footer_byte_avail;
gzip_footer_bytes_ += footer_byte_avail;
diff --git a/net/base/gzip_header.cc b/net/base/gzip_header.cc
index db810dc..8cf5df4 100644
--- a/net/base/gzip_header.cc
+++ b/net/base/gzip_header.cc
@@ -27,8 +27,6 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#include <minmax.h>
-
#include "net/base/gzip_header.h"
#include "base/logging.h"
@@ -125,8 +123,8 @@ GZipHeader::Status GZipHeader::ReadMore(const char* inbuf, int inbuf_len,
case IN_FEXTRA: {
// Grab the rest of the bytes in the extra field, or as many
// of them as are actually present so far.
- const int num_extra_bytes = static_cast<const int>(min(
- extra_length_,
+ const int num_extra_bytes = static_cast<const int>(std::min(
+ static_cast<ptrdiff_t>(extra_length_),
(end - pos)));
pos += num_extra_bytes;
extra_length_ -= num_extra_bytes;
diff --git a/net/base/net_errors.h b/net/base/net_errors.h
index 71c19614..f229978 100644
--- a/net/base/net_errors.h
+++ b/net/base/net_errors.h
@@ -38,7 +38,7 @@ namespace net {
extern const char kErrorDomain[];
// Error values are negative.
-enum {
+enum Error {
// No error.
OK = 0,