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

Unified Diff: chrome/browser/gtk/options/advanced_contents_gtk.cc

Issue 3798001: Merge 62408 - Fixes bugs in usage of adding a new tab with a disposition of... (Closed) Base URL: svn://svn.chromium.org/chrome/branches/552/src/
Patch Set: Created 10 years, 2 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 side-by-side diff with in-line comments
Download patch
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
« no previous file with comments | « chrome/browser/cocoa/preferences_window_controller.mm ('k') | chrome/browser/gtk/options/content_filter_page_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698