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

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

Issue 164002: Apply theme to incognito NTP.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 4 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/dom_ui/dom_ui_theme_source.cc ('k') | chrome/browser/resources/incognito_tab.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/dom_ui/new_tab_ui.cc
===================================================================
--- chrome/browser/dom_ui/new_tab_ui.cc (revision 22523)
+++ chrome/browser/dom_ui/new_tab_ui.cc (working copy)
@@ -433,9 +433,8 @@
class IncognitoTabHTMLSource : public ChromeURLDataManager::DataSource {
public:
- // Creates our datasource and sets our user message to a specific message
- // from our string bundle.
- IncognitoTabHTMLSource();
+ // Creates our datasource and registers initial state of the bookmark bar.
+ explicit IncognitoTabHTMLSource(bool bookmark_bar_attached);
// Called when the network layer has requested a resource underneath
// the path we registered.
@@ -446,11 +445,14 @@
}
private:
+ bool bookmark_bar_attached_;
+
DISALLOW_COPY_AND_ASSIGN(IncognitoTabHTMLSource);
};
-IncognitoTabHTMLSource::IncognitoTabHTMLSource()
- : DataSource(chrome::kChromeUINewTabHost, MessageLoop::current()) {
+IncognitoTabHTMLSource::IncognitoTabHTMLSource(bool bookmark_bar_attached)
+ : DataSource(chrome::kChromeUINewTabHost, MessageLoop::current()),
+ bookmark_bar_attached_(bookmark_bar_attached) {
}
void IncognitoTabHTMLSource::StartDataRequest(const std::string& path,
@@ -461,6 +463,8 @@
localized_strings.SetString(L"content",
l10n_util::GetStringF(IDS_NEW_TAB_OTR_MESSAGE,
l10n_util::GetString(IDS_LEARN_MORE_INCOGNITO_URL)));
+ localized_strings.SetString(L"bookmarkbarattached",
+ bookmark_bar_attached_ ? "true" : "false");
SetFontAndTextDirection(&localized_strings);
@@ -1529,7 +1533,8 @@
if (GetProfile()->IsOffTheRecord()) {
incognito_ = true;
- IncognitoTabHTMLSource* html_source = new IncognitoTabHTMLSource();
+ IncognitoTabHTMLSource* html_source = new IncognitoTabHTMLSource(
+ GetProfile()->GetPrefs()->GetBoolean(prefs::kShowBookmarkBar));
g_browser_process->io_thread()->message_loop()->PostTask(FROM_HERE,
NewRunnableMethod(&chrome_url_data_manager,
« no previous file with comments | « chrome/browser/dom_ui/dom_ui_theme_source.cc ('k') | chrome/browser/resources/incognito_tab.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698