From 09f0cc93ef09136948d6c868f63d948094b92fa6 Mon Sep 17 00:00:00 2001 From: "altimofeev@chromium.org" Date: Fri, 29 Oct 2010 07:37:57 +0000 Subject: Revert 64246 (reviewer's veto) - Use special text for Guest Session instead of using standard text form Incognito mode. BUG=chromium-os:6907 TEST=Enter Guest mode, open new tab. Check opened page. Review URL: http://codereview.chromium.org/4010004 TBR=altimofeev@chromium.org Review URL: http://codereview.chromium.org/4215005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@64374 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/app/generated_resources.grd | 6 -- chrome/browser/browser_resources.grd | 1 - chrome/browser/dom_ui/ntp_resource_cache.cc | 13 +--- chrome/browser/resources/guest_session_tab.html | 69 --------------------- .../shared/images/guest_icon_standalone.png | Bin 2556 -> 0 bytes chrome/browser/views/frame/browser_view.cc | 8 +-- 6 files changed, 3 insertions(+), 94 deletions(-) delete mode 100644 chrome/browser/resources/guest_session_tab.html delete mode 100644 chrome/browser/resources/shared/images/guest_icon_standalone.png diff --git a/chrome/app/generated_resources.grd b/chrome/app/generated_resources.grd index 6e05baa..dc81bf0 100644 --- a/chrome/app/generated_resources.grd +++ b/chrome/app/generated_resources.grd @@ -7170,12 +7170,6 @@ Keep your key file in a safe place. You will need it to create new versions of y Because $1Google Chrome does not control how extensions handle your personal data, all extensions have been disabled for incognito windows. You can reenable them individually in the <a href="$2">extensions manager</a>. - - <strong>You're browsing as a guest</strong>. Pages you view in this window won't appear in the browser history or search history, and they won't leave other traces, like cookies, on the computer after you sign out. Files you download and bookmarks you create won't be preserved. - <br /><br /> - <a href="$1">Learn more</a> about guest mode. - 1 Tab diff --git a/chrome/browser/browser_resources.grd b/chrome/browser/browser_resources.grd index 4e94bfb2..a20aac9 100644 --- a/chrome/browser/browser_resources.grd +++ b/chrome/browser/browser_resources.grd @@ -34,7 +34,6 @@ without changes to the corresponding grd file. ete --> - diff --git a/chrome/browser/dom_ui/ntp_resource_cache.cc b/chrome/browser/dom_ui/ntp_resource_cache.cc index b052c40..c2e7add 100644 --- a/chrome/browser/dom_ui/ntp_resource_cache.cc +++ b/chrome/browser/dom_ui/ntp_resource_cache.cc @@ -11,7 +11,6 @@ #include "app/l10n_util.h" #include "app/resource_bundle.h" #include "app/theme_provider.h" -#include "base/command_line.h" #include "base/file_util.h" #include "base/ref_counted_memory.h" #include "base/string16.h" @@ -197,16 +196,8 @@ void NTPResourceCache::CreateNewTabIncognitoHTML() { DictionaryValue localized_strings; localized_strings.SetString("title", l10n_util::GetStringUTF16(IDS_NEW_TAB_TITLE)); - int new_tab_message_ids = IDS_NEW_TAB_OTR_MESSAGE; - int new_tab_html_idr = IDR_INCOGNITO_TAB_HTML; -#if defined(OS_CHROMEOS) - if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kGuestSession)) { - new_tab_message_ids = IDS_NEW_TAB_GUEST_SESSION_MESSAGE; - new_tab_html_idr = IDR_GUEST_SESSION_TAB_HTML; - } -#endif localized_strings.SetString("content", - l10n_util::GetStringFUTF16(new_tab_message_ids, + l10n_util::GetStringFUTF16(IDS_NEW_TAB_OTR_MESSAGE, GetUrlWithLang(GURL(kLearnMoreIncognitoUrl)))); localized_strings.SetString("extensionsmessage", l10n_util::GetStringFUTF16(IDS_NEW_TAB_OTR_EXTENSIONS_MESSAGE, @@ -221,7 +212,7 @@ void NTPResourceCache::CreateNewTabIncognitoHTML() { static const base::StringPiece incognito_tab_html( ResourceBundle::GetSharedInstance().GetRawDataResource( - new_tab_html_idr)); + IDR_INCOGNITO_TAB_HTML)); std::string full_html = jstemplate_builder::GetI18nTemplateHtml( incognito_tab_html, &localized_strings); diff --git a/chrome/browser/resources/guest_session_tab.html b/chrome/browser/resources/guest_session_tab.html deleted file mode 100644 index 1d3ac21..0000000 --- a/chrome/browser/resources/guest_session_tab.html +++ /dev/null @@ -1,69 +0,0 @@ - - - - - - - - -
- - -
- - - diff --git a/chrome/browser/resources/shared/images/guest_icon_standalone.png b/chrome/browser/resources/shared/images/guest_icon_standalone.png deleted file mode 100644 index 967e8b8..0000000 Binary files a/chrome/browser/resources/shared/images/guest_icon_standalone.png and /dev/null differ diff --git a/chrome/browser/views/frame/browser_view.cc b/chrome/browser/views/frame/browser_view.cc index fb4be88..bc77707 100644 --- a/chrome/browser/views/frame/browser_view.cc +++ b/chrome/browser/views/frame/browser_view.cc @@ -601,13 +601,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) { -- cgit v1.1