Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(508)

Unified Diff: sdk/lib/_internal/pub/lib/src/dart.dart

Issue 368103002: Support passing CSP configuration to the dart2js transformer. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: sdk/lib/_internal/pub/lib/src/dart.dart
diff --git a/sdk/lib/_internal/pub/lib/src/dart.dart b/sdk/lib/_internal/pub/lib/src/dart.dart
index 9a26e1ceb4fc25922e35a750e1fe33a181754429..50bdd2c678acc89748882c1735beda9cae7c1358 100644
--- a/sdk/lib/_internal/pub/lib/src/dart.dart
+++ b/sdk/lib/_internal/pub/lib/src/dart.dart
@@ -59,6 +59,7 @@ abstract class CompilerProvider {
Future compile(String entrypoint, CompilerProvider provider, {
Iterable<String> commandLineOptions,
bool checked: false,
+ bool csp: false,
bool minify: true,
bool verbose: false,
Map<String, String> environment,
@@ -73,6 +74,7 @@ Future compile(String entrypoint, CompilerProvider provider, {
return syncFuture(() {
var options = <String>['--categories=Client,Server'];
if (checked) options.add('--enable-checked-mode');
+ if (csp) options.add('--csp');
if (minify) options.add('--minify');
if (verbose) options.add('--verbose');
if (analyzeAll) options.add('--analyze-all');

Powered by Google App Engine
This is Rietveld 408576698