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

Unified Diff: chrome/browser/chromeos/login/ui/captive_portal_window_proxy.cc

Issue 1018523007: ChromeOS: Do not show the error dialog when captive portal is detected in OOBE. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: UMA metric added. Created 5 years, 9 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/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();
}

Powered by Google App Engine
This is Rietveld 408576698