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

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

Issue 5314002: Changes appearance of the NTP for the guest mode. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/chrome/browser/chromeos/login
Patch Set: Created 10 years, 1 month 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/views/frame/browser_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/login/login_utils.cc
diff --git a/chrome/browser/chromeos/login/login_utils.cc b/chrome/browser/chromeos/login/login_utils.cc
index 80b7d206d0eec00afd6eca17af19266cd3f599cb..ab8c2f19513bcfc01a389d86f3d547548c4086a4 100644
--- a/chrome/browser/chromeos/login/login_utils.cc
+++ b/chrome/browser/chromeos/login/login_utils.cc
@@ -45,6 +45,7 @@
#include "chrome/common/net/gaia/gaia_constants.h"
#include "chrome/common/net/url_request_context_getter.h"
#include "chrome/common/pref_names.h"
+#include "chrome/common/url_constants.h"
#include "googleurl/src/gurl.h"
#include "net/base/cookie_store.h"
#include "net/url_request/url_request_context.h"
@@ -62,7 +63,7 @@ const char kAuthSuffix[] = "\n";
const char kGuestModeLoggingLevel[] = "1";
// Format of command line switch.
-const char kSwitchFormatString[] = "--%s=\"%s\"";
+const char kSwitchFormatString[] = " --%s=\"%s\"";
} // namespace
@@ -313,6 +314,12 @@ void LoginUtilsImpl::CompleteOffTheRecordLogin(const GURL& start_url) {
if (start_url.is_valid())
command_line.AppendArg(start_url.spec());
+ // Override the value of the homepage that is set in first run mode.
+ // TODO(altimofeev): extend action of the |kNoFirstRun| to cover this case.
+ command_line.AppendSwitchASCII(
+ switches::kHomePage,
+ GURL(chrome::kChromeUINewTabURL).spec());
+
std::string cmd_line_str = command_line.command_line_string();
// Special workaround for the arguments that should be quoted.
// Copying switches won't be needed when Guest mode won't need restart
« no previous file with comments | « no previous file | chrome/browser/ui/views/frame/browser_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698