Use SEQUENCE_CHECKER in CastURLLoaderThrottleProvider
We are planning to conduct an experiment to move Blink's resource loading logic off the main thread. To run the loading logic in the background thread using SequencedTaskRunner, we need to replace THREAD_CHECKER in URLLoaderThrottleProvider with SEQUENCE_CHECKER. Bug: 1410609 Change-Id: Id22f76e4ea7728ae521d0bde1bf44c433ddb7cc0 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4764656 Reviewed-by: Sean Topping <seantopping@chromium.org> Commit-Queue: Tsuyoshi Horo <horo@chromium.org> Cr-Commit-Position: refs/heads/main@{#1181758}
This commit is contained in:

committed by
Chromium LUCI CQ

parent
3501da02a2
commit
1eeb4d66a0
chromecast/renderer
@ -20,11 +20,11 @@ CastURLLoaderThrottleProvider::CastURLLoaderThrottleProvider(
|
||||
blink::URLLoaderThrottleProviderType type,
|
||||
CastActivityUrlFilterManager* url_filter_manager)
|
||||
: type_(type), cast_activity_url_filter_manager_(url_filter_manager) {
|
||||
DETACH_FROM_THREAD(thread_checker_);
|
||||
DETACH_FROM_SEQUENCE(sequence_checker_);
|
||||
}
|
||||
|
||||
CastURLLoaderThrottleProvider::~CastURLLoaderThrottleProvider() {
|
||||
DCHECK_CALLED_ON_VALID_THREAD(thread_checker_);
|
||||
DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
|
||||
}
|
||||
|
||||
CastURLLoaderThrottleProvider::CastURLLoaderThrottleProvider(
|
||||
@ -32,7 +32,7 @@ CastURLLoaderThrottleProvider::CastURLLoaderThrottleProvider(
|
||||
: type_(other.type_),
|
||||
cast_activity_url_filter_manager_(
|
||||
other.cast_activity_url_filter_manager_) {
|
||||
DETACH_FROM_THREAD(thread_checker_);
|
||||
DETACH_FROM_SEQUENCE(sequence_checker_);
|
||||
}
|
||||
|
||||
std::unique_ptr<blink::URLLoaderThrottleProvider>
|
||||
@ -44,7 +44,7 @@ blink::WebVector<std::unique_ptr<blink::URLLoaderThrottle>>
|
||||
CastURLLoaderThrottleProvider::CreateThrottles(
|
||||
int render_frame_id,
|
||||
const blink::WebURLRequest& request) {
|
||||
DCHECK_CALLED_ON_VALID_THREAD(thread_checker_);
|
||||
DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
|
||||
|
||||
blink::WebVector<std::unique_ptr<blink::URLLoaderThrottle>> throttles;
|
||||
|
||||
|
@ -10,8 +10,8 @@
|
||||
|
||||
#include "base/functional/callback_forward.h"
|
||||
#include "base/memory/scoped_refptr.h"
|
||||
#include "base/sequence_checker.h"
|
||||
#include "base/strings/string_piece.h"
|
||||
#include "base/threading/thread_checker.h"
|
||||
#include "third_party/blink/public/platform/url_loader_throttle_provider.h"
|
||||
|
||||
namespace chromecast {
|
||||
@ -41,7 +41,7 @@ class CastURLLoaderThrottleProvider : public blink::URLLoaderThrottleProvider {
|
||||
blink::URLLoaderThrottleProviderType type_;
|
||||
CastActivityUrlFilterManager* const cast_activity_url_filter_manager_;
|
||||
|
||||
THREAD_CHECKER(thread_checker_);
|
||||
SEQUENCE_CHECKER(sequence_checker_);
|
||||
};
|
||||
|
||||
} // namespace chromecast
|
||||
|
Reference in New Issue
Block a user