Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions third_party/blink/renderer/platform/loader/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,11 @@ source_set("unit_tests") {
"unencoded_digest_unittest.cc",
]

if (is_cobalt) {
# resource_load_schedule is disabled, see b/484394054
sources -= [ "fetch/resource_load_scheduler_test.cc" ]
}

configs += [ "//third_party/blink/renderer/platform:blink_platform_config" ]

deps = [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
#include "base/numerics/safe_conversions.h"
#include "base/strings/string_number_conversions.h"
#include "base/time/default_clock.h"
#include "build/build_config.h"
#include "third_party/blink/public/common/features.h"
#include "third_party/blink/public/mojom/devtools/console_message.mojom-blink.h"
#include "third_party/blink/public/platform/platform.h"
Expand Down Expand Up @@ -261,6 +262,10 @@ void ResourceLoadScheduler::SetOutstandingLimitForTesting(
}

bool ResourceLoadScheduler::IsClientDelayable(ThrottleOption option) const {
#if BUILDFLAG(IS_COBALT)
// Cobalt is a single tab app, all requests should not be throttled.
return false;
#else
switch (frame_scheduler_lifecycle_state_) {
case scheduler::SchedulingLifecycleState::kNotThrottled:
case scheduler::SchedulingLifecycleState::kHidden:
Expand All @@ -269,6 +274,7 @@ bool ResourceLoadScheduler::IsClientDelayable(ThrottleOption option) const {
case scheduler::SchedulingLifecycleState::kStopped:
return option != ThrottleOption::kCanNotBeStoppedOrThrottled;
}
#endif
}

void ResourceLoadScheduler::OnLifecycleStateChanged(
Expand Down
Loading