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 <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/file_util.h" | 10 #include "base/file_util.h" |
(...skipping 359 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
370 localized_strings.SetString("importDataLinkTitle", | 370 localized_strings.SetString("importDataLinkTitle", |
371 l10n_util::GetStringUTF16(IDS_NEW_TAB_BOOKMARKS_IMPORT_LINK_TITLE)); | 371 l10n_util::GetStringUTF16(IDS_NEW_TAB_BOOKMARKS_IMPORT_LINK_TITLE)); |
372 #if defined(OS_CHROMEOS) | 372 #if defined(OS_CHROMEOS) |
373 localized_strings.SetString("expandMenu", | 373 localized_strings.SetString("expandMenu", |
374 l10n_util::GetStringUTF16(IDS_NEW_TAB_CLOSE_MENU_EXPAND)); | 374 l10n_util::GetStringUTF16(IDS_NEW_TAB_CLOSE_MENU_EXPAND)); |
375 #endif | 375 #endif |
376 | 376 |
377 NewTabPageHandler::GetLocalizedValues(profile_, &localized_strings); | 377 NewTabPageHandler::GetLocalizedValues(profile_, &localized_strings); |
378 NTPLoginHandler::GetLocalizedValues(profile_, &localized_strings); | 378 NTPLoginHandler::GetLocalizedValues(profile_, &localized_strings); |
379 | 379 |
380 SyncSetupHandler::GetStaticLocalizedValues(&localized_strings); | |
381 | |
382 // 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 |
383 // code is not present. | 381 // code is not present. |
384 if (profile_->GetProfileSyncService()) | 382 if (profile_->GetProfileSyncService()) |
385 localized_strings.SetString("syncispresent", "true"); | 383 localized_strings.SetString("syncispresent", "true"); |
386 else | 384 else |
387 localized_strings.SetString("syncispresent", "false"); | 385 localized_strings.SetString("syncispresent", "false"); |
388 | 386 |
389 ChromeURLDataManager::DataSource::SetFontAndTextDirection(&localized_strings); | 387 ChromeURLDataManager::DataSource::SetFontAndTextDirection(&localized_strings); |
390 | 388 |
391 // Control fade and resize animations. | 389 // Control fade and resize animations. |
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
583 IDR_NEW_TAB_4_THEME_CSS : IDR_NEW_TAB_THEME_CSS; | 581 IDR_NEW_TAB_4_THEME_CSS : IDR_NEW_TAB_THEME_CSS; |
584 static const base::StringPiece new_tab_theme_css( | 582 static const base::StringPiece new_tab_theme_css( |
585 ResourceBundle::GetSharedInstance().GetRawDataResource( | 583 ResourceBundle::GetSharedInstance().GetRawDataResource( |
586 ntp_css_resource_id)); | 584 ntp_css_resource_id)); |
587 | 585 |
588 // Create the string from our template and the replacements. | 586 // Create the string from our template and the replacements. |
589 std::string css_string; | 587 std::string css_string; |
590 css_string = ReplaceStringPlaceholders(new_tab_theme_css, subst, NULL); | 588 css_string = ReplaceStringPlaceholders(new_tab_theme_css, subst, NULL); |
591 new_tab_css_ = base::RefCountedString::TakeString(&css_string); | 589 new_tab_css_ = base::RefCountedString::TakeString(&css_string); |
592 } | 590 } |
OLD | NEW |