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

Unified Diff: chrome/browser/chromeos/net/network_portal_detector.cc

Issue 12211111: Added UMA records for OOBE portal detection. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Sync, fix. Created 7 years, 10 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/net/network_portal_detector.cc
diff --git a/chrome/browser/chromeos/net/network_portal_detector.cc b/chrome/browser/chromeos/net/network_portal_detector.cc
index 93c5d35aed26f14540d18908fbd44d0fcdc28d37..4a2b6a51587106017b0ab5717962df32a21d13c4 100644
--- a/chrome/browser/chromeos/net/network_portal_detector.cc
+++ b/chrome/browser/chromeos/net/network_portal_detector.cc
@@ -8,6 +8,7 @@
#include "base/command_line.h"
#include "base/logging.h"
#include "base/message_loop.h"
+#include "base/metrics/histogram.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/chromeos/cros/cros_library.h"
#include "chrome/common/chrome_notification_types.h"
@@ -55,6 +56,8 @@ std::string CaptivePortalStatusString(
case NetworkPortalDetector::CAPTIVE_PORTAL_STATUS_PROXY_AUTH_REQUIRED:
return l10n_util::GetStringUTF8(
IDS_CHROMEOS_CAPTIVE_PORTAL_STATUS_PROXY_AUTH_REQUIRED);
+ case NetworkPortalDetector::CAPTIVE_PORTAL_STATUS_COUNT:
+ NOTREACHED();
}
return l10n_util::GetStringUTF8(
IDS_CHROMEOS_CAPTIVE_PORTAL_STATUS_UNRECOGNIZED);
@@ -239,6 +242,8 @@ void NetworkPortalDetector::DetectCaptivePortal(const base::TimeDelta& delay) {
min_time_between_attempts_ - elapsed_time > next_attempt_delay_) {
next_attempt_delay_ = min_time_between_attempts_ - elapsed_time;
}
+ } else {
+ detection_start_time_ = GetCurrentTimeTicks();
}
detection_task_.Reset(
base::Bind(&NetworkPortalDetector::DetectCaptivePortalTask,
@@ -366,6 +371,11 @@ void NetworkPortalDetector::SetCaptivePortalState(
const CaptivePortalState& state) {
DCHECK(network);
+ if (!detection_start_time_.is_null()) {
+ UMA_HISTOGRAM_TIMES("CaptivePortal.OOBE.DetectionDuration",
+ GetCurrentTimeTicks() - detection_start_time_);
+ }
+
CaptivePortalStateMap::const_iterator it =
portal_state_map_.find(network->service_path());
if (it == portal_state_map_.end() ||
« no previous file with comments | « chrome/browser/chromeos/net/network_portal_detector.h ('k') | chrome/browser/ui/webui/chromeos/login/signin_screen_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698