summaryrefslogtreecommitdiffstats
path: root/chrome_frame/chrome_tab.cc
diff options
context:
space:
mode:
authorrobertshield@chromium.org <robertshield@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-03-10 10:08:57 +0000
committerrobertshield@chromium.org <robertshield@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-03-10 10:08:57 +0000
commitadd184df7cdf49062f469156018ff069a8d36f56 (patch)
tree3bbf4ef3feaf617a77c474a4ffbc52bd8d6214a3 /chrome_frame/chrome_tab.cc
parentab100318a067963f3dcadd2d4343a60f5c1526ca (diff)
downloadchromium_src-add184df7cdf49062f469156018ff069a8d36f56.zip
chromium_src-add184df7cdf49062f469156018ff069a8d36f56.tar.gz
chromium_src-add184df7cdf49062f469156018ff069a8d36f56.tar.bz2
Adding FieldTrial support for Chrome Frame to allow measurement of startup time improvements from delaying Chrome shutdown.
The other half of http://crrev.com/124942 BUG=98506 TEST=NONE Review URL: http://codereview.chromium.org/9600011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@126024 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome_frame/chrome_tab.cc')
-rw-r--r--chrome_frame/chrome_tab.cc16
1 files changed, 14 insertions, 2 deletions
diff --git a/chrome_frame/chrome_tab.cc b/chrome_frame/chrome_tab.cc
index 69e72f6..8634956 100644
--- a/chrome_frame/chrome_tab.cc
+++ b/chrome_frame/chrome_tab.cc
@@ -16,6 +16,7 @@
#include "base/file_version_info.h"
#include "base/logging.h"
#include "base/logging_win.h"
+#include "base/metrics/field_trial.h"
#include "base/path_service.h"
#include "base/string16.h"
#include "base/string_number_conversions.h"
@@ -38,6 +39,7 @@
#include "chrome_frame/chrome_protocol.h"
#include "chrome_frame/dll_redirector.h"
#include "chrome_frame/exception_barrier.h"
+#include "chrome_frame/metrics_service.h"
#include "chrome_frame/resource.h"
#include "chrome_frame/utils.h"
#include "googleurl/src/url_util.h"
@@ -194,7 +196,7 @@ class ChromeTabModule : public CAtlDllModuleT<ChromeTabModule> {
ChromeTabModule _AtlModule;
base::AtExitManager* g_exit_manager = NULL;
-
+base::FieldTrialList* g_field_trial_list = NULL;
HRESULT RefreshElevationPolicy() {
const wchar_t kIEFrameDll[] = L"ieframe.dll";
@@ -858,14 +860,24 @@ extern "C" BOOL WINAPI DllMain(HINSTANCE instance,
NULL, 0)) {
logging::LogEventProvider::Initialize(kChromeFrameProvider);
}
+
+ // Initialize the field test infrastructure. Must be done somewhere that
+ // can only get called once. For Chrome Frame, that is here.
+ g_field_trial_list = new base::FieldTrialList(
+ MetricsService::GetClientID());
} else if (reason == DLL_PROCESS_DETACH) {
+ delete g_field_trial_list;
+ g_field_trial_list = NULL;
+
DllRedirector* dll_redirector = DllRedirector::GetInstance();
DCHECK(dll_redirector);
-
dll_redirector->UnregisterAsFirstCFModule();
+
g_patch_helper.UnpatchIfNeeded();
+
delete g_exit_manager;
g_exit_manager = NULL;
+
ShutdownCrashReporting();
}
return _AtlModule.DllMain(reason, reserved);