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

Side by Side Diff: chrome/browser/printing/printer_manager_dialog_linux.cc

Issue 7377012: Change base::LaunchProcess API slightly (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 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 | 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 #include "chrome/browser/printing/printer_manager_dialog.h" 5 #include "chrome/browser/printing/printer_manager_dialog.h"
6 6
7 #include "base/environment.h" 7 #include "base/environment.h"
8 #include "base/nix/xdg_util.h" 8 #include "base/nix/xdg_util.h"
9 #include "base/process_util.h" 9 #include "base/process_util.h"
10 #include "content/browser/browser_thread.h" 10 #include "content/browser/browser_thread.h"
(...skipping 29 matching lines...) Expand all
40 break; 40 break;
41 } 41 }
42 42
43 if (!command) { 43 if (!command) {
44 LOG(ERROR) << "Failed to detect the command to open printer config dialog"; 44 LOG(ERROR) << "Failed to detect the command to open printer config dialog";
45 return; 45 return;
46 } 46 }
47 47
48 std::vector<std::string> argv; 48 std::vector<std::string> argv;
49 argv.push_back(command); 49 argv.push_back(command);
50 base::LaunchOptions options;
51 base::ProcessHandle handle; 50 base::ProcessHandle handle;
52 options.process_handle = &handle; 51 if (!base::LaunchProcess(argv, base::LaunchOptions(), &handle)) {
53 if (!base::LaunchProcess(argv, options)) {
54 LOG(ERROR) << "Failed to open printer manager dialog "; 52 LOG(ERROR) << "Failed to open printer manager dialog ";
55 return; 53 return;
56 } 54 }
57 ProcessWatcher::EnsureProcessGetsReaped(handle); 55 ProcessWatcher::EnsureProcessGetsReaped(handle);
58 } 56 }
59 57
60 } // anonymous namespace 58 } // anonymous namespace
61 59
62 namespace printing { 60 namespace printing {
63 61
64 void PrinterManagerDialog::ShowPrinterManagerDialog() { 62 void PrinterManagerDialog::ShowPrinterManagerDialog() {
65 BrowserThread::PostTask(BrowserThread::FILE, FROM_HERE, 63 BrowserThread::PostTask(BrowserThread::FILE, FROM_HERE,
66 NewRunnableFunction(&DetectAndOpenPrinterConfigDialog)); 64 NewRunnableFunction(&DetectAndOpenPrinterConfigDialog));
67 } 65 }
68 66
69 } // namespace printing 67 } // namespace printing
OLDNEW
« no previous file with comments | « chrome/browser/platform_util_linux.cc ('k') | chrome/browser/process_info_snapshot_mac_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698