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

Issue 12504006: Make IOSink implement StringSink (Closed)

Created:
7 years, 9 months ago by Søren Gjesse
Modified:
7 years, 9 months ago
CC:
reviews_dartlang.org
Visibility:
Public.

Description

Make IOSink implement StringSink Besides adding the StringSink methods I also added writeBytes and deprecated both add and addString. To handle the encoding of strings the IOSike has an encoding property. This property is mutable in situation when it makes sense to change encoding of what is written. The exception here is for HTTP where the encoding is determined from the header and the encoding cannot be changed. R=ajohnsen@google.com, ager@google.com, nweiz@google.com BUG= Committed: https://code.google.com/p/dart/source/detail?r=19676

Patch Set 1 #

Patch Set 2 : Minor fixes #

Patch Set 3 : Correct rebase #

Total comments: 20

Patch Set 4 : Addressed review comments #

Patch Set 5 : Rebased and additional fixes #

Patch Set 6 : Fixed accidental edit #

Total comments: 24

Patch Set 7 : Addressed second round of review comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+539 lines, -340 lines) Patch
M pkg/http/lib/src/utils.dart View 1 2 3 4 5 6 1 chunk +3 lines, -13 lines 0 comments Download
M pkg/http/test/utils.dart View 1 2 3 4 5 6 3 chunks +14 lines, -13 lines 0 comments Download
M runtime/bin/socket_patch.dart View 1 2 3 4 1 chunk +15 lines, -10 lines 0 comments Download
M samples/chat/chat_server_lib.dart View 1 2 3 4 5 6 7 chunks +8 lines, -7 lines 0 comments Download
M samples/tests/samples/chat/chat_server_test.dart View 5 chunks +9 lines, -9 lines 0 comments Download
M sdk/lib/_internal/compiler/implementation/dart2js.dart View 1 2 3 4 3 chunks +3 lines, -3 lines 0 comments Download
M sdk/lib/io/file.dart View 1 2 3 2 chunks +8 lines, -2 lines 0 comments Download
M sdk/lib/io/file_impl.dart View 1 2 3 4 5 6 2 chunks +8 lines, -16 lines 0 comments Download
M sdk/lib/io/http.dart View 1 2 3 4 5 6 2 chunks +50 lines, -6 lines 0 comments Download
M sdk/lib/io/http_headers.dart View 1 2 3 4 4 chunks +5 lines, -5 lines 0 comments Download
M sdk/lib/io/http_impl.dart View 1 2 3 4 11 chunks +102 lines, -36 lines 0 comments Download
M sdk/lib/io/io_sink.dart View 1 2 3 4 2 chunks +67 lines, -27 lines 0 comments Download
M sdk/lib/io/string_transformer.dart View 1 2 3 4 5 6 1 chunk +48 lines, -0 lines 0 comments Download
M sdk/lib/io/websocket_impl.dart View 1 chunk +2 lines, -2 lines 0 comments Download
M tests/standalone/debugger/debug_lib.dart View 1 2 3 4 2 chunks +2 lines, -2 lines 0 comments Download
M tests/standalone/io/echo_server_stream_test.dart View 2 chunks +2 lines, -2 lines 0 comments Download
M tests/standalone/io/file_fuzz_test.dart View 1 2 3 2 chunks +2 lines, -2 lines 0 comments Download
M tests/standalone/io/file_output_stream_test.dart View 2 chunks +2 lines, -2 lines 0 comments Download
M tests/standalone/io/file_system_links_test.dart View 1 2 3 4 2 chunks +3 lines, -3 lines 0 comments Download
M tests/standalone/io/file_test.dart View 1 2 3 6 chunks +17 lines, -13 lines 0 comments Download
M tests/standalone/io/http_10_test.dart View 8 chunks +14 lines, -14 lines 0 comments Download
M tests/standalone/io/http_basic_test.dart View 3 chunks +5 lines, -5 lines 0 comments Download
M tests/standalone/io/http_client_connect_test.dart View 2 chunks +3 lines, -3 lines 0 comments Download
M tests/standalone/io/http_client_request_test.dart View 4 chunks +7 lines, -7 lines 0 comments Download
M tests/standalone/io/http_close_test.dart View 2 chunks +2 lines, -2 lines 0 comments Download
M tests/standalone/io/http_connection_close_test.dart View 3 chunks +3 lines, -3 lines 0 comments Download
M tests/standalone/io/http_content_length_test.dart View 7 chunks +20 lines, -20 lines 0 comments Download
M tests/standalone/io/http_detach_socket_test.dart View 4 chunks +5 lines, -5 lines 0 comments Download
M tests/standalone/io/http_head_test.dart View 1 2 3 4 1 chunk +3 lines, -3 lines 0 comments Download
M tests/standalone/io/http_headers_state_test.dart View 2 chunks +2 lines, -2 lines 0 comments Download
M tests/standalone/io/http_keep_alive_test.dart View 1 chunk +1 line, -1 line 0 comments Download
M tests/standalone/io/http_proxy_test.dart View 5 chunks +5 lines, -5 lines 0 comments Download
M tests/standalone/io/http_read_test.dart View 2 chunks +4 lines, -4 lines 0 comments Download
M tests/standalone/io/http_request_pipeling_test.dart View 2 chunks +3 lines, -3 lines 0 comments Download
M tests/standalone/io/http_server_early_client_close_test.dart View 1 chunk +1 line, -1 line 0 comments Download
M tests/standalone/io/http_server_response_test.dart View 1 2 3 4 7 chunks +11 lines, -11 lines 0 comments Download
M tests/standalone/io/http_shutdown_test.dart View 5 chunks +5 lines, -5 lines 0 comments Download
M tests/standalone/io/http_stream_close_test.dart View 2 chunks +2 lines, -2 lines 0 comments Download
M tests/standalone/io/https_client_certificate_test.dart View 1 chunk +1 line, -1 line 0 comments Download
M tests/standalone/io/process_broken_pipe_test.dart View 2 chunks +2 lines, -2 lines 0 comments Download
M tests/standalone/io/process_set_exit_code_script.dart View 1 chunk +3 lines, -3 lines 0 comments Download
M tests/standalone/io/process_std_io_script.dart View 2 chunks +3 lines, -3 lines 0 comments Download
M tests/standalone/io/process_std_io_script2.dart View 2 chunks +5 lines, -3 lines 0 comments Download
M tests/standalone/io/process_stderr_test.dart View 2 chunks +2 lines, -2 lines 0 comments Download
M tests/standalone/io/process_stdin_transform_unsubscribe_test.dart View 1 chunk +1 line, -1 line 0 comments Download
M tests/standalone/io/process_stdout_test.dart View 2 chunks +2 lines, -2 lines 0 comments Download
M tests/standalone/io/process_test_util.dart View 2 chunks +2 lines, -2 lines 0 comments Download
M tests/standalone/io/raw_secure_socket_pause_test.dart View 1 chunk +1 line, -1 line 0 comments Download
M tests/standalone/io/raw_secure_socket_test.dart View 1 chunk +1 line, -1 line 0 comments Download
M tests/standalone/io/regress_6521_test.dart View 2 chunks +2 lines, -2 lines 0 comments Download
M tests/standalone/io/regress_7191_test.dart View 1 chunk +2 lines, -2 lines 0 comments Download
M tests/standalone/io/regress_8828_test.dart View 1 chunk +3 lines, -3 lines 0 comments Download
M tests/standalone/io/secure_client_raw_server_test.dart View 1 chunk +1 line, -1 line 0 comments Download
M tests/standalone/io/secure_client_server_test.dart View 2 chunks +2 lines, -2 lines 0 comments Download
M tests/standalone/io/secure_multiple_client_server_test.dart View 2 chunks +2 lines, -2 lines 0 comments Download
M tests/standalone/io/secure_server_socket_test.dart View 2 chunks +2 lines, -2 lines 0 comments Download
M tests/standalone/io/secure_session_resume_test.dart View 2 chunks +2 lines, -2 lines 0 comments Download
M tests/standalone/io/secure_socket_bad_certificate_test.dart View 2 chunks +2 lines, -2 lines 0 comments Download
M tests/standalone/io/secure_socket_test.dart View 2 chunks +2 lines, -2 lines 0 comments Download
M tests/standalone/io/socket_close_test.dart View 2 chunks +2 lines, -2 lines 0 comments Download
M tests/standalone/io/socket_exception_test.dart View 5 chunks +5 lines, -5 lines 0 comments Download
M tests/standalone/io/socket_invalid_arguments_test.dart View 1 chunk +1 line, -1 line 0 comments Download
M tests/standalone/io/socket_test.dart View 4 chunks +4 lines, -4 lines 0 comments Download
M tests/standalone/io/stdout_bad_argument_test.dart View 1 chunk +2 lines, -2 lines 0 comments Download
M tests/standalone/io/stream_pipe_test.dart View 1 2 3 4 3 chunks +5 lines, -5 lines 0 comments Download
M utils/tests/pub/pub_uploader_test.dart View 1 2 3 8 chunks +8 lines, -8 lines 0 comments Download
M utils/tests/pub/test_pub.dart View 1 2 3 3 chunks +3 lines, -3 lines 0 comments Download

Messages

Total messages: 11 (0 generated)
Søren Gjesse
Mads and Anders please review this. Nathan please take a look at the pkg/http changes. ...
7 years, 9 months ago (2013-03-06 15:29:31 UTC) #1
nweiz
https://codereview.chromium.org/12504006/diff/4002/pkg/http/test/utils.dart File pkg/http/test/utils.dart (left): https://codereview.chromium.org/12504006/diff/4002/pkg/http/test/utils.dart#oldcode68 pkg/http/test/utils.dart:68: var encoding = requiredEncodingForCharset( If you've removed all references ...
7 years, 9 months ago (2013-03-06 20:31:51 UTC) #2
Mads Ager (google)
LGTM with a couple of nits on top of Nathan's comments. https://codereview.chromium.org/12504006/diff/4002/runtime/bin/socket_patch.dart File runtime/bin/socket_patch.dart (right): ...
7 years, 9 months ago (2013-03-07 07:57:36 UTC) #3
Anders Johnsen
LGTM https://codereview.chromium.org/12504006/diff/4002/runtime/bin/socket_patch.dart File runtime/bin/socket_patch.dart (right): https://codereview.chromium.org/12504006/diff/4002/runtime/bin/socket_patch.dart#newcode784 runtime/bin/socket_patch.dart:784: void add(List<int> data) { Remove these? https://codereview.chromium.org/12504006/diff/4002/sdk/lib/io/file_impl.dart File ...
7 years, 9 months ago (2013-03-07 08:48:44 UTC) #4
Søren Gjesse
PTAL Addressed review comments Changed addStream to writeStream on IOSink as well. https://codereview.chromium.org/12504006/diff/4002/pkg/http/test/utils.dart File pkg/http/test/utils.dart ...
7 years, 9 months ago (2013-03-07 16:28:47 UTC) #5
Søren Gjesse
PTAL Addressed review comments Changed addStream to writeStream on IOSink as well. https://codereview.chromium.org/12504006/diff/4002/pkg/http/test/utils.dart File pkg/http/test/utils.dart ...
7 years, 9 months ago (2013-03-07 16:28:47 UTC) #6
Anders Johnsen
LGTM https://codereview.chromium.org/12504006/diff/25001/samples/chat/chat_server_lib.dart File samples/chat/chat_server_lib.dart (right): https://codereview.chromium.org/12504006/diff/25001/samples/chat/chat_server_lib.dart#newcode314 samples/chat/chat_server_lib.dart:314: _redirectPage = redirectPageHtml.codeUnits; Not your code, encodeUtf8 or ...
7 years, 9 months ago (2013-03-07 16:53:49 UTC) #7
nweiz
https://codereview.chromium.org/12504006/diff/25001/pkg/http/lib/src/utils.dart File pkg/http/lib/src/utils.dart (left): https://codereview.chromium.org/12504006/diff/25001/pkg/http/lib/src/utils.dart#oldcode88 pkg/http/lib/src/utils.dart:88: Encoding requiredEncodingForCharset(String charset) { Now I'm concerned that there ...
7 years, 9 months ago (2013-03-07 19:32:05 UTC) #8
Søren Gjesse
https://codereview.chromium.org/12504006/diff/25001/pkg/http/lib/src/utils.dart File pkg/http/lib/src/utils.dart (left): https://codereview.chromium.org/12504006/diff/25001/pkg/http/lib/src/utils.dart#oldcode88 pkg/http/lib/src/utils.dart:88: Encoding requiredEncodingForCharset(String charset) { On 2013/03/07 19:32:05, nweiz wrote: ...
7 years, 9 months ago (2013-03-08 09:47:46 UTC) #9
Søren Gjesse
Committed patchset #7 manually as r19676 (presubmit successful).
7 years, 9 months ago (2013-03-08 10:07:05 UTC) #10
nweiz
7 years, 9 months ago (2013-03-08 19:37:20 UTC) #11
Message was sent while issue was closed.
lgtm

Powered by Google App Engine
This is Rietveld 408576698