|
Re-write many calls to WrapUnique() with MakeUnique()
A mostly-automated change to convert instances of WrapUnique(new Foo(...)) to
MakeUnique<Foo>(...). See the thread at
https://groups.google.com/a/chromium.org/forum/#!topic/chromium-dev/iQgMedVA8-k
for background.
To avoid requiring too many manual fixups, the change skips some cases that are
frequently problematic. In particular, in methods named Foo::Method() it will
not try to change WrapUnique(new Foo()) to MakeUnique<Foo>(). This is because
Foo::Method() may be accessing an internal constructor of Foo.
Cases where MakeUnique<NestedClass>(...) is called within a method of
OuterClass are common but hard to detect automatically, so have been fixed-up
manually.
The only types of manual fix ups applied are:
1) Revert MakeUnique back to WrapUnique
2) Change NULL to nullptr in argument list (MakeUnique cannot forward NULL
correctly)
3) Add base:: namespace qualifier where missing.
WrapUnique(new Foo) has not been converted to MakeUnique<Foo>() as this might
change behaviour if Foo does not have a user-defined constructor. For example,
WrapUnique(new int) creates an unitialised integer, but MakeUnique<int>()
creates an integer initialised to 0.
git cl format has been been run over the CL. Spot-checking has uncovered no
cases of mis-formatting.
BUG= 637812
Committed: https://crrev.com/2deef68d60652155b338b88b1acc1f4be1c51ee3
Cr-Commit-Position: refs/heads/master@{#417532}
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+354 lines, -355 lines) |
Patch |
 |
M |
net/base/chunked_upload_data_stream.cc
|
View
|
1
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
net/base/elements_upload_data_stream_unittest.cc
|
View
|
1
|
12 chunks |
+27 lines, -27 lines |
0 comments
|
Download
|
 |
M |
net/cert/internal/path_builder.cc
|
View
|
1
2
3
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
net/cert/internal/signature_algorithm.cc
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
net/cert_net/cert_net_fetcher_impl_unittest.cc
|
View
|
|
1 chunk |
+4 lines, -4 lines |
0 comments
|
Download
|
 |
M |
net/cookies/cookie_monster.cc
|
View
|
1
2
3
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
net/cookies/cookie_monster_store_test.cc
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
net/cookies/cookie_monster_unittest.cc
|
View
|
1
2
3
|
2 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
net/disk_cache/simple/simple_backend_impl.cc
|
View
|
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
net/dns/dns_session.cc
|
View
|
1
2
3
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
net/dns/dns_transaction_unittest.cc
|
View
|
|
5 chunks |
+13 lines, -13 lines |
0 comments
|
Download
|
 |
M |
net/dns/host_resolver_impl.cc
|
View
|
1
2
3
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
net/dns/host_resolver_impl_unittest.cc
|
View
|
1
2
3
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
net/ftp/ftp_network_layer.cc
|
View
|
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
net/http/bidirectional_stream.cc
|
View
|
1
2
3
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
net/http/bidirectional_stream_unittest.cc
|
View
|
1
2
3
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
net/http/http_auth_handler_factory.cc
|
View
|
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
net/http/http_auth_handler_negotiate_unittest.cc
|
View
|
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
net/http/http_cache.cc
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
net/http/http_cache_unittest.cc
|
View
|
1
2
3
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
net/http/http_network_transaction_unittest.cc
|
View
|
1
2
3
|
14 chunks |
+20 lines, -20 lines |
0 comments
|
Download
|
 |
M |
net/http/http_stream_factory_impl_job_controller_unittest.cc
|
View
|
1
2
3
|
8 chunks |
+22 lines, -22 lines |
0 comments
|
Download
|
 |
M |
net/http/http_stream_parser_unittest.cc
|
View
|
1
2
3
|
5 chunks |
+11 lines, -10 lines |
0 comments
|
Download
|
 |
M |
net/http/mock_http_cache.cc
|
View
|
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
net/http/transport_security_state.cc
|
View
|
1
2
3
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
net/log/net_log_unittest.cc
|
View
|
1
2
3
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
net/proxy/dhcp_proxy_script_fetcher_factory.cc
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
net/proxy/mock_proxy_resolver.cc
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
net/proxy/mojo_proxy_resolver_factory_impl.cc
|
View
|
|
1 chunk |
+2 lines, -3 lines |
0 comments
|
Download
|
 |
M |
net/proxy/mojo_proxy_resolver_impl.cc
|
View
|
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
net/proxy/proxy_resolver_factory_mojo_unittest.cc
|
View
|
1
2
3
|
5 chunks |
+13 lines, -12 lines |
0 comments
|
Download
|
 |
M |
net/proxy/proxy_resolver_v8_tracing_unittest.cc
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
net/proxy/proxy_script_fetcher_impl_unittest.cc
|
View
|
|
1 chunk |
+7 lines, -7 lines |
0 comments
|
Download
|
 |
M |
net/proxy/proxy_service.cc
|
View
|
1
2
3
|
6 chunks |
+11 lines, -12 lines |
0 comments
|
Download
|
 |
M |
net/proxy/proxy_service_mojo.cc
|
View
|
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
net/proxy/proxy_service_mojo_unittest.cc
|
View
|
1
2
3
|
2 chunks |
+5 lines, -5 lines |
0 comments
|
Download
|
 |
M |
net/proxy/proxy_service_unittest.cc
|
View
|
1
2
3
|
16 chunks |
+16 lines, -17 lines |
0 comments
|
Download
|
 |
M |
net/proxy/proxy_service_v8.cc
|
View
|
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
net/quic/chromium/bidirectional_stream_quic_impl_unittest.cc
|
View
|
1
2
3
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
net/quic/chromium/crypto_test_utils_chromium.cc
|
View
|
|
1 chunk |
+4 lines, -4 lines |
0 comments
|
Download
|
 |
M |
net/quic/chromium/quic_chromium_client_session.cc
|
View
|
1
2
3
|
2 chunks |
+6 lines, -6 lines |
0 comments
|
Download
|
 |
M |
net/quic/chromium/quic_end_to_end_unittest.cc
|
View
|
1
2
3
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
net/quic/chromium/quic_http_stream_test.cc
|
View
|
1
2
3
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
net/quic/chromium/quic_stream_factory.cc
|
View
|
1
2
3
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
net/quic/test_tools/quic_test_packet_maker.cc
|
View
|
|
2 chunks |
+4 lines, -4 lines |
0 comments
|
Download
|
 |
M |
net/server/http_server.cc
|
View
|
|
1 chunk |
+1 line, -2 lines |
0 comments
|
Download
|
 |
M |
net/server/web_socket_encoder.cc
|
View
|
|
2 chunks |
+8 lines, -8 lines |
0 comments
|
Download
|
 |
M |
net/socket/fuzzed_socket_factory.cc
|
View
|
1
2
|
2 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
net/spdy/bidirectional_stream_spdy_impl_unittest.cc
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
net/spdy/spdy_network_transaction_unittest.cc
|
View
|
1
2
3
|
4 chunks |
+12 lines, -12 lines |
0 comments
|
Download
|
 |
M |
net/spdy/spdy_test_util_common.cc
|
View
|
1
2
3
|
2 chunks |
+5 lines, -5 lines |
0 comments
|
Download
|
 |
M |
net/ssl/default_channel_id_store_unittest.cc
|
View
|
|
8 chunks |
+37 lines, -37 lines |
0 comments
|
Download
|
 |
M |
net/ssl/ssl_platform_key_chromecast.cc
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
net/ssl/ssl_platform_key_mac.cc
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
net/ssl/ssl_platform_key_nss.cc
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
net/ssl/test_ssl_private_key.cc
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
net/test/embedded_test_server/request_handler_util.cc
|
View
|
|
1 chunk |
+1 line, -2 lines |
0 comments
|
Download
|
 |
M |
net/test/url_request/url_request_hanging_read_job.cc
|
View
|
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
net/test/url_request/url_request_mock_data_job.cc
|
View
|
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
net/tools/cert_verify_tool/verify_using_path_builder.cc
|
View
|
1
2
3
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
net/tools/get_server_time/get_server_time.cc
|
View
|
1
2
3
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
net/url_request/url_fetcher_impl_unittest.cc
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
net/url_request/url_request_context_builder.cc
|
View
|
|
6 chunks |
+10 lines, -10 lines |
0 comments
|
Download
|
 |
M |
net/url_request/url_request_context_builder_unittest.cc
|
View
|
|
2 chunks |
+5 lines, -4 lines |
0 comments
|
Download
|
 |
M |
net/url_request/url_request_data_job_fuzzer.cc
|
View
|
1
2
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
net/url_request/url_request_ftp_job_unittest.cc
|
View
|
|
2 chunks |
+6 lines, -5 lines |
0 comments
|
Download
|
 |
M |
net/url_request/url_request_simple_job_unittest.cc
|
View
|
1
2
3
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
net/url_request/url_request_test_job.cc
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
net/url_request/url_request_test_util.cc
|
View
|
1
2
3
|
3 chunks |
+14 lines, -13 lines |
0 comments
|
Download
|
 |
M |
net/url_request/url_request_unittest.cc
|
View
|
1
2
3
|
4 chunks |
+7 lines, -8 lines |
0 comments
|
Download
|
 |
M |
net/url_request/view_cache_helper_unittest.cc
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
net/websockets/websocket_channel_test.cc
|
View
|
|
6 chunks |
+10 lines, -10 lines |
0 comments
|
Download
|
 |
M |
net/websockets/websocket_deflate_predictor_impl_test.cc
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
net/websockets/websocket_stream.cc
|
View
|
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
net/websockets/websocket_stream_cookie_test.cc
|
View
|
|
2 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
net/websockets/websocket_stream_test.cc
|
View
|
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
Total messages: 29 (21 generated)
|