diff options
author | altimofeev@chromium.org <altimofeev@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-29 07:37:57 +0000 |
---|---|---|
committer | altimofeev@chromium.org <altimofeev@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-29 07:37:57 +0000 |
commit | 09f0cc93ef09136948d6c868f63d948094b92fa6 (patch) | |
tree | 658ea211024bae8b1569f6f973801e053135dd8b | |
parent | efe9e0d63dc93c9eed724ba5ce0c4c896bec6891 (diff) | |
download | chromium_src-09f0cc93ef09136948d6c868f63d948094b92fa6.zip chromium_src-09f0cc93ef09136948d6c868f63d948094b92fa6.tar.gz chromium_src-09f0cc93ef09136948d6c868f63d948094b92fa6.tar.bz2 |
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
-rw-r--r-- | chrome/app/generated_resources.grd | 6 | ||||
-rw-r--r-- | chrome/browser/browser_resources.grd | 1 | ||||
-rw-r--r-- | chrome/browser/dom_ui/ntp_resource_cache.cc | 13 | ||||
-rw-r--r-- | chrome/browser/resources/guest_session_tab.html | 69 | ||||
-rw-r--r-- | chrome/browser/resources/shared/images/guest_icon_standalone.png | bin | 2556 -> 0 bytes | |||
-rw-r--r-- | chrome/browser/views/frame/browser_view.cc | 8 |
6 files changed, 3 insertions, 94 deletions
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 <ph name="PRODUCT_NAME">$1<ex>Google Chrome</ex></ph> does not control how extensions handle your personal data, all extensions have been disabled for incognito windows. You can reenable them individually in the <ph name="BEGIN_LINK"><a href="$2"></ph>extensions manager<ph name="END_LINK"></a></ph>. </message> - <message name="IDS_NEW_TAB_GUEST_SESSION_MESSAGE" - desc="Used when a person enters Guest Session"> - <ph name="BEGIN_BOLD"><strong></ph>You're browsing as a guest<ph name="END_BOLD"></strong></ph>. 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. - <ph name="LINE_BREAK"><br /><br /></ph> - <ph name="BEGIN_LINK"><a href="$1"></ph>Learn more<ph name="END_LINK"></a></ph> about guest mode. - </message> <message name="IDS_NEW_TAB_RECENTLY_CLOSED_WINDOW_SINGLE" desc="Title of recently closed windows in the recently closed section of the new tab page when the window has a single tab"> 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 --> </if> <include name="IDR_EXTENSIONS_UI_HTML" file="resources\extensions_ui.html" flattenhtml="true" type="BINDATA" /> <include name="IDR_GAIA_LOGIN_HTML" file="sync\resources\gaia_login.html" flattenhtml="true" type="BINDATA" /> - <include name="IDR_GUEST_SESSION_TAB_HTML" file="resources\guest_session_tab.html" flattenhtml="true" type="BINDATA" /> <include name="IDR_HISTORY_HTML" file="resources\history.html" flattenhtml="true" type="BINDATA" /> <include name="IDR_HISTORY2_HTML" file="resources\history2.html" flattenhtml="true" type="BINDATA" /> <include name="IDR_INCOGNITO_TAB_HTML" file="resources\incognito_tab.html" flattenhtml="true" type="BINDATA" /> 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 @@ -<!DOCTYPE html> -<html i18n-values="dir:textdirection;bookmarkbarattached:bookmarkbarattached"> -<head> -<title i18n-content="title"></title> -<style> -body { - margin:10px 8px 10px 8px; -} -html[dir="ltr"] .icon { - float:right; - margin:0 6px 0 3px; - -webkit-transform: scale(-1, 1); -} -html[dir="rtl"] .icon { - float:left; - margin:0 3px 0 6px; -} -.content { - border-radius: 5px 5px; - background-color:#eee; - color:black; - padding:10px 10px 10px 10px; - max-width:600px; - margin-left:auto; - margin-right:auto; - margin-top:66px; -} -.extensionsmessage { - color:black; - padding:10px 10px 10px 10px; - max-width:600px; - margin-left:auto; - margin-right:auto; - margin-top:5px; -} -.extensionicon { - float:left; - margin:10px 5px 0 0px; - width:30px; -} -</style> -<script> -// Until themes can clear the cache, force-reload the theme stylesheet. -document.write('<link id="incognitothemecss" rel="stylesheet" ' + - 'href="chrome://theme/css/newincognitotab.css?' + - Date.now() + '">'); -</script> -</head> -<body> -<div class="content" i18n-values=".style.fontFamily:fontfamily;.style.fontSize:fontsize"> - <img src="shared/images/guest_icon_standalone.png" class="icon" /> - <span i18n-values=".innerHTML:content"></span> -</div> -</body> -<script> -function themeChanged() { - document.getElementById('incognitothemecss').href = - 'chrome://theme/css/newincognitotab.css?' + Date.now(); -} - -function bookmarkBarAttached() { - document.documentElement.setAttribute("bookmarkbarattached", "true"); -} - -function bookmarkBarDetached() { - document.documentElement.setAttribute("bookmarkbarattached", "false"); -} -</script> -</html> diff --git a/chrome/browser/resources/shared/images/guest_icon_standalone.png b/chrome/browser/resources/shared/images/guest_icon_standalone.png Binary files differdeleted file mode 100644 index 967e8b8..0000000 --- a/chrome/browser/resources/shared/images/guest_icon_standalone.png +++ /dev/null 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) { |