From 8fcec3c79f1c8f2edae6a1b064cf60c39720ba54 Mon Sep 17 00:00:00 2001 From: "estade@chromium.org" Date: Thu, 3 Jun 2010 00:17:22 +0000 Subject: Linux/GTK: implement update notification. BUG=45148 TEST=compile chrome with PRODUCT_VERSION manually set to something higher than the current version (e.g. 7.0.0.0), and manually set the upgrade detector time to something short (like 10 seconds). Launch chrome and wait a short time for the update notification to appear. The update notification should pulse every few seconds, and should stop pulsing when the user opens the wrench menu. The about menu item should launch a dialog that allows the user to restart chrome, restoring the current session. Review URL: http://codereview.chromium.org/2365003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@48795 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/app/chrome_dll_main.cc | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'chrome/app') diff --git a/chrome/app/chrome_dll_main.cc b/chrome/app/chrome_dll_main.cc index ca682a5..1a39c5e 100644 --- a/chrome/app/chrome_dll_main.cc +++ b/chrome/app/chrome_dll_main.cc @@ -37,6 +37,7 @@ #include "base/at_exit.h" #include "base/command_line.h" #include "base/debug_util.h" +#include "base/file_version_info.h" #include "base/i18n/icu_util.h" #include "base/message_loop.h" #include "base/path_service.h" @@ -45,6 +46,7 @@ #include "base/stats_counters.h" #include "base/stats_table.h" #include "base/string_util.h" +#include "chrome/app/chrome_version_info.h" #include "chrome/browser/diagnostics/diagnostics_main.h" #include "chrome/browser/renderer_host/render_process_host.h" #include "chrome/common/chrome_constants.h" @@ -475,6 +477,15 @@ int ChromeMain(int argc, char** argv) { #endif const CommandLine& parsed_command_line = *CommandLine::ForCurrentProcess(); + +#if defined(OS_POSIX) && !defined(OS_MACOSX) + if (parsed_command_line.HasSwitch(switches::kProductVersion)) { + scoped_ptr version(chrome_app::GetChromeVersionInfo()); + printf("%s\n", WideToASCII(version->product_version()).c_str()); + return 0; + } +#endif + std::string process_type = parsed_command_line.GetSwitchValueASCII(switches::kProcessType); -- cgit v1.1