summaryrefslogtreecommitdiffstats
path: root/chrome/browser/browser_main.cc
diff options
context:
space:
mode:
authorprasadt@chromium.org <prasadt@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-04-30 18:55:53 +0000
committerprasadt@chromium.org <prasadt@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-04-30 18:55:53 +0000
commit3cdacd4e6a2ca4c305c591dac8176828ae2e2b62 (patch)
treeb5c51b6e0db2c1aadb03e80b148b3b9a0c9ef4f6 /chrome/browser/browser_main.cc
parent980539163f30d19e5adff1538122b1ea6a0e4803 (diff)
downloadchromium_src-3cdacd4e6a2ca4c305c591dac8176828ae2e2b62.zip
chromium_src-3cdacd4e6a2ca4c305c591dac8176828ae2e2b62.tar.gz
chromium_src-3cdacd4e6a2ca4c305c591dac8176828ae2e2b62.tar.bz2
r46025 reverted r46023 which caused a build break on chromeos.
This change reverts r46025 and fixes the build break which is just a one line change in chrome/browser/first_run_gtk.cc to move the definition of Upgrade::new_command_line_ to be inside a #if. Details on the change and code review feedback for the original CL can be found at http://codereview.chromium.org/1633021. BUG=40975 TEST=none Review URL: http://codereview.chromium.org/1691022 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@46103 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/browser_main.cc')
-rw-r--r--chrome/browser/browser_main.cc23
1 files changed, 22 insertions, 1 deletions
diff --git a/chrome/browser/browser_main.cc b/chrome/browser/browser_main.cc
index 790502f..179201d 100644
--- a/chrome/browser/browser_main.cc
+++ b/chrome/browser/browser_main.cc
@@ -618,6 +618,19 @@ OSStatus KeychainCallback(SecKeychainEvent keychain_event,
} // 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 @@ int BrowserMain(const MainFunctionParams& parameters) {
// 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 @@ int BrowserMain(const MainFunctionParams& parameters) {
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