|
Make TabRestoreService::Entry noncopyable and fix up surrounding code.
Instances of TabRestoreService::Entry (Window and Tab) were managed by
hand, and had special support for copying even though they never
actually need to be copied.
This refactor starts by making Entry noncopyable and branches out.
Bigger changes:
- Entry is noncopyable. PlatformSpecificTabData::Clone is gone.
- Entry is usually wrapped in unique_ptr, including inside collections.
- [Important] ValidateEntry/ValidateTab/ValidateWindow take const
references and return a result. They don't try to fix damaged entries.
Smaller changes:
- Entry is taken by const reference whenever possible, not const pointer
or non-const pointer/reference.
- ifs that check if an entry is a Tab and assume it's a Window otherwise
are now switch statements.
- Loops that iterate over collections of Entry are range-based when
appropriate.
BUG= 633689
Committed: https://crrev.com/7710d22ccb2ffb236be1bc99d91e5ed5f7483a13
Cr-Commit-Position: refs/heads/master@{#410655}
Total comments: 23
Total comments: 20
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+468 lines, -701 lines) |
Patch |
|
M |
chrome/browser/android/recently_closed_tabs_bridge.cc
|
View
|
1
2
3
4
5
6
7
8
|
2 chunks |
+8 lines, -11 lines |
0 comments
|
Download
|
|
M |
chrome/browser/extensions/api/sessions/sessions_api.h
|
View
|
1
2
3
4
5
6
7
8
9
|
2 chunks |
+4 lines, -6 lines |
0 comments
|
Download
|
|
M |
chrome/browser/extensions/api/sessions/sessions_api.cc
|
View
|
1
2
3
4
5
6
7
8
9
|
10 chunks |
+36 lines, -54 lines |
0 comments
|
Download
|
|
M |
chrome/browser/sessions/persistent_tab_restore_service_browsertest.cc
|
View
|
1
2
3
4
5
6
|
1 chunk |
+2 lines, -3 lines |
0 comments
|
Download
|
|
M |
chrome/browser/sessions/persistent_tab_restore_service_unittest.cc
|
View
|
1
2
3
4
5
6
|
16 chunks |
+57 lines, -53 lines |
0 comments
|
Download
|
|
M |
chrome/browser/sessions/session_restore_browsertest.cc
|
View
|
1
2
3
4
5
6
|
3 chunks |
+7 lines, -8 lines |
0 comments
|
Download
|
|
M |
chrome/browser/sessions/tab_restore_browsertest.cc
|
View
|
1
2
3
4
5
6
7
|
2 chunks |
+7 lines, -6 lines |
0 comments
|
Download
|
|
M |
chrome/browser/ui/cocoa/history_menu_bridge.mm
|
View
|
1
2
3
4
5
6
|
3 chunks |
+11 lines, -14 lines |
0 comments
|
Download
|
|
M |
chrome/browser/ui/cocoa/history_menu_bridge_unittest.mm
|
View
|
1
2
3
4
5
6
7
8
|
4 chunks |
+5 lines, -13 lines |
0 comments
|
Download
|
|
M |
chrome/browser/ui/toolbar/recent_tabs_sub_menu_model.cc
|
View
|
1
2
3
4
5
6
|
1 chunk |
+22 lines, -21 lines |
0 comments
|
Download
|
|
M |
chrome/browser/ui/views/frame/global_menu_bar_x11.cc
|
View
|
1
2
3
4
5
6
|
2 chunks |
+4 lines, -6 lines |
0 comments
|
Download
|
|
M |
chrome/browser/win/jumplist.h
|
View
|
1
2
3
4
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
chrome/browser/win/jumplist.cc
|
View
|
1
2
3
4
5
|
4 chunks |
+17 lines, -18 lines |
0 comments
|
Download
|
|
M |
components/sessions/BUILD.gn
|
View
|
1
2
|
1 chunk |
+0 lines, -1 line |
0 comments
|
Download
|
|
M |
components/sessions/content/content_live_tab.cc
|
View
|
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
components/sessions/content/content_platform_specific_tab_data.h
|
View
|
1
2
3
4
5
6
|
1 chunk |
+0 lines, -3 lines |
0 comments
|
Download
|
|
M |
components/sessions/content/content_platform_specific_tab_data.cc
|
View
|
|
1 chunk |
+0 lines, -7 lines |
0 comments
|
Download
|
|
M |
components/sessions/core/in_memory_tab_restore_service.h
|
View
|
1
2
3
4
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
components/sessions/core/in_memory_tab_restore_service.cc
|
View
|
1
2
3
4
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
components/sessions/core/persistent_tab_restore_service.h
|
View
|
1
2
3
4
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
components/sessions/core/persistent_tab_restore_service.cc
|
View
|
1
2
3
4
5
6
7
8
9
|
20 chunks |
+95 lines, -118 lines |
0 comments
|
Download
|
|
M |
components/sessions/core/tab_restore_service.h
|
View
|
1
2
3
4
5
|
6 chunks |
+17 lines, -26 lines |
0 comments
|
Download
|
|
M |
components/sessions/core/tab_restore_service.cc
|
View
|
1
2
3
4
5
6
7
8
|
1 chunk |
+6 lines, -63 lines |
0 comments
|
Download
|
|
M |
components/sessions/core/tab_restore_service_helper.h
|
View
|
1
2
3
4
|
4 chunks |
+14 lines, -15 lines |
0 comments
|
Download
|
|
M |
components/sessions/core/tab_restore_service_helper.cc
|
View
|
1
2
3
4
5
6
7
|
14 chunks |
+148 lines, -184 lines |
0 comments
|
Download
|
|
D |
components/sessions/core/tab_restore_service_unittest.cc
|
View
|
1
2
|
1 chunk |
+0 lines, -63 lines |
0 comments
|
Download
|
Total messages: 58 (41 generated)
|