Index: chrome/browser/ui/browser_commands.cc |
diff --git a/chrome/browser/ui/browser_commands.cc b/chrome/browser/ui/browser_commands.cc |
index da95740433d1a872648a08e7d18d9555fce0dbf8..64a4c254115f9917c2d93f519d27830ebeaf59e9 100644 |
--- a/chrome/browser/ui/browser_commands.cc |
+++ b/chrome/browser/ui/browser_commands.cc |
@@ -54,12 +54,15 @@ |
#include "chrome/browser/ui/tabs/tab_strip_model.h" |
#include "chrome/browser/ui/web_contents_modal_dialog_manager.h" |
#include "chrome/browser/ui/webui/ntp/app_launcher_handler.h" |
+#include "chrome/browser/upgrade_detector.h" |
#include "chrome/browser/web_applications/web_app.h" |
+#include "chrome/common/chrome_notification_types.h" |
#include "chrome/common/chrome_switches.h" |
#include "chrome/common/pref_names.h" |
#include "content/public/browser/devtools_agent_host.h" |
#include "content/public/browser/navigation_controller.h" |
#include "content/public/browser/navigation_entry.h" |
+#include "content/public/browser/notification_service.h" |
#include "content/public/browser/page_navigator.h" |
#include "content/public/browser/render_view_host.h" |
#include "content/public/browser/user_metrics.h" |
@@ -86,6 +89,7 @@ |
namespace { |
const char kOsOverrideForTabletSite[] = "Linux; Android 4.0.3"; |
+ |
Finnur
2013/01/30 15:50:48
nit: Space after but not before?
MAD
2013/01/31 21:31:42
Done.
|
} |
using content::NavigationController; |
@@ -918,8 +922,15 @@ void ShowAvatarMenu(Browser* browser) { |
} |
void OpenUpdateChromeDialog(Browser* browser) { |
- content::RecordAction(UserMetricsAction("UpdateChrome")); |
- browser->window()->ShowUpdateChromeDialog(); |
+ if (UpgradeDetector::GetInstance()->is_outdated_install()) { |
+ content::NotificationService::current()->Notify( |
+ chrome::NOTIFICATION_OUTDATED_INSTALL, |
+ content::NotificationService::AllSources(), |
+ content::NotificationService::NoDetails()); |
+ } else { |
+ content::RecordAction(UserMetricsAction("UpdateChrome")); |
+ browser->window()->ShowUpdateChromeDialog(); |
+ } |
} |
void ToggleSpeechInput(Browser* browser) { |