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

Unified Diff: sdk/lib/_internal/pub_generated/lib/src/validator/size.dart

Issue 657673002: Regenerate pub sources. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 2 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_generated/lib/src/validator/size.dart
diff --git a/sdk/lib/_internal/pub_generated/lib/src/validator/size.dart b/sdk/lib/_internal/pub_generated/lib/src/validator/size.dart
index 675587c5e5796b2345fd2b2a1e8e891763d0a1e3..129fea9f08827265d45e3439ea5eac3694051ed2 100644
--- a/sdk/lib/_internal/pub_generated/lib/src/validator/size.dart
+++ b/sdk/lib/_internal/pub_generated/lib/src/validator/size.dart
@@ -1,12 +1,25 @@
+// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
library pub.validator.size;
+
import 'dart:async';
import 'dart:math' as math;
+
import '../entrypoint.dart';
import '../validator.dart';
+
+/// The maximum size of the package to upload (10 MB).
const _MAX_SIZE = 10 * 1024 * 1024;
+
+/// A validator that validates that a package isn't too big.
class SizeValidator extends Validator {
final Future<int> packageSize;
- SizeValidator(Entrypoint entrypoint, this.packageSize) : super(entrypoint);
+
+ SizeValidator(Entrypoint entrypoint, this.packageSize)
+ : super(entrypoint);
+
Future validate() {
return packageSize.then((size) {
if (size <= _MAX_SIZE) return;
@@ -16,3 +29,4 @@ class SizeValidator extends Validator {
});
}
}
+

Powered by Google App Engine
This is Rietveld 408576698