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

Unified Diff: chrome/browser/automation/chrome_frame_automation_provider_win.cc

Issue 14030003: Remove Chrome Frame's delay shutdown field trial. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Dear Greg Created 7 years, 8 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
« no previous file with comments | « chrome/browser/automation/chrome_frame_automation_provider_win.h ('k') | chrome/common/chrome_switches.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/automation/chrome_frame_automation_provider_win.cc
diff --git a/chrome/browser/automation/chrome_frame_automation_provider_win.cc b/chrome/browser/automation/chrome_frame_automation_provider_win.cc
index 808b7112b7cab7aaa9b6f9ebf143a397f1c576c7..e251a358f08b51de3342ef32bd36671d6d0624a8 100644
--- a/chrome/browser/automation/chrome_frame_automation_provider_win.cc
+++ b/chrome/browser/automation/chrome_frame_automation_provider_win.cc
@@ -4,10 +4,6 @@
#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/profiles/profile.h"
#include "chrome/browser/profiles/profile_manager.h"
@@ -16,8 +12,6 @@
#include "ipc/ipc_channel.h"
#include "ipc/ipc_message.h"
-const int kMaxChromeShutdownDelaySeconds = 60*60;
-
ChromeFrameAutomationProvider::ChromeFrameAutomationProvider(Profile* profile)
: AutomationProvider(profile) {
DCHECK(g_browser_process);
@@ -27,38 +21,8 @@ ChromeFrameAutomationProvider::ChromeFrameAutomationProvider(Profile* profile)
ChromeFrameAutomationProvider::~ChromeFrameAutomationProvider() {
DCHECK(g_browser_process);
- if (g_browser_process) {
- CommandLine& cmd_line = *CommandLine::ForCurrentProcess();
-
- 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();
- }
- }
+ if (g_browser_process)
+ g_browser_process->ReleaseModule();
}
bool ChromeFrameAutomationProvider::OnMessageReceived(
@@ -120,11 +84,3 @@ bool ChromeFrameAutomationProvider::IsValidMessage(uint32 type) {
return is_valid_message;
}
-
-// static
-void ChromeFrameAutomationProvider::ReleaseBrowserProcess() {
- if (g_browser_process) {
- VLOG(1) << "ChromeFrameAutomationProvider: Releasing browser process.";
- g_browser_process->ReleaseModule();
- }
-}
« no previous file with comments | « chrome/browser/automation/chrome_frame_automation_provider_win.h ('k') | chrome/common/chrome_switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698