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

Unified Diff: chrome/browser/chromeos/boot_times_loader.cc

Issue 409113002: Refactoring: get rid of notificataions in ParallelAuthenticator (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix nits Created 6 years, 4 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
Index: chrome/browser/chromeos/boot_times_loader.cc
diff --git a/chrome/browser/chromeos/boot_times_loader.cc b/chrome/browser/chromeos/boot_times_loader.cc
index eb4633e3a4ca91159fa67189780fed3798e6c957..d77d7e1482d1ca382e4dfb9fa46596edc5f8cf74 100644
--- a/chrome/browser/chromeos/boot_times_loader.cc
+++ b/chrome/browser/chromeos/boot_times_loader.cc
@@ -26,7 +26,6 @@
#include "base/time/time.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/chrome_notification_types.h"
-#include "chrome/browser/chromeos/login/auth/authentication_notification_details.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/browser_iterator.h"
#include "chrome/browser/ui/tabs/tab_strip_model.h"
@@ -428,8 +427,6 @@ void BootTimesLoader::RecordLoginAttempted() {
AddLoginTimeMarker("LoginStarted", false);
if (!have_registered_) {
have_registered_ = true;
- registrar_.Add(this, chrome::NOTIFICATION_LOGIN_AUTHENTICATION,
- content::NotificationService::AllSources());
registrar_.Add(this, content::NOTIFICATION_LOAD_START,
content::NotificationService::AllSources());
registrar_.Add(this, content::NOTIFICATION_LOAD_STOP,
@@ -475,21 +472,20 @@ void BootTimesLoader::AddMarker(std::vector<TimeMarker>* vector,
}
}
+void BootTimesLoader::RecordAuthenticationSuccess() {
+ AddLoginTimeMarker("Authenticate", true);
+ RecordCurrentStats(kLoginSuccess);
+}
+
+void BootTimesLoader::RecordAuthenticationFailure() {
+ // Do nothing for now.
+}
+
void BootTimesLoader::Observe(
int type,
const content::NotificationSource& source,
const content::NotificationDetails& details) {
switch (type) {
- case chrome::NOTIFICATION_LOGIN_AUTHENTICATION: {
- content::Details<AuthenticationNotificationDetails> auth_details(details);
- if (auth_details->success()) {
- AddLoginTimeMarker("Authenticate", true);
- RecordCurrentStats(kLoginSuccess);
- registrar_.Remove(this, chrome::NOTIFICATION_LOGIN_AUTHENTICATION,
- content::NotificationService::AllSources());
- }
- break;
- }
case content::NOTIFICATION_LOAD_START: {
NavigationController* tab =
content::Source<NavigationController>(source).ptr();
« no previous file with comments | « chrome/browser/chromeos/boot_times_loader.h ('k') | chrome/browser/chromeos/login/auth/authentication_notification_details.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698