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

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

Issue 7346017: Clean up users of a deprecated base::LaunchApp API. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: cros 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::file_handle_mapping_vector no_files; 50 base::LaunchOptions options;
51 base::ProcessHandle handle; 51 base::ProcessHandle handle;
52 if (!base::LaunchApp(argv, no_files, false, &handle)) { 52 options.process_handle = &handle;
53 if (!base::LaunchProcess(argv, options)) {
53 LOG(ERROR) << "Failed to open printer manager dialog "; 54 LOG(ERROR) << "Failed to open printer manager dialog ";
54 return; 55 return;
55 } 56 }
56 ProcessWatcher::EnsureProcessGetsReaped(handle); 57 ProcessWatcher::EnsureProcessGetsReaped(handle);
57 } 58 }
58 59
59 } // anonymous namespace 60 } // anonymous namespace
60 61
61 namespace printing { 62 namespace printing {
62 63
63 void PrinterManagerDialog::ShowPrinterManagerDialog() { 64 void PrinterManagerDialog::ShowPrinterManagerDialog() {
64 BrowserThread::PostTask(BrowserThread::FILE, FROM_HERE, 65 BrowserThread::PostTask(BrowserThread::FILE, FROM_HERE,
65 NewRunnableFunction(&DetectAndOpenPrinterConfigDialog)); 66 NewRunnableFunction(&DetectAndOpenPrinterConfigDialog));
66 } 67 }
67 68
68 } // namespace printing 69 } // namespace printing
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698