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

Side by Side Diff: base/linux_util.cc

Issue 149785: Add proxy config (using gnome-network-preferences) (Closed)
Patch Set: use new forground tab Created 11 years, 5 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
« no previous file with comments | « base/linux_util.h ('k') | chrome/app/resources/locale_settings.grd » ('j') | no next file with comments »
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 #include "base/linux_util.h" 5 #include "base/linux_util.h"
6 6
7 #include <stdlib.h> 7 #include <stdlib.h>
8 8
9 #include <vector> 9 #include <vector>
10 10
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 linux_distro = output.substr(field.length()); 52 linux_distro = output.substr(field.length());
53 } 53 }
54 // We do this check only once per process. If it fails, there's 54 // We do this check only once per process. If it fails, there's
55 // little reason to believe it will work if we attempt to run 55 // little reason to believe it will work if we attempt to run
56 // lsb_release again. 56 // lsb_release again.
57 checked_distro = true; 57 checked_distro = true;
58 } 58 }
59 return linux_distro; 59 return linux_distro;
60 } 60 }
61 61
62 bool UseGnomeForSettings() {
63 // GNOME_DESKTOP_SESSION_ID being defined is a good indication that
64 // we are probably running under GNOME.
65 // Note: KDE_FULL_SESSION is a corresponding env var to recognize KDE.
66 char* desktop_session;
67 return (getenv("GNOME_DESKTOP_SESSION_ID") ||
68 ((desktop_session = getenv("DESKTOP_SESSION")) &&
69 std::string(desktop_session) == "gnome"));
70 }
71
62 } // namespace base 72 } // namespace base
OLDNEW
« no previous file with comments | « base/linux_util.h ('k') | chrome/app/resources/locale_settings.grd » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698