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

Unified Diff: pkg/mime/lib/src/magic_number.dart

Issue 141433024: pkg/mime: formatting, finals, consts, etc (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 11 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: pkg/mime/lib/src/magic_number.dart
diff --git a/pkg/mime/lib/src/magic_number.dart b/pkg/mime/lib/src/magic_number.dart
index 451a093446ab918d44cbe712e19a30f1321f415c..7064cf62bd6ab42006e3163aa003305a433018f6 100644
--- a/pkg/mime/lib/src/magic_number.dart
+++ b/pkg/mime/lib/src/magic_number.dart
@@ -28,22 +28,22 @@ class _MagicNumber {
}
-int _defaultMagicNumbersMaxLength = 16;
-
-List<_MagicNumber> _defaultMagicNumbers = const [
-const _MagicNumber('application/pdf', const [0x25, 0x50, 0x44, 0x46]),
-const _MagicNumber('application/postscript', const [0x25, 0x51]),
-const _MagicNumber('image/gif', const [0x47, 0x49, 0x46, 0x38, 0x37, 0x61]),
-const _MagicNumber('image/gif', const [0x47, 0x49, 0x46, 0x38, 0x39, 0x61]),
-const _MagicNumber('image/jpeg', const [0xFF, 0xD8]),
-const _MagicNumber('image/png',
- const [0x89, 0x50, 0x4E, 0x47, 0x0D, 0x0A, 0x1A, 0x0A]),
-const _MagicNumber('image/tiff', const [0x49, 0x49, 0x2A, 0x00]),
-const _MagicNumber('image/tiff', const [0x4D, 0x4D, 0x00, 0x2A]),
-const _MagicNumber('video/mp4',
- const [0x00, 0x00, 0x00, 0x00, 0x66, 0x74,
- 0x79, 0x70, 0x33, 0x67, 0x70, 0x35],
- mask: const [0xFF, 0xFF, 0xFF, 0x00, 0xFF, 0xFF,
- 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF])
+const int _DEFAULT_MAGIC_NUMBERS_MAX_LENGTH = 16;
+
+const List<_MagicNumber> _DEFAULT_MAGIC_NUMBERS = const [
+ const _MagicNumber('application/pdf', const [0x25, 0x50, 0x44, 0x46]),
+ const _MagicNumber('application/postscript', const [0x25, 0x51]),
+ const _MagicNumber('image/gif', const [0x47, 0x49, 0x46, 0x38, 0x37, 0x61]),
+ const _MagicNumber('image/gif', const [0x47, 0x49, 0x46, 0x38, 0x39, 0x61]),
+ const _MagicNumber('image/jpeg', const [0xFF, 0xD8]),
+ const _MagicNumber('image/png',
+ const [0x89, 0x50, 0x4E, 0x47, 0x0D, 0x0A, 0x1A, 0x0A]),
+ const _MagicNumber('image/tiff', const [0x49, 0x49, 0x2A, 0x00]),
+ const _MagicNumber('image/tiff', const [0x4D, 0x4D, 0x00, 0x2A]),
+ const _MagicNumber('video/mp4',
Anders Johnsen 2014/01/28 08:11:55 Move video/mp4 to next line?
kevmoo 2014/01/28 17:23:54 Done.
+ const [0x00, 0x00, 0x00, 0x00, 0x66, 0x74,
+ 0x79, 0x70, 0x33, 0x67, 0x70, 0x35],
+ mask: const [0xFF, 0xFF, 0xFF, 0x00, 0xFF, 0xFF,
+ 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF])
];

Powered by Google App Engine
This is Rietveld 408576698