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

Side by Side Diff: chrome/browser/ui/browser_commands.cc

Issue 325433002: Elevated install of recovery component (UI part). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/ui/browser_commands.h" 5 #include "chrome/browser/ui/browser_commands.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/metrics/histogram.h" 8 #include "base/metrics/histogram.h"
9 #include "base/prefs/pref_service.h" 9 #include "base/prefs/pref_service.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
(...skipping 1044 matching lines...) Expand 10 before | Expand all | Expand 10 after
1055 browser->window()->ShowAppMenu(); 1055 browser->window()->ShowAppMenu();
1056 } 1056 }
1057 1057
1058 void ShowAvatarMenu(Browser* browser) { 1058 void ShowAvatarMenu(Browser* browser) {
1059 browser->window()->ShowAvatarBubbleFromAvatarButton( 1059 browser->window()->ShowAvatarBubbleFromAvatarButton(
1060 BrowserWindow::AVATAR_BUBBLE_MODE_DEFAULT, 1060 BrowserWindow::AVATAR_BUBBLE_MODE_DEFAULT,
1061 signin::ManageAccountsParams()); 1061 signin::ManageAccountsParams());
1062 } 1062 }
1063 1063
1064 void OpenUpdateChromeDialog(Browser* browser) { 1064 void OpenUpdateChromeDialog(Browser* browser) {
1065 if (UpgradeDetector::GetInstance()->is_outdated_install()) { 1065 if (UpgradeDetector::GetInstance()->is_elevation_needed_for_recovery()) {
1066 content::NotificationService::current()->Notify(
1067 chrome::NOTIFICATION_UPGRADE_NEEDS_ELEVATION,
1068 content::NotificationService::AllSources(),
1069 content::NotificationService::NoDetails());
1070 } else if (UpgradeDetector::GetInstance()->is_outdated_install()) {
1066 content::NotificationService::current()->Notify( 1071 content::NotificationService::current()->Notify(
1067 chrome::NOTIFICATION_OUTDATED_INSTALL, 1072 chrome::NOTIFICATION_OUTDATED_INSTALL,
1068 content::NotificationService::AllSources(), 1073 content::NotificationService::AllSources(),
1069 content::NotificationService::NoDetails()); 1074 content::NotificationService::NoDetails());
1070 } else if (UpgradeDetector::GetInstance()->is_outdated_install_no_au()) { 1075 } else if (UpgradeDetector::GetInstance()->is_outdated_install_no_au()) {
1071 content::NotificationService::current()->Notify( 1076 content::NotificationService::current()->Notify(
1072 chrome::NOTIFICATION_OUTDATED_INSTALL_NO_AU, 1077 chrome::NOTIFICATION_OUTDATED_INSTALL_NO_AU,
1073 content::NotificationService::AllSources(), 1078 content::NotificationService::AllSources(),
1074 content::NotificationService::NoDetails()); 1079 content::NotificationService::NoDetails());
1075 } else { 1080 } else {
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
1275 browser->profile(), 1280 browser->profile(),
1276 browser->host_desktop_type())); 1281 browser->host_desktop_type()));
1277 app_browser->tab_strip_model()->AppendWebContents(contents, true); 1282 app_browser->tab_strip_model()->AppendWebContents(contents, true);
1278 1283
1279 contents->GetMutableRendererPrefs()->can_accept_load_drops = false; 1284 contents->GetMutableRendererPrefs()->can_accept_load_drops = false;
1280 contents->GetRenderViewHost()->SyncRendererPrefs(); 1285 contents->GetRenderViewHost()->SyncRendererPrefs();
1281 app_browser->window()->Show(); 1286 app_browser->window()->Show();
1282 } 1287 }
1283 1288
1284 } // namespace chrome 1289 } // namespace chrome
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698