summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authoraruslan@chromium.org <aruslan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-06-23 01:05:01 +0000
committeraruslan@chromium.org <aruslan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-06-23 01:05:01 +0000
commit82752671f55f7eecf069c83c12f31cbe676459df (patch)
tree30549770f8e2237da310edb1c64f7bcfd6d12260 /net
parenta4f94d30e7a4218c4da5be8e57c9e7928cce6edd (diff)
downloadchromium_src-82752671f55f7eecf069c83c12f31cbe676459df.zip
chromium_src-82752671f55f7eecf069c83c12f31cbe676459df.tar.gz
chromium_src-82752671f55f7eecf069c83c12f31cbe676459df.tar.bz2
Tests handling in DNS RRResolver; cosmetic cleanup
BUG= TEST= Review URL: https://chromiumcodereview.appspot.com/10636013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@143766 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net')
-rw-r--r--net/base/dnsrr_resolver.cc7
-rw-r--r--net/base/mime_util.cc2
-rw-r--r--net/base/net_util.cc8
3 files changed, 12 insertions, 5 deletions
diff --git a/net/base/dnsrr_resolver.cc b/net/base/dnsrr_resolver.cc
index 65ea8b6..cfe63e2 100644
--- a/net/base/dnsrr_resolver.cc
+++ b/net/base/dnsrr_resolver.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 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.
@@ -179,6 +179,10 @@ class RRResolverWorker {
#if defined(OS_ANDROID)
void Run() {
+ if (HandleTestCases()) {
+ Finish();
+ return;
+ }
NOTIMPLEMENTED();
}
@@ -491,7 +495,6 @@ bool RRResponse::ParseFromResponse(const uint8* p, unsigned len,
signatures.push_back(std::string(rrdata.data(), rrdata.size()));
}
}
-
return true;
}
#endif // defined(OS_POSIX) && !defined(OS_ANDROID)
diff --git a/net/base/mime_util.cc b/net/base/mime_util.cc
index 364cbdf..4471b53 100644
--- a/net/base/mime_util.cc
+++ b/net/base/mime_util.cc
@@ -248,6 +248,8 @@ static const char* const common_media_types[] = {
// WebM.
"video/webm",
"audio/webm",
+
+ // Wav.
"audio/wav",
"audio/x-wav",
};
diff --git a/net/base/net_util.cc b/net/base/net_util.cc
index 126fc32..1aa954c 100644
--- a/net/base/net_util.cc
+++ b/net/base/net_util.cc
@@ -1972,6 +1972,8 @@ ScopedPortException::~ScopedPortException() {
NOTREACHED();
}
+namespace {
+
enum IPv6SupportStatus {
IPV6_CANNOT_CREATE_SOCKETS,
IPV6_CAN_CREATE_SOCKETS,
@@ -1982,7 +1984,7 @@ enum IPv6SupportStatus {
IPV6_SUPPORT_MAX // Bounding values for enumeration.
};
-static void IPv6SupportResults(IPv6SupportStatus result) {
+void IPv6SupportResults(IPv6SupportStatus result) {
static bool run_once = false;
if (!run_once) {
run_once = true;
@@ -1993,6 +1995,8 @@ static void IPv6SupportResults(IPv6SupportStatus result) {
}
}
+} // namespace
+
// TODO(jar): The following is a simple estimate of IPv6 support. We may need
// to do a test resolution, and a test connection, to REALLY verify support.
// static
@@ -2002,8 +2006,6 @@ bool IPv6Supported() {
// Another approach is implementing the similar feature by
// java.net.NetworkInterface through JNI.
NOTIMPLEMENTED();
- // so we don't get a 'defined but not used' warning/err
- IPv6SupportResults(IPV6_GETIFADDRS_FAILED);
return true;
#elif defined(OS_POSIX)
int test_socket = socket(AF_INET6, SOCK_STREAM, 0);