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

Unified Diff: pkg/http_parser/lib/src/media_type.dart

Issue 223023003: Extract an http_parser package from shelf. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: code review Created 6 years, 9 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
« no previous file with comments | « pkg/http_parser/lib/http_parser.dart ('k') | pkg/http_parser/pubspec.yaml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/http_parser/lib/src/media_type.dart
diff --git a/pkg/shelf/lib/src/media_type.dart b/pkg/http_parser/lib/src/media_type.dart
similarity index 97%
rename from pkg/shelf/lib/src/media_type.dart
rename to pkg/http_parser/lib/src/media_type.dart
index a1f5ed260e7fb96c7729b2c0c04e912abc8bdf46..7a1ff23ba7f78686e8d543085043078389c0de4b 100644
--- a/pkg/shelf/lib/src/media_type.dart
+++ b/pkg/http_parser/lib/src/media_type.dart
@@ -2,7 +2,7 @@
// 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 shelf.media_type;
+library http_parser.media_type;
import 'package:collection/collection.dart';
import 'package:string_scanner/string_scanner.dart';
@@ -26,6 +26,9 @@ final _escapedChar = new RegExp(r'["\x00-\x1F\x7F]');
/// A class representing an HTTP media type, as used in Accept and Content-Type
/// headers.
+///
+/// This is immutable; new instances can be created based on an old instance by
+/// calling [change].
class MediaType {
/// The primary identifier of the MIME type.
final String type;
« no previous file with comments | « pkg/http_parser/lib/http_parser.dart ('k') | pkg/http_parser/pubspec.yaml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698