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

Side by Side Diff: base/linux_util.h

Issue 174106: Linux: make the "change proxy settings" button able to start several proxy config utilities. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 4 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
« no previous file with comments | « no previous file | base/linux_util.cc » ('j') | chrome/browser/gtk/options/advanced_contents_gtk.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 #ifndef BASE_LINUX_UTIL_H__ 5 #ifndef BASE_LINUX_UTIL_H__
6 #define BASE_LINUX_UTIL_H__ 6 #define BASE_LINUX_UTIL_H__
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <string> 10 #include <string>
(...skipping 17 matching lines...) Expand all
28 // result. Returns false if the key is unset. 28 // result. Returns false if the key is unset.
29 virtual bool Getenv(const char* variable_name, std::string* result) = 0; 29 virtual bool Getenv(const char* variable_name, std::string* result) = 0;
30 30
31 // Create an instance of EnvironmentVariableGetter 31 // Create an instance of EnvironmentVariableGetter
32 static EnvironmentVariableGetter* Create(); 32 static EnvironmentVariableGetter* Create();
33 }; 33 };
34 34
35 enum DesktopEnvironment { 35 enum DesktopEnvironment {
36 DESKTOP_ENVIRONMENT_OTHER, 36 DESKTOP_ENVIRONMENT_OTHER,
37 DESKTOP_ENVIRONMENT_GNOME, 37 DESKTOP_ENVIRONMENT_GNOME,
38 DESKTOP_ENVIRONMENT_KDE, 38 // KDE3 and KDE4 are sufficiently different that we count
39 // them as two different desktop environments here.
40 DESKTOP_ENVIRONMENT_KDE3,
41 DESKTOP_ENVIRONMENT_KDE4,
39 }; 42 };
40 43
41 // Return an entry from the DesktopEnvironment enum with a best guess 44 // Return an entry from the DesktopEnvironment enum with a best guess
42 // of which desktop environment we're using. We use this to know when 45 // of which desktop environment we're using. We use this to know when
43 // to attempt to use preferences from the desktop environment -- 46 // to attempt to use preferences from the desktop environment --
44 // proxy settings, password manager, etc. 47 // proxy settings, password manager, etc.
45 DesktopEnvironment GetDesktopEnvironment(EnvironmentVariableGetter* env); 48 DesktopEnvironment GetDesktopEnvironment(EnvironmentVariableGetter* env);
46 49
50 // Return a string representation of the given desktop environment.
51 // May return NULL in the case of DESKTOP_ENVIRONMENT_OTHER.
52 const char* GetDesktopEnvironmentName(DesktopEnvironment env);
53 // Convenience wrapper that calls GetDesktopEnvironment() first.
54 const char* GetDesktopEnvironmentName(EnvironmentVariableGetter* env);
55
47 } // namespace base 56 } // namespace base
48 57
49 #endif // BASE_LINUX_UTIL_H__ 58 #endif // BASE_LINUX_UTIL_H__
OLDNEW
« no previous file with comments | « no previous file | base/linux_util.cc » ('j') | chrome/browser/gtk/options/advanced_contents_gtk.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698