| Index: chrome/browser/automation/automation_provider_observers.cc
|
| diff --git a/chrome/browser/automation/automation_provider_observers.cc b/chrome/browser/automation/automation_provider_observers.cc
|
| index d64b673ede2ee81ffee1c3ca56a8c130fd74e89b..050080c5daee714ecd23723c468bce6dae006a10 100644
|
| --- a/chrome/browser/automation/automation_provider_observers.cc
|
| +++ b/chrome/browser/automation/automation_provider_observers.cc
|
| @@ -253,8 +253,8 @@ void NavigationControllerRestoredObserver::Observe(
|
| int type, const content::NotificationSource& source,
|
| const content::NotificationDetails& details) {
|
| if (FinishedRestoring()) {
|
| - SendDone();
|
| registrar_.RemoveAll();
|
| + SendDone();
|
| }
|
| }
|
|
|
| @@ -264,12 +264,11 @@ bool NavigationControllerRestoredObserver::FinishedRestoring() {
|
| }
|
|
|
| void NavigationControllerRestoredObserver::SendDone() {
|
| - if (!automation_)
|
| - return;
|
| -
|
| - AutomationMsg_WaitForTabToBeRestored::WriteReplyParams(reply_message_.get(),
|
| - true);
|
| - automation_->Send(reply_message_.release());
|
| + if (automation_) {
|
| + AutomationJSONReply(automation_, reply_message_.release())
|
| + .SendSuccess(NULL);
|
| + }
|
| + delete this;
|
| }
|
|
|
| NavigationNotificationObserver::NavigationNotificationObserver(
|
|
|