Bug 1827504 - Remove last files of netwerk/cache/ r=sunil,geckoview-reviewers,zeid,m_kato

Differential Revision: https://phabricator.services.mozilla.com/D175177
This commit is contained in:
Valentin Gosu 2023-04-13 09:04:24 +00:00
parent 4d4ecbb77c
commit 401d933a4f
14 changed files with 6 additions and 154 deletions

View file

@ -221,7 +221,6 @@ src:*/gfx/skia/skia/include/private/SkChecksum.h
src:*/intl/icu/source/common/unifiedcache.h
src:*/mfbt/SHA1.cpp
src:*/modules/zlib/src/adler32.c
src:*/netwerk/cache/nsDiskCacheDevice.cpp
src:*/netwerk/cache2/CacheHashUtils.cpp
src:*/netwerk/sctp/src/netinet/sctp_sha1.c
src:*/netwerk/srtp/src/crypto/hash/sha1.c

View file

@ -228,7 +228,6 @@ src:*/gfx/skia/skia/include/private/SkChecksum.h
src:*/intl/icu/source/common/unifiedcache.h
src:*/mfbt/SHA1.cpp
src:*/modules/zlib/src/adler32.c
src:*/netwerk/cache/nsDiskCacheDevice.cpp
src:*/netwerk/cache2/CacheHashUtils.cpp
src:*/netwerk/sctp/src/netinet/sctp_sha1.c
src:*/netwerk/srtp/src/crypto/hash/sha1.c

View file

@ -1500,7 +1500,7 @@ The Mozilla Networking Library
| `netwerk/\*\*/\* <https://searchfox.org/mozilla-central/search?q=&path=netwerk/\*\*/\*>`__
| `netwerk/base/\*\*/\* <https://searchfox.org/mozilla-central/search?q=&path=netwerk/base/\*\*/\*>`__
| `netwerk/build/\*\*/\* <https://searchfox.org/mozilla-central/search?q=&path=netwerk/build/\*\*/\*>`__
| `netwerk/cache/\*\*/\* <https://searchfox.org/mozilla-central/search?q=&path=netwerk/cache/\*\*/\*>`__
| `netwerk/cache2/\*\*/\* <https://searchfox.org/mozilla-central/search?q=&path=netwerk/cache2/\*\*/\*>`__
| `netwerk/dns/\*\*/\* <https://searchfox.org/mozilla-central/search?q=&path=netwerk/dns/\*\*/\*>`__
| `netwerk/locales/\*\*/\* <https://searchfox.org/mozilla-central/search?q=&path=netwerk/locales/\*\*/\*>`__
| `netwerk/mime/\*\*/\* <https://searchfox.org/mozilla-central/search?q=&path=netwerk/mime/\*\*/\*>`__

View file

@ -8,7 +8,7 @@
# documentation and how to modify this file.
repo: mozilla-central
created_at: '2021-10-14T12:50:40.073465'
updated_at: '2023-04-04T10:50:59.346928'
updated_at: '2023-04-12T14:39:57.947364'
export:
path: ./docs/mots/index.rst
format: rst
@ -2152,7 +2152,7 @@ modules:
- netwerk/**/*
- netwerk/base/**/*
- netwerk/build/**/*
- netwerk/cache/**/*
- netwerk/cache2/**/*
- netwerk/dns/**/*
- netwerk/locales/**/*
- netwerk/mime/**/*
@ -4083,5 +4083,5 @@ modules:
- Ryan Tilder
group: dev-platform
hashes:
config: 6dcd6203d12824b5ee47fcb31ea5bbdca588d06e
export: 4e8ece19caf52a866630717755b1006885b07f63
config: ae2d574be8b71032afd58d06fdada016eff41c68
export: fbbc9a293c177a87694878b68cfedbf12670e835

View file

@ -22,7 +22,6 @@ FINAL_LIBRARY = "xul"
LOCAL_INCLUDES += [
"/netwerk/base",
"/netwerk/cache",
"/netwerk/dns",
"/netwerk/mime",
"/netwerk/protocol/about",

View file

@ -423,7 +423,7 @@
}
/******************************************************************************
* netwerk/cache/ classes
* netwerk/cache2/ classes
*/
// service implementing nsICacheService.

View file

@ -1,18 +0,0 @@
# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
# vim: set filetype=python:
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
with Files("**"):
BUG_COMPONENT = ("Core", "Networking: Cache")
UNIFIED_SOURCES += [
"nsCacheUtils.cpp",
]
FINAL_LIBRARY = "xul"
LOCAL_INCLUDES += [
"/netwerk/base",
]

View file

