diff options
6 files changed, 23 insertions, 18 deletions
diff --git a/chrome/browser/custom_handlers/register_protocol_handler_infobar_delegate.cc b/chrome/browser/custom_handlers/register_protocol_handler_infobar_delegate.cc index f83c6b2..5033be9 100644 --- a/chrome/browser/custom_handlers/register_protocol_handler_infobar_delegate.cc +++ b/chrome/browser/custom_handlers/register_protocol_handler_infobar_delegate.cc @@ -6,6 +6,7 @@ #include "base/utf_string_conversions.h" #include "chrome/browser/custom_handlers/protocol_handler_registry.h" +#include "chrome/browser/google/google_util.h" #include "chrome/common/url_constants.h" #include "content/browser/tab_contents/tab_contents.h" #include "grit/generated_resources.h" @@ -83,8 +84,9 @@ string16 RegisterProtocolHandlerInfoBarDelegate::GetLinkText() const { bool RegisterProtocolHandlerInfoBarDelegate::LinkClicked( WindowOpenDisposition disposition) { - // Ignore the click dispostion and always open in a new top level tab. - tab_contents_->OpenURL(GURL(chrome::kLearnMoreRegisterProtocolHandlerURL), - GURL(), NEW_FOREGROUND_TAB, PageTransition::LINK); + tab_contents_->OpenURL(google_util::AppendGoogleLocaleParam(GURL( + chrome::kLearnMoreRegisterProtocolHandlerURL)), GURL(), + (disposition == CURRENT_TAB) ? NEW_FOREGROUND_TAB : disposition, + PageTransition::LINK); return false; } diff --git a/chrome/browser/geolocation/chrome_geolocation_permission_context.cc b/chrome/browser/geolocation/chrome_geolocation_permission_context.cc index 4d90689..91d6a35 100644 --- a/chrome/browser/geolocation/chrome_geolocation_permission_context.cc +++ b/chrome/browser/geolocation/chrome_geolocation_permission_context.cc @@ -214,10 +214,10 @@ bool GeolocationConfirmInfoBarDelegate::LinkClicked( "https://www.google.com/support/chrome/bin/answer.py?answer=142065"; #endif - // Ignore the click disposition and always open in a new top level tab. tab_contents_->OpenURL( google_util::AppendGoogleLocaleParam(GURL(kGeolocationLearnMoreUrl)), - GURL(), NEW_FOREGROUND_TAB, PageTransition::LINK); + GURL(), (disposition == CURRENT_TAB) ? NEW_FOREGROUND_TAB : disposition, + PageTransition::LINK); return false; // Do not dismiss the info bar. } diff --git a/chrome/browser/plugin_installer_infobar_delegate.cc b/chrome/browser/plugin_installer_infobar_delegate.cc index c860137..dcdc4ae 100644 --- a/chrome/browser/plugin_installer_infobar_delegate.cc +++ b/chrome/browser/plugin_installer_infobar_delegate.cc @@ -4,6 +4,7 @@ #include "chrome/browser/plugin_installer_infobar_delegate.h" +#include "chrome/browser/google/google_util.h" #include "content/browser/renderer_host/render_view_host.h" #include "content/browser/tab_contents/tab_contents.h" #include "content/common/view_messages.h" @@ -58,10 +59,10 @@ string16 PluginInstallerInfoBarDelegate::GetLinkText() const { bool PluginInstallerInfoBarDelegate::LinkClicked( WindowOpenDisposition disposition) { - // Ignore the click dispostion and always open in a new top level tab. - static const char kLearnMorePluginInstallerUrl[] = "http://www.google.com/" - "support/chrome/bin/answer.py?answer=95697&topic=14687"; - tab_contents_->OpenURL(GURL(kLearnMorePluginInstallerUrl), GURL(), - NEW_FOREGROUND_TAB, PageTransition::LINK); + tab_contents_->OpenURL(google_util::AppendGoogleLocaleParam(GURL( + "http://www.google.com/support/chrome/bin/answer.py?answer=95697&topic=" + "14687")), GURL(), + (disposition == CURRENT_TAB) ? NEW_FOREGROUND_TAB : disposition, + PageTransition::LINK); return false; } diff --git a/chrome/browser/plugin_observer.cc b/chrome/browser/plugin_observer.cc index f3b8a69..ce0c849 100644 --- a/chrome/browser/plugin_observer.cc +++ b/chrome/browser/plugin_observer.cc @@ -71,10 +71,10 @@ bool PluginInfoBarDelegate::Cancel() { } bool PluginInfoBarDelegate::LinkClicked(WindowOpenDisposition disposition) { - if (disposition == CURRENT_TAB) - disposition = NEW_FOREGROUND_TAB; - GURL url = google_util::AppendGoogleLocaleParam(GURL(GetLearnMoreURL())); - tab_contents_->OpenURL(url, GURL(), disposition, PageTransition::LINK); + tab_contents_->OpenURL( + google_util::AppendGoogleLocaleParam(GURL(GetLearnMoreURL())), GURL(), + (disposition == CURRENT_TAB) ? NEW_FOREGROUND_TAB : disposition, + PageTransition::LINK); return false; } diff --git a/chrome/browser/tab_contents/insecure_content_infobar_delegate.cc b/chrome/browser/tab_contents/insecure_content_infobar_delegate.cc index 33682ea..590bc14 100644 --- a/chrome/browser/tab_contents/insecure_content_infobar_delegate.cc +++ b/chrome/browser/tab_contents/insecure_content_infobar_delegate.cc @@ -5,6 +5,7 @@ #include "chrome/browser/tab_contents/insecure_content_infobar_delegate.h" #include "base/metrics/histogram.h" +#include "chrome/browser/google/google_util.h" #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" #include "chrome/common/render_messages.h" #include "content/common/page_transition_types.h" @@ -77,8 +78,9 @@ string16 InsecureContentInfoBarDelegate::GetLinkText() const { bool InsecureContentInfoBarDelegate::LinkClicked( WindowOpenDisposition disposition) { - tab_contents_->tab_contents()->OpenURL(GURL( - "https://www.google.com/support/chrome/bin/answer.py?answer=1342714"), + tab_contents_->tab_contents()->OpenURL( + google_util::AppendGoogleLocaleParam(GURL( + "https://www.google.com/support/chrome/bin/answer.py?answer=1342714")), GURL(), (disposition == CURRENT_TAB) ? NEW_FOREGROUND_TAB : disposition, PageTransition::LINK); return false; diff --git a/chrome/common/logging_chrome.cc b/chrome/common/logging_chrome.cc index a5f168a..797ffa7 100644 --- a/chrome/common/logging_chrome.cc +++ b/chrome/common/logging_chrome.cc @@ -401,9 +401,9 @@ FilePath GetLogFileName() { scoped_ptr<base::Environment> env(base::Environment::Create()); if (env->GetVar(env_vars::kLogFileName, &filename) && !filename.empty()) { #if defined(OS_WIN) - return FilePath(UTF8ToWide(filename).c_str()); + return FilePath(UTF8ToWide(filename)); #elif defined(OS_POSIX) - return FilePath(filename.c_str()); + return FilePath(filename); #endif } |