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

Unified Diff: lib/src/request.dart

Issue 837193005: pkg/shelf: formatted code (Closed) Base URL: https://github.com/dart-lang/shelf.git@master
Patch Set: nits Created 5 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
« no previous file with comments | « lib/src/middleware.dart ('k') | lib/src/response.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/src/request.dart
diff --git a/lib/src/request.dart b/lib/src/request.dart
index 15d8b87a52982ddb5cd5a8180ffa4cd26d10b487..9e03cd7722ce3238f1afc4aea991e516cb0e78c8 100644
--- a/lib/src/request.dart
+++ b/lib/src/request.dart
@@ -119,11 +119,14 @@ class Request extends Message {
Request(String method, Uri requestedUri, {String protocolVersion,
Map<String, String> headers, Uri url, String scriptName,
Stream<List<int>> body, Map<String, Object> context,
- OnHijackCallback onHijack})
- : this._(method, requestedUri, protocolVersion: protocolVersion,
- headers: headers, url: url, scriptName: scriptName,
- body: body, context: context,
- onHijack: onHijack == null ? null : new _OnHijack(onHijack));
+ OnHijackCallback onHijack}) : this._(method, requestedUri,
nweiz 2015/01/20 23:20:31 Putting ": this()" on the same line as the paramet
kevmoo 2015/01/21 00:50:18 Done https://github.com/dart-lang/dart_style/issue
+ protocolVersion: protocolVersion,
+ headers: headers,
+ url: url,
+ scriptName: scriptName,
+ body: body,
+ context: context,
+ onHijack: onHijack == null ? null : new _OnHijack(onHijack));
/// This constructor has the same signature as [new Request] except that
/// accepts [onHijack] as [_OnHijack].
@@ -132,12 +135,12 @@ class Request extends Message {
/// source [Request] to ensure that [hijack] can only be called once, even
/// from a changed [Request].
Request._(this.method, Uri requestedUri, {String protocolVersion,
- Map<String, String> headers, Uri url, String scriptName,
- Stream<List<int>> body, Map<String, Object> context,
- _OnHijack onHijack})
+ Map<String, String> headers, Uri url, String scriptName,
+ Stream<List<int>> body, Map<String, Object> context, _OnHijack onHijack})
: this.requestedUri = requestedUri,
- this.protocolVersion = protocolVersion == null ?
- '1.1' : protocolVersion,
+ this.protocolVersion = protocolVersion == null
+ ? '1.1'
+ : protocolVersion,
this.url = _computeUrl(requestedUri, url, scriptName),
this.scriptName = _computeScriptName(requestedUri, url, scriptName),
this._onHijack = onHijack,
@@ -191,7 +194,7 @@ class Request extends Message {
/// removed. Useful for routing middleware that sends requests to an inner
/// [Handler].
Request change({Map<String, String> headers, Map<String, Object> context,
- String scriptName, Uri url}) {
+ String scriptName, Uri url}) {
headers = updateMap(this.headers, headers);
context = updateMap(this.context, context);
@@ -210,8 +213,12 @@ class Request extends Message {
if (scriptName == null) scriptName = this.scriptName;
return new Request._(this.method, this.requestedUri,
- protocolVersion: this.protocolVersion, headers: headers, url: url,
- scriptName: scriptName, body: this.read(), context: context,
+ protocolVersion: this.protocolVersion,
+ headers: headers,
+ url: url,
+ scriptName: scriptName,
+ body: this.read(),
+ context: context,
onHijack: _onHijack);
}
« no previous file with comments | « lib/src/middleware.dart ('k') | lib/src/response.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698