@ -1,78 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim:set ts=2 sw=2 sts=2 et cindent: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "nsCacheUtils.h"
#include "nsThreadUtils.h"
#include "nsIThread.h"
using namespace mozilla;
class nsDestroyThreadEvent : public Runnable {
public:
explicit nsDestroyThreadEvent(nsIThread* thread)
: mozilla::Runnable("nsDestroyThreadEvent"), mThread(thread) {}
NS_IMETHOD Run() override {
mThread->Shutdown();
return NS_OK;
}
private:
nsCOMPtr<nsIThread> mThread;
};
nsShutdownThread::nsShutdownThread(nsIThread* aThread)
: mozilla::Runnable("nsShutdownThread"),
mMonitor("nsShutdownThread.mMonitor"),
mShuttingDown(false),
mThread(aThread) {}
nsresult nsShutdownThread::Shutdown(nsIThread* aThread) {
nsresult rv;
RefPtr<nsDestroyThreadEvent> ev = new nsDestroyThreadEvent(aThread);
rv = NS_DispatchToMainThread(ev);
if (NS_FAILED(rv)) {
NS_WARNING("Dispatching event in nsShutdownThread::Shutdown failed!");
}
return rv;
}
nsresult nsShutdownThread::BlockingShutdown(nsIThread* aThread) {
nsresult rv;
RefPtr<nsShutdownThread> st = new nsShutdownThread(aThread);
nsCOMPtr<nsIThread> workerThread;
rv = NS_NewNamedThread("thread shutdown", getter_AddRefs(workerThread));
if (NS_FAILED(rv)) {
NS_WARNING("Can't create nsShutDownThread worker thread!");
return rv;
}
{
MonitorAutoLock mon(st->mMonitor);
rv = workerThread->Dispatch(st, NS_DISPATCH_NORMAL);
if (NS_FAILED(rv)) {
NS_WARNING(
"Dispatching event in nsShutdownThread::BlockingShutdown failed!");
} else {
st->mShuttingDown = true;
while (st->mShuttingDown) {
mon.Wait();
}
}
}
return Shutdown(workerThread);
}
NS_IMETHODIMP
nsShutdownThread::Run() {
MonitorAutoLock mon(mMonitor);
mThread->Shutdown();
mShuttingDown = false;
mon.Notify();
return NS_OK;
}

View file

@ -1,44 +0,0 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim: set sw=2 ts=8 et tw=80 : */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef _nsCacheUtils_h_
#define _nsCacheUtils_h_
#include "nsThreadUtils.h"
#include "nsCOMPtr.h"
#include "mozilla/Monitor.h"
class nsIThread;
/**
* A class with utility methods for shutting down nsIThreads easily.
*/
class nsShutdownThread : public mozilla::Runnable {
public:
explicit nsShutdownThread(nsIThread* aThread);
~nsShutdownThread() = default;
NS_IMETHOD Run() override;
/**
* Shutdown ensures that aThread->Shutdown() is called on a main thread
*/
static nsresult Shutdown(nsIThread* aThread);
/**
* BlockingShutdown ensures that by the time it returns, aThread->Shutdown()
* has been called and no pending events have been processed on the current
* thread.
*/
static nsresult BlockingShutdown(nsIThread* aThread);
private:
mozilla::Monitor mMonitor MOZ_UNANNOTATED;
bool mShuttingDown;
nsCOMPtr<nsIThread> mThread;
};
#endif

View file

@ -6,7 +6,6 @@
#include "CacheLog.h"
#include "CacheFileIOManager.h"
#include "../cache/nsCacheUtils.h"
#include "CacheHashUtils.h"
#include "CacheStorageService.h"
#include "CacheIndex.h"

View file

@ -12,7 +12,6 @@
#include "CacheFileUtils.h"
#include "nsILoadContextInfo.h"
#include "nsICacheEntry.h" // for nsICacheEntryMetaDataVisitor
#include "../cache/nsCacheUtils.h"
#include "nsIFile.h"
#include "mozilla/ScopeExit.h"
#include "mozilla/Telemetry.h"

View file

@ -59,7 +59,6 @@ if CONFIG["MOZ_WIDGET_TOOLKIT"] != "android":
LOCAL_INCLUDES += [
"/netwerk/base",
"/netwerk/cache",
]
include("/ipc/chromium/chromium-config.mozbuild")

View file

@ -14,7 +14,6 @@ DIRS += [
"socket",
"mime",
"streamconv",
"cache",
"cache2",
"protocol",
"system",

View file

@ -188,7 +188,6 @@ LOCAL_INCLUDES += [
"/layout/forms",
"/layout/painting",
"/netwerk/base",
"/netwerk/cache",
"/toolkit/components/telemetry",
"/widget",
"/widget/headless",