Remove Chrome Frame's delay shutdown field trial.

Delete lots of related code in both Chrome and CF.

BUG=229940
TEST=NONE

Review URL: https://chromiumcodereview.appspot.com/14030003

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@194798 0039d316-1c4b-4281-b951-d872f2087c98
parent a86e03c9
...@@ -4,10 +4,6 @@ ...@@ -4,10 +4,6 @@
#include "chrome/browser/automation/chrome_frame_automation_provider_win.h" #include "chrome/browser/automation/chrome_frame_automation_provider_win.h"
#include <algorithm>
#include "base/command_line.h"
#include "base/strings/string_number_conversions.h"
#include "chrome/browser/browser_process.h" #include "chrome/browser/browser_process.h"
#include "chrome/browser/profiles/profile.h" #include "chrome/browser/profiles/profile.h"
#include "chrome/browser/profiles/profile_manager.h" #include "chrome/browser/profiles/profile_manager.h"
...@@ -16,8 +12,6 @@ ...@@ -16,8 +12,6 @@
#include "ipc/ipc_channel.h" #include "ipc/ipc_channel.h"
#include "ipc/ipc_message.h" #include "ipc/ipc_message.h"
const int kMaxChromeShutdownDelaySeconds = 60*60;
ChromeFrameAutomationProvider::ChromeFrameAutomationProvider(Profile* profile) ChromeFrameAutomationProvider::ChromeFrameAutomationProvider(Profile* profile)
: AutomationProvider(profile) { : AutomationProvider(profile) {
DCHECK(g_browser_process); DCHECK(g_browser_process);
...@@ -27,38 +21,8 @@ ChromeFrameAutomationProvider::ChromeFrameAutomationProvider(Profile* profile) ...@@ -27,38 +21,8 @@ ChromeFrameAutomationProvider::ChromeFrameAutomationProvider(Profile* profile)
ChromeFrameAutomationProvider::~ChromeFrameAutomationProvider() { ChromeFrameAutomationProvider::~ChromeFrameAutomationProvider() {
DCHECK(g_browser_process); DCHECK(g_browser_process);
if (g_browser_process) { if (g_browser_process)
CommandLine& cmd_line = *CommandLine::ForCurrentProcess(); g_browser_process->ReleaseModule();
CommandLine::StringType shutdown_delay(
cmd_line.GetSwitchValueNative(switches::kChromeFrameShutdownDelay));
if (!shutdown_delay.empty()) {
VLOG(1) << "ChromeFrameAutomationProvider: "
"Scheduling ReleaseBrowserProcess.";
// Grab the specified shutdown delay.
int shutdown_delay_seconds = 0;
base::StringToInt(shutdown_delay, &shutdown_delay_seconds);
// Clamp to reasonable values.
shutdown_delay_seconds = std::max(0, shutdown_delay_seconds);
shutdown_delay_seconds = std::min(shutdown_delay_seconds,
kMaxChromeShutdownDelaySeconds);
// We have Chrome Frame defer Chrome shutdown for a time to improve
// intra-page load times.
// Note that we are tracking the perf impact of this under
// http://crbug.com/98506
MessageLoop::current()->PostDelayedTask(
FROM_HERE,
base::Bind(&ChromeFrameAutomationProvider::ReleaseBrowserProcess),
base::TimeDelta::FromSeconds(shutdown_delay_seconds));
} else {
VLOG(1) << "ChromeFrameAutomationProvider: "
"Releasing browser module with no delay.";
g_browser_process->ReleaseModule();
}
}
} }
bool ChromeFrameAutomationProvider::OnMessageReceived( bool ChromeFrameAutomationProvider::OnMessageReceived(
...@@ -120,11 +84,3 @@ bool ChromeFrameAutomationProvider::IsValidMessage(uint32 type) { ...@@ -120,11 +84,3 @@ bool ChromeFrameAutomationProvider::IsValidMessage(uint32 type) {
return is_valid_message; return is_valid_message;
} }
// static
void ChromeFrameAutomationProvider::ReleaseBrowserProcess() {
if (g_browser_process) {
VLOG(1) << "ChromeFrameAutomationProvider: Releasing browser process.";
g_browser_process->ReleaseModule();
}
}
...@@ -33,10 +33,6 @@ class ChromeFrameAutomationProvider : public AutomationProvider { ...@@ -33,10 +33,6 @@ class ChromeFrameAutomationProvider : public AutomationProvider {
// Returns true if the message received is a valid chrome frame message. // Returns true if the message received is a valid chrome frame message.
bool IsValidMessage(uint32 type); bool IsValidMessage(uint32 type);
// Called to release an instance's ref count on the global BrowserProcess
// instance.
static void ReleaseBrowserProcess();
private: private:
DISALLOW_COPY_AND_ASSIGN(ChromeFrameAutomationProvider); DISALLOW_COPY_AND_ASSIGN(ChromeFrameAutomationProvider);
}; };
......
...@@ -151,10 +151,6 @@ const char kCheckCloudPrintConnectorPolicy[] = ...@@ -151,10 +151,6 @@ const char kCheckCloudPrintConnectorPolicy[] =
// as a dependent process of the Chrome Frame plugin. // as a dependent process of the Chrome Frame plugin.
const char kChromeFrame[] = "chrome-frame"; const char kChromeFrame[] = "chrome-frame";
// Tells Chrome to delay shutdown (for a specified number of seconds) when a
// Chrome Frame automation channel is closed.
const char kChromeFrameShutdownDelay[] = "chrome-frame-shutdown-delay";
// Tells chrome to load the specified version of chrome.dll on Windows. If this // Tells chrome to load the specified version of chrome.dll on Windows. If this
// version cannot be loaded, Chrome will exit. // version cannot be loaded, Chrome will exit.
const char kChromeVersion[] = "chrome-version"; const char kChromeVersion[] = "chrome-version";
......
...@@ -59,7 +59,6 @@ extern const char kAutomationReinitializeOnChannelError[]; ...@@ -59,7 +59,6 @@ extern const char kAutomationReinitializeOnChannelError[];
extern const char kCheckForUpdateIntervalSec[]; extern const char kCheckForUpdateIntervalSec[];
extern const char kCheckCloudPrintConnectorPolicy[]; extern const char kCheckCloudPrintConnectorPolicy[];
extern const char kChromeFrame[]; extern const char kChromeFrame[];
extern const char kChromeFrameShutdownDelay[];
extern const char kChromeVersion[]; extern const char kChromeVersion[];
extern const char kCipherSuiteBlacklist[]; extern const char kCipherSuiteBlacklist[];
extern const char kClearTokenService[]; extern const char kClearTokenService[];
......
...@@ -14,7 +14,6 @@ ...@@ -14,7 +14,6 @@
#include "base/file_version_info.h" #include "base/file_version_info.h"
#include "base/lazy_instance.h" #include "base/lazy_instance.h"
#include "base/logging.h" #include "base/logging.h"
#include "base/metrics/field_trial.h"
#include "base/path_service.h" #include "base/path_service.h"
#include "base/process_util.h" #include "base/process_util.h"
#include "base/string_util.h" #include "base/string_util.h"
...@@ -43,10 +42,6 @@ int64 kAutomationServerReasonableLaunchDelay = 1000; // in milliseconds ...@@ -43,10 +42,6 @@ int64 kAutomationServerReasonableLaunchDelay = 1000; // in milliseconds
int64 kAutomationServerReasonableLaunchDelay = 1000 * 10; int64 kAutomationServerReasonableLaunchDelay = 1000 * 10;
#endif #endif
const char kChromeShutdownDelaySeconds[] = "30";
const char kWithDelayFieldTrialName[] = "WithShutdownDelay";
const char kNoDelayFieldTrialName[] = "NoShutdownDelay";
} // namespace } // namespace
class ChromeFrameAutomationProxyImpl::TabProxyNotificationMessageFilter class ChromeFrameAutomationProxyImpl::TabProxyNotificationMessageFilter
...@@ -302,10 +297,6 @@ void AutomationProxyCacheEntry::CreateProxy(ChromeFrameLaunchParams* params, ...@@ -302,10 +297,6 @@ void AutomationProxyCacheEntry::CreateProxy(ChromeFrameLaunchParams* params,
if (IsAccessibleMode()) if (IsAccessibleMode())
command_line->AppendSwitch(switches::kForceRendererAccessibility); command_line->AppendSwitch(switches::kForceRendererAccessibility);
if (params->send_shutdown_delay_switch())
command_line->AppendSwitchASCII(switches::kChromeFrameShutdownDelay,
kChromeShutdownDelaySeconds);
DVLOG(1) << "Profile path: " << params->profile_path().value(); DVLOG(1) << "Profile path: " << params->profile_path().value();
command_line->AppendSwitchPath(switches::kUserDataDir, command_line->AppendSwitchPath(switches::kUserDataDir,
params->profile_path()); params->profile_path());
...@@ -350,19 +341,9 @@ void AutomationProxyCacheEntry::CreateProxy(ChromeFrameLaunchParams* params, ...@@ -350,19 +341,9 @@ void AutomationProxyCacheEntry::CreateProxy(ChromeFrameLaunchParams* params,
if (launch_result_ == AUTOMATION_SUCCESS) { if (launch_result_ == AUTOMATION_SUCCESS) {
UMA_HISTOGRAM_TIMES( UMA_HISTOGRAM_TIMES(
"ChromeFrame.AutomationServerLaunchSuccessTime", delta); "ChromeFrame.AutomationServerLaunchSuccessTime", delta);
UMA_HISTOGRAM_TIMES(
base::FieldTrial::MakeName(
"ChromeFrame.AutomationServerLaunchSuccessTime",
"ChromeShutdownDelay"),
delta);
} else { } else {
UMA_HISTOGRAM_TIMES( UMA_HISTOGRAM_TIMES(
"ChromeFrame.AutomationServerLaunchFailedTime", delta); "ChromeFrame.AutomationServerLaunchFailedTime", delta);
UMA_HISTOGRAM_TIMES(
base::FieldTrial::MakeName(
"ChromeFrame.AutomationServerLaunchFailedTime",
"ChromeShutdownDelay"),
delta);
} }
UMA_HISTOGRAM_CUSTOM_COUNTS("ChromeFrame.LaunchResult", UMA_HISTOGRAM_CUSTOM_COUNTS("ChromeFrame.LaunchResult",
...@@ -557,9 +538,7 @@ ChromeFrameAutomationClient::ChromeFrameAutomationClient() ...@@ -557,9 +538,7 @@ ChromeFrameAutomationClient::ChromeFrameAutomationClient()
url_fetcher_(NULL), url_fetcher_(NULL),
url_fetcher_flags_(PluginUrlRequestManager::NOT_THREADSAFE), url_fetcher_flags_(PluginUrlRequestManager::NOT_THREADSAFE),
navigate_after_initialization_(false), navigate_after_initialization_(false),
route_all_top_level_navigations_(false), route_all_top_level_navigations_(false) {
send_shutdown_delay_switch_(true) {
InitializeFieldTrials();
} }
ChromeFrameAutomationClient::~ChromeFrameAutomationClient() { ChromeFrameAutomationClient::~ChromeFrameAutomationClient() {
...@@ -698,8 +677,7 @@ bool ChromeFrameAutomationClient::InitiateNavigation( ...@@ -698,8 +677,7 @@ bool ChromeFrameAutomationClient::InitiateNavigation(
base::FilePath profile_path; base::FilePath profile_path;
chrome_launch_params_ = new ChromeFrameLaunchParams(parsed_url, chrome_launch_params_ = new ChromeFrameLaunchParams(parsed_url,
referrer_gurl, profile_path, L"", SimpleResourceLoader::GetLanguage(), referrer_gurl, profile_path, L"", SimpleResourceLoader::GetLanguage(),
false, false, route_all_top_level_navigations_, false, false, route_all_top_level_navigations_);
send_shutdown_delay_switch_);
} else { } else {
chrome_launch_params_->set_referrer(referrer_gurl); chrome_launch_params_->set_referrer(referrer_gurl);
chrome_launch_params_->set_url(parsed_url); chrome_launch_params_->set_url(parsed_url);
...@@ -1037,33 +1015,6 @@ bool ChromeFrameAutomationClient::ProcessUrlRequestMessage(TabProxy* tab, ...@@ -1037,33 +1015,6 @@ bool ChromeFrameAutomationClient::ProcessUrlRequestMessage(TabProxy* tab,
return true; return true;
} }
void ChromeFrameAutomationClient::InitializeFieldTrials() {
static base::FieldTrial* trial = NULL;
if (!trial) {
// Do one-time initialization of the field trial here.
// TODO(robertshield): End the field trial before March 7th 2013.
scoped_refptr<base::FieldTrial> new_trial =
base::FieldTrialList::FactoryGetFieldTrial(
"ChromeShutdownDelay", 1000, kWithDelayFieldTrialName,
2013, 3, 7, NULL);
// Be consistent for this client. Note that this will only have an effect
// once the client id is persisted. See http://crbug.com/117188
new_trial->UseOneTimeRandomization();
new_trial->AppendGroup(kNoDelayFieldTrialName, 500); // 50% without.
trial = new_trial.get();
}
// Take action depending of which group we randomly land in.
if (trial->group_name() == kWithDelayFieldTrialName)
send_shutdown_delay_switch_ = true;
else
send_shutdown_delay_switch_ = false;
}
// These are invoked in channel's background thread. // These are invoked in channel's background thread.
// Cannot call any method of the activex here since it is a STA kind of being. // Cannot call any method of the activex here since it is a STA kind of being.
// By default we marshal the IPC message to the main/GUI thread and from there // By default we marshal the IPC message to the main/GUI thread and from there
......
...@@ -111,15 +111,13 @@ class ChromeFrameLaunchParams : // NOLINT ...@@ -111,15 +111,13 @@ class ChromeFrameLaunchParams : // NOLINT
const std::wstring& profile_name, const std::wstring& profile_name,
const std::wstring& language, const std::wstring& language,
bool incognito, bool widget_mode, bool incognito, bool widget_mode,
bool route_all_top_level_navigations, bool route_all_top_level_navigations)
bool send_shutdown_delay_switch)
: launch_timeout_(kCommandExecutionTimeout), url_(url), : launch_timeout_(kCommandExecutionTimeout), url_(url),
referrer_(referrer), profile_path_(profile_path), referrer_(referrer), profile_path_(profile_path),
profile_name_(profile_name), language_(language), profile_name_(profile_name), language_(language),
version_check_(true), incognito_mode_(incognito), version_check_(true), incognito_mode_(incognito),
is_widget_mode_(widget_mode), is_widget_mode_(widget_mode),
route_all_top_level_navigations_(route_all_top_level_navigations), route_all_top_level_navigations_(route_all_top_level_navigations) {
send_shutdown_delay_switch_(send_shutdown_delay_switch) {
} }
~ChromeFrameLaunchParams() { ~ChromeFrameLaunchParams() {
...@@ -186,10 +184,6 @@ class ChromeFrameLaunchParams : // NOLINT ...@@ -186,10 +184,6 @@ class ChromeFrameLaunchParams : // NOLINT
return route_all_top_level_navigations_; return route_all_top_level_navigations_;
} }
bool send_shutdown_delay_switch() const {
return send_shutdown_delay_switch_;
}
protected: protected:
int launch_timeout_; int launch_timeout_;
GURL url_; GURL url_;
...@@ -201,7 +195,6 @@ class ChromeFrameLaunchParams : // NOLINT ...@@ -201,7 +195,6 @@ class ChromeFrameLaunchParams : // NOLINT
bool incognito_mode_; bool incognito_mode_;
bool is_widget_mode_; bool is_widget_mode_;
bool route_all_top_level_navigations_; bool route_all_top_level_navigations_;
bool send_shutdown_delay_switch_;
private: private:
DISALLOW_COPY_AND_ASSIGN(ChromeFrameLaunchParams); DISALLOW_COPY_AND_ASSIGN(ChromeFrameLaunchParams);
...@@ -378,10 +371,6 @@ class ChromeFrameAutomationClient ...@@ -378,10 +371,6 @@ class ChromeFrameAutomationClient
return use_chrome_network_; return use_chrome_network_;
} }
bool send_shutdown_delay_switch() const {
return send_shutdown_delay_switch_;
}
#ifdef UNIT_TEST #ifdef UNIT_TEST
void set_proxy_factory(ProxyFactory* factory) { void set_proxy_factory(ProxyFactory* factory) {
proxy_factory_ = factory; proxy_factory_ = factory;
...@@ -439,8 +428,6 @@ class ChromeFrameAutomationClient ...@@ -439,8 +428,6 @@ class ChromeFrameAutomationClient
} }
private: private:
void InitializeFieldTrials();
void OnMessageReceivedUIThread(const IPC::Message& msg); void OnMessageReceivedUIThread(const IPC::Message& msg);
void OnChannelErrorUIThread(); void OnChannelErrorUIThread();
...@@ -525,10 +512,6 @@ class ChromeFrameAutomationClient ...@@ -525,10 +512,6 @@ class ChromeFrameAutomationClient
// page without chrome frame. Defaults to false. // page without chrome frame. Defaults to false.
bool route_all_top_level_navigations_; bool route_all_top_level_navigations_;
// Set to true if Chrome Frame should tell Chrome to delay shutdown after
// we break a connection. Currently used only as part of a field trial.
bool send_shutdown_delay_switch_;
friend class BeginNavigateContext; friend class BeginNavigateContext;
friend class CreateExternalTabContext; friend class CreateExternalTabContext;
}; };
......
...@@ -82,8 +82,7 @@ END_MSG_MAP() ...@@ -82,8 +82,7 @@ END_MSG_MAP()
base::FilePath actual_profile_name = profile_path.BaseName(); base::FilePath actual_profile_name = profile_path.BaseName();
launch_params_ = new ChromeFrameLaunchParams(url, referrer, profile_path, launch_params_ = new ChromeFrameLaunchParams(url, referrer, profile_path,
actual_profile_name.value(), SimpleResourceLoader::GetLanguage(), actual_profile_name.value(), SimpleResourceLoader::GetLanguage(),
incognito_mode, is_widget_mode, route_all_top_level_navigations, incognito_mode, is_widget_mode, route_all_top_level_navigations);
automation_client_->send_shutdown_delay_switch());
return automation_client_->Initialize(this, launch_params_); return automation_client_->Initialize(this, launch_params_);
} }
......
...@@ -22,7 +22,6 @@ namespace { ...@@ -22,7 +22,6 @@ namespace {
const wchar_t* kAllowedSwitches[] = { const wchar_t* kAllowedSwitches[] = {
L"automation-channel", L"automation-channel",
L"chrome-frame", L"chrome-frame",
L"chrome-frame-shutdown-delay",
L"chrome-version", L"chrome-version",
L"disable-background-mode", L"disable-background-mode",
L"disable-popup-blocking", L"disable-popup-blocking",
......
...@@ -17,7 +17,6 @@ ...@@ -17,7 +17,6 @@
#include "base/file_version_info.h" #include "base/file_version_info.h"
#include "base/logging.h" #include "base/logging.h"
#include "base/logging_win.h" #include "base/logging_win.h"
#include "base/metrics/field_trial.h"
#include "base/path_service.h" #include "base/path_service.h"
#include "base/string16.h" #include "base/string16.h"
#include "base/string_number_conversions.h" #include "base/string_number_conversions.h"
...@@ -40,7 +39,6 @@ ...@@ -40,7 +39,6 @@
#include "chrome_frame/chrome_protocol.h" #include "chrome_frame/chrome_protocol.h"
#include "chrome_frame/dll_redirector.h" #include "chrome_frame/dll_redirector.h"
#include "chrome_frame/exception_barrier.h" #include "chrome_frame/exception_barrier.h"
#include "chrome_frame/metrics_service.h"
#include "chrome_frame/pin_module.h" #include "chrome_frame/pin_module.h"
#include "chrome_frame/resource.h" #include "chrome_frame/resource.h"
#include "chrome_frame/utils.h" #include "chrome_frame/utils.h"
...@@ -233,7 +231,6 @@ class ChromeTabModule : public CAtlDllModuleT<ChromeTabModule> { ...@@ -233,7 +231,6 @@ class ChromeTabModule : public CAtlDllModuleT<ChromeTabModule> {
ChromeTabModule _AtlModule; ChromeTabModule _AtlModule;
base::AtExitManager* g_exit_manager = NULL; base::AtExitManager* g_exit_manager = NULL;
base::FieldTrialList* g_field_trial_list = NULL;
HRESULT RefreshElevationPolicy() { HRESULT RefreshElevationPolicy() {
const wchar_t kIEFrameDll[] = L"ieframe.dll"; const wchar_t kIEFrameDll[] = L"ieframe.dll";
...@@ -899,18 +896,10 @@ extern "C" BOOL WINAPI DllMain(HINSTANCE instance, ...@@ -899,18 +896,10 @@ extern "C" BOOL WINAPI DllMain(HINSTANCE instance,
// Enable trace control and transport through event tracing for Windows. // Enable trace control and transport through event tracing for Windows.
logging::LogEventProvider::Initialize(kChromeFrameProvider); 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(
new metrics::SHA1EntropyProvider(MetricsService::GetClientID()));
// Set a callback so that crash reporting can be pinned when the module is // Set a callback so that crash reporting can be pinned when the module is
// pinned. // pinned.
chrome_frame::SetPinModuleCallback(&OnPinModule); chrome_frame::SetPinModuleCallback(&OnPinModule);
} else if (reason == DLL_PROCESS_DETACH) { } else if (reason == DLL_PROCESS_DETACH) {
delete g_field_trial_list;
g_field_trial_list = NULL;
DllRedirector* dll_redirector = DllRedirector::GetInstance(); DllRedirector* dll_redirector = DllRedirector::GetInstance();
DCHECK(dll_redirector); DCHECK(dll_redirector);
dll_redirector->UnregisterAsFirstCFModule(); dll_redirector->UnregisterAsFirstCFModule();
......
...@@ -14,7 +14,6 @@ ...@@ -14,7 +14,6 @@
#include "base/basictypes.h" #include "base/basictypes.h"
#include "base/lazy_instance.h" #include "base/lazy_instance.h"
#include "base/memory/scoped_ptr.h" #include "base/memory/scoped_ptr.h"
#include "base/metrics/field_trial.h"
#include "base/metrics/histogram.h" #include "base/metrics/histogram.h"
#include "base/synchronization/lock.h" #include "base/synchronization/lock.h"
#include "base/threading/platform_thread.h" #include "base/threading/platform_thread.h"
......
...@@ -137,7 +137,7 @@ void CFACWithChrome::SetUp() { ...@@ -137,7 +137,7 @@ void CFACWithChrome::SetUp() {
GURL empty; GURL empty;
launch_params_ = new ChromeFrameLaunchParams( launch_params_ = new ChromeFrameLaunchParams(
empty, empty, profile_path_, profile_path_.BaseName().value(), L"", empty, empty, profile_path_, profile_path_.BaseName().value(), L"",
false, false, false, false); false, false, false);
launch_params_->set_version_check(false); launch_params_->set_version_check(false);
launch_params_->set_launch_timeout(kSaneAutomationTimeoutMs); launch_params_->set_launch_timeout(kSaneAutomationTimeoutMs);
} }
...@@ -266,7 +266,7 @@ TEST_F(CFACMockTest, MockedCreateTabOk) { ...@@ -266,7 +266,7 @@ TEST_F(CFACMockTest, MockedCreateTabOk) {
GURL empty; GURL empty;
scoped_refptr<ChromeFrameLaunchParams> clp(new ChromeFrameLaunchParams( scoped_refptr<ChromeFrameLaunchParams> clp(new ChromeFrameLaunchParams(
empty, empty, profile_path_, profile_path_.BaseName().value(), L"", empty, empty, profile_path_, profile_path_.BaseName().value(), L"",
false, false, false, false)); false, false, false));
clp->set_launch_timeout(timeout); clp->set_launch_timeout(timeout);
clp->set_version_check(false); clp->set_version_check(false);
EXPECT_TRUE(client_->Initialize(&cfd_, clp)); EXPECT_TRUE(client_->Initialize(&cfd_, clp));
...@@ -299,7 +299,7 @@ TEST_F(CFACMockTest, MockedCreateTabFailed) { ...@@ -299,7 +299,7 @@ TEST_F(CFACMockTest, MockedCreateTabFailed) {
GURL empty; GURL empty;
scoped_refptr<ChromeFrameLaunchParams> clp(new ChromeFrameLaunchParams( scoped_refptr<ChromeFrameLaunchParams> clp(new ChromeFrameLaunchParams(
empty, empty, profile_path_, profile_path_.BaseName().value(), L"", empty, empty, profile_path_, profile_path_.BaseName().value(), L"",
false, false, false, false)); false, false, false));
clp->set_launch_timeout(timeout_); clp->set_launch_timeout(timeout_);
clp->set_version_check(false); clp->set_version_check(false);
EXPECT_TRUE(client_->Initialize(&cfd_, clp)); EXPECT_TRUE(client_->Initialize(&cfd_, clp));
...@@ -343,7 +343,7 @@ TEST_F(CFACMockTest, OnChannelError) { ...@@ -343,7 +343,7 @@ TEST_F(CFACMockTest, OnChannelError) {
GURL empty; GURL empty;
scoped_refptr<ChromeFrameLaunchParams> clp(new ChromeFrameLaunchParams( scoped_refptr<ChromeFrameLaunchParams> clp(new ChromeFrameLaunchParams(
empty, empty, profile_path_, profile_path_.BaseName().value(), L"", empty, empty, profile_path_, profile_path_.BaseName().value(), L"",
false, false, false, false)); false, false, false));
clp->set_launch_timeout(1); // Unneeded timeout, but can't be 0. clp->set_launch_timeout(1); // Unneeded timeout, but can't be 0.
clp->set_version_check(false); clp->set_version_check(false);
...@@ -463,7 +463,7 @@ TEST_F(CFACMockTest, NavigateTwiceAfterInitToSameUrl) { ...@@ -463,7 +463,7 @@ TEST_F(CFACMockTest, NavigateTwiceAfterInitToSameUrl) {
scoped_refptr<ChromeFrameLaunchParams> launch_params( scoped_refptr<ChromeFrameLaunchParams> launch_params(
new ChromeFrameLaunchParams( new ChromeFrameLaunchParams(
GURL("http://www.nonexistent.com"), empty, profile_path_, GURL("http://www.nonexistent.com"), empty, profile_path_,
profile_path_.BaseName().value(), L"", false, false, false, false)); profile_path_.BaseName().value(), L"", false, false, false));
launch_params->set_launch_timeout(timeout); launch_params->set_launch_timeout(timeout);
launch_params->set_version_check(false); launch_params->set_version_check(false);
EXPECT_TRUE(client_->Initialize(&cfd_, launch_params)); EXPECT_TRUE(client_->Initialize(&cfd_, launch_params));
......
...@@ -49,7 +49,7 @@ class AutomationMockDelegate ...@@ -49,7 +49,7 @@ class AutomationMockDelegate
GURL empty; GURL empty;
scoped_refptr<ChromeFrameLaunchParams> clp( scoped_refptr<ChromeFrameLaunchParams> clp(
new ChromeFrameLaunchParams(empty, empty, profile_path, profile_name, new ChromeFrameLaunchParams(empty, empty, profile_path, profile_name,
language, incognito, is_widget_mode, false, false)); language, incognito, is_widget_mode, false));
clp->set_launch_timeout(launch_timeout); clp->set_launch_timeout(launch_timeout);
clp->set_version_check(perform_version_check); clp->set_version_check(perform_version_check);
automation_client_->Initialize(this, clp); automation_client_->Initialize(this, clp);
......
...@@ -40,7 +40,7 @@ ChromeFrameLaunchParams* ProxyFactoryTest::MakeLaunchParams( ...@@ -40,7 +40,7 @@ ChromeFrameLaunchParams* ProxyFactoryTest::MakeLaunchParams(
ChromeFrameLaunchParams* params = ChromeFrameLaunchParams* params =
new ChromeFrameLaunchParams(empty, empty, profile_path, new ChromeFrameLaunchParams(empty, empty, profile_path,
profile_path.BaseName().value(), L"", false, profile_path.BaseName().value(), L"", false,
false, false, false); false, false);
params->set_launch_timeout(0); params->set_launch_timeout(0);
params->set_version_check(false); params->set_version_check(false);
return params; return params;
......
...@@ -5,7 +5,6 @@ ...@@ -5,7 +5,6 @@
#include <atlbase.h> #include <atlbase.h>
#include "base/command_line.h" #include "base/command_line.h"
#include "base/metrics/field_trial.h"
#include "base/process_util.h" #include "base/process_util.h"
#include "base/test/test_suite.h" #include "base/test/test_suite.h"
#include "base/threading/platform_thread.h" #include "base/threading/platform_thread.h"
...@@ -55,10 +54,6 @@ int main(int argc, char **argv) { ...@@ -55,10 +54,6 @@ int main(int argc, char **argv) {
_set_purecall_handler(PureCall); _set_purecall_handler(PureCall);
// Set up a FieldTrialList to keep any field trials we have going in
// Chrome Frame happy.
base::FieldTrialList field_trial_list(new metrics::SHA1EntropyProvider("42"));
base::TestSuite test_suite(argc, argv); base::TestSuite test_suite(argc, argv);
SetConfigBool(kChromeFrameHeadlessMode, true); SetConfigBool(kChromeFrameHeadlessMode, true);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment