| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/chromeos/browser_notification_observers.h" | 5 #include "chrome/browser/chromeos/browser_notification_observers.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/file_util.h" | 9 #include "base/file_util.h" |
| 10 #include "base/histogram.h" |
| 10 #include "chrome/browser/chrome_thread.h" | 11 #include "chrome/browser/chrome_thread.h" |
| 11 #include "chrome/browser/chromeos/boot_times_loader.h" | 12 #include "chrome/browser/chromeos/boot_times_loader.h" |
| 12 #include "chrome/browser/chromeos/login/authentication_notification_details.h" | 13 #include "chrome/browser/chromeos/login/authentication_notification_details.h" |
| 13 #include "chrome/common/notification_service.h" | 14 #include "chrome/common/notification_service.h" |
| 14 | 15 |
| 15 namespace chromeos { | 16 namespace chromeos { |
| 16 | 17 |
| 17 InitialTabNotificationObserver::InitialTabNotificationObserver() { | 18 InitialTabNotificationObserver::InitialTabNotificationObserver() { |
| 18 registrar_.Add(this, NotificationType::LOAD_START, | 19 registrar_.Add(this, NotificationType::LOAD_START, |
| 19 NotificationService::AllSources()); | 20 NotificationService::AllSources()); |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 53 Details<AuthenticationNotificationDetails> auth_details(details); | 54 Details<AuthenticationNotificationDetails> auth_details(details); |
| 54 if (auth_details->success()) { | 55 if (auth_details->success()) { |
| 55 InitialTabNotificationObserver::Get()->SetLoginSuccessTime(); | 56 InitialTabNotificationObserver::Get()->SetLoginSuccessTime(); |
| 56 BootTimesLoader::RecordCurrentStats("login-successful"); | 57 BootTimesLoader::RecordCurrentStats("login-successful"); |
| 57 registrar_.Remove(this, NotificationType::LOGIN_AUTHENTICATION, | 58 registrar_.Remove(this, NotificationType::LOGIN_AUTHENTICATION, |
| 58 NotificationService::AllSources()); | 59 NotificationService::AllSources()); |
| 59 } | 60 } |
| 60 } | 61 } |
| 61 | 62 |
| 62 } // namespace chromeos | 63 } // namespace chromeos |
| OLD | NEW |