| Index: chrome/browser/gtk/options/advanced_contents_gtk.cc
|
| diff --git a/chrome/browser/gtk/options/advanced_contents_gtk.cc b/chrome/browser/gtk/options/advanced_contents_gtk.cc
|
| index edf89b8d3dd9e60c98bc38549674a605e43e0919..343f9bdd1c6f2ca9ead3ad9a46813a97476fe87e 100644
|
| --- a/chrome/browser/gtk/options/advanced_contents_gtk.cc
|
| +++ b/chrome/browser/gtk/options/advanced_contents_gtk.cc
|
| @@ -39,6 +39,7 @@
|
| #include "chrome/browser/profile.h"
|
| #include "chrome/browser/renderer_host/resource_dispatcher_host.h"
|
| #include "chrome/browser/safe_browsing/safe_browsing_service.h"
|
| +#include "chrome/browser/show_options_url.h"
|
| #include "chrome/common/chrome_paths.h"
|
| #include "chrome/common/chrome_switches.h"
|
| #include "chrome/common/pref_names.h"
|
| @@ -367,7 +368,8 @@ class NetworkSection : public OptionsPageBase {
|
| static bool SearchPATH(ProxyConfigCommand* commands, size_t ncommands,
|
| size_t* index);
|
| // Start the given proxy configuration utility.
|
| - static void StartProxyConfigUtil(const ProxyConfigCommand& command);
|
| + static void StartProxyConfigUtil(Profile* profile,
|
| + const ProxyConfigCommand& command);
|
|
|
| // Tracks the state of proxy preferences.
|
| scoped_ptr<PrefSetObserver> proxy_prefs_;
|
| @@ -455,14 +457,12 @@ void NetworkSection::OnChangeProxiesButtonClicked(GtkButton *button,
|
| }
|
|
|
| if (found_command) {
|
| - StartProxyConfigUtil(command);
|
| + StartProxyConfigUtil(section->profile(), command);
|
| } else {
|
| const char* name = base::GetDesktopEnvironmentName(env.get());
|
| if (name)
|
| LOG(ERROR) << "Could not find " << name << " network settings in $PATH";
|
| - BrowserList::GetLastActive()->
|
| - OpenURL(GURL(kLinuxProxyConfigUrl),
|
| - GURL(), NEW_FOREGROUND_TAB, PageTransition::LINK);
|
| + browser::ShowOptionsURL(section->profile(), GURL(kLinuxProxyConfigUrl));
|
| }
|
| }
|
|
|
| @@ -491,7 +491,8 @@ bool NetworkSection::SearchPATH(ProxyConfigCommand* commands, size_t ncommands,
|
| }
|
|
|
| // static
|
| -void NetworkSection::StartProxyConfigUtil(const ProxyConfigCommand& command) {
|
| +void NetworkSection::StartProxyConfigUtil(Profile* profile,
|
| + const ProxyConfigCommand& command) {
|
| std::vector<std::string> argv;
|
| argv.push_back(command.binary);
|
| for (size_t i = 1; command.argv[i]; i++)
|
| @@ -500,9 +501,7 @@ void NetworkSection::StartProxyConfigUtil(const ProxyConfigCommand& command) {
|
| base::ProcessHandle handle;
|
| if (!base::LaunchApp(argv, no_files, false, &handle)) {
|
| LOG(ERROR) << "StartProxyConfigUtil failed to start " << command.binary;
|
| - BrowserList::GetLastActive()->
|
| - OpenURL(GURL(kLinuxProxyConfigUrl), GURL(), NEW_FOREGROUND_TAB,
|
| - PageTransition::LINK);
|
| + browser::ShowOptionsURL(profile, GURL(kLinuxProxyConfigUrl));
|
| return;
|
| }
|
| ProcessWatcher::EnsureProcessGetsReaped(handle);
|
| @@ -683,9 +682,9 @@ void ChromeAppsSection::OnBackgroundModeClicked(GtkWidget* widget) {
|
| }
|
|
|
| void ChromeAppsSection::OnLearnMoreLinkClicked(GtkWidget* widget) {
|
| - BrowserList::GetLastActive()->OpenURL(
|
| - GURL(l10n_util::GetStringUTF8(IDS_LEARN_MORE_BACKGROUND_MODE_URL)),
|
| - GURL(), NEW_WINDOW, PageTransition::LINK);
|
| + browser::ShowOptionsURL(
|
| + profile(),
|
| + GURL(l10n_util::GetStringUTF8(IDS_LEARN_MORE_BACKGROUND_MODE_URL)));
|
| }
|
|
|
|
|
| @@ -884,9 +883,9 @@ void PrivacySection::OnClearBrowsingDataButtonClicked(GtkButton* widget,
|
| // static
|
| void PrivacySection::OnLearnMoreLinkClicked(GtkButton *button,
|
| PrivacySection* privacy_section) {
|
| - BrowserList::GetLastActive()->
|
| - OpenURL(GURL(l10n_util::GetStringUTF8(IDS_LEARN_MORE_PRIVACY_URL)),
|
| - GURL(), NEW_WINDOW, PageTransition::LINK);
|
| + browser::ShowOptionsURL(
|
| + privacy_section->profile(),
|
| + GURL(l10n_util::GetStringUTF8(IDS_LEARN_MORE_PRIVACY_URL)));
|
| }
|
|
|
| // static
|
| @@ -1184,9 +1183,8 @@ void SecuritySection::NotifyPrefChanged(const std::string* pref_name) {
|
| // static
|
| void SecuritySection::OnManageCertificatesClicked(GtkButton* button,
|
| SecuritySection* section) {
|
| - BrowserList::GetLastActive()->
|
| - OpenURL(GURL(kLinuxCertificatesConfigUrl), GURL(), NEW_WINDOW,
|
| - PageTransition::LINK);
|
| + browser::ShowOptionsURL(section->profile(),
|
| + GURL(kLinuxCertificatesConfigUrl));
|
| }
|
|
|
| // static
|
|
|