Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(95)

Side by Side Diff: chrome/browser/ui/webui/ntp/ntp_resource_cache.cc

Issue 327793005: Change google_util::AppendGoogleLocaleParam to take in the application locale (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Nits Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 292 matching lines...) Expand 10 before | Expand all | Expand 10 after
303 localized_strings.SetString("incognitoTabDescription", 303 localized_strings.SetString("incognitoTabDescription",
304 l10n_util::GetStringUTF16(new_tab_description_ids)); 304 l10n_util::GetStringUTF16(new_tab_description_ids));
305 localized_strings.SetString("incognitoTabHeading", 305 localized_strings.SetString("incognitoTabHeading",
306 l10n_util::GetStringUTF16(new_tab_heading_ids)); 306 l10n_util::GetStringUTF16(new_tab_heading_ids));
307 localized_strings.SetString("incognitoTabWarning", 307 localized_strings.SetString("incognitoTabWarning",
308 l10n_util::GetStringUTF16(new_tab_warning_ids)); 308 l10n_util::GetStringUTF16(new_tab_warning_ids));
309 } 309 }
310 310
311 localized_strings.SetString("learnMore", 311 localized_strings.SetString("learnMore",
312 l10n_util::GetStringUTF16(new_tab_link_ids)); 312 l10n_util::GetStringUTF16(new_tab_link_ids));
313 localized_strings.SetString("learnMoreLink", GURL(new_tab_link).spec()); 313 localized_strings.SetString("learnMoreLink", GURL(new_tab_link).spec());
Peter Kasting 2014/06/11 18:25:54 These next three places can drop the "GURL(x).spec
blundell 2014/06/12 16:12:36 Done.
314 314
315 bool bookmark_bar_attached = profile_->GetPrefs()->GetBoolean( 315 bool bookmark_bar_attached = profile_->GetPrefs()->GetBoolean(
316 prefs::kShowBookmarkBar); 316 prefs::kShowBookmarkBar);
317 localized_strings.SetBoolean("bookmarkbarattached", bookmark_bar_attached); 317 localized_strings.SetBoolean("bookmarkbarattached", bookmark_bar_attached);
318 318
319 webui::SetFontAndTextDirection(&localized_strings); 319 webui::SetFontAndTextDirection(&localized_strings);
320 320
321 static const base::StringPiece incognito_tab_html( 321 static const base::StringPiece incognito_tab_html(
322 ResourceBundle::GetSharedInstance().GetRawDataResource( 322 ResourceBundle::GetSharedInstance().GetRawDataResource(
323 new_tab_html_idr)); 323 new_tab_html_idr));
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
452 load_time_data.SetString("otherSessions", 452 load_time_data.SetString("otherSessions",
453 l10n_util::GetStringUTF16(IDS_NEW_TAB_OTHER_SESSIONS_LABEL)); 453 l10n_util::GetStringUTF16(IDS_NEW_TAB_OTHER_SESSIONS_LABEL));
454 load_time_data.SetString("otherSessionsEmpty", 454 load_time_data.SetString("otherSessionsEmpty",
455 l10n_util::GetStringUTF16(IDS_NEW_TAB_OTHER_SESSIONS_EMPTY)); 455 l10n_util::GetStringUTF16(IDS_NEW_TAB_OTHER_SESSIONS_EMPTY));
456 load_time_data.SetString("otherSessionsLearnMoreUrl", 456 load_time_data.SetString("otherSessionsLearnMoreUrl",
457 l10n_util::GetStringUTF16(IDS_NEW_TAB_OTHER_SESSIONS_LEARN_MORE_URL)); 457 l10n_util::GetStringUTF16(IDS_NEW_TAB_OTHER_SESSIONS_LEARN_MORE_URL));
458 load_time_data.SetString("learnMore", 458 load_time_data.SetString("learnMore",
459 l10n_util::GetStringUTF16(IDS_LEARN_MORE)); 459 l10n_util::GetStringUTF16(IDS_LEARN_MORE));
460 load_time_data.SetString("webStoreLink", 460 load_time_data.SetString("webStoreLink",
461 google_util::AppendGoogleLocaleParam( 461 google_util::AppendGoogleLocaleParam(
462 GURL(extension_urls::GetWebstoreLaunchURL())).spec()); 462 GURL(extension_urls::GetWebstoreLaunchURL()),
463 g_browser_process->GetApplicationLocale()).spec());
463 load_time_data.SetString("appInstallHintText", 464 load_time_data.SetString("appInstallHintText",
464 l10n_util::GetStringUTF16(IDS_NEW_TAB_APP_INSTALL_HINT_LABEL)); 465 l10n_util::GetStringUTF16(IDS_NEW_TAB_APP_INSTALL_HINT_LABEL));
465 load_time_data.SetBoolean("isDiscoveryInNTPEnabled", 466 load_time_data.SetBoolean("isDiscoveryInNTPEnabled",
466 NewTabUI::IsDiscoveryInNTPEnabled()); 467 NewTabUI::IsDiscoveryInNTPEnabled());
467 load_time_data.SetString("collapseSessionMenuItemText", 468 load_time_data.SetString("collapseSessionMenuItemText",
468 l10n_util::GetStringUTF16(IDS_NEW_TAB_OTHER_SESSIONS_COLLAPSE_SESSION)); 469 l10n_util::GetStringUTF16(IDS_NEW_TAB_OTHER_SESSIONS_COLLAPSE_SESSION));
469 load_time_data.SetString("expandSessionMenuItemText", 470 load_time_data.SetString("expandSessionMenuItemText",
470 l10n_util::GetStringUTF16(IDS_NEW_TAB_OTHER_SESSIONS_EXPAND_SESSION)); 471 l10n_util::GetStringUTF16(IDS_NEW_TAB_OTHER_SESSIONS_EXPAND_SESSION));
471 load_time_data.SetString("restoreSessionMenuItemText", 472 load_time_data.SetString("restoreSessionMenuItemText",
472 l10n_util::GetStringUTF16(IDS_NEW_TAB_OTHER_SESSIONS_OPEN_ALL)); 473 l10n_util::GetStringUTF16(IDS_NEW_TAB_OTHER_SESSIONS_OPEN_ALL));
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after
716 // Get our template. 717 // Get our template.
717 static const base::StringPiece new_tab_theme_css( 718 static const base::StringPiece new_tab_theme_css(
718 ResourceBundle::GetSharedInstance().GetRawDataResource( 719 ResourceBundle::GetSharedInstance().GetRawDataResource(
719 IDR_NEW_TAB_4_THEME_CSS)); 720 IDR_NEW_TAB_4_THEME_CSS));
720 721
721 // Create the string from our template and the replacements. 722 // Create the string from our template and the replacements.
722 std::string css_string; 723 std::string css_string;
723 css_string = ReplaceStringPlaceholders(new_tab_theme_css, subst, NULL); 724 css_string = ReplaceStringPlaceholders(new_tab_theme_css, subst, NULL);
724 new_tab_css_ = base::RefCountedString::TakeString(&css_string); 725 new_tab_css_ = base::RefCountedString::TakeString(&css_string);
725 } 726 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/extensions/extension_settings_handler.cc ('k') | chrome/browser/ui/webui/sync_setup_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698