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

Side by Side Diff: chrome/browser/platform_util_linux.cc

Issue 9429039: Cleanup: Remove base::environment_vector and base::file_handle_mapping_vector to StudlyCaps. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 10 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) 2012 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/platform_util.h" 5 #include "chrome/browser/platform_util.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/file_util.h" 8 #include "base/file_util.h"
9 #include "base/process_util.h" 9 #include "base/process_util.h"
10 #include "base/utf_string_conversions.h" 10 #include "base/utf_string_conversions.h"
11 #include "content/public/browser/browser_thread.h" 11 #include "content/public/browser/browser_thread.h"
12 #include "googleurl/src/gurl.h" 12 #include "googleurl/src/gurl.h"
13 13
14 using content::BrowserThread; 14 using content::BrowserThread;
15 15
16 namespace { 16 namespace {
17 17
18 void XDGUtil(const std::string& util, const std::string& arg) { 18 void XDGUtil(const std::string& util, const std::string& arg) {
19 std::vector<std::string> argv; 19 std::vector<std::string> argv;
20 argv.push_back(util); 20 argv.push_back(util);
21 argv.push_back(arg); 21 argv.push_back(arg);
22 22
23 base::environment_vector env; 23 base::EnvironmentVector env;
24 // xdg-open can fall back on mailcap which eventually might plumb through 24 // xdg-open can fall back on mailcap which eventually might plumb through
25 // to a command that needs a terminal. Set the environment variable telling 25 // to a command that needs a terminal. Set the environment variable telling
26 // it that we definitely don't have a terminal available and that it should 26 // it that we definitely don't have a terminal available and that it should
27 // bring up a new terminal if necessary. See "man mailcap". 27 // bring up a new terminal if necessary. See "man mailcap".
28 env.push_back(std::make_pair("MM_NOTTTY", "1")); 28 env.push_back(std::make_pair("MM_NOTTTY", "1"));
29 29
30 // In Google Chrome, we do not let GNOME's bug-buddy intercept our crashes. 30 // In Google Chrome, we do not let GNOME's bug-buddy intercept our crashes.
31 // However, we do not want this environment variable to propagate to external 31 // However, we do not want this environment variable to propagate to external
32 // applications. See http://crbug.com/24120 32 // applications. See http://crbug.com/24120
33 char* disable_gnome_bug_buddy = getenv("GNOME_DISABLE_CRASH_DIALOG"); 33 char* disable_gnome_bug_buddy = getenv("GNOME_DISABLE_CRASH_DIALOG");
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 } 79 }
80 80
81 void OpenExternal(const GURL& url) { 81 void OpenExternal(const GURL& url) {
82 if (url.SchemeIs("mailto")) 82 if (url.SchemeIs("mailto"))
83 XDGEmail(url.spec()); 83 XDGEmail(url.spec());
84 else 84 else
85 XDGOpen(url.spec()); 85 XDGOpen(url.spec());
86 } 86 }
87 87
88 } // namespace platform_util 88 } // namespace platform_util
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698