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

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: Fixed description Created 5 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
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..de4e946e67a24522b2462e0c12b29833a24c348e 100644
--- a/chrome/browser/ui/ash/chrome_shell_delegate.cc
+++ b/chrome/browser/ui/ash/chrome_shell_delegate.cc
@@ -7,6 +7,7 @@
#include "ash/content_support/gpu_support_impl.h"
#include "ash/wm/window_state.h"
#include "ash/wm/window_util.h"
+#include "base/prefs/pref_service.h"
#include "chrome/browser/app_mode/app_mode_utils.h"
#include "chrome/browser/lifetime/application_lifetime.h"
#include "chrome/browser/profiles/profile_manager.h"
@@ -17,6 +18,7 @@
#include "chrome/browser/ui/ash/launcher/chrome_launcher_controller.h"
#include "chrome/browser/ui/ash/launcher/launcher_context_menu.h"
#include "chrome/browser/ui/browser_commands.h"
+#include "chrome/common/pref_names.h"
#include "chrome/grit/chromium_strings.h"
#include "components/signin/core/common/profile_management_switches.h"
#include "ui/base/l10n/l10n_util.h"
@@ -88,6 +90,16 @@ bool ChromeShellDelegate::IsMultiAccountEnabled() const {
return false;
}
+bool ChromeShellDelegate::IsFirstTimeMaximized() const {
+#if defined(OS_CHROMEOS)
+ if (ProfileManager::GetActiveUserProfile()) {
bartfab (slow) 2015/03/12 11:54:47 The documentation for this method says that you sh
peletskyi 2015/03/18 13:28:13 Done.
+ return ProfileManager::GetActiveUserProfile()->GetPrefs()->GetBoolean(
bartfab (slow) 2015/03/12 11:54:47 Nit: #include "chrome/browser/profiles/profile.h"
peletskyi 2015/03/18 13:28:13 Done.
+ prefs::kForceMaximizeBrowserWindowOnFirstRun);
+ }
+#endif
+ return false;
+}
+
void ChromeShellDelegate::Exit() {
chrome::AttemptUserExit();
}

Powered by Google App Engine
This is Rietveld 408576698