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

Unified Diff: chrome/browser/automation/automation_event_observers_chromeos.cc

Issue 10912142: [chromeos] Wait for initial page load after login (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/automation/automation_event_observers.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..4244979c4066905e4a28f482bd20e98216cf1a34 100644
--- a/chrome/browser/automation/automation_event_observers_chromeos.cc
+++ b/chrome/browser/automation/automation_event_observers_chromeos.cc
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include "content/public/browser/notification_service.h"
#include "chrome/browser/automation/automation_event_observers.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/chromeos/login/existing_user_controller.h"
@@ -14,6 +15,8 @@ LoginEventObserver::LoginEventObserver(
controller_(controller),
automation_(automation->AsWeakPtr()) {
controller_->set_login_status_consumer(this);
+ registrar_.Add(this, content::NOTIFICATION_LOAD_STOP,
+ content::NotificationService::AllBrowserContextsAndSources());
}
LoginEventObserver::~LoginEventObserver() {}
@@ -32,9 +35,18 @@ void LoginEventObserver::OnLoginSuccess(const std::string& username,
automation_->set_profile(
g_browser_process->profile_manager()->GetLastUsedProfile());
}
craigdh 2012/09/07 16:30:05 Log that the login success event occurred (this co
Nirnimesh 2012/09/11 00:28:20 Done.
- _NotifyLoginEvent(std::string());
}
+void LoginEventObserver::Observe(
+ int type,
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
+ if (type == content::NOTIFICATION_LOAD_STOP) {
+ _NotifyLoginEvent(std::string());
+ }
+}
+
+
void LoginEventObserver::_NotifyLoginEvent(const std::string& error_string) {
DictionaryValue* dict = new DictionaryValue;
dict->SetString("type", "login_event");
« no previous file with comments | « chrome/browser/automation/automation_event_observers.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698