diff options
author | siggi <siggi@chromium.org> | 2015-10-07 10:19:27 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-10-07 17:22:59 +0000 |
commit | d896f9ab5962b5ef5251241a6a4e30a970045bfb (patch) | |
tree | 24de6f23f9e2e386115fb0f9e0ad8ed43e7f3858 /chrome/chrome_watcher | |
parent | f986f9572c792346194055784b9237820ffce52b (diff) | |
download | chromium_src-d896f9ab5962b5ef5251241a6a4e30a970045bfb.zip chromium_src-d896f9ab5962b5ef5251241a6a4e30a970045bfb.tar.gz chromium_src-d896f9ab5962b5ef5251241a6a4e30a970045bfb.tar.bz2 |
Remove ExitFunnel instrumentation and clean up leaked data.
BUG=442526
Review URL: https://codereview.chromium.org/1373573004
Cr-Commit-Position: refs/heads/master@{#352870}
Diffstat (limited to 'chrome/chrome_watcher')
-rw-r--r-- | chrome/chrome_watcher/chrome_watcher_main.cc | 47 |
1 files changed, 3 insertions, 44 deletions
diff --git a/chrome/chrome_watcher/chrome_watcher_main.cc b/chrome/chrome_watcher/chrome_watcher_main.cc index 6219bec..db578d6 100644 --- a/chrome/chrome_watcher/chrome_watcher_main.cc +++ b/chrome/chrome_watcher/chrome_watcher_main.cc @@ -35,7 +35,6 @@ #include "chrome/installer/util/util_constants.h" #include "components/browser_watcher/endsession_watcher_window_win.h" #include "components/browser_watcher/exit_code_watcher_win.h" -#include "components/browser_watcher/exit_funnel_win.h" #include "components/browser_watcher/window_hang_monitor_win.h" #ifdef KASKO @@ -79,9 +78,6 @@ class BrowserMonitor { // Posted to main thread from Watch when browser exits. void BrowserExited(); - // The funnel used to record events for this browser. - browser_watcher::ExitFunnel exit_funnel_; - browser_watcher::ExitCodeWatcher exit_code_watcher_; browser_watcher::EndSessionWatcherWindow end_session_watcher_window_; @@ -121,11 +117,6 @@ bool BrowserMonitor::StartWatching( if (!exit_code_watcher_.Initialize(process.Pass())) return false; - if (!exit_funnel_.Init(registry_path, - exit_code_watcher_.process().Handle())) { - return false; - } - if (!background_thread_.StartWithOptions( base::Thread::Options(base::MessageLoop::TYPE_IO, 0))) { return false; @@ -144,22 +135,6 @@ bool BrowserMonitor::StartWatching( void BrowserMonitor::OnEndSessionMessage(UINT message, LPARAM lparam) { DCHECK_EQ(main_thread_, base::ThreadTaskRunnerHandle::Get()); - if (message == WM_QUERYENDSESSION) { - exit_funnel_.RecordEvent(L"WatcherQueryEndSession"); - } else if (message == WM_ENDSESSION) { - exit_funnel_.RecordEvent(L"WatcherEndSession"); - } - if (lparam & ENDSESSION_CLOSEAPP) - exit_funnel_.RecordEvent(L"ES_CloseApp"); - if (lparam & ENDSESSION_CRITICAL) - exit_funnel_.RecordEvent(L"ES_Critical"); - if (lparam & ENDSESSION_LOGOFF) - exit_funnel_.RecordEvent(L"ES_Logoff"); - const LPARAM kKnownBits = - ENDSESSION_CLOSEAPP | ENDSESSION_CRITICAL | ENDSESSION_LOGOFF; - if (lparam & ~kKnownBits) - exit_funnel_.RecordEvent(L"ES_Other"); - // If the browser hasn't exited yet, dally for a bit to try and stretch this // process' lifetime to give it some more time to capture the browser exit. browser_exited_.TimedWait(base::TimeDelta::FromSeconds(kDelayTimeSeconds)); @@ -177,7 +152,6 @@ void BrowserMonitor::Watch(base::win::ScopedHandle on_initialized_event) { on_initialized_event.Close(); exit_code_watcher_.WaitForExit(); - exit_funnel_.RecordEvent(L"BrowserExit"); // Note that the browser has exited. browser_exited_.Signal(); @@ -213,24 +187,9 @@ void OnWindowEvent( base::Process process, const base::Callback<void(const base::Process&)>& on_hung_callback, browser_watcher::WindowHangMonitor::WindowEvent window_event) { - browser_watcher::ExitFunnel exit_funnel; - if (exit_funnel.Init(registry_path.c_str(), process.Handle())) { - switch (window_event) { - case browser_watcher::WindowHangMonitor::WINDOW_NOT_FOUND: - exit_funnel.RecordEvent(L"MessageWindowNotFound"); - break; - case browser_watcher::WindowHangMonitor::WINDOW_HUNG: - exit_funnel.RecordEvent(L"MessageWindowHung"); - if (!on_hung_callback.is_null()) - on_hung_callback.Run(process); - break; - case browser_watcher::WindowHangMonitor::WINDOW_VANISHED: - exit_funnel.RecordEvent(L"MessageWindowVanished"); - break; - default: - NOTREACHED(); - break; - } + if (window_event == browser_watcher::WindowHangMonitor::WINDOW_HUNG && + !on_hung_callback.is_null()) { + on_hung_callback.Run(process); } } |