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

Unified Diff: chrome/browser/ui/ash/chrome_shell_delegate.cc

Issue 964503002: Implemented ForceMaximizeBrowserWindowOnFirstRun policy, added unit test and browser test. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 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/ash/chrome_shell_delegate.h ('k') | chrome/chrome_tests.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/ash/chrome_shell_delegate.cc
diff --git a/chrome/browser/ui/ash/chrome_shell_delegate.cc b/chrome/browser/ui/ash/chrome_shell_delegate.cc
index 88998525db8117bb5342cdda7a63554ce6da4a56..612c61f8120628ddf2357f6b31686daf3da9fbd5 100644
--- a/chrome/browser/ui/ash/chrome_shell_delegate.cc
+++ b/chrome/browser/ui/ash/chrome_shell_delegate.cc
@@ -22,8 +22,13 @@
#include "ui/base/l10n/l10n_util.h"
#if defined(OS_CHROMEOS)
+#include "base/prefs/pref_service.h"
#include "chrome/browser/chromeos/accessibility/accessibility_manager.h"
#include "chrome/browser/chromeos/display/display_configuration_observer.h"
+#include "chrome/browser/chromeos/profiles/profile_helper.h"
+#include "chrome/browser/profiles/profile.h"
+#include "chrome/common/pref_names.h"
+#include "components/user_manager/user.h"
#include "components/user_manager/user_manager.h"
#endif
@@ -88,6 +93,20 @@ bool ChromeShellDelegate::IsMultiAccountEnabled() const {
return false;
}
+bool ChromeShellDelegate::IsForceMaximizeOnFirstRun() const {
+#if defined(OS_CHROMEOS)
+ const user_manager::User* const user =
+ user_manager::UserManager::Get()->GetActiveUser();
+ if (user) {
+ return chromeos::ProfileHelper::Get()
+ ->GetProfileByUser(user)
+ ->GetPrefs()
+ ->GetBoolean(prefs::kForceMaximizeOnFirstRun);
+ }
+#endif
+ return false;
+}
+
void ChromeShellDelegate::Exit() {
chrome::AttemptUserExit();
}
« no previous file with comments | « chrome/browser/ui/ash/chrome_shell_delegate.h ('k') | chrome/chrome_tests.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698