Skip to content

Commit

Permalink
Cleanup experimental report flag. (dart-lang#8001)
Browse files Browse the repository at this point in the history
  • Loading branch information
isoos authored Sep 2, 2024
1 parent b2394d4 commit fe31b83
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 14 deletions.
3 changes: 0 additions & 3 deletions app/lib/frontend/handlers/experimental.dart
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import '../../shared/cookie_utils.dart';

const _publicFlags = <String>{
'dark',
'report',
};

const _allFlags = <String>{
Expand Down Expand Up @@ -84,8 +83,6 @@ class ExperimentalFlags {
return params;
}

bool get isReportPageEnabled => true;

bool get isDarkModeEnabled => isEnabled('dark');
bool get isDarkModeDefault => isEnabled('dark-as-default');

Expand Down
8 changes: 0 additions & 8 deletions app/lib/frontend/handlers/report.dart
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,6 @@ const _reportRateLimitWindowAsText = 'last 10 minutes';

/// Handles GET /report
Future<shelf.Response> reportPageHandler(shelf.Request request) async {
if (!requestContext.experimentalFlags.isReportPageEnabled) {
return notFoundHandler(request);
}

final caseId = request.requestedUri.queryParameters['appeal'];
final mc = await _loadAndVerifyCase(caseId);

Expand Down Expand Up @@ -136,10 +132,6 @@ Future<void> _verifyCaseSubject(
/// Handles POST /api/report
Future<String> processReportPageHandler(
shelf.Request request, ReportForm form) async {
if (!requestContext.experimentalFlags.isReportPageEnabled) {
throw NotFoundException('Experimental flag is not enabled.');
}

final sourceIp = request.sourceIp;
if (sourceIp != null) {
await verifyRequestCounts(
Expand Down
3 changes: 0 additions & 3 deletions app/lib/frontend/templates/layout.dart
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,6 @@ String renderLayoutPage(
final announcementBannerHtml = announcementBackend.getAnnouncementHtml();
final session = requestContext.sessionData;
final moderationSubject = () {
if (!requestContext.experimentalFlags.isReportPageEnabled) {
return null;
}
if (pageData == null) {
return null;
}
Expand Down

0 comments on commit fe31b83

Please sign in to comment.