Skip to content
Snippets Groups Projects
Commit 625f95b1 authored by altimofeev@chromium.org's avatar altimofeev@chromium.org
Browse files

Changes appearance of the NTP for the guest mode.

1. Returns icon of the incognito guy to the tab header.
2. Sets NTP as homepage for the guest mode.
3. Adds the missing separator between the options.

BUG=chromium-os:9534
TEST=manual

Review URL: http://codereview.chromium.org/5314002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@67125 0039d316-1c4b-4281-b951-d872f2087c98
parent 3746b9d4
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
......@@ -595,13 +595,7 @@ bool BrowserView::IsOffTheRecord() const {
}
bool BrowserView::ShouldShowOffTheRecordAvatar() const {
bool should_show_off_the_record_avatar =
IsOffTheRecord() && IsBrowserTypeNormal();
#if defined(OS_CHROMEOS)
should_show_off_the_record_avatar = should_show_off_the_record_avatar &&
!CommandLine::ForCurrentProcess()->HasSwitch(switches::kGuestSession);
#endif
return should_show_off_the_record_avatar;
return IsOffTheRecord() && IsBrowserTypeNormal();
}
bool BrowserView::AcceleratorPressed(const views::Accelerator& accelerator) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment