Chromium Code Reviews| Index: chrome/browser/chromeos/login/ui/captive_portal_window_proxy.cc |
| diff --git a/chrome/browser/chromeos/login/ui/captive_portal_window_proxy.cc b/chrome/browser/chromeos/login/ui/captive_portal_window_proxy.cc |
| index 24b00ecc3556eea6676f91f3af28a84fcc242824..dbcbed2d8558967507708d801fe83196f9842d81 100644 |
| --- a/chrome/browser/chromeos/login/ui/captive_portal_window_proxy.cc |
| +++ b/chrome/browser/chromeos/login/ui/captive_portal_window_proxy.cc |
| @@ -4,6 +4,7 @@ |
| #include "chrome/browser/chromeos/login/ui/captive_portal_window_proxy.h" |
| +#include "base/metrics/histogram_macros.h" |
| #include "chrome/browser/chromeos/login/ui/captive_portal_view.h" |
| #include "chrome/browser/chromeos/login/ui/proxy_settings_dialog.h" |
| #include "chrome/browser/chromeos/profiles/profile_helper.h" |
| @@ -90,8 +91,14 @@ void CaptivePortalWindowProxy::Close() { |
| } |
| void CaptivePortalWindowProxy::OnRedirected() { |
| - if (GetState() == STATE_WAITING_FOR_REDIRECTION) |
| + if (GetState() == STATE_WAITING_FOR_REDIRECTION) { |
| + if (!started_loading_at_.is_null()) { |
| + UMA_HISTOGRAM_TIMES("CaptivePortal.RedirectTime", |
| + base::Time::Now() - started_loading_at_); |
| + started_loading_at_ = base::Time::FromInternalValue(0); |
|
Ilya Sherman
2015/03/24 18:18:35
nit: Why not "base::Time()"?
Alexander Alekseev
2015/03/25 13:05:23
Done.
|
| + } |
| Show(); |
| + } |
| delegate_->OnPortalDetected(); |
| } |
| @@ -124,6 +131,8 @@ void CaptivePortalWindowProxy::InitCaptivePortalView() { |
| new CaptivePortalView(ProfileHelper::GetSigninProfile(), this)); |
| captive_portal_view_for_testing_ = captive_portal_view_.get(); |
| } |
| + |
| + started_loading_at_ = base::Time::Now(); |
| captive_portal_view_->StartLoad(); |
| } |