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

Issue 2802763002: [ios] Cleanup SessionServiceIOS implementation. (Closed)

Created:
3 years, 8 months ago by sdefresne
Modified:
3 years, 8 months ago
CC:
chromium-reviews, ios-reviews+chrome_chromium.org, ios-reviews_chromium.org, pkl (ping after 24h if needed), noyau+watch_chromium.org, marq+watch_chromium.org, sdefresne+watch_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

[ios] Cleanup SessionServiceIOS implementation. Before refactoring of SessionServiceIOS to make it easier to unit test and to share with the new architecture, clean up legacy code. - Rename the files session_service{ => _ios}.{h,mm} to follow the convention of naming the files after the class defined. - Remove custom NSKeyedUnarchiver subclass SessionWindowUnarchiver as the additional property browserState is no longer and use a category of NSKeyedUnarchiver to define the method to register the aliases to load legacy saved session files. - Convert the code to ARC and merge "unit_tests_non_arc" target with "unit_tests" target as they both use ARC. - Reformat logged error messages, ensure that they include the path of the file or directory they apply to. - Use base::MakeCriticalClosure to prevent Chrome from suspending instead of using -beginBackgroundTaskWithExpirationHandler (the CriticalClosure code use the same functionality, but is shared code). - Remove SessionWindowIOS -clearSession as the method is no longer useful (obsolete). - Use lightweight generics and remove casts. - Remove obsolete #includes. BUG=None Review-Url: https://codereview.chromium.org/2802763002 Cr-Commit-Position: refs/heads/master@{#462527} Committed: https://chromium.googlesource.com/chromium/src/+/da974c8881efb5c372206a5ac86ad807c0dbd931

Patch Set 1 #

Total comments: 9

Patch Set 2 : Address comments. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+91 lines, -693 lines) Patch
M ios/chrome/browser/crash_report/crash_restore_helper.mm View 3 chunks +3 lines, -5 lines 0 comments Download
M ios/chrome/browser/crash_report/crash_restore_helper_unittest.mm View 1 chunk +1 line, -1 line 0 comments Download
M ios/chrome/browser/sessions/BUILD.gn View 4 chunks +5 lines, -19 lines 0 comments Download
D ios/chrome/browser/sessions/session_service.h View 1 chunk +0 lines, -80 lines 0 comments Download
D ios/chrome/browser/sessions/session_service.mm View 1 chunk +0 lines, -279 lines 0 comments Download
A + ios/chrome/browser/sessions/session_service_ios.h View 3 chunks +4 lines, -22 lines 0 comments Download
A + ios/chrome/browser/sessions/session_service_ios.mm View 1 10 chunks +71 lines, -98 lines 0 comments Download
A + ios/chrome/browser/sessions/session_service_ios_unittest.mm View 2 chunks +2 lines, -3 lines 0 comments Download
D ios/chrome/browser/sessions/session_service_unittest.mm View 1 chunk +0 lines, -162 lines 0 comments Download
M ios/chrome/browser/sessions/session_util.mm View 1 chunk +1 line, -1 line 0 comments Download
M ios/chrome/browser/sessions/session_window_ios.h View 1 chunk +0 lines, -3 lines 0 comments Download
M ios/chrome/browser/sessions/session_window_ios.mm View 1 chunk +0 lines, -5 lines 0 comments Download
M ios/chrome/browser/sessions/session_window_ios_unittest.mm View 1 chunk +0 lines, -11 lines 0 comments Download
M ios/chrome/browser/sessions/test_session_service.h View 1 chunk +1 line, -1 line 0 comments Download
M ios/chrome/browser/tabs/tab_model.mm View 1 chunk +1 line, -1 line 0 comments Download
M ios/chrome/browser/test/perf_test_with_bvc_ios.mm View 1 chunk +1 line, -1 line 0 comments Download
M ios/chrome/browser/ui/main/browser_view_wrangler.mm View 1 chunk +1 line, -1 line 0 comments Download

Depends on Patchset:

Dependent Patchsets:

Messages

Total messages: 18 (12 generated)
sdefresne
Please take a look.
3 years, 8 months ago (2017-04-05 16:51:28 UTC) #3
marq (ping after 24h)
https://codereview.chromium.org/2802763002/diff/1/ios/chrome/browser/sessions/session_service_ios.mm File ios/chrome/browser/sessions/session_service_ios.mm (left): https://codereview.chromium.org/2802763002/diff/1/ios/chrome/browser/sessions/session_service_ios.mm#oldcode141 ios/chrome/browser/sessions/session_service_ios.mm:141: UIBackgroundTaskIdentifier identifier = [[UIApplication sharedApplication] Was this code just ...
3 years, 8 months ago (2017-04-06 11:58:16 UTC) #7
sdefresne
Please take another look. https://codereview.chromium.org/2802763002/diff/1/ios/chrome/browser/sessions/session_service_ios.mm File ios/chrome/browser/sessions/session_service_ios.mm (left): https://codereview.chromium.org/2802763002/diff/1/ios/chrome/browser/sessions/session_service_ios.mm#oldcode141 ios/chrome/browser/sessions/session_service_ios.mm:141: UIBackgroundTaskIdentifier identifier = [[UIApplication sharedApplication] ...
3 years, 8 months ago (2017-04-06 14:57:02 UTC) #10
marq (ping after 24h)
lgtm https://codereview.chromium.org/2802763002/diff/1/ios/chrome/browser/sessions/session_service_ios.mm File ios/chrome/browser/sessions/session_service_ios.mm (right): https://codereview.chromium.org/2802763002/diff/1/ios/chrome/browser/sessions/session_service_ios.mm#newcode237 ios/chrome/browser/sessions/session_service_ios.mm:237: FROM_HERE, base::BindBlockArc(^{ On 2017/04/06 14:57:01, sdefresne wrote: > ...
3 years, 8 months ago (2017-04-06 16:15:57 UTC) #13
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/2802763002/20001
3 years, 8 months ago (2017-04-06 16:39:00 UTC) #15
commit-bot: I haz the power
3 years, 8 months ago (2017-04-06 17:25:40 UTC) #18
Message was sent while issue was closed.
Committed patchset #2 (id:20001) as
https://chromium.googlesource.com/chromium/src/+/da974c8881efb5c372206a5ac86a...

Powered by Google App Engine
This is Rietveld 408576698