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

Unified Diff: chrome/browser/chromeos/login/existing_user_controller.cc

Issue 10332024: [cros] Show release notes in app window + restore sesssion. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: open NTP for new user. Created 8 years, 7 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 | « no previous file | chrome/browser/ui/browser_init.cc » ('j') | chrome/common/chrome_switches.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/login/existing_user_controller.cc
diff --git a/chrome/browser/chromeos/login/existing_user_controller.cc b/chrome/browser/chromeos/login/existing_user_controller.cc
index 0ba1c37620ae8e583f3a554e551ab7dd5a05532c..f1887781a9850bdc60002059b2937c94483321d6 100644
--- a/chrome/browser/chromeos/login/existing_user_controller.cc
+++ b/chrome/browser/chromeos/login/existing_user_controller.cc
@@ -42,6 +42,7 @@
#include "chrome/common/chrome_version_info.h"
#include "chrome/common/net/gaia/google_service_auth_error.h"
#include "chrome/common/pref_names.h"
+#include "chrome/common/url_constants.h"
#include "chromeos/dbus/dbus_thread_manager.h"
#include "chromeos/dbus/session_manager_client.h"
#include "content/public/browser/browser_thread.h"
@@ -742,6 +743,12 @@ void ExistingUserController::InitializeStartUrls() const {
if (!guide_url.empty()) {
CommandLine::ForCurrentProcess()->AppendSwitchASCII(switches::kApp,
guide_url);
+ // These two parameters would open NTP in the background +
+ // focus app window with GSG so that user won't have an empty desktop
+ // after GSG is closed.
+ CommandLine::ForCurrentProcess()->AppendArg(chrome::kChromeUINewTabURL);
+ CommandLine::ForCurrentProcess()->AppendSwitch(
+ switches::kAppRestoreSession);
} else {
// We should not be adding any start URLs if guide
// is defined as it launches as a standalone app window.
@@ -821,9 +828,10 @@ void ExistingUserController::OptionallyShowReleaseNotes(
if (current_version.components()[0] > prev_version.components()[0]) {
std::string release_notes_url = GetGettingStartedGuideURL();
if (!release_notes_url.empty()) {
- // TODO(nkostylev): Ideally we'd want to show this in app window
- // but passing --app=<url> would ignore session restore.
- CommandLine::ForCurrentProcess()->AppendArg(release_notes_url);
+ CommandLine::ForCurrentProcess()->AppendSwitch(
+ switches::kAppRestoreSession);
+ CommandLine::ForCurrentProcess()->AppendSwitchASCII(switches::kApp,
+ release_notes_url);
prefs->SetString(prefs::kChromeOSReleaseNotesVersion,
current_version.GetString());
}
« no previous file with comments | « no previous file | chrome/browser/ui/browser_init.cc » ('j') | chrome/common/chrome_switches.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698