Commit 526b3d71 authored by Nancy Wang's avatar Nancy Wang Committed by Chromium LUCI CQ

Modify FullRestoreSaveHandler to override OnWindowDestroyed.

in CL:2556904, OnWindowDestroying is used by the WM to save the window
info. So FullRestoreSaveHandler should not use OnWindowDestroying to
delete the window from the restore data. So modify the interface to
use OnWindowDestroyed to delete the window from the restore data.

BUG=1146900

Change-Id: I824e216a898c6c28bf6cdae044e0a8fba7079a64
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2622354Reviewed-by: default avatarSammie Quon <sammiequon@chromium.org>
Commit-Queue: Nancy Wang <nancylingwang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#842296}
parent 0697b335
...@@ -54,7 +54,7 @@ void FullRestoreSaveHandler::OnWindowInitialized(aura::Window* window) { ...@@ -54,7 +54,7 @@ void FullRestoreSaveHandler::OnWindowInitialized(aura::Window* window) {
observed_windows_.AddObservation(window); observed_windows_.AddObservation(window);
} }
void FullRestoreSaveHandler::OnWindowDestroying(aura::Window* window) { void FullRestoreSaveHandler::OnWindowDestroyed(aura::Window* window) {
// TODO(crbug.com/1146900): Handle ARC app windows. // TODO(crbug.com/1146900): Handle ARC app windows.
DCHECK(observed_windows_.IsObservingSource(window)); DCHECK(observed_windows_.IsObservingSource(window));
......
...@@ -52,7 +52,7 @@ class COMPONENT_EXPORT(FULL_RESTORE) FullRestoreSaveHandler ...@@ -52,7 +52,7 @@ class COMPONENT_EXPORT(FULL_RESTORE) FullRestoreSaveHandler
void OnWindowInitialized(aura::Window* window) override; void OnWindowInitialized(aura::Window* window) override;
// aura::WindowObserver: // aura::WindowObserver:
void OnWindowDestroying(aura::Window* window) override; void OnWindowDestroyed(aura::Window* window) override;
// Save |app_launch_info| to the full restore file in |profile_path|. // Save |app_launch_info| to the full restore file in |profile_path|.
void SaveAppLaunchInfo(const base::FilePath& profile_path, void SaveAppLaunchInfo(const base::FilePath& profile_path,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment