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

Unified Diff: chrome/browser/ui/webui/ntp/ntp_resource_cache.cc

Issue 164333007: Switch guest profile from forced-incognito to UI mods like ChromeOS. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: addressed review comments by msw Created 6 years, 10 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
Index: chrome/browser/ui/webui/ntp/ntp_resource_cache.cc
diff --git a/chrome/browser/ui/webui/ntp/ntp_resource_cache.cc b/chrome/browser/ui/webui/ntp/ntp_resource_cache.cc
index c8fd292bd3e894e07f2098929bc74d99150b8879..56fa41d197a4a04aa9c18f7c0c6b317897eda83c 100644
--- a/chrome/browser/ui/webui/ntp/ntp_resource_cache.cc
+++ b/chrome/browser/ui/webui/ntp/ntp_resource_cache.cc
@@ -296,10 +296,10 @@ void NTPResourceCache::CreateNewTabIncognitoHTML() {
int new_tab_message_ids = IDS_NEW_TAB_OTR_MESSAGE;
int new_tab_html_idr = IDR_INCOGNITO_TAB_HTML;
const char* new_tab_link = kLearnMoreIncognitoUrl;
+
// TODO(altimofeev): consider implementation without 'if def' usage.
#if defined(OS_CHROMEOS)
- if (CommandLine::ForCurrentProcess()->HasSwitch(
- chromeos::switches::kGuestSession)) {
+ if (profile_->IsGuestSession()) {
new_tab_message_ids = IDS_NEW_TAB_GUEST_SESSION_MESSAGE;
new_tab_html_idr = IDR_GUEST_SESSION_TAB_HTML;
new_tab_link = kLearnMoreGuestSessionUrl;
@@ -323,6 +323,7 @@ void NTPResourceCache::CreateNewTabIncognitoHTML() {
}
}
#endif
+
localized_strings.SetString("content",
l10n_util::GetStringFUTF16(new_tab_message_ids,
GetUrlWithLang(GURL(new_tab_link))));
« no previous file with comments | « chrome/browser/ui/toolbar/wrench_menu_model.cc ('k') | chrome/browser/ui/webui/options/browser_options_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698