|
|
WebString: makes string16 conversions explicit (part 1: blink, content)
This is a series of patches that make WebString <-> string16 conversions
explicit. Implicit conversions between WebString and string16 used to make
it really easy to write inefficient code and should be removed.
(More details can be found on crbug.com/667131)
This CL changes implicit conversions to/from string16 by adding following methods:
* static WebString WebString::fromUTF16(const string16&);
* static WebString WebString::fromUTF16(const NullableString16&);
* string16 WebString::utf16();
* static NullableString16 WebString::toNullableString16();
Revises/removes following unnecessary conversions:
* UTF16ToUTF8(StringPiece16(webstring)) -> webstring.utf8()
* WebString(UTF8ToUTF16(string)) -> WebString::fromUTF8(string)
* WebString(ASCIIToUTF16(string)) -> WebString::fromASCII(string)
* WebString(path.AsUTF8Unsafe()) -> FilePathToWebString(path)
* base::IsStringASCII(webstring) -> webstring.containsOnlyASCII()
* base::FilePath::FromUTF8Unsafe(webstring.utf8()) ->
WebStringToFilePath(webstring)
(This still doesn't fix inefficient String comparisons that require unnecessary string copies,
it should be able to be fixed in a separate patch)
BUG= 667131
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+630 lines, -528 lines) |
Patch |
 |
M |
content/child/blink_platform_impl.cc
|
View
|
|
3 chunks |
+10 lines, -8 lines |
0 comments
|
Download
|
 |
M |
content/child/browser_font_resource_trusted.cc
|
View
|
|
5 chunks |
+8 lines, -8 lines |
0 comments
|
Download
|
 |
M |
content/child/database_util.cc
|
View
|
|
5 chunks |
+5 lines, -5 lines |
0 comments
|
Download
|
 |
M |
content/child/db_message_filter.cc
|
View
|
|
2 chunks |
+4 lines, -2 lines |
0 comments
|
Download
|
 |
M |
content/child/fileapi/webfilesystem_impl.cc
|
View
|
|
5 chunks |
+16 lines, -19 lines |
0 comments
|
Download
|
 |
M |
content/child/indexed_db/indexed_db_callbacks_impl.cc
|
View
|
1
|
6 chunks |
+17 lines, -11 lines |
0 comments
|
Download
|
 |
M |
content/child/indexed_db/indexed_db_database_callbacks_impl.cc
|
View
|
1
|
1 chunk |
+3 lines, -1 line |
0 comments
|
Download
|
 |
M |
content/child/indexed_db/indexed_db_key_builders.cc
|
View
|
|
6 chunks |
+9 lines, -7 lines |
0 comments
|
Download
|
 |
M |
content/child/indexed_db/webidbdatabase_impl.cc
|
View
|
1
|
6 chunks |
+10 lines, -10 lines |
0 comments
|
Download
|
 |
M |
content/child/indexed_db/webidbfactory_impl.cc
|
View
|
1
|
2 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
content/child/notifications/notification_data_conversions.cc
|
View
|
|
6 chunks |
+14 lines, -12 lines |
0 comments
|
Download
|
 |
M |
content/child/notifications/notification_manager.cc
|
View
|
1
2
|
3 chunks |
+3 lines, -6 lines |
0 comments
|
Download
|
 |
M |
content/child/service_worker/service_worker_dispatcher.cc
|
View
|
1
2
|
6 chunks |
+12 lines, -6 lines |
0 comments
|
Download
|
 |
M |
content/child/service_worker/web_service_worker_impl.cc
|
View
|
|
1 chunk |
+2 lines, -3 lines |
0 comments
|
Download
|
 |
M |
content/child/web_database_observer_impl.cc
|
View
|
|
2 chunks |
+10 lines, -8 lines |
0 comments
|
Download
|
 |
M |
content/child/web_url_loader_impl.cc
|
View
|
1
2
3
|
5 chunks |
+17 lines, -36 lines |
0 comments
|
Download
|
 |
M |
content/child/web_url_request_util.cc
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
content/child/webfileutilities_impl.cc
|
View
|
|
1 chunk |
+3 lines, -2 lines |
0 comments
|
Download
|
 |
M |
content/child/webmessageportchannel_impl.cc
|
View
|
|
2 chunks |
+3 lines, -3 lines |
0 comments
|
Download
|
 |
M |
content/public/common/color_suggestion.cc
|
View
|
|
1 chunk |
+1 line, -3 lines |
0 comments
|
Download
|
 |
M |
content/public/common/window_container_type.cc
|
View
|
|
1 chunk |
+8 lines, -5 lines |
0 comments
|
Download
|
 |
M |
content/public/test/render_view_test.cc
|
View
|
1
2
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
content/renderer/accessibility/render_accessibility_impl.cc
|
View
|
1
2
3
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
content/renderer/browser_plugin/browser_plugin.cc
|
View
|
|
1 chunk |
+2 lines, -3 lines |
0 comments
|
Download
|
 |
M |
content/renderer/cache_storage/cache_storage_dispatcher.cc
|
View
|
1
2
3
|
7 chunks |
+10 lines, -13 lines |
0 comments
|
Download
|
 |
M |
content/renderer/clipboard_utils.cc
|
View
|
|
2 chunks |
+2 lines, -4 lines |
0 comments
|
Download
|
 |
M |
content/renderer/context_menu_params_builder.cc
|
View
|
|
4 chunks |
+7 lines, -6 lines |
0 comments
|
Download
|
 |
M |
content/renderer/devtools/devtools_agent.cc
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
content/renderer/dom_storage/dom_storage_dispatcher.cc
|
View
|
|
1 chunk |
+8 lines, -12 lines |
0 comments
|
Download
|
 |
M |
content/renderer/dom_storage/local_storage_area.cc
|
View
|
|
2 chunks |
+4 lines, -4 lines |
0 comments
|
Download
|
 |
M |
content/renderer/dom_storage/local_storage_cached_area.cc
|
View
|
|
3 chunks |
+8 lines, -5 lines |
0 comments
|
Download
|
 |
M |
content/renderer/dom_storage/webstoragearea_impl.cc
|
View
|
1
2
|
2 chunks |
+6 lines, -4 lines |
0 comments
|
Download
|
 |
M |
content/renderer/drop_data_builder.cc
|
View
|
|
2 chunks |
+8 lines, -7 lines |
0 comments
|
Download
|
 |
M |
content/renderer/history_serialization.cc
|
View
|
1
2
3
|
5 chunks |
+20 lines, -14 lines |
0 comments
|
Download
|
 |
M |
content/renderer/manifest/manifest_parser.cc
|
View
|
|
2 chunks |
+4 lines, -2 lines |
0 comments
|
Download
|
 |
M |
content/renderer/media/canvas_capture_handler.cc
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
content/renderer/media/media_stream_renderer_factory_impl.cc
|
View
|
|
2 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
content/renderer/media/midi_message_filter.cc
|
View
|
|
4 chunks |
+17 lines, -16 lines |
0 comments
|
Download
|
 |
M |
content/renderer/media/mock_web_rtc_peer_connection_handler_client.cc
|
View
|
|
1 chunk |
+2 lines, -3 lines |
0 comments
|
Download
|
 |
M |
content/renderer/media/peer_connection_tracker.cc
|
View
|
|
3 chunks |
+7 lines, -9 lines |
0 comments
|
Download
|
 |
M |
content/renderer/media/pepper_to_video_track_adapter.cc
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
content/renderer/media/remote_media_stream_impl.cc
|
View
|
|
2 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
content/renderer/media/rtc_data_channel_handler.cc
|
View
|
|
4 chunks |
+4 lines, -4 lines |
0 comments
|
Download
|
 |
M |
content/renderer/media/rtc_dtmf_sender_handler.cc
|
View
|
|
3 chunks |
+3 lines, -4 lines |
0 comments
|
Download
|
 |
M |
content/renderer/media/rtc_peer_connection_handler.cc
|
View
|
|
11 chunks |
+19 lines, -25 lines |
0 comments
|
Download
|
 |
M |
content/renderer/media/user_media_client_impl.cc
|
View
|
1
2
3
|
2 chunks |
+4 lines, -6 lines |
0 comments
|
Download
|
 |
M |
content/renderer/menu_item_builder.cc
|
View
|
|
1 chunk |
+3 lines, -3 lines |
0 comments
|
Download
|
 |
M |
content/renderer/pepper/host_globals.cc
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
content/renderer/pepper/pepper_media_stream_video_track_host.cc
|
View
|
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
content/renderer/pepper/pepper_plugin_instance_impl.h
|
View
|
1
2
3
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
content/renderer/pepper/pepper_plugin_instance_impl.cc
|
View
|
1
2
3
|
2 chunks |
+3 lines, -5 lines |
0 comments
|
Download
|
 |
M |
content/renderer/pepper/pepper_webplugin_impl.cc
|
View
|
|
2 chunks |
+3 lines, -3 lines |
0 comments
|
Download
|
 |
M |
content/renderer/pepper/ppb_graphics_3d_impl.cc
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
content/renderer/pepper/url_request_info_util.cc
|
View
|
|
2 chunks |
+3 lines, -3 lines |
0 comments
|
Download
|
 |
M |
content/renderer/render_frame_impl.cc
|
View
|
1
2
3
|
25 chunks |
+52 lines, -70 lines |
0 comments
|
Download
|
 |
M |
content/renderer/render_frame_proxy.cc
|
View
|
1
2
3
|
1 chunk |
+3 lines, -3 lines |
0 comments
|
Download
|
 |
M |
content/renderer/render_view_impl.cc
|
View
|
1
2
3
|
4 chunks |
+11 lines, -11 lines |
0 comments
|
Download
|
 |
M |
content/renderer/render_widget.cc
|
View
|
1
|
11 chunks |
+16 lines, -13 lines |
0 comments
|
Download
|
 |
M |
content/renderer/renderer_blink_platform_impl.cc
|
View
|
1
2
3
|
3 chunks |
+7 lines, -7 lines |
0 comments
|
Download
|
 |
M |
content/renderer/renderer_webcookiejar_impl.cc
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
content/renderer/savable_resources.cc
|
View
|
|
1 chunk |
+6 lines, -4 lines |
0 comments
|
Download
|
 |
M |
content/renderer/service_worker/embedded_worker_dispatcher.cc
|
View
|
1
2
|
1 chunk |
+2 lines, -1 line |
0 comments
|
Download
|
 |
M |
content/renderer/service_worker/service_worker_context_client.cc
|
View
|
1
2
|
11 chunks |
+20 lines, -21 lines |
0 comments
|
Download
|
 |
M |
content/renderer/shared_worker/embedded_shared_worker_content_settings_client_proxy.cc
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
content/renderer/shared_worker/embedded_shared_worker_stub.cc
|
View
|
|
1 chunk |
+4 lines, -2 lines |
0 comments
|
Download
|
 |
M |
content/renderer/shared_worker_repository.cc
|
View
|
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
content/renderer/speech_recognition_dispatcher.cc
|
View
|
1
|
2 chunks |
+2 lines, -3 lines |
0 comments
|
Download
|
 |
M |
content/renderer/webclipboard_impl.cc
|
View
|
1
2
3
|
7 chunks |
+12 lines, -10 lines |
0 comments
|
Download
|
 |
M |
content/shell/renderer/layout_test/blink_test_runner.cc
|
View
|
1
|
2 chunks |
+2 lines, -7 lines |
0 comments
|
Download
|
 |
M |
content/test/layouttest_support.cc
|
View
|
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
content/test/mock_webclipboard_impl.cc
|
View
|
|
10 chunks |
+21 lines, -19 lines |
0 comments
|
Download
|
 |
M |
content/test/test_blink_web_unit_test_support.cc
|
View
|
1
|
4 chunks |
+19 lines, -17 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/platform/exported/FilePathConversion.cpp
|
View
|
1
2
3
|
1 chunk |
+11 lines, -0 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/platform/exported/FilePathConversionTest.cpp
|
View
|
|
1 chunk |
+9 lines, -0 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/platform/exported/WebString.cpp
|
View
|
1
2
3
|
1 chunk |
+15 lines, -0 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/public/platform/DEPS
|
View
|
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/public/platform/FilePathConversion.h
|
View
|
|
1 chunk |
+2 lines, -0 lines |
0 comments
|
Download
|
 |
A |
third_party/WebKit/public/platform/StringVectorCopier.h
|
View
|
1
2
3
4
5
|
1 chunk |
+42 lines, -0 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/public/platform/WebString.h
|
View
|
1
2
3
4
|
4 chunks |
+47 lines, -6 lines |
0 comments
|
Download
|
Total messages: 53 (48 generated)
|