Issue #2542 - Part 7: Move SecFetch.* to /netwerk where it belongs.

This commit is contained in:
Moonchild 2024-07-05 14:05:45 +02:00 committed by roytam1
commit fffe6c4996
5 changed files with 12 additions and 5 deletions

View file

@ -13,7 +13,6 @@ EXPORTS.mozilla.dom += [
'nsCSPService.h',
'nsCSPUtils.h',
'nsMixedContentBlocker.h',
'SecFetch.h',
'SRICheck.h',
'SRILogHelper.h',
'SRIMetadata.h',
@ -33,7 +32,6 @@ UNIFIED_SOURCES += [
'nsCSPService.cpp',
'nsCSPUtils.cpp',
'nsMixedContentBlocker.cpp',
'SecFetch.cpp',
'SRICheck.cpp',
'SRIMetadata.cpp',
]

View file

@ -6,9 +6,16 @@
#include "SecFetch.h"
#include "nsIHttpChannel.h"
#include "nsIURI.h"
#include "mozIThirdPartyUtil.h"
#include "nsContentUtils.h"
#include "nsMixedContentBlocker.h"
#include "nsNetUtil.h"
#include "mozilla/Preferences.h"
#include "mozilla/Unused.h"
using namespace mozilla;
using namespace mozilla::net;
// Helper function which maps an internal content policy type
// to the corresponding destination for the context of SecFetch.

View file

@ -10,7 +10,7 @@
class nsIHttpChannel;
namespace mozilla {
namespace dom {
namespace net {
class SecFetch final {
public:

View file

@ -39,6 +39,7 @@ EXPORTS.mozilla.net += [
'NullHttpChannel.h',
'PHttpChannelParams.h',
'PSpdyPush.h',
'SecFetch.h',
'TimingStruct.h',
]
@ -85,6 +86,7 @@ UNIFIED_SOURCES += [
'nsHttpTransaction.cpp',
'NullHttpChannel.cpp',
'NullHttpTransaction.cpp',
'SecFetch.cpp',
'TunnelUtils.cpp',
]

View file

@ -99,7 +99,7 @@
#include "CacheControlParser.h"
#include "nsMixedContentBlocker.h"
#include "CacheStorageService.h"
#include "mozilla/dom/SecFetch.h"
#include "mozilla/net/SecFetch.h"
namespace mozilla { namespace net {
@ -382,7 +382,7 @@ nsHttpChannel::Connect()
NS_ENSURE_SUCCESS(rv, rv);
}
mozilla::dom::SecFetch::AddSecFetchHeader(this);
mozilla::net::SecFetch::AddSecFetchHeader(this);
bool isHttps = false;
rv = mURI->SchemeIs("https", &isHttps);