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

Unified Diff: chrome/browser/dom_ui/ntp_resource_cache.cc

Issue 4010004: Changed new tab content for Guest Session. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/chrome
Patch Set: merge Created 10 years, 2 months 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 | « chrome/browser/browser_resources.grd ('k') | chrome/browser/resources/guest_session_tab.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/dom_ui/ntp_resource_cache.cc
diff --git a/chrome/browser/dom_ui/ntp_resource_cache.cc b/chrome/browser/dom_ui/ntp_resource_cache.cc
index c2e7addec149a8ed8cd4d65bc3a8450d18ab914d..b052c40a9b182554124820355dea7c6039582614 100644
--- a/chrome/browser/dom_ui/ntp_resource_cache.cc
+++ b/chrome/browser/dom_ui/ntp_resource_cache.cc
@@ -11,6 +11,7 @@
#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"
@@ -196,8 +197,16 @@ 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(IDS_NEW_TAB_OTR_MESSAGE,
+ l10n_util::GetStringFUTF16(new_tab_message_ids,
GetUrlWithLang(GURL(kLearnMoreIncognitoUrl))));
localized_strings.SetString("extensionsmessage",
l10n_util::GetStringFUTF16(IDS_NEW_TAB_OTR_EXTENSIONS_MESSAGE,
@@ -212,7 +221,7 @@ void NTPResourceCache::CreateNewTabIncognitoHTML() {
static const base::StringPiece incognito_tab_html(
ResourceBundle::GetSharedInstance().GetRawDataResource(
- IDR_INCOGNITO_TAB_HTML));
+ new_tab_html_idr));
std::string full_html = jstemplate_builder::GetI18nTemplateHtml(
incognito_tab_html, &localized_strings);
« no previous file with comments | « chrome/browser/browser_resources.grd ('k') | chrome/browser/resources/guest_session_tab.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698