| Index: chrome/browser/browser_main.cc
|
| ===================================================================
|
| --- chrome/browser/browser_main.cc (revision 45984)
|
| +++ chrome/browser/browser_main.cc (working copy)
|
| @@ -618,6 +618,19 @@
|
|
|
| } // namespace
|
|
|
| +#if defined(OS_WIN)
|
| +#define DLLEXPORT __declspec(dllexport)
|
| +
|
| +// We use extern C for the prototype DLLEXPORT to avoid C++ name mangling.
|
| +extern "C" {
|
| +DLLEXPORT void __cdecl RelaunchChromeBrowserWithNewCommandLineIfNeeded();
|
| +}
|
| +
|
| +DLLEXPORT void __cdecl RelaunchChromeBrowserWithNewCommandLineIfNeeded() {
|
| + Upgrade::RelaunchChromeBrowserWithNewCommandLineIfNeeded();
|
| +}
|
| +#endif
|
| +
|
| // Main routine for running as the Browser process.
|
| int BrowserMain(const MainFunctionParams& parameters) {
|
| const CommandLine& parsed_command_line = parameters.command_line_;
|
| @@ -1177,7 +1190,7 @@
|
| // the main message loop.
|
| if (browser_init.Start(parsed_command_line, std::wstring(), profile,
|
| &result_code)) {
|
| -#if defined(OS_WIN)
|
| +#if (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS)
|
| // Initialize autoupdate timer. Timer callback costs basically nothing
|
| // when browser is not in persistent mode, so it's OK to let it ride on
|
| // the main thread. This needs to be done here because we don't want
|
| @@ -1185,6 +1198,14 @@
|
| g_browser_process->StartAutoupdateTimer();
|
| #endif
|
|
|
| +#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
|
| + // On Linux, the running exe will be updated if an upgrade becomes
|
| + // available while the browser is running. We need to save the last
|
| + // modified time of the exe, so we can compare to determine if there is
|
| + // an upgrade while the browser is kept alive by a persistent extension.
|
| + Upgrade::SaveLastModifiedTimeOfExe();
|
| +#endif
|
| +
|
| // Record now as the last succesful chrome start.
|
| GoogleUpdateSettings::SetLastRunTime();
|
| // Call Recycle() here as late as possible, before going into the loop
|
|
|