diff options
author | altimofeev@chromium.org <altimofeev@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-11-23 18:50:21 +0000 |
---|---|---|
committer | altimofeev@chromium.org <altimofeev@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-11-23 18:50:21 +0000 |
commit | 625f95b184032003bc96fa84035b97ab34b29485 (patch) | |
tree | 98292dd5301e088e02d0105073324600df00c768 | |
parent | 3746b9d4c40b77bb70257cadc78386b59767a14b (diff) | |
download | chromium_src-625f95b184032003bc96fa84035b97ab34b29485.zip chromium_src-625f95b184032003bc96fa84035b97ab34b29485.tar.gz chromium_src-625f95b184032003bc96fa84035b97ab34b29485.tar.bz2 |
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
-rw-r--r-- | chrome/browser/chromeos/login/login_utils.cc | 9 | ||||
-rw-r--r-- | chrome/browser/ui/views/frame/browser_view.cc | 8 |
2 files changed, 9 insertions, 8 deletions
diff --git a/chrome/browser/chromeos/login/login_utils.cc b/chrome/browser/chromeos/login/login_utils.cc index 80b7d20..ab8c2f1 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 diff --git a/chrome/browser/ui/views/frame/browser_view.cc b/chrome/browser/ui/views/frame/browser_view.cc index 1c5c5ee..eb2a263 100644 --- a/chrome/browser/ui/views/frame/browser_view.cc +++ b/chrome/browser/ui/views/frame/browser_view.cc @@ -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) { |