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

Side by Side Diff: chrome/browser/ui/webui/options/advanced_options_utils_x11.cc

Issue 8253002: Move PageTransition into content namespace. While I'm touching all these files, I've also updated... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 #if !defined(OS_CHROMEOS) 5 #if !defined(OS_CHROMEOS)
6 6
7 #include "chrome/browser/ui/webui/options/advanced_options_utils.h" 7 #include "chrome/browser/ui/webui/options/advanced_options_utils.h"
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/environment.h" 10 #include "base/environment.h"
(...skipping 24 matching lines...) Expand all
35 namespace { 35 namespace {
36 36
37 // Show the proxy config URL in the given tab. 37 // Show the proxy config URL in the given tab.
38 void ShowLinuxProxyConfigUrl(TabContents* tab_contents) { 38 void ShowLinuxProxyConfigUrl(TabContents* tab_contents) {
39 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 39 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
40 scoped_ptr<base::Environment> env(base::Environment::Create()); 40 scoped_ptr<base::Environment> env(base::Environment::Create());
41 const char* name = base::nix::GetDesktopEnvironmentName(env.get()); 41 const char* name = base::nix::GetDesktopEnvironmentName(env.get());
42 if (name) 42 if (name)
43 LOG(ERROR) << "Could not find " << name << " network settings in $PATH"; 43 LOG(ERROR) << "Could not find " << name << " network settings in $PATH";
44 tab_contents->OpenURL(GURL(kLinuxProxyConfigUrl), GURL(), 44 tab_contents->OpenURL(GURL(kLinuxProxyConfigUrl), GURL(),
45 NEW_FOREGROUND_TAB, PageTransition::LINK); 45 NEW_FOREGROUND_TAB, content::PAGE_TRANSITION_LINK);
46 } 46 }
47 47
48 // Start the given proxy configuration utility. 48 // Start the given proxy configuration utility.
49 bool StartProxyConfigUtil(TabContents* tab_contents, const char* command[]) { 49 bool StartProxyConfigUtil(TabContents* tab_contents, const char* command[]) {
50 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE)); 50 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
51 // base::LaunchProcess() returns true ("success") if the fork() 51 // base::LaunchProcess() returns true ("success") if the fork()
52 // succeeds, but not necessarily the exec(). We'd like to be able to 52 // succeeds, but not necessarily the exec(). We'd like to be able to
53 // use StartProxyConfigUtil() to search possible options and stop on 53 // use StartProxyConfigUtil() to search possible options and stop on
54 // success, so we search $PATH first to predict whether the exec is 54 // success, so we search $PATH first to predict whether the exec is
55 // expected to succeed. 55 // expected to succeed.
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 130
131 } // anonymous namespace 131 } // anonymous namespace
132 132
133 void AdvancedOptionsUtilities::ShowNetworkProxySettings( 133 void AdvancedOptionsUtilities::ShowNetworkProxySettings(
134 TabContents* tab_contents) { 134 TabContents* tab_contents) {
135 BrowserThread::PostTask(BrowserThread::FILE, FROM_HERE, 135 BrowserThread::PostTask(BrowserThread::FILE, FROM_HERE,
136 base::Bind(&DetectAndStartProxyConfigUtil, tab_contents)); 136 base::Bind(&DetectAndStartProxyConfigUtil, tab_contents));
137 } 137 }
138 138
139 #endif // !defined(OS_CHROMEOS) 139 #endif // !defined(OS_CHROMEOS)
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/options/advanced_options_handler.cc ('k') | chrome/browser/ui/webui/print_preview_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698