Bug 1318887 - Remove NS_GetAppInfo; r=mcmanus
This function is now only used to populate some write-only data members.
This commit is contained in:
@@ -1258,23 +1258,6 @@ NS_GetOriginAttributes(nsIChannel *aChannel,
|
||||
return true;
|
||||
}
|
||||
|
||||
bool
|
||||
NS_GetAppInfo(nsIChannel *aChannel,
|
||||
uint32_t *aAppID,
|
||||
bool *aIsInIsolatedMozBrowserElement)
|
||||
{
|
||||
NeckoOriginAttributes attrs;
|
||||
|
||||
if (!NS_GetOriginAttributes(aChannel, attrs)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
*aAppID = attrs.mAppId;
|
||||
*aIsInIsolatedMozBrowserElement = attrs.mInIsolatedMozBrowser;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool
|
||||
NS_HasBeenCrossOrigin(nsIChannel* aChannel, bool aReport)
|
||||
{
|
||||
|
||||
@@ -675,14 +675,6 @@ bool NS_HasBeenCrossOrigin(nsIChannel* aChannel, bool aReport = false);
|
||||
// special app id reserved for separating the safebrowsing cookie
|
||||
#define NECKO_SAFEBROWSING_APP_ID UINT32_MAX - 1
|
||||
|
||||
/**
|
||||
* Gets AppId and isInIsolatedMozBrowserElement from channel's nsILoadContext.
|
||||
* Returns false if error or channel's callbacks don't implement nsILoadContext.
|
||||
*/
|
||||
bool NS_GetAppInfo(nsIChannel *aChannel,
|
||||
uint32_t *aAppID,
|
||||
bool *aIsInIsolatedMozBrowserElement);
|
||||
|
||||
/**
|
||||
* Determines whether appcache should be checked for a given URI.
|
||||
*/
|
||||
|
||||
@@ -138,8 +138,6 @@ nsHttpTransaction::nsHttpTransaction()
|
||||
, mSubmittedRatePacing(false)
|
||||
, mPassedRatePacing(false)
|
||||
, mSynchronousRatePaceRequest(false)
|
||||
, mAppId(NECKO_NO_APP_ID)
|
||||
, mIsInIsolatedMozBrowser(false)
|
||||
, mClassOfService(0)
|
||||
, m0RTTInProgress(false)
|
||||
{
|
||||
@@ -256,19 +254,6 @@ nsHttpTransaction::Init(uint32_t caps,
|
||||
mActivityDistributor = nullptr;
|
||||
}
|
||||
mChannel = do_QueryInterface(eventsink);
|
||||
nsCOMPtr<nsIChannel> channel = do_QueryInterface(eventsink);
|
||||
if (channel) {
|
||||
NS_GetAppInfo(channel, &mAppId, &mIsInIsolatedMozBrowser);
|
||||
}
|
||||
|
||||
#ifdef MOZ_WIDGET_GONK
|
||||
if (mAppId != NECKO_NO_APP_ID) {
|
||||
nsCOMPtr<nsINetworkInfo> activeNetworkInfo;
|
||||
GetActiveNetworkInfo(activeNetworkInfo);
|
||||
mActiveNetworkInfo =
|
||||
new nsMainThreadPtrHolder<nsINetworkInfo>(activeNetworkInfo);
|
||||
}
|
||||
#endif
|
||||
|
||||
nsCOMPtr<nsIHttpChannelInternal> httpChannelInternal =
|
||||
do_QueryInterface(eventsink);
|
||||
|
||||
@@ -425,14 +425,6 @@ private:
|
||||
bool mPassedRatePacing;
|
||||
bool mSynchronousRatePaceRequest;
|
||||
nsCOMPtr<nsICancelable> mTokenBucketCancel;
|
||||
|
||||
// These members are used for network per-app metering (bug 746073)
|
||||
// Currently, they are only available on gonk.
|
||||
uint32_t mAppId;
|
||||
bool mIsInIsolatedMozBrowser;
|
||||
#ifdef MOZ_WIDGET_GONK
|
||||
nsMainThreadPtrHandle<nsINetworkInfo> mActiveNetworkInfo;
|
||||
#endif
|
||||
public:
|
||||
void SetClassOfService(uint32_t cos) { mClassOfService = cos; }
|
||||
uint32_t ClassOfService() { return mClassOfService; }
|
||||
|
||||
@@ -1177,9 +1177,7 @@ WebSocketChannel::WebSocketChannel() :
|
||||
mDynamicOutputSize(0),
|
||||
mDynamicOutput(nullptr),
|
||||
mPrivateBrowsing(false),
|
||||
mConnectionLogService(nullptr),
|
||||
mAppId(NECKO_NO_APP_ID),
|
||||
mIsInIsolatedMozBrowser(false)
|
||||
mConnectionLogService(nullptr)
|
||||
{
|
||||
MOZ_ASSERT(NS_IsMainThread(), "not main thread");
|
||||
|
||||
@@ -1390,19 +1388,6 @@ WebSocketChannel::BeginOpenInternal()
|
||||
return;
|
||||
}
|
||||
|
||||
if (localChannel) {
|
||||
NS_GetAppInfo(localChannel, &mAppId, &mIsInIsolatedMozBrowser);
|
||||
}
|
||||
|
||||
#ifdef MOZ_WIDGET_GONK
|
||||
if (mAppId != NECKO_NO_APP_ID) {
|
||||
nsCOMPtr<nsINetworkInfo> activeNetworkInfo;
|
||||
GetActiveNetworkInfo(activeNetworkInfo);
|
||||
mActiveNetworkInfo =
|
||||
new nsMainThreadPtrHolder<nsINetworkInfo>(activeNetworkInfo);
|
||||
}
|
||||
#endif
|
||||
|
||||
rv = NS_MaybeOpenChannelUsingAsyncOpen2(localChannel, this);
|
||||
|
||||
if (NS_FAILED(rv)) {
|
||||
|
||||
@@ -300,12 +300,6 @@ private:
|
||||
bool mPrivateBrowsing;
|
||||
|
||||
nsCOMPtr<nsIDashboardEventNotifier> mConnectionLogService;
|
||||
|
||||
uint32_t mAppId;
|
||||
bool mIsInIsolatedMozBrowser;
|
||||
#ifdef MOZ_WIDGET_GONK
|
||||
nsMainThreadPtrHandle<nsINetworkInfo> mActiveNetworkInfo;
|
||||
#endif
|
||||
};
|
||||
|
||||
class WebSocketSSLChannel : public WebSocketChannel
|
||||
|
||||
Reference in New Issue
Block a user