New issue
Advanced search Search tips

Issue 644626 link

Starred by 9 users

Issue metadata

Status: Untriaged
Owner: ----
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

Replace unique_ptr.reset(other_unique_ptr.release() with std::move()

Project Member Reported by thestig@chromium.org, Sep 7 2016

Issue description

With C++11, unique_ptr.reset(other_unique_ptr.release()) can be rewritten as:

unique_ptr = std::move(other_unique_ptr)

and unique_ptr.reset(return_unique_ptr_func().release()) can simply be:

unique_ptr = return_unique_ptr_func();


Here's a code search query to try to find some of these: https://cs.chromium.org/search/?q=reset%5C(.*release%5C(%5C)%5C);&sq=package:chromium&type=cs
 
Hello,
I just downloaded the code and I was looking for an easy patch and I think this is it.

Newbie question: How should the patch(es) be separated? Should this be in one patch or multiple? And if so, is there a clear scope for patches (files, modules, etc.).

Thank you, and sorry for the newbie question.
Cheers.

re: Comment 1 - Try to group them by directories so you can send them to just one or two OWNERS. Try to keep the CLs smallish. 10-15 files at most.
re: Comment 2- Okay! Thank you!
Project Member

Comment 5 by bugdroid1@chromium.org, Nov 1 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/888d4fd7935dea7bda7a2567ee4b1c801d4dd870

commit 888d4fd7935dea7bda7a2567ee4b1c801d4dd870
Author: sanghee.lee1992 <sanghee.lee1992@gmail.com>
Date: Tue Nov 01 05:19:43 2016

Replace unique_ptr.reset(other_unique_ptr.release() with std::move()
in ui/base/resource/resource_bundle.cc

BUG= 644626

Review-Url: https://codereview.chromium.org/2463713002
Cr-Commit-Position: refs/heads/master@{#428942}

[modify] https://crrev.com/888d4fd7935dea7bda7a2567ee4b1c801d4dd870/AUTHORS
[modify] https://crrev.com/888d4fd7935dea7bda7a2567ee4b1c801d4dd870/ui/base/resource/resource_bundle.cc

Project Member

Comment 6 by bugdroid1@chromium.org, Nov 16 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/77666edc7219541b2af29981b398b2221bcb77e5

commit 77666edc7219541b2af29981b398b2221bcb77e5
Author: sanghee.lee1992 <sanghee.lee1992@gmail.com>
Date: Wed Nov 16 02:13:41 2016

Replace unique_ptr.reset with std::move() in error_page/renderer

BUG=644626

Replace unique_ptr.reset(other_unique_ptr.release() with std::move()
in component/error_page/renderer

Review-Url: https://codereview.chromium.org/2490413002
Cr-Commit-Position: refs/heads/master@{#432355}

[modify] https://crrev.com/77666edc7219541b2af29981b398b2221bcb77e5/components/error_page/renderer/net_error_helper_core.cc
[modify] https://crrev.com/77666edc7219541b2af29981b398b2221bcb77e5/components/error_page/renderer/net_error_helper_core.h
[modify] https://crrev.com/77666edc7219541b2af29981b398b2221bcb77e5/components/error_page/renderer/net_error_helper_core_unittest.cc

Project Member

Comment 8 by bugdroid1@chromium.org, Nov 22 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/0d074f722de6e0687e1a572407380cc8fb6005fb

commit 0d074f722de6e0687e1a572407380cc8fb6005fb
Author: Yoonjae.Cho92 <Yoonjae.Cho92@gmail.com>
Date: Tue Nov 22 12:42:17 2016

Replace ptr.reset with std::move in src/components

BUG=644626

Review-Url: https://codereview.chromium.org/2521063004
Cr-Commit-Position: refs/heads/master@{#433843}

[modify] https://crrev.com/0d074f722de6e0687e1a572407380cc8fb6005fb/components/autofill/content/browser/risk/fingerprint.cc
[modify] https://crrev.com/0d074f722de6e0687e1a572407380cc8fb6005fb/components/data_reduction_proxy/core/browser/data_reduction_proxy_network_delegate.cc
[modify] https://crrev.com/0d074f722de6e0687e1a572407380cc8fb6005fb/components/dom_distiller/core/dom_distiller_store.cc
[modify] https://crrev.com/0d074f722de6e0687e1a572407380cc8fb6005fb/components/history/core/browser/history_service.cc
[modify] https://crrev.com/0d074f722de6e0687e1a572407380cc8fb6005fb/components/leveldb_proto/proto_database_impl.h
[modify] https://crrev.com/0d074f722de6e0687e1a572407380cc8fb6005fb/components/metrics/metrics_log_manager.cc
[modify] https://crrev.com/0d074f722de6e0687e1a572407380cc8fb6005fb/components/nacl/loader/nacl_ipc_adapter.cc
[modify] https://crrev.com/0d074f722de6e0687e1a572407380cc8fb6005fb/components/nacl/renderer/ppb_nacl_private_impl.cc
[modify] https://crrev.com/0d074f722de6e0687e1a572407380cc8fb6005fb/components/safe_browsing_db/v4_update_protocol_manager.cc
[modify] https://crrev.com/0d074f722de6e0687e1a572407380cc8fb6005fb/components/storage_monitor/storage_monitor_mac.mm
[modify] https://crrev.com/0d074f722de6e0687e1a572407380cc8fb6005fb/components/update_client/action.cc
[modify] https://crrev.com/0d074f722de6e0687e1a572407380cc8fb6005fb/components/update_client/action_update.cc
[modify] https://crrev.com/0d074f722de6e0687e1a572407380cc8fb6005fb/components/update_client/update_engine.cc

Project Member

Comment 9 by bugdroid1@chromium.org, Dec 2 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/5722ddb82d35096ead26103f8663b8d68a08558b

commit 5722ddb82d35096ead26103f8663b8d68a08558b
Author: htamop <htamop@gmail.com>
Date: Fri Dec 02 04:51:04 2016

Replace unique_ptr.reset(other_unique_ptr.release() with std::move()

BUG=644626

TAG:PLTAL!

Review-Url: https://codereview.chromium.org/2532423002
Cr-Commit-Position: refs/heads/master@{#435861}

[modify] https://crrev.com/5722ddb82d35096ead26103f8663b8d68a08558b/AUTHORS
[modify] https://crrev.com/5722ddb82d35096ead26103f8663b8d68a08558b/content/renderer/history_controller.cc

Project Member

Comment 10 by bugdroid1@chromium.org, Dec 5 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/19e46f29dc94984c71fcaa05babdf14dd252054d

commit 19e46f29dc94984c71fcaa05babdf14dd252054d
Author: skeksk91 <skeksk91@gmail.com>
Date: Mon Dec 05 01:44:38 2016

Replace unique_ptr::reset() to std::move()

BUG=644626

Review-Url: https://codereview.chromium.org/2547333002
Cr-Commit-Position: refs/heads/master@{#436213}

[modify] https://crrev.com/19e46f29dc94984c71fcaa05babdf14dd252054d/AUTHORS
[modify] https://crrev.com/19e46f29dc94984c71fcaa05babdf14dd252054d/ui/gl/gl_surface_egl.cc

Project Member

Comment 12 by bugdroid1@chromium.org, Dec 9 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/894515af61d650d0f2d28445f62eb0ad518e4238

commit 894515af61d650d0f2d28445f62eb0ad518e4238
Author: inlinechan <inlinechan@gmail.com>
Date: Fri Dec 09 02:40:10 2016

Change unique_ptr::reset() for std::move

BUG=644626

R=gavinp@chromium.org

Review-Url: https://codereview.chromium.org/2503993002
Cr-Commit-Position: refs/heads/master@{#437444}

[modify] https://crrev.com/894515af61d650d0f2d28445f62eb0ad518e4238/net/cert/x509_util.cc
[modify] https://crrev.com/894515af61d650d0f2d28445f62eb0ad518e4238/net/disk_cache/simple/simple_entry_impl.cc
[modify] https://crrev.com/894515af61d650d0f2d28445f62eb0ad518e4238/net/http/http_network_transaction_unittest.cc
[modify] https://crrev.com/894515af61d650d0f2d28445f62eb0ad518e4238/net/http/http_stream_factory_impl_job_controller_unittest.cc
[modify] https://crrev.com/894515af61d650d0f2d28445f62eb0ad518e4238/net/proxy/proxy_config_service_linux.cc
[modify] https://crrev.com/894515af61d650d0f2d28445f62eb0ad518e4238/net/quic/chromium/crypto/channel_id_chromium.cc
[modify] https://crrev.com/894515af61d650d0f2d28445f62eb0ad518e4238/net/quic/core/crypto/quic_crypto_client_config.cc
[modify] https://crrev.com/894515af61d650d0f2d28445f62eb0ad518e4238/net/quic/core/quic_crypto_client_stream.cc
[modify] https://crrev.com/894515af61d650d0f2d28445f62eb0ad518e4238/net/server/http_server_unittest.cc
[modify] https://crrev.com/894515af61d650d0f2d28445f62eb0ad518e4238/net/socket/udp_socket_posix.cc
[modify] https://crrev.com/894515af61d650d0f2d28445f62eb0ad518e4238/net/socket/udp_socket_win.cc
[modify] https://crrev.com/894515af61d650d0f2d28445f62eb0ad518e4238/net/spdy/spdy_network_transaction_unittest.cc
[modify] https://crrev.com/894515af61d650d0f2d28445f62eb0ad518e4238/net/spdy/spdy_session_unittest.cc

Project Member

Comment 14 by bugdroid1@chromium.org, Jan 24 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/437df5cde1efb13ea51c97e4133c2fd1b1fd654c

commit 437df5cde1efb13ea51c97e4133c2fd1b1fd654c
Author: ratsunny <ratsunny@gmail.com>
Date: Tue Jan 24 15:50:59 2017

Replace unique_ptr.reset/release with std::move

R=gavinp@chromium.org
BUG=644626

Review-Url: https://codereview.chromium.org/2634513004
Cr-Commit-Position: refs/heads/master@{#445735}

[modify] https://crrev.com/437df5cde1efb13ea51c97e4133c2fd1b1fd654c/net/quic/quartc/quartc_factory.cc

Project Member

Comment 15 by bugdroid1@chromium.org, Mar 6 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/037f99733dfc7a5465e0ac7dc39f3711dc4090d7

commit 037f99733dfc7a5465e0ac7dc39f3711dc4090d7
Author: gogag2 <gogag2@gmail.com>
Date: Mon Mar 06 02:12:54 2017

Replace unique_ptr.reset(other_unique_ptr.release() with std::move() in device/bluetooth/

BUG= 644626

Review-Url: https://codereview.chromium.org/2729333002
Cr-Commit-Position: refs/heads/master@{#454813}

[modify] https://crrev.com/037f99733dfc7a5465e0ac7dc39f3711dc4090d7/device/bluetooth/bluetooth_discovery_session.cc
[modify] https://crrev.com/037f99733dfc7a5465e0ac7dc39f3711dc4090d7/device/bluetooth/bluez/bluetooth_adapter_bluez.cc

Project Member

Comment 16 by bugdroid1@chromium.org, Mar 13 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/178891545bb2f76efeb22802e069de1be23712f5

commit 178891545bb2f76efeb22802e069de1be23712f5
Author: gogag2 <gogag2@gmail.com>
Date: Mon Mar 13 14:34:42 2017

Replace unique_ptr.reset(other_unique_ptr.release()) with std::move() in cc/trees/

BUG=644626

CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_trusty_blink_rel

Review-Url: https://codereview.chromium.org/2745963002
Cr-Commit-Position: refs/heads/master@{#456375}

[modify] https://crrev.com/178891545bb2f76efeb22802e069de1be23712f5/cc/trees/layer_tree_host_common_unittest.cc
[modify] https://crrev.com/178891545bb2f76efeb22802e069de1be23712f5/cc/trees/layer_tree_host_impl_unittest.cc
[modify] https://crrev.com/178891545bb2f76efeb22802e069de1be23712f5/cc/trees/layer_tree_impl_unittest.cc

Project Member

Comment 18 by bugdroid1@chromium.org, Mar 16 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/9e0c428878a84a2a53623ea973e761dff3c83b0c

commit 9e0c428878a84a2a53623ea973e761dff3c83b0c
Author: gogag2 <gogag2@gmail.com>
Date: Thu Mar 16 02:43:10 2017

Replace unique_ptr.reset(other_unique_ptr.release()) with std::move() in ash/

BUG=644626

Review-Url: https://codereview.chromium.org/2743193002
Cr-Commit-Position: refs/heads/master@{#457327}

[modify] https://crrev.com/9e0c428878a84a2a53623ea973e761dff3c83b0c/ash/sticky_keys/sticky_keys_controller.cc
[modify] https://crrev.com/9e0c428878a84a2a53623ea973e761dff3c83b0c/ash/test/shelf_button_pressed_metric_tracker_test_api.cc

Project Member

Comment 22 by bugdroid1@chromium.org, May 10 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/031e9182682edbd67ddae5c7bd0ba9805bb02146

commit 031e9182682edbd67ddae5c7bd0ba9805bb02146
Author: gogag2 <gogag2@gmail.com>
Date: Wed May 10 04:49:07 2017

Replace unique_ptr.reset(other_unique_ptr.release()) with std::move() in chrome

BUG=644626

Review-Url: https://codereview.chromium.org/2838433003
Cr-Commit-Position: refs/heads/master@{#470460}

[modify] https://crrev.com/031e9182682edbd67ddae5c7bd0ba9805bb02146/remoting/host/clipboard_mac.mm
[modify] https://crrev.com/031e9182682edbd67ddae5c7bd0ba9805bb02146/remoting/protocol/audio_decode_scheduler.cc

Project Member

Comment 23 by sheriffbot@chromium.org, May 10 2018

Labels: Hotlist-Recharge-Cold
Status: Untriaged (was: Available)
This issue has been Available for over a year. If it's no longer important or seems unlikely to be fixed, please consider closing it out. If it is important, please re-triage the issue.

Sorry for the inconvenience if the bug really should have been left as Available.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Project Member

Comment 24 by bugdroid1@chromium.org, Jul 10

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/fb941e99d9b3330b5cd2e7803704e1bf3f57de64

commit fb941e99d9b3330b5cd2e7803704e1bf3f57de64
Author: kokihoon <rhrlgns777@gmail.com>
Date: Tue Jul 10 18:04:24 2018

Replace unique_ptr.reset(other_unique_ptr.release()) with std::move()

Bug=644626

Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;luci.chromium.try:linux_optional_gpu_tests_rel;luci.chromium.try:mac_optional_gpu_tests_rel;luci.chromium.try:win_optional_gpu_tests_rel
Change-Id: I65716a23813f83c98b908fbff37e60c1d3ca1a83
Reviewed-on: https://chromium-review.googlesource.com/1124135
Reviewed-by: John Rummell <jrummell@chromium.org>
Commit-Queue: John Rummell <jrummell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#573807}
[modify] https://crrev.com/fb941e99d9b3330b5cd2e7803704e1bf3f57de64/AUTHORS
[modify] https://crrev.com/fb941e99d9b3330b5cd2e7803704e1bf3f57de64/media/gpu/vp9_decoder.cc
[modify] https://crrev.com/fb941e99d9b3330b5cd2e7803704e1bf3f57de64/media/midi/midi_manager_alsa.cc

Sign in to add a comment