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

Issue 2559693003: [ObjC ARC] Converts ios/chrome/browser/passwords:unit_tests to ARC. (Closed)

Created:
4 years ago by stkhapugin
Modified:
4 years ago
CC:
chromium-reviews, gcasto+watchlist_chromium.org, pkl (ping after 24h if needed), vabr+watchlistpasswordmanager_chromium.org, sdefresne+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[ObjC ARC] Converts ios/chrome/browser/passwords:unit_tests to ARC. Notable issues: * After replacing scoped_nsobjects with strong ivars, the tests started failing because of the change in destruction order of TestWebState and its observer. Patched TestWebState to reset its observers upon destruction, similar to WebStateImpl. BUG=624363 TEST=None Committed: https://crrev.com/3de9dfcbfc1a9fd4cd7cc09feb2be207eb8301ce Cr-Commit-Position: refs/heads/master@{#437223}

Patch Set 1 #

Patch Set 2 : Cleanup #

Total comments: 4
Unified diffs Side-by-side diffs Delta from patch set Stats (+99 lines, -67 lines) Patch
M ios/chrome/browser/passwords/BUILD.gn View 1 chunk +1 line, -0 lines 0 comments Download
M ios/chrome/browser/passwords/credential_manager_js_unittest.mm View 1 4 chunks +8 lines, -5 lines 0 comments Download
M ios/chrome/browser/passwords/credential_manager_unittest.mm View 1 5 chunks +12 lines, -9 lines 0 comments Download
M ios/chrome/browser/passwords/password_controller_js_unittest.mm View 1 1 chunk +4 lines, -0 lines 0 comments Download
M ios/chrome/browser/passwords/password_controller_off_the_record_unittest.mm View 1 4 chunks +7 lines, -5 lines 0 comments Download
M ios/chrome/browser/passwords/password_controller_unittest.mm View 1 9 chunks +17 lines, -23 lines 2 comments Download
M ios/chrome/browser/passwords/password_generation_agent_unittest.mm View 1 8 chunks +24 lines, -22 lines 2 comments Download
M ios/web/public/test/test_web_state.h View 1 3 chunks +9 lines, -2 lines 0 comments Download
M ios/web/public/test/test_web_state.mm View 1 1 chunk +15 lines, -1 line 0 comments Download
M ios/web/public/web_state/web_state_observer.h View 1 2 chunks +2 lines, -0 lines 0 comments Download

Messages

Total messages: 21 (14 generated)
stkhapugin
ptal
4 years ago (2016-12-07 17:25:22 UTC) #9
Eugene But (OOO till 7-30)
lgtm https://codereview.chromium.org/2559693003/diff/20001/ios/chrome/browser/passwords/password_controller_unittest.mm File ios/chrome/browser/passwords/password_controller_unittest.mm (right): https://codereview.chromium.org/2559693003/diff/20001/ios/chrome/browser/passwords/password_controller_unittest.mm#newcode217 ios/chrome/browser/passwords/password_controller_unittest.mm:217: __unsafe_unretained void (^completionHandler)(BOOL); Should this be __weal? https://codereview.chromium.org/2559693003/diff/20001/ios/chrome/browser/passwords/password_generation_agent_unittest.mm ...
4 years ago (2016-12-07 18:21:35 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2559693003/20001
4 years ago (2016-12-08 09:55:03 UTC) #14
commit-bot: I haz the power
Committed patchset #2 (id:20001)
4 years ago (2016-12-08 09:59:58 UTC) #17
commit-bot: I haz the power
Patchset 2 (id:??) landed as https://crrev.com/3de9dfcbfc1a9fd4cd7cc09feb2be207eb8301ce Cr-Commit-Position: refs/heads/master@{#437223}
4 years ago (2016-12-08 10:01:27 UTC) #19
stkhapugin
Thanks! https://codereview.chromium.org/2559693003/diff/20001/ios/chrome/browser/passwords/password_controller_unittest.mm File ios/chrome/browser/passwords/password_controller_unittest.mm (right): https://codereview.chromium.org/2559693003/diff/20001/ios/chrome/browser/passwords/password_controller_unittest.mm#newcode217 ios/chrome/browser/passwords/password_controller_unittest.mm:217: __unsafe_unretained void (^completionHandler)(BOOL); On 2016/12/07 18:21:35, Eugene But ...
4 years ago (2016-12-08 10:15:47 UTC) #20
stkhapugin
4 years ago (2016-12-08 10:15:47 UTC) #21
Message was sent while issue was closed.
https://codereview.chromium.org/2559693003/diff/20001/ios/chrome/browser/pass...
File ios/chrome/browser/passwords/password_controller_unittest.mm (right):

https://codereview.chromium.org/2559693003/diff/20001/ios/chrome/browser/pass...
ios/chrome/browser/passwords/password_controller_unittest.mm:217:
__unsafe_unretained void (^completionHandler)(BOOL);
On 2016/12/07 18:21:35, Eugene But wrote:
> Should this be __weal?

Actually, no - grabbing arguments from NSInvocation is unsafe and memory
semantics do not apply, so ARC enforces __unsafe_unretained. It is assumed that
the argument is properly memory managed when the invocation is valid, which is
the case here as the invocation argument is retrieved during the invocation
dispatch.

https://codereview.chromium.org/2559693003/diff/20001/ios/chrome/browser/pass...
File ios/chrome/browser/passwords/password_generation_agent_unittest.mm (right):

https://codereview.chromium.org/2559693003/diff/20001/ios/chrome/browser/pass...
ios/chrome/browser/passwords/password_generation_agent_unittest.mm:487:
__unsafe_unretained void (^completion_handler)(BOOL);
On 2016/12/07 18:21:35, Eugene But wrote:
> ditto

See above.

Powered by Google App Engine
This is Rietveld 408576698