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

Issue 297593003: Add a shelf_web_socket package. (Closed)

Created:
6 years, 7 months ago by nweiz
Modified:
6 years, 7 months ago
Reviewers:
kevmoo
CC:
reviews_dartlang.org
Visibility:
Public.

Description

Patch Set 1 #

Total comments: 14

Patch Set 2 : code review #

Patch Set 3 : fixes #

Unified diffs Side-by-side diffs Delta from patch set Stats (+406 lines, --1 lines) Patch
M pkg/pkg.status View 1 2 1 chunk +1 line, -0 lines 0 comments Download
A + pkg/shelf_web_socket/LICENSE View 0 chunks +-1 lines, --1 lines 0 comments Download
A pkg/shelf_web_socket/README.md View 1 1 chunk +31 lines, -0 lines 0 comments Download
A pkg/shelf_web_socket/lib/shelf_web_socket.dart View 1 chunk +61 lines, -0 lines 0 comments Download
A pkg/shelf_web_socket/lib/src/web_socket_handler.dart View 1 2 1 chunk +133 lines, -0 lines 0 comments Download
A pkg/shelf_web_socket/pubspec.yaml View 1 1 chunk +14 lines, -0 lines 0 comments Download
A pkg/shelf_web_socket/test/web_socket_test.dart View 1 chunk +167 lines, -0 lines 0 comments Download

Messages

Total messages: 4 (0 generated)
nweiz
6 years, 7 months ago (2014-05-19 23:13:03 UTC) #1
kevmoo
LGTM w/ comments ...especially the non-usage of crypto https://codereview.chromium.org/297593003/diff/1/pkg/shelf_web_socket/README.md File pkg/shelf_web_socket/README.md (right): https://codereview.chromium.org/297593003/diff/1/pkg/shelf_web_socket/README.md#newcode30 pkg/shelf_web_socket/README.md:30: } ...
6 years, 7 months ago (2014-05-20 21:54:49 UTC) #2
nweiz
Committed patchset #3 manually as r36394 (presubmit successful).
6 years, 7 months ago (2014-05-20 22:17:13 UTC) #3
nweiz
6 years, 7 months ago (2014-05-20 22:17:42 UTC) #4
Message was sent while issue was closed.
https://codereview.chromium.org/297593003/diff/1/pkg/shelf_web_socket/README.md
File pkg/shelf_web_socket/README.md (right):

https://codereview.chromium.org/297593003/diff/1/pkg/shelf_web_socket/README....
pkg/shelf_web_socket/README.md:30: }
On 2014/05/20 21:54:49, kevmoo wrote:
> end block w/ ```

Done.

https://codereview.chromium.org/297593003/diff/1/pkg/shelf_web_socket/lib/src...
File pkg/shelf_web_socket/lib/src/web_socket_handler.dart (right):

https://codereview.chromium.org/297593003/diff/1/pkg/shelf_web_socket/lib/src...
pkg/shelf_web_socket/lib/src/web_socket_handler.dart:9: import
'package:crypto/crypto.dart';
On 2014/05/20 21:54:49, kevmoo wrote:
> not used?

Done.

https://codereview.chromium.org/297593003/diff/1/pkg/shelf_web_socket/lib/src...
pkg/shelf_web_socket/lib/src/web_socket_handler.dart:25: Response get _notFound
=> _htmlResponse(404, "404 Not Found",
On 2014/05/20 21:54:49, kevmoo wrote:
> Make this a (static? top-level?) method
> 
> Definitely not a property

Done.

https://codereview.chromium.org/297593003/diff/1/pkg/shelf_web_socket/lib/src...
pkg/shelf_web_socket/lib/src/web_socket_handler.dart:85: assert(false);
On 2014/05/20 21:54:49, kevmoo wrote:
> Explain the flow here a bit in a comment. This is tough to reason about.

Done.

https://codereview.chromium.org/297593003/diff/1/pkg/shelf_web_socket/lib/src...
pkg/shelf_web_socket/lib/src/web_socket_handler.dart:92: String
_chooseProtocol(Request request) {
On 2014/05/20 21:54:49, kevmoo wrote:
> Style nit: if methods don't access instance state, make them static (or
better)
> top-level.
> 
> ...but until we have this resolved in a style guide...

I disagree with this principle. Private methods should be defined in the same
place as the methods that call them, even if they don't (currently) use any
state.

https://codereview.chromium.org/297593003/diff/1/pkg/shelf_web_socket/lib/src...
pkg/shelf_web_socket/lib/src/web_socket_handler.dart:116: Response
_htmlResponse(int statusCode, String title, String message) {
On 2014/05/20 21:54:49, kevmoo wrote:
> clarify that this method expects unescaped params

Done.

https://codereview.chromium.org/297593003/diff/1/pkg/shelf_web_socket/pubspec...
File pkg/shelf_web_socket/pubspec.yaml (right):

https://codereview.chromium.org/297593003/diff/1/pkg/shelf_web_socket/pubspec...
pkg/shelf_web_socket/pubspec.yaml:8: crypto: ">=0.9.0 <0.10.0"
On 2014/05/20 21:54:49, kevmoo wrote:
> Not user?

Done.

Powered by Google App Engine
This is Rietveld 408576698