| 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 262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 273 "true" : "false"); | 273 "true" : "false"); |
| 274 localized_strings.SetString("hasattribution", | 274 localized_strings.SetString("hasattribution", |
| 275 ThemeServiceFactory::GetForProfile(profile_)->HasCustomImage( | 275 ThemeServiceFactory::GetForProfile(profile_)->HasCustomImage( |
| 276 IDR_THEME_NTP_ATTRIBUTION) ? | 276 IDR_THEME_NTP_ATTRIBUTION) ? |
| 277 "true" : "false"); | 277 "true" : "false"); |
| 278 localized_strings.SetString("apps", apps); | 278 localized_strings.SetString("apps", apps); |
| 279 localized_strings.SetString("title", title); | 279 localized_strings.SetString("title", title); |
| 280 localized_strings.SetString("mostvisited", most_visited); | 280 localized_strings.SetString("mostvisited", most_visited); |
| 281 localized_strings.SetString("restorethumbnails", | 281 localized_strings.SetString("restorethumbnails", |
| 282 l10n_util::GetStringUTF16(IDS_NEW_TAB_RESTORE_THUMBNAILS_LINK)); | 282 l10n_util::GetStringUTF16(IDS_NEW_TAB_RESTORE_THUMBNAILS_LINK)); |
| 283 localized_strings.SetString("restoreThumbnailsShort", |
| 284 l10n_util::GetStringUTF16(IDS_NEW_TAB_RESTORE_THUMBNAILS_SHORT_LINK)); |
| 283 localized_strings.SetString("recentlyclosed", | 285 localized_strings.SetString("recentlyclosed", |
| 284 l10n_util::GetStringUTF16(IDS_NEW_TAB_RECENTLY_CLOSED)); | 286 l10n_util::GetStringUTF16(IDS_NEW_TAB_RECENTLY_CLOSED)); |
| 285 localized_strings.SetString("closedwindowsingle", | 287 localized_strings.SetString("closedwindowsingle", |
| 286 l10n_util::GetStringUTF16(IDS_NEW_TAB_RECENTLY_CLOSED_WINDOW_SINGLE)); | 288 l10n_util::GetStringUTF16(IDS_NEW_TAB_RECENTLY_CLOSED_WINDOW_SINGLE)); |
| 287 localized_strings.SetString("foreignsessions", | 289 localized_strings.SetString("foreignsessions", |
| 288 l10n_util::GetStringUTF16(IDS_SYNC_DATATYPE_SESSIONS)); | 290 l10n_util::GetStringUTF16(IDS_SYNC_DATATYPE_SESSIONS)); |
| 289 localized_strings.SetString("closedwindowmultiple", | 291 localized_strings.SetString("closedwindowmultiple", |
| 290 l10n_util::GetStringUTF16(IDS_NEW_TAB_RECENTLY_CLOSED_WINDOW_MULTIPLE)); | 292 l10n_util::GetStringUTF16(IDS_NEW_TAB_RECENTLY_CLOSED_WINDOW_MULTIPLE)); |
| 291 localized_strings.SetString("attributionintro", | 293 localized_strings.SetString("attributionintro", |
| 292 l10n_util::GetStringUTF16(IDS_NEW_TAB_ATTRIBUTION_INTRO)); | 294 l10n_util::GetStringUTF16(IDS_NEW_TAB_ATTRIBUTION_INTRO)); |
| (...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 565 std::string css_string; | 567 std::string css_string; |
| 566 css_string = ReplaceStringPlaceholders(new_tab_theme_css, subst, NULL); | 568 css_string = ReplaceStringPlaceholders(new_tab_theme_css, subst, NULL); |
| 567 css_string = ReplaceStringPlaceholders(css_string, subst2, NULL); | 569 css_string = ReplaceStringPlaceholders(css_string, subst2, NULL); |
| 568 css_string = ReplaceStringPlaceholders(css_string, subst3, NULL); | 570 css_string = ReplaceStringPlaceholders(css_string, subst3, NULL); |
| 569 | 571 |
| 570 new_tab_css_ = new RefCountedBytes; | 572 new_tab_css_ = new RefCountedBytes; |
| 571 new_tab_css_->data.resize(css_string.size()); | 573 new_tab_css_->data.resize(css_string.size()); |
| 572 std::copy(css_string.begin(), css_string.end(), | 574 std::copy(css_string.begin(), css_string.end(), |
| 573 new_tab_css_->data.begin()); | 575 new_tab_css_->data.begin()); |
| 574 } | 576 } |
| OLD | NEW |