| Index: chrome/browser/gtk/options/advanced_contents_gtk.cc
|
| ===================================================================
|
| --- chrome/browser/gtk/options/advanced_contents_gtk.cc (revision 62416)
|
| +++ chrome/browser/gtk/options/advanced_contents_gtk.cc (working copy)
|
| @@ -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 @@
|
| 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 @@
|
| }
|
|
|
| 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 @@
|
| }
|
|
|
| // 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 @@
|
| 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::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 @@
|
| // 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 @@
|
| // 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
|
|
|