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

Unified Diff: chrome/browser/ui/webui/options/chromeos/power_handler.cc

Issue 2341783005: mash: Fix Chrome crash accessing chrome://settings. (Closed)
Patch Set: Avoid PowerStatus access; not init in Chrome. Created 4 years, 3 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/browser/ui/webui/options/chromeos/display_options_handler.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/options/chromeos/power_handler.cc
diff --git a/chrome/browser/ui/webui/options/chromeos/power_handler.cc b/chrome/browser/ui/webui/options/chromeos/power_handler.cc
index 08406f55bf0c680bc1e0bf31d776a1b43d6ed25f..84b3c24248208ab566724a4be411fc3e15687796 100644
--- a/chrome/browser/ui/webui/options/chromeos/power_handler.cc
+++ b/chrome/browser/ui/webui/options/chromeos/power_handler.cc
@@ -10,6 +10,7 @@
#include "base/strings/string_number_conversions.h"
#include "base/strings/utf_string_conversions.h"
#include "base/values.h"
+#include "chrome/browser/ui/ash/ash_util.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/grit/generated_resources.h"
#include "content/public/browser/web_ui.h"
@@ -24,9 +25,11 @@ namespace chromeos {
namespace options {
PowerHandler::PowerHandler() {
- this->show_power_status_ = switches::PowerOverlayEnabled() ||
- (PowerStatus::Get()->IsBatteryPresent() &&
- PowerStatus::Get()->SupportsDualRoleDevices());
+ // TODO(mash): Support Chrome power settings in Mash. crbug.com/644348
+ this->show_power_status_ = !chrome::IsRunningInMash() &&
+ (switches::PowerOverlayEnabled() ||
+ (PowerStatus::Get()->IsBatteryPresent() &&
+ PowerStatus::Get()->SupportsDualRoleDevices()));
}
PowerHandler::~PowerHandler() {
« no previous file with comments | « chrome/browser/ui/webui/options/chromeos/display_options_handler.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698