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

Unified Diff: chrome/browser/ui/browser_commands.cc

Issue 11440020: Add an outdated upgrade bubble view. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed OWNERS comments... Created 7 years, 10 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/app/generated_resources.grd ('k') | chrome/browser/ui/toolbar/wrench_menu_model.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/browser_commands.cc
diff --git a/chrome/browser/ui/browser_commands.cc b/chrome/browser/ui/browser_commands.cc
index 48127d9230a4f7190b7f380fd21953b62ed2786a..41b584b788fbe097f49bae2156941aa96c76ae51 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"
@@ -916,8 +919,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) {
« no previous file with comments | « chrome/app/generated_resources.grd ('k') | chrome/browser/ui/toolbar/wrench_menu_model.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698