| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 <algorithm> | 7 #include <algorithm> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 357 localized_strings.SetString("web_store_title", | 357 localized_strings.SetString("web_store_title", |
| 358 l10n_util::GetStringUTF16(IDS_EXTENSION_WEB_STORE_TITLE)); | 358 l10n_util::GetStringUTF16(IDS_EXTENSION_WEB_STORE_TITLE)); |
| 359 localized_strings.SetString("web_store_url", | 359 localized_strings.SetString("web_store_url", |
| 360 GetUrlWithLang(GURL(extension_urls::GetWebstoreLaunchURL()))); | 360 GetUrlWithLang(GURL(extension_urls::GetWebstoreLaunchURL()))); |
| 361 localized_strings.SetString("syncpromotext", | 361 localized_strings.SetString("syncpromotext", |
| 362 l10n_util::GetStringUTF16(IDS_SYNC_START_SYNC_BUTTON_LABEL)); | 362 l10n_util::GetStringUTF16(IDS_SYNC_START_SYNC_BUTTON_LABEL)); |
| 363 localized_strings.SetString("syncLinkText", | 363 localized_strings.SetString("syncLinkText", |
| 364 l10n_util::GetStringUTF16(IDS_SYNC_ADVANCED_OPTIONS)); | 364 l10n_util::GetStringUTF16(IDS_SYNC_ADVANCED_OPTIONS)); |
| 365 localized_strings.SetString("bookmarksManagerLinkTitle", | 365 localized_strings.SetString("bookmarksManagerLinkTitle", |
| 366 l10n_util::GetStringUTF16(IDS_NEW_TAB_BOOKMARKS_MANAGER_LINK_TITLE)); | 366 l10n_util::GetStringUTF16(IDS_NEW_TAB_BOOKMARKS_MANAGER_LINK_TITLE)); |
| 367 localized_strings.SetString("bookmarksShowAllLinkTitle", |
| 368 l10n_util::GetStringUTF16(IDS_NEW_TAB_BOOKMARKS_SHOW_ALL_LINK_TITLE)); |
| 367 #if defined(OS_CHROMEOS) | 369 #if defined(OS_CHROMEOS) |
| 368 localized_strings.SetString("expandMenu", | 370 localized_strings.SetString("expandMenu", |
| 369 l10n_util::GetStringUTF16(IDS_NEW_TAB_CLOSE_MENU_EXPAND)); | 371 l10n_util::GetStringUTF16(IDS_NEW_TAB_CLOSE_MENU_EXPAND)); |
| 370 #endif | 372 #endif |
| 371 | 373 |
| 372 NewTabPageHandler::GetLocalizedValues(profile_, &localized_strings); | 374 NewTabPageHandler::GetLocalizedValues(profile_, &localized_strings); |
| 373 | 375 |
| 374 SyncSetupHandler::GetStaticLocalizedValues(&localized_strings); | 376 SyncSetupHandler::GetStaticLocalizedValues(&localized_strings); |
| 375 | 377 |
| 376 // Don't initiate the sync related message passing with the page if the sync | 378 // Don't initiate the sync related message passing with the page if the sync |
| (...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 584 IDR_NEW_TAB_4_THEME_CSS : IDR_NEW_TAB_THEME_CSS; | 586 IDR_NEW_TAB_4_THEME_CSS : IDR_NEW_TAB_THEME_CSS; |
| 585 static const base::StringPiece new_tab_theme_css( | 587 static const base::StringPiece new_tab_theme_css( |
| 586 ResourceBundle::GetSharedInstance().GetRawDataResource( | 588 ResourceBundle::GetSharedInstance().GetRawDataResource( |
| 587 ntp_css_resource_id)); | 589 ntp_css_resource_id)); |
| 588 | 590 |
| 589 // Create the string from our template and the replacements. | 591 // Create the string from our template and the replacements. |
| 590 std::string css_string; | 592 std::string css_string; |
| 591 css_string = ReplaceStringPlaceholders(new_tab_theme_css, subst, NULL); | 593 css_string = ReplaceStringPlaceholders(new_tab_theme_css, subst, NULL); |
| 592 new_tab_css_ = base::RefCountedString::TakeString(&css_string); | 594 new_tab_css_ = base::RefCountedString::TakeString(&css_string); |
| 593 } | 595 } |
| OLD | NEW |