summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
authorderat@chromium.org <derat@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-11-10 18:15:08 +0000
committerderat@chromium.org <derat@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-11-10 18:15:08 +0000
commit91a79239222020a645e69e6db55d24e4d5bb2ca9 (patch)
treedb4d7184fea9b8af9a939822be8a0f3d9b96c09a /chrome
parentbcfc82aa62de3794364854fabf908b1ebe0aa8de (diff)
downloadchromium_src-91a79239222020a645e69e6db55d24e4d5bb2ca9.zip
chromium_src-91a79239222020a645e69e6db55d24e4d5bb2ca9.tar.gz
chromium_src-91a79239222020a645e69e6db55d24e4d5bb2ca9.tar.bz2
chromeos: Update help URLs.
This also moves some untranslatable URL strings out of .grd files and into code so we don't duplicate them per-language. BUG=chromium-os:8117 TEST=trybots; also built and ran the chrome os version Review URL: http://codereview.chromium.org/4495001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@65683 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r--chrome/app/generated_resources.grd3
-rw-r--r--chrome/app/resources/locale_settings.grd25
-rw-r--r--chrome/browser/cocoa/browser_window_controller.mm8
-rw-r--r--chrome/browser/cocoa/page_info_bubble_controller.mm5
-rw-r--r--chrome/browser/cocoa/preferences_window_controller.mm7
-rw-r--r--chrome/browser/dom_ui/ntp_resource_cache.cc4
-rw-r--r--chrome/browser/dom_ui/options/advanced_options_handler.cc7
-rw-r--r--chrome/browser/external_tab_container_win.cc7
-rw-r--r--chrome/browser/geolocation/geolocation_permission_context.cc19
-rw-r--r--chrome/browser/gtk/options/advanced_contents_gtk.cc8
-rw-r--r--chrome/browser/gtk/page_info_bubble_gtk.cc5
-rw-r--r--chrome/browser/gtk/sad_tab_gtk.cc7
-rw-r--r--chrome/browser/resources/options/autofill_options.html8
-rw-r--r--chrome/browser/translate/options_menu_model.cc20
-rw-r--r--chrome/browser/ui/browser.cc40
-rw-r--r--chrome/browser/ui/views/options/advanced_contents_view.cc8
-rw-r--r--chrome/browser/ui/views/page_info_bubble_view.cc5
-rw-r--r--chrome/browser/ui/views/sad_tab_view.cc8
-rw-r--r--chrome/common/url_constants.cc21
-rw-r--r--chrome/common/url_constants.h9
20 files changed, 148 insertions, 76 deletions
diff --git a/chrome/app/generated_resources.grd b/chrome/app/generated_resources.grd
index b151a2b..a5dc74c 100644
--- a/chrome/app/generated_resources.grd
+++ b/chrome/app/generated_resources.grd
@@ -6864,9 +6864,6 @@ Keep your key file in a safe place. You will need it to create new versions of y
<message name="IDS_AUTOFILL_HELP_LABEL" desc="The label of the Help link on the Autofill dialog.">
About Autofill
</message>
- <message name="IDS_AUTOFILL_HELP_URL" desc="The url of the Help link on the Autofill dialog.">
- http://www.google.com/support/chrome/bin/answer.py?answer=142893&amp;hl=[GRITLANGCODE]
- </message>
<message name="IDS_THEMES_GROUP_NAME" desc="The title of the themes group">
Themes:
diff --git a/chrome/app/resources/locale_settings.grd b/chrome/app/resources/locale_settings.grd
index ad67dd8..864d189 100644
--- a/chrome/app/resources/locale_settings.grd
+++ b/chrome/app/resources/locale_settings.grd
@@ -377,11 +377,6 @@
25
</message>
- <!-- The URL for the "Learn more" page for the Privacy section under Options. -->
- <message name="IDS_PAGE_INFO_HELP_CENTER" translateable="false">
- http://www.google.com/support/chrome/bin/answer.py?hl=[GRITLANGCODE]&amp;answer=95617
- </message>
-
<!-- The width and height of the Page Info bubble characters and lines (See above). -->
<message name="IDS_PAGEINFOBUBBLE_WIDTH_CHARS" use_name_for_id="true">
50
@@ -530,11 +525,6 @@
http://tools.google.com/chrome/intl/[GRITLANGCODE]/welcome.html
</message>
- <!-- The URL for the "Learn more" page for the Privacy section under Options. -->
- <message name="IDS_LEARN_MORE_PRIVACY_URL" translateable="false">
- http://www.google.com/support/chrome/bin/answer.py?answer=114836&amp;hl=[GRITLANGCODE]
- </message>
-
<!-- The URL for the "Learn more" page for the Chrome Web Apps section under Options.-->
<message name="IDS_LEARN_MORE_BACKGROUND_MODE_URL" translateable="false">
http://www.google.com/support/chrome/bin/answer.py?answer=188022&amp;hl=[GRITLANGCODE]
@@ -545,11 +535,6 @@
http://www.google.com/support/chrome/bin/answer.py?answer=96817&amp;hl=[GRITLANGCODE]
</message>
- <!-- The URL for the "Learn more" privacy page for the Geolocation permission infobar. -->
- <message name="IDS_LEARN_MORE_GEOLOCATION_URL" translateable="false">
- http://www.google.com/support/chrome/bin/answer.py?answer=142065&amp;hl=[GRITLANGCODE]
- </message>
-
<!-- The width and height of the bookmark manager in characters and lines -->
<!-- (See above). -->
<message name="IDS_BOOKMARK_MANAGER_DIALOG_WIDTH_CHARS" use_name_for_id="true">
@@ -617,11 +602,6 @@
8
</message>
- <!-- The URL for the "Aw snap" page. -->
- <message name="IDS_CRASH_REASON_URL" translateable="false">
- http://www.google.com/support/chrome/bin/answer.py?answer=95669&amp;hl=[GRITLANGCODE]
- </message>
-
<!-- The default width and min height for the 'download_in_progress' dialog. -->
<message name="IDS_DOWNLOAD_IN_PROGRESS_WIDTH_CHARS" use_name_for_id="true">
67
@@ -675,11 +655,6 @@
9
</message>
- <!-- The URL for About Google Translate. -->
- <message name="IDS_ABOUT_GOOGLE_TRANSLATE_URL" translateable="false">
- http://www.google.com/support/chrome/bin/answer.py?answer=173424&amp;hl=[GRITLANGCODE]
- </message>
-
<!-- The width and height of the Content Settings Exceptions dialog box in -->
<!-- characters and lines (See above). -->
<message name="IDS_CONTENT_EXCEPTION_DIALOG_WIDTH_CHARS" use_name_for_id="true">
diff --git a/chrome/browser/cocoa/browser_window_controller.mm b/chrome/browser/cocoa/browser_window_controller.mm
index 0e39267b..da6f070 100644
--- a/chrome/browser/cocoa/browser_window_controller.mm
+++ b/chrome/browser/cocoa/browser_window_controller.mm
@@ -46,6 +46,7 @@
#import "chrome/browser/cocoa/toolbar_controller.h"
#include "chrome/browser/dock_info.h"
#include "chrome/browser/encoding_menu_controller.h"
+#include "chrome/browser/google/google_util.h"
#include "chrome/browser/location_bar.h"
#include "chrome/browser/profile.h"
#include "chrome/browser/renderer_host/render_widget_host_view.h"
@@ -56,6 +57,7 @@
#include "chrome/browser/tabs/tab_strip_model.h"
#include "chrome/browser/themes/browser_theme_provider.h"
#include "chrome/browser/window_sizer.h"
+#include "chrome/common/url_constants.h"
#include "grit/generated_resources.h"
#include "grit/locale_settings.h"
@@ -1615,9 +1617,9 @@
SadTabController* sad_tab = static_cast<SadTabController*>(sender);
TabContents* tab_contents = [sad_tab tabContents];
if (tab_contents) {
- std::string linkUrl = l10n_util::GetStringUTF8(IDS_CRASH_REASON_URL);
- tab_contents->OpenURL(GURL(linkUrl), GURL(), CURRENT_TAB,
- PageTransition::LINK);
+ GURL helpUrl =
+ google_util::AppendGoogleLocaleParam(GURL(chrome::kCrashReasonURL));
+ tab_contents->OpenURL(helpUrl, GURL(), CURRENT_TAB, PageTransition::LINK);
}
}
}
diff --git a/chrome/browser/cocoa/page_info_bubble_controller.mm b/chrome/browser/cocoa/page_info_bubble_controller.mm
index c2c2d36..c11b3e4 100644
--- a/chrome/browser/cocoa/page_info_bubble_controller.mm
+++ b/chrome/browser/cocoa/page_info_bubble_controller.mm
@@ -17,7 +17,9 @@
#import "chrome/browser/cocoa/info_bubble_view.h"
#import "chrome/browser/cocoa/info_bubble_window.h"
#import "chrome/browser/cocoa/location_bar/location_bar_view_mac.h"
+#include "chrome/browser/google/google_util.h"
#include "chrome/browser/profile.h"
+#include "chrome/common/url_constants.h"
#include "grit/generated_resources.h"
#include "grit/locale_settings.h"
#include "net/base/cert_status_flags.h"
@@ -195,7 +197,8 @@ void ShowPageInfoBubble(gfx::NativeWindow parent,
}
- (IBAction)showHelpPage:(id)sender {
- GURL url = GURL(l10n_util::GetStringUTF16(IDS_PAGE_INFO_HELP_CENTER));
+ GURL url = google_util::AppendGoogleLocaleParam(
+ GURL(chrome::kPageInfoHelpCenterURL));
Browser* browser = BrowserList::GetLastActive();
browser->OpenURL(url, GURL(), NEW_FOREGROUND_TAB, PageTransition::LINK);
}
diff --git a/chrome/browser/cocoa/preferences_window_controller.mm b/chrome/browser/cocoa/preferences_window_controller.mm
index a323233..7dbc2fc 100644
--- a/chrome/browser/cocoa/preferences_window_controller.mm
+++ b/chrome/browser/cocoa/preferences_window_controller.mm
@@ -34,6 +34,7 @@
#include "chrome/browser/download/download_manager.h"
#include "chrome/browser/download/download_prefs.h"
#include "chrome/browser/extensions/extensions_service.h"
+#include "chrome/browser/google/google_util.h"
#include "chrome/browser/metrics/metrics_service.h"
#include "chrome/browser/metrics/user_metrics.h"
#include "chrome/browser/net/url_fixer_upper.h"
@@ -1497,11 +1498,11 @@ const int kDisabledIndex = 1;
}
- (IBAction)privacyLearnMore:(id)sender {
+ GURL url = google_util::AppendGoogleLocaleParam(
+ GURL(chrome::kPrivacyLearnMoreURL));
// We open a new browser window so the Options dialog doesn't get lost
// behind other windows.
- browser::ShowOptionsURL(
- profile_,
- GURL(l10n_util::GetStringUTF16(IDS_LEARN_MORE_PRIVACY_URL)));
+ browser::ShowOptionsURL(profile_, url);
}
- (IBAction)backgroundModeLearnMore:(id)sender {
diff --git a/chrome/browser/dom_ui/ntp_resource_cache.cc b/chrome/browser/dom_ui/ntp_resource_cache.cc
index c2e7add..e6e93a6 100644
--- a/chrome/browser/dom_ui/ntp_resource_cache.cc
+++ b/chrome/browser/dom_ui/ntp_resource_cache.cc
@@ -54,7 +54,11 @@ namespace {
// The URL for the the Learn More page shown on incognito new tab.
const char kLearnMoreIncognitoUrl[] =
+#if defined(OS_CHROMEOS)
+ "http://www.google.com/support/chromeos/bin/answer.py?answer=95464";
+#else
"http://www.google.com/support/chrome/bin/answer.py?answer=95464";
+#endif
// The URL for bookmark sync service help.
const char kSyncServiceHelpUrl[] =
diff --git a/chrome/browser/dom_ui/options/advanced_options_handler.cc b/chrome/browser/dom_ui/options/advanced_options_handler.cc
index bb7bb88..d019be5 100644
--- a/chrome/browser/dom_ui/options/advanced_options_handler.cc
+++ b/chrome/browser/dom_ui/options/advanced_options_handler.cc
@@ -14,6 +14,7 @@
#include "chrome/browser/dom_ui/options/options_managed_banner_handler.h"
#include "chrome/browser/download/download_manager.h"
#include "chrome/browser/download/download_prefs.h"
+#include "chrome/browser/google/google_util.h"
#include "chrome/browser/metrics/user_metrics.h"
#include "chrome/browser/options_util.h"
#include "chrome/browser/options_window.h"
@@ -24,10 +25,11 @@
#include "chrome/browser/profile.h"
#include "chrome/browser/tab_contents/tab_contents.h"
#include "chrome/browser/tab_contents/tab_contents_view.h"
+#include "chrome/common/chrome_switches.h"
#include "chrome/common/notification_service.h"
#include "chrome/common/notification_type.h"
#include "chrome/common/pref_names.h"
-#include "chrome/common/chrome_switches.h"
+#include "chrome/common/url_constants.h"
#include "grit/chromium_strings.h"
#include "grit/generated_resources.h"
#include "grit/locale_settings.h"
@@ -57,7 +59,8 @@ void AdvancedOptionsHandler::GetLocalizedValues(
DCHECK(localized_strings);
localized_strings->SetString("privacyLearnMoreURL",
- l10n_util::GetStringUTF16(IDS_LEARN_MORE_PRIVACY_URL));
+ google_util::AppendGoogleLocaleParam(
+ GURL(chrome::kPrivacyLearnMoreURL)).spec());
localized_strings->SetString("downloadLocationGroupName",
l10n_util::GetStringUTF16(IDS_OPTIONS_DOWNLOADLOCATION_GROUP_NAME));
localized_strings->SetString("downloadLocationBrowseButton",
diff --git a/chrome/browser/external_tab_container_win.cc b/chrome/browser/external_tab_container_win.cc
index eb336b9..88a1da7 100644
--- a/chrome/browser/external_tab_container_win.cc
+++ b/chrome/browser/external_tab_container_win.cc
@@ -19,6 +19,7 @@
#include "chrome/browser/browser_window.h"
#include "chrome/browser/debugger/devtools_manager.h"
#include "chrome/browser/debugger/devtools_toggle_action.h"
+#include "chrome/browser/google/google_util.h"
#include "chrome/browser/history/history_types.h"
#include "chrome/browser/load_notification_details.h"
#include "chrome/browser/page_info_window.h"
@@ -27,9 +28,9 @@
#include "chrome/browser/renderer_host/render_view_host.h"
#include "chrome/browser/renderer_host/resource_dispatcher_host_request_info.h"
#include "chrome/browser/tab_contents/provisional_load_details.h"
-#include "chrome/browser/views/tab_contents/render_view_context_menu_views.h"
#include "chrome/browser/tab_contents/tab_contents.h"
#include "chrome/browser/views/page_info_bubble_view.h"
+#include "chrome/browser/views/tab_contents/render_view_context_menu_views.h"
#include "chrome/browser/views/tab_contents/tab_contents_container.h"
#include "chrome/common/bindings_policy.h"
#include "chrome/common/chrome_constants.h"
@@ -38,6 +39,7 @@
#include "chrome/common/native_web_keyboard_event.h"
#include "chrome/common/notification_service.h"
#include "chrome/common/page_transition_types.h"
+#include "chrome/common/url_constants.h"
#include "chrome/test/automation/automation_messages.h"
#include "grit/generated_resources.h"
#include "grit/locale_settings.h"
@@ -66,7 +68,8 @@ class ExternalTabPageInfoBubbleView : public PageInfoBubbleView {
}
// LinkController methods:
virtual void LinkActivated(views::Link* source, int event_flags) {
- GURL url = GURL(l10n_util::GetStringUTF16(IDS_PAGE_INFO_HELP_CENTER));
+ GURL url = google_util::AppendGoogleLocaleParam(
+ GURL(chrome::kPageInfoHelpCenterURL));
container_->OpenURLFromTab(container_->tab_contents(), url, GURL(),
NEW_FOREGROUND_TAB, PageTransition::LINK);
}
diff --git a/chrome/browser/geolocation/geolocation_permission_context.cc b/chrome/browser/geolocation/geolocation_permission_context.cc
index 4d7c848..d7f69d7 100644
--- a/chrome/browser/geolocation/geolocation_permission_context.cc
+++ b/chrome/browser/geolocation/geolocation_permission_context.cc
@@ -13,6 +13,7 @@
#include "chrome/browser/geolocation/geolocation_content_settings_map.h"
#include "chrome/browser/geolocation/geolocation_dispatcher_host_old.h"
#include "chrome/browser/geolocation/geolocation_provider.h"
+#include "chrome/browser/google/google_util.h"
#include "chrome/browser/prefs/pref_service.h"
#include "chrome/browser/profile.h"
#include "chrome/browser/renderer_host/render_process_host.h"
@@ -29,6 +30,17 @@
#include "grit/theme_resources.h"
#include "net/base/net_util.h"
+namespace {
+
+const char kGeolocationLearnMoreUrl[] =
+#if defined(OS_CHROMEOS)
+ "http://www.google.com/support/chromeos/bin/answer.py?answer=142065";
+#else
+ "http://www.google.com/support/chrome/bin/answer.py?answer=142065";
+#endif
+
+} // namespace
+
// This class controls the geolocation infobar queue per profile, and it's an
// internal class to GeolocationPermissionContext.
// An alternate approach would be to have this queue per tab, and use
@@ -138,10 +150,11 @@ class GeolocationConfirmInfoBarDelegate : public ConfirmInfoBarDelegate {
return l10n_util::GetStringUTF16(IDS_LEARN_MORE);
}
virtual bool LinkClicked(WindowOpenDisposition disposition) {
- // Ignore the click dispostion and always open in a new top level tab.
+ GURL learn_more_url =
+ google_util::AppendGoogleLocaleParam(GURL(kGeolocationLearnMoreUrl));
+ // Ignore the click disposition and always open in a new top level tab.
tab_contents_->OpenURL(
- GURL(l10n_util::GetStringUTF8(IDS_LEARN_MORE_GEOLOCATION_URL)), GURL(),
- NEW_FOREGROUND_TAB, PageTransition::LINK);
+ learn_more_url, GURL(), NEW_FOREGROUND_TAB, PageTransition::LINK);
return false; // Do not dismiss the info bar.
}
diff --git a/chrome/browser/gtk/options/advanced_contents_gtk.cc b/chrome/browser/gtk/options/advanced_contents_gtk.cc
index f98490e..6ea7a49 100644
--- a/chrome/browser/gtk/options/advanced_contents_gtk.cc
+++ b/chrome/browser/gtk/options/advanced_contents_gtk.cc
@@ -25,6 +25,7 @@
#include "chrome/browser/download/download_manager.h"
#include "chrome/browser/download/download_prefs.h"
#include "chrome/browser/fonts_languages_window.h"
+#include "chrome/browser/google/google_util.h"
#include "chrome/browser/gtk/accessible_widget_helper_gtk.h"
#include "chrome/browser/gtk/clear_browsing_data_dialog_gtk.h"
#include "chrome/browser/gtk/gtk_chrome_link_button.h"
@@ -43,6 +44,7 @@
#include "chrome/common/chrome_switches.h"
#include "chrome/common/pref_names.h"
#include "chrome/common/process_watcher.h"
+#include "chrome/common/url_constants.h"
#include "grit/chromium_strings.h"
#include "grit/generated_resources.h"
#include "grit/locale_settings.h"
@@ -882,9 +884,9 @@ void PrivacySection::OnClearBrowsingDataButtonClicked(GtkButton* widget,
// static
void PrivacySection::OnLearnMoreLinkClicked(GtkButton *button,
PrivacySection* privacy_section) {
- browser::ShowOptionsURL(
- privacy_section->profile(),
- GURL(l10n_util::GetStringUTF8(IDS_LEARN_MORE_PRIVACY_URL)));
+ GURL url = google_util::AppendGoogleLocaleParam(
+ GURL(chrome::kPrivacyLearnMoreURL));
+ browser::ShowOptionsURL(privacy_section->profile(), url);
}
// static
diff --git a/chrome/browser/gtk/page_info_bubble_gtk.cc b/chrome/browser/gtk/page_info_bubble_gtk.cc
index cfb54de..6bfa77c 100644
--- a/chrome/browser/gtk/page_info_bubble_gtk.cc
+++ b/chrome/browser/gtk/page_info_bubble_gtk.cc
@@ -11,6 +11,7 @@
#include "base/utf_string_conversions.h"
#include "chrome/browser/browser_list.h"
#include "chrome/browser/certificate_viewer.h"
+#include "chrome/browser/google/google_util.h"
#include "chrome/browser/gtk/browser_toolbar_gtk.h"
#include "chrome/browser/gtk/browser_window_gtk.h"
#include "chrome/browser/gtk/gtk_chrome_link_button.h"
@@ -23,6 +24,7 @@
#include "chrome/common/notification_observer.h"
#include "chrome/common/notification_registrar.h"
#include "chrome/common/notification_service.h"
+#include "chrome/common/url_constants.h"
#include "googleurl/src/gurl.h"
#include "grit/generated_resources.h"
#include "grit/locale_settings.h"
@@ -270,7 +272,8 @@ void PageInfoBubbleGtk::OnViewCertLinkClicked(GtkWidget* widget) {
}
void PageInfoBubbleGtk::OnHelpLinkClicked(GtkWidget* widget) {
- GURL url = GURL(l10n_util::GetStringUTF16(IDS_PAGE_INFO_HELP_CENTER));
+ GURL url = google_util::AppendGoogleLocaleParam(
+ GURL(chrome::kPageInfoHelpCenterURL));
Browser* browser = BrowserList::GetLastActive();
browser->OpenURL(url, GURL(), NEW_FOREGROUND_TAB, PageTransition::LINK);
bubble_->Close();
diff --git a/chrome/browser/gtk/sad_tab_gtk.cc b/chrome/browser/gtk/sad_tab_gtk.cc
index 569c53f..80612f7 100644
--- a/chrome/browser/gtk/sad_tab_gtk.cc
+++ b/chrome/browser/gtk/sad_tab_gtk.cc
@@ -8,9 +8,11 @@
#include "app/l10n_util.h"
#include "app/resource_bundle.h"
+#include "chrome/browser/google/google_util.h"
#include "chrome/browser/gtk/gtk_chrome_link_button.h"
#include "chrome/browser/gtk/gtk_util.h"
#include "chrome/browser/tab_contents/tab_contents.h"
+#include "chrome/common/url_constants.h"
#include "grit/generated_resources.h"
#include "grit/locale_settings.h"
#include "grit/theme_resources.h"
@@ -112,7 +114,8 @@ SadTabGtk::~SadTabGtk() {
void SadTabGtk::OnLinkButtonClick(GtkWidget* sender) {
if (tab_contents_ != NULL) {
- tab_contents_->OpenURL(GURL(l10n_util::GetStringUTF8(IDS_CRASH_REASON_URL)),
- GURL(), CURRENT_TAB, PageTransition::LINK);
+ GURL help_url =
+ google_util::AppendGoogleLocaleParam(GURL(chrome::kCrashReasonURL));
+ tab_contents_->OpenURL(help_url, GURL(), CURRENT_TAB, PageTransition::LINK);
}
}
diff --git a/chrome/browser/resources/options/autofill_options.html b/chrome/browser/resources/options/autofill_options.html
index fe357c5..f709df1 100644
--- a/chrome/browser/resources/options/autofill_options.html
+++ b/chrome/browser/resources/options/autofill_options.html
@@ -38,7 +38,13 @@
</div>
<div class="autofill-section">
+<if expr="pp_ifdef('chromeos')">
+ <a href="http://www.google.com/support/chromeos/bin/answer.py?answer=142893"
+ target="_blank" i18n-content="helpButton"></a>
+</if>
+<if expr="not pp_ifdef('chromeos')">
<a href="http://www.google.com/support/chrome/bin/answer.py?answer=142893"
- target=”_blank” i18n-content="helpButton"></a>
+ target="_blank" i18n-content="helpButton"></a>
+</if>
</div>
</div>
diff --git a/chrome/browser/translate/options_menu_model.cc b/chrome/browser/translate/options_menu_model.cc
index 975140e..e9b0943 100644
--- a/chrome/browser/translate/options_menu_model.cc
+++ b/chrome/browser/translate/options_menu_model.cc
@@ -8,12 +8,24 @@
#include "base/metrics/histogram.h"
#include "chrome/app/chrome_command_ids.h"
#include "chrome/browser/browser_process.h"
+#include "chrome/browser/google/google_util.h"
#include "chrome/browser/profile.h"
#include "chrome/browser/tab_contents/tab_contents.h"
#include "chrome/browser/translate/translate_infobar_delegate.h"
#include "grit/generated_resources.h"
#include "grit/locale_settings.h"
+namespace {
+
+const char kAboutGoogleTranslateUrl[] =
+#if defined(OS_CHROMEOS)
+ "http://www.google.com/support/chromeos/bin/answer.py?answer=173424";
+#else
+ "http://www.google.com/support/chrome/bin/answer.py?answer=173424";
+#endif
+
+} // namespace
+
OptionsMenuModel::OptionsMenuModel(
TranslateInfoBarDelegate* translate_delegate)
: ALLOW_THIS_IN_INITIALIZER_LIST(menus::SimpleMenuModel(this)),
@@ -111,10 +123,10 @@ void OptionsMenuModel::ExecuteCommand(int command_id) {
case IDC_TRANSLATE_OPTIONS_ABOUT: {
TabContents* tab_contents = translate_infobar_delegate_->tab_contents();
if (tab_contents) {
- string16 url = l10n_util::GetStringUTF16(
- IDS_ABOUT_GOOGLE_TRANSLATE_URL);
- tab_contents->OpenURL(GURL(url), GURL(), NEW_FOREGROUND_TAB,
- PageTransition::LINK);
+ GURL about_url = google_util::AppendGoogleLocaleParam(
+ GURL(kAboutGoogleTranslateUrl));
+ tab_contents->OpenURL(
+ about_url, GURL(), NEW_FOREGROUND_TAB, PageTransition::LINK);
}
break;
}
diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc
index 5fe1f67..097d38f 100644
--- a/chrome/browser/ui/browser.cc
+++ b/chrome/browser/ui/browser.cc
@@ -138,33 +138,41 @@
using base::TimeDelta;
-// How long we wait before updating the browser chrome while loading a page.
-static const int kUIUpdateCoalescingTimeMS = 200;
+///////////////////////////////////////////////////////////////////////////////
+
+namespace {
// The URL to be loaded to display Help.
#if defined(OS_CHROMEOS)
-static const char* const kHelpContentUrl =
+const char kHelpContentUrl[] =
"chrome-extension://nifaohjgppdbmalmmgkmfdlodaggnbpe/main.html";
-static const char* const kHelpContentOnlineUrl =
+const char kHelpContentOnlineUrl[] =
"http://www.google.com/support/chromeos/";
#else
-static const char* const kHelpContentUrl =
+const char kHelpContentUrl[] =
"http://www.google.com/support/chrome/";
#endif
+// The URL to be opened when the Help link on the Autofill dialog is clicked.
+const char kAutofillHelpUrl[] =
+#if defined(OS_CHROMEOS)
+ "http://www.google.com/support/chromeos/bin/answer.py?answer=142893";
+#else
+ "http://www.google.com/support/chrome/bin/answer.py?answer=142893";
+#endif
+
// The URL to be loaded to display the "Report a broken page" form.
-static const std::string kBrokenPageUrl =
+const char kBrokenPageUrl[] =
"http://www.google.com/support/chrome/bin/request.py?contact_type="
"broken_website&format=inproduct&p.page_title=$1&p.page_url=$2";
-static const std::string kHashMark = "#";
-
// The URL for the privacy dashboard.
-static const char kPrivacyDashboardUrl[] = "https://www.google.com/dashboard";
+const char kPrivacyDashboardUrl[] = "https://www.google.com/dashboard";
-///////////////////////////////////////////////////////////////////////////////
+// How long we wait before updating the browser chrome while loading a page.
+const int kUIUpdateCoalescingTimeMS = 200;
-namespace {
+const char kHashMark[] = "#";
#if defined(OS_CHROMEOS)
// If a popup window is bigger than this fraction of the screen on chrome os,
@@ -1784,7 +1792,7 @@ void Browser::OpenClearBrowsingDataDialog() {
if (CommandLine::ForCurrentProcess()->HasSwitch(
switches::kEnableTabbedOptions)) {
ShowOptionsTab(
- chrome::kAdvancedOptionsSubPage + kHashMark +
+ chrome::kAdvancedOptionsSubPage + std::string(kHashMark) +
chrome::kClearBrowserDataSubPage);
} else {
window_->ShowClearBrowsingDataDialog();
@@ -1820,7 +1828,7 @@ void Browser::OpenImportSettingsDialog() {
if (CommandLine::ForCurrentProcess()->HasSwitch(
switches::kEnableTabbedOptions)) {
ShowOptionsTab(
- chrome::kPersonalOptionsSubPage + kHashMark +
+ chrome::kPersonalOptionsSubPage + std::string(kHashMark) +
chrome::kImportDataSubPage);
} else {
window_->ShowImportDialog();
@@ -1875,8 +1883,8 @@ void Browser::OpenPrivacyDashboardTabAndActivate() {
}
void Browser::OpenAutoFillHelpTabAndActivate() {
- AddSelectedTabWithURL(GURL(l10n_util::GetStringUTF8(IDS_AUTOFILL_HELP_URL)),
- PageTransition::LINK);
+ GURL help_url = google_util::AppendGoogleLocaleParam(GURL(kAutofillHelpUrl));
+ AddSelectedTabWithURL(help_url, PageTransition::LINK);
}
void Browser::OpenSearchEngineOptionsDialog() {
@@ -3090,7 +3098,7 @@ void Browser::ShowContentSettingsWindow(ContentSettingsType content_type) {
if (CommandLine::ForCurrentProcess()->HasSwitch(
switches::kEnableTabbedOptions)) {
ShowOptionsTab(
- chrome::kContentSettingsSubPage + kHashMark +
+ chrome::kContentSettingsSubPage + std::string(kHashMark) +
ContentSettingsHandler::ContentSettingsTypeToGroupName(content_type));
} else {
window()->ShowContentSettingsWindow(content_type,
diff --git a/chrome/browser/ui/views/options/advanced_contents_view.cc b/chrome/browser/ui/views/options/advanced_contents_view.cc
index b8513b6..4fa3116 100644
--- a/chrome/browser/ui/views/options/advanced_contents_view.cc
+++ b/chrome/browser/ui/views/options/advanced_contents_view.cc
@@ -27,6 +27,7 @@
#include "chrome/browser/browser_process.h"
#include "chrome/browser/download/download_manager.h"
#include "chrome/browser/download/download_prefs.h"
+#include "chrome/browser/google/google_util.h"
#include "chrome/browser/gears_integration.h"
#include "chrome/browser/options_util.h"
#include "chrome/browser/prefs/pref_member.h"
@@ -48,6 +49,7 @@
#include "chrome/browser/views/restart_message_box.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/common/pref_names.h"
+#include "chrome/common/url_constants.h"
#include "gfx/canvas_skia.h"
#include "gfx/native_theme_win.h"
#include "grit/app_resources.h"
@@ -540,9 +542,9 @@ void PrivacySection::ButtonPressed(
void PrivacySection::LinkActivated(views::Link* source, int event_flags) {
DCHECK(source == learn_more_link_);
- browser::ShowOptionsURL(
- profile(),
- GURL(l10n_util::GetString(IDS_LEARN_MORE_PRIVACY_URL)));
+ GURL url = google_util::AppendGoogleLocaleParam(
+ GURL(chrome::kPrivacyLearnMoreURL));
+ browser::ShowOptionsURL(profile(), url);
}
void PrivacySection::InitControlLayout() {
diff --git a/chrome/browser/ui/views/page_info_bubble_view.cc b/chrome/browser/ui/views/page_info_bubble_view.cc
index 90fa667..0dbd950 100644
--- a/chrome/browser/ui/views/page_info_bubble_view.cc
+++ b/chrome/browser/ui/views/page_info_bubble_view.cc
@@ -9,9 +9,11 @@
#include "chrome/browser/browser_list.h"
#include "chrome/browser/cert_store.h"
#include "chrome/browser/certificate_viewer.h"
+#include "chrome/browser/google/google_util.h"
#include "chrome/browser/views/frame/browser_view.h"
#include "chrome/browser/views/info_bubble.h"
#include "chrome/browser/views/toolbar_view.h"
+#include "chrome/common/url_constants.h"
#include "grit/generated_resources.h"
#include "grit/locale_settings.h"
#include "views/controls/image_view.h"
@@ -205,7 +207,8 @@ void PageInfoBubbleView::ModelChanged() {
}
void PageInfoBubbleView::LinkActivated(views::Link* source, int event_flags) {
- GURL url = GURL(l10n_util::GetStringUTF16(IDS_PAGE_INFO_HELP_CENTER));
+ GURL url = google_util::AppendGoogleLocaleParam(
+ GURL(chrome::kPageInfoHelpCenterURL));
Browser* browser = BrowserList::GetLastActive();
browser->OpenURL(url, GURL(), NEW_FOREGROUND_TAB, PageTransition::LINK);
}
diff --git a/chrome/browser/ui/views/sad_tab_view.cc b/chrome/browser/ui/views/sad_tab_view.cc
index 31f45fd..f8a48a9 100644
--- a/chrome/browser/ui/views/sad_tab_view.cc
+++ b/chrome/browser/ui/views/sad_tab_view.cc
@@ -6,8 +6,10 @@
#include "app/l10n_util.h"
#include "app/resource_bundle.h"
+#include "chrome/browser/google/google_util.h"
#include "chrome/browser/tab_contents/tab_contents.h"
#include "chrome/browser/tab_contents/tab_contents_delegate.h"
+#include "chrome/common/url_constants.h"
#include "gfx/canvas.h"
#include "gfx/canvas_skia.h"
#include "gfx/size.h"
@@ -110,7 +112,8 @@ void SadTabView::Layout() {
void SadTabView::LinkActivated(views::Link* source, int event_flags) {
if (tab_contents_ != NULL && source == learn_more_link_) {
- string16 url = l10n_util::GetStringUTF16(IDS_CRASH_REASON_URL);
+ GURL help_url =
+ google_util::AppendGoogleLocaleParam(GURL(chrome::kCrashReasonURL));
WindowOpenDisposition disposition(CURRENT_TAB);
#if defined(OS_CHROMEOS)
if (tab_contents_->delegate() &&
@@ -120,8 +123,7 @@ void SadTabView::LinkActivated(views::Link* source, int event_flags) {
disposition = NEW_FOREGROUND_TAB;
}
#endif
- tab_contents_->OpenURL(GURL(url), GURL(), disposition,
- PageTransition::LINK);
+ tab_contents_->OpenURL(help_url, GURL(), disposition, PageTransition::LINK);
}
}
diff --git a/chrome/common/url_constants.cc b/chrome/common/url_constants.cc
index 427c933..554b5ba 100644
--- a/chrome/common/url_constants.cc
+++ b/chrome/common/url_constants.cc
@@ -174,6 +174,27 @@ const char kLanguageOptionsSubPage[] = "language";
const char kSystemOptionsSubPage[] = "system";
#endif
+const char kPageInfoHelpCenterURL[] =
+#if defined(OS_CHROMEOS)
+ "http://www.google.com/support/chromeos/bin/answer.py?answer=95617";
+#else
+ "http://www.google.com/support/chrome/bin/answer.py?answer=95617";
+#endif
+
+const char kCrashReasonURL[] =
+#if defined(OS_CHROMEOS)
+ "http://www.google.com/support/chromeos/bin/answer.py?answer=1047340";
+#else
+ "http://www.google.com/support/chrome/bin/answer.py?answer=95669";
+#endif
+
+const char kPrivacyLearnMoreURL[] =
+#if defined(OS_CHROMEOS)
+ "http://www.google.com/support/chromeos/bin/answer.py?answer=1047334";
+#else
+ "http://www.google.com/support/chrome/bin/answer.py?answer=114836";
+#endif
+
void RegisterChromeSchemes() {
// Don't need "chrome-internal" which was used in old versions of Chrome for
// the new tab page.
diff --git a/chrome/common/url_constants.h b/chrome/common/url_constants.h
index 05e32e6..14c2b37 100644
--- a/chrome/common/url_constants.h
+++ b/chrome/common/url_constants.h
@@ -170,6 +170,15 @@ extern const char kLanguageOptionsSubPage[];
extern const char kSystemOptionsSubPage[];
#endif
+// "What do these mean?" URL for the Page Info bubble.
+extern const char kPageInfoHelpCenterURL[];
+
+// "Learn more" URL for "Aw snap" page.
+extern const char kCrashReasonURL[];
+
+// "Learn more" URL for the Privacy section under Options.
+extern const char kPrivacyLearnMoreURL[];
+
// Call near the beginning of startup to register Chrome's internal URLs that
// should be parsed as "standard" with the googleurl library.
void RegisterChromeSchemes();