| Index: chrome/browser/automation/automation_event_observers_chromeos.cc
|
| diff --git a/chrome/browser/automation/automation_event_observers_chromeos.cc b/chrome/browser/automation/automation_event_observers_chromeos.cc
|
| index e3da47d840fa0fe762c7990afa36611169e63006..6d45d0054b41f1811097ae8a71573cebf8271b6e 100644
|
| --- a/chrome/browser/automation/automation_event_observers_chromeos.cc
|
| +++ b/chrome/browser/automation/automation_event_observers_chromeos.cc
|
| @@ -5,6 +5,7 @@
|
| #include "chrome/browser/automation/automation_event_observers.h"
|
| #include "chrome/browser/browser_process.h"
|
| #include "chrome/browser/chromeos/login/existing_user_controller.h"
|
| +#include "content/public/browser/notification_service.h"
|
|
|
| LoginEventObserver::LoginEventObserver(
|
| AutomationEventQueue* event_queue,
|
| @@ -32,7 +33,19 @@ void LoginEventObserver::OnLoginSuccess(const std::string& username,
|
| automation_->set_profile(
|
| g_browser_process->profile_manager()->GetLastUsedProfile());
|
| }
|
| - _NotifyLoginEvent(std::string());
|
| + VLOG(1) << "Successfully logged in. Waiting for a page to load";
|
| + registrar_.Add(this, content::NOTIFICATION_LOAD_STOP,
|
| + content::NotificationService::AllBrowserContextsAndSources());
|
| +}
|
| +
|
| +void LoginEventObserver::Observe(
|
| + int type,
|
| + const content::NotificationSource& source,
|
| + const content::NotificationDetails& details) {
|
| + if (type == content::NOTIFICATION_LOAD_STOP) {
|
| + VLOG(1) << "Page load done.";
|
| + _NotifyLoginEvent(std::string());
|
| + }
|
| }
|
|
|
| void LoginEventObserver::_NotifyLoginEvent(const std::string& error_string) {
|
|
|