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 348 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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", | 367 localized_strings.SetString("bookmarksShowAllLinkTitle", |
368 l10n_util::GetStringUTF16(IDS_NEW_TAB_BOOKMARKS_SHOW_ALL_LINK_TITLE)); | 368 l10n_util::GetStringUTF16(IDS_NEW_TAB_BOOKMARKS_SHOW_ALL_LINK_TITLE)); |
| 369 localized_strings.SetString("importDataLinkTitle", |
| 370 l10n_util::GetStringUTF16(IDS_NEW_TAB_BOOKMARKS_IMPORT_LINK_TITLE)); |
369 #if defined(OS_CHROMEOS) | 371 #if defined(OS_CHROMEOS) |
370 localized_strings.SetString("expandMenu", | 372 localized_strings.SetString("expandMenu", |
371 l10n_util::GetStringUTF16(IDS_NEW_TAB_CLOSE_MENU_EXPAND)); | 373 l10n_util::GetStringUTF16(IDS_NEW_TAB_CLOSE_MENU_EXPAND)); |
372 #endif | 374 #endif |
373 | 375 |
374 NewTabPageHandler::GetLocalizedValues(profile_, &localized_strings); | 376 NewTabPageHandler::GetLocalizedValues(profile_, &localized_strings); |
375 | 377 |
376 SyncSetupHandler::GetStaticLocalizedValues(&localized_strings); | 378 SyncSetupHandler::GetStaticLocalizedValues(&localized_strings); |
377 | 379 |
378 // Don't initiate the sync related message passing with the page if the sync | 380 // 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... |
586 IDR_NEW_TAB_4_THEME_CSS : IDR_NEW_TAB_THEME_CSS; | 588 IDR_NEW_TAB_4_THEME_CSS : IDR_NEW_TAB_THEME_CSS; |
587 static const base::StringPiece new_tab_theme_css( | 589 static const base::StringPiece new_tab_theme_css( |
588 ResourceBundle::GetSharedInstance().GetRawDataResource( | 590 ResourceBundle::GetSharedInstance().GetRawDataResource( |
589 ntp_css_resource_id)); | 591 ntp_css_resource_id)); |
590 | 592 |
591 // Create the string from our template and the replacements. | 593 // Create the string from our template and the replacements. |
592 std::string css_string; | 594 std::string css_string; |
593 css_string = ReplaceStringPlaceholders(new_tab_theme_css, subst, NULL); | 595 css_string = ReplaceStringPlaceholders(new_tab_theme_css, subst, NULL); |
594 new_tab_css_ = base::RefCountedString::TakeString(&css_string); | 596 new_tab_css_ = base::RefCountedString::TakeString(&css_string); |
595 } | 597 } |
OLD | NEW |