summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
Diffstat (limited to 'net')
-rw-r--r--net/base/mime_util.cc20
-rw-r--r--net/base/mime_util.h1
-rw-r--r--net/base/network_change_notifier_win.cc12
-rw-r--r--net/base/network_change_notifier_win.h4
4 files changed, 3 insertions, 34 deletions
diff --git a/net/base/mime_util.cc b/net/base/mime_util.cc
index c0b8d36..4679dcc 100644
--- a/net/base/mime_util.cc
+++ b/net/base/mime_util.cc
@@ -63,7 +63,6 @@ class MimeUtil : public PlatformMimeUtil {
bool IsSupportedNonImageMimeType(const std::string& mime_type) const;
bool IsUnsupportedTextMimeType(const std::string& mime_type) const;
bool IsSupportedJavascriptMimeType(const std::string& mime_type) const;
- bool IsSupportedDartMimeType(const std::string& mime_type) const;
bool IsSupportedMimeType(const std::string& mime_type) const;
@@ -110,7 +109,6 @@ class MimeUtil : public PlatformMimeUtil {
MimeMappings non_image_map_;
MimeMappings unsupported_text_map_;
MimeMappings javascript_map_;
- MimeMappings dart_map_;
MimeMappings codecs_map_;
StrictMappings strict_format_map_;
@@ -152,7 +150,6 @@ static const MimeInfo secondary_mappings[] = {
{ "application/pdf", "pdf" },
{ "application/postscript", "ps,eps,ai" },
{ "application/javascript", "js" },
- { "application/dart", "dart" },
{ "application/font-woff", "woff" },
{ "image/bmp", "bmp" },
{ "image/x-icon", "ico" },
@@ -429,10 +426,6 @@ static bool IsCodecSupportedOnAndroid(const std::string& codec) {
}
#endif
-static const char* const supported_dart_types[] = {
- "application/dart",
-};
-
struct MediaFormatStrict {
const char* mime_type;
const char* codecs_list;
@@ -475,8 +468,6 @@ void MimeUtil::InitializeMimeTypeMaps() {
unsupported_text_map_.insert(unsupported_text_types[i]);
for (size_t i = 0; i < arraysize(supported_javascript_types); ++i)
non_image_map_.insert(supported_javascript_types[i]);
- for (size_t i = 0; i < arraysize(supported_dart_types); ++i)
- non_image_map_.insert(supported_dart_types[i]);
for (size_t i = 0; i < arraysize(common_media_types); ++i)
non_image_map_.insert(common_media_types[i]);
#if defined(USE_PROPRIETARY_CODECS)
@@ -494,8 +485,6 @@ void MimeUtil::InitializeMimeTypeMaps() {
for (size_t i = 0; i < arraysize(supported_javascript_types); ++i)
javascript_map_.insert(supported_javascript_types[i]);
- for (size_t i = 0; i < arraysize(supported_dart_types); ++i)
- dart_map_.insert(supported_dart_types[i]);
for (size_t i = 0; i < arraysize(common_media_codecs); ++i) {
#if defined(OS_ANDROID)
@@ -553,11 +542,6 @@ bool MimeUtil::IsSupportedJavascriptMimeType(
return javascript_map_.find(mime_type) != javascript_map_.end();
}
-bool MimeUtil::IsSupportedDartMimeType(
- const std::string& mime_type) const {
- return dart_map_.find(mime_type) != dart_map_.end();
-}
-
// Mirrors WebViewImpl::CanShowMIMEType()
bool MimeUtil::IsSupportedMimeType(const std::string& mime_type) const {
return (mime_type.compare(0, 6, "image/") == 0 &&
@@ -780,10 +764,6 @@ bool IsSupportedJavascriptMimeType(const std::string& mime_type) {
return g_mime_util.Get().IsSupportedJavascriptMimeType(mime_type);
}
-bool IsSupportedDartMimeType(const std::string& mime_type) {
- return g_mime_util.Get().IsSupportedDartMimeType(mime_type);
-}
-
bool IsSupportedMimeType(const std::string& mime_type) {
return g_mime_util.Get().IsSupportedMimeType(mime_type);
}
diff --git a/net/base/mime_util.h b/net/base/mime_util.h
index d5e15af..9662e96 100644
--- a/net/base/mime_util.h
+++ b/net/base/mime_util.h
@@ -44,7 +44,6 @@ NET_EXPORT bool IsSupportedMediaMimeType(const std::string& mime_type);
NET_EXPORT bool IsSupportedNonImageMimeType(const std::string& mime_type);
NET_EXPORT bool IsUnsupportedTextMimeType(const std::string& mime_type);
NET_EXPORT bool IsSupportedJavascriptMimeType(const std::string& mime_type);
-NET_EXPORT bool IsSupportedDartMimeType(const std::string& mime_type);
NET_EXPORT bool IsSupportedCertificateMimeType(const std::string& mime_type);
// Convenience function.
diff --git a/net/base/network_change_notifier_win.cc b/net/base/network_change_notifier_win.cc
index 135905e..77a72b0 100644
--- a/net/base/network_change_notifier_win.cc
+++ b/net/base/network_change_notifier_win.cc
@@ -54,7 +54,6 @@ class NetworkChangeNotifierWin::DnsConfigServiceThread : public base::Thread {
NetworkChangeNotifierWin::NetworkChangeNotifierWin()
: NetworkChangeNotifier(NetworkChangeCalculatorParamsWin()),
is_watching_(false),
- network_change_event_handle_(NULL),
sequential_failures_(0),
weak_factory_(this),
dns_config_service_thread_(new DnsConfigServiceThread()),
@@ -223,15 +222,10 @@ void NetworkChangeNotifierWin::OnObjectSignaled(HANDLE object) {
DCHECK(is_watching_);
is_watching_ = false;
- DWORD bytes;
- BOOL network_changed = GetOverlappedResult(network_change_event_handle_, &addr_overlapped_, &bytes, TRUE);
-
// Start watching for the next address change.
WatchForAddressChange();
- // If network_changed is 0 an error occured (e.g. GetLastError() = 995 = ERROR_OPERATION_ABORTED).
- if (network_changed != 0)
- NotifyObservers();
+ NotifyObservers();
}
void NetworkChangeNotifierWin::NotifyObservers() {
@@ -301,8 +295,8 @@ bool NetworkChangeNotifierWin::WatchForAddressChangeInternal() {
base::Thread::Options(base::MessageLoop::TYPE_IO, 0));
}
-
- DWORD ret = NotifyAddrChange(&network_change_event_handle_, &addr_overlapped_);
+ HANDLE handle = NULL;
+ DWORD ret = NotifyAddrChange(&handle, &addr_overlapped_);
if (ret != ERROR_IO_PENDING)
return false;
diff --git a/net/base/network_change_notifier_win.h b/net/base/network_change_notifier_win.h
index e32b950..7b75c15 100644
--- a/net/base/network_change_notifier_win.h
+++ b/net/base/network_change_notifier_win.h
@@ -90,10 +90,6 @@ class NET_EXPORT_PRIVATE NetworkChangeNotifierWin
base::win::ObjectWatcher addr_watcher_;
OVERLAPPED addr_overlapped_;
- // This file handle receives network change notifications and is used for calling
- // GetOverlappedResult().
- HANDLE network_change_event_handle_;
-
base::OneShotTimer<NetworkChangeNotifierWin> timer_;
// Number of times WatchForAddressChange has failed in a row.