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

Side by Side Diff: chrome/browser/ui/webui/settings_utils_linux.cc

Issue 2248873002: Convert WindowOpenDisposition to an enum class. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 4 years, 3 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/ui/webui/settings_utils.h" 5 #include "chrome/browser/ui/webui/settings_utils.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/environment.h" 10 #include "base/environment.h"
(...skipping 30 matching lines...) Expand all
41 // supported desktop environment. 41 // supported desktop environment.
42 const char kLinuxProxyConfigUrl[] = "about:linux-proxy-config"; 42 const char kLinuxProxyConfigUrl[] = "about:linux-proxy-config";
43 43
44 // Show the proxy config URL in the given tab. 44 // Show the proxy config URL in the given tab.
45 void ShowLinuxProxyConfigUrl(int render_process_id, int render_view_id) { 45 void ShowLinuxProxyConfigUrl(int render_process_id, int render_view_id) {
46 DCHECK_CURRENTLY_ON(BrowserThread::UI); 46 DCHECK_CURRENTLY_ON(BrowserThread::UI);
47 std::unique_ptr<base::Environment> env(base::Environment::Create()); 47 std::unique_ptr<base::Environment> env(base::Environment::Create());
48 const char* name = base::nix::GetDesktopEnvironmentName(env.get()); 48 const char* name = base::nix::GetDesktopEnvironmentName(env.get());
49 if (name) 49 if (name)
50 LOG(ERROR) << "Could not find " << name << " network settings in $PATH"; 50 LOG(ERROR) << "Could not find " << name << " network settings in $PATH";
51 OpenURLParams params( 51 OpenURLParams params(GURL(kLinuxProxyConfigUrl), Referrer(),
52 GURL(kLinuxProxyConfigUrl), Referrer(), NEW_FOREGROUND_TAB, 52 WindowOpenDisposition::NEW_FOREGROUND_TAB,
53 ui::PAGE_TRANSITION_LINK, false); 53 ui::PAGE_TRANSITION_LINK, false);
54 54
55 content::WebContents* web_contents = 55 content::WebContents* web_contents =
56 tab_util::GetWebContentsByID(render_process_id, render_view_id); 56 tab_util::GetWebContentsByID(render_process_id, render_view_id);
57 if (web_contents) 57 if (web_contents)
58 web_contents->OpenURL(params); 58 web_contents->OpenURL(params);
59 } 59 }
60 60
61 // Start the given proxy configuration utility. 61 // Start the given proxy configuration utility.
62 bool StartProxyConfigUtil(const char* const command[]) { 62 bool StartProxyConfigUtil(const char* const command[]) {
63 DCHECK_CURRENTLY_ON(BrowserThread::FILE); 63 DCHECK_CURRENTLY_ON(BrowserThread::FILE);
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 namespace settings_utils { 134 namespace settings_utils {
135 135
136 void ShowNetworkProxySettings(content::WebContents* web_contents) { 136 void ShowNetworkProxySettings(content::WebContents* web_contents) {
137 BrowserThread::PostTask(BrowserThread::FILE, FROM_HERE, 137 BrowserThread::PostTask(BrowserThread::FILE, FROM_HERE,
138 base::Bind(&DetectAndStartProxyConfigUtil, 138 base::Bind(&DetectAndStartProxyConfigUtil,
139 web_contents->GetRenderProcessHost()->GetID(), 139 web_contents->GetRenderProcessHost()->GetID(),
140 web_contents->GetRenderViewHost()->GetRoutingID())); 140 web_contents->GetRenderViewHost()->GetRoutingID()));
141 } 141 }
142 142
143 } // namespace settings_utils 143 } // namespace settings_utils
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698