OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/browser/ui/webui/ntp/ntp_resource_cache.h" | 5 #include "chrome/browser/ui/webui/ntp/ntp_resource_cache.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
320 GetUrlWithLang(GURL(chrome::kLearnMoreEnterpriseURL))); | 320 GetUrlWithLang(GURL(chrome::kLearnMoreEnterpriseURL))); |
321 } else { | 321 } else { |
322 localized_strings.SetString("enterpriseInfoVisible", "false"); | 322 localized_strings.SetString("enterpriseInfoVisible", "false"); |
323 } | 323 } |
324 } | 324 } |
325 #endif | 325 #endif |
326 | 326 |
327 localized_strings.SetString("content", | 327 localized_strings.SetString("content", |
328 l10n_util::GetStringFUTF16(new_tab_message_ids, | 328 l10n_util::GetStringFUTF16(new_tab_message_ids, |
329 GetUrlWithLang(GURL(new_tab_link)))); | 329 GetUrlWithLang(GURL(new_tab_link)))); |
330 localized_strings.SetString("extensionsmessage", | |
331 l10n_util::GetStringFUTF16( | |
332 IDS_NEW_TAB_OTR_EXTENSIONS_MESSAGE, | |
333 base::ASCIIToUTF16(chrome::kChromeUIExtensionsURL))); | |
334 bool bookmark_bar_attached = profile_->GetPrefs()->GetBoolean( | 330 bool bookmark_bar_attached = profile_->GetPrefs()->GetBoolean( |
335 prefs::kShowBookmarkBar); | 331 prefs::kShowBookmarkBar); |
336 localized_strings.SetBoolean("bookmarkbarattached", bookmark_bar_attached); | 332 localized_strings.SetBoolean("bookmarkbarattached", bookmark_bar_attached); |
337 | 333 |
338 webui::SetFontAndTextDirection(&localized_strings); | 334 webui::SetFontAndTextDirection(&localized_strings); |
339 | 335 |
340 static const base::StringPiece incognito_tab_html( | 336 static const base::StringPiece incognito_tab_html( |
341 ResourceBundle::GetSharedInstance().GetRawDataResource( | 337 ResourceBundle::GetSharedInstance().GetRawDataResource( |
342 new_tab_html_idr)); | 338 new_tab_html_idr)); |
343 | 339 |
(...skipping 363 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
707 // Get our template. | 703 // Get our template. |
708 static const base::StringPiece new_tab_theme_css( | 704 static const base::StringPiece new_tab_theme_css( |
709 ResourceBundle::GetSharedInstance().GetRawDataResource( | 705 ResourceBundle::GetSharedInstance().GetRawDataResource( |
710 IDR_NEW_TAB_4_THEME_CSS)); | 706 IDR_NEW_TAB_4_THEME_CSS)); |
711 | 707 |
712 // Create the string from our template and the replacements. | 708 // Create the string from our template and the replacements. |
713 std::string css_string; | 709 std::string css_string; |
714 css_string = ReplaceStringPlaceholders(new_tab_theme_css, subst, NULL); | 710 css_string = ReplaceStringPlaceholders(new_tab_theme_css, subst, NULL); |
715 new_tab_css_ = base::RefCountedString::TakeString(&css_string); | 711 new_tab_css_ = base::RefCountedString::TakeString(&css_string); |
716 } | 712 } |
OLD | NEW |