| OLD | NEW |
| 1 // Copyright (c) 2012 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/printing/printer_manager_dialog.h" | 5 #include "chrome/browser/printing/printer_manager_dialog.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/environment.h" | 8 #include "base/environment.h" |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "base/message_loop/message_loop.h" | 10 #include "base/message_loop/message_loop.h" |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 47 return; | 47 return; |
| 48 } | 48 } |
| 49 | 49 |
| 50 std::vector<std::string> argv; | 50 std::vector<std::string> argv; |
| 51 argv.push_back(command); | 51 argv.push_back(command); |
| 52 base::Process process = base::LaunchProcess(argv, base::LaunchOptions()); | 52 base::Process process = base::LaunchProcess(argv, base::LaunchOptions()); |
| 53 if (!process.IsValid()) { | 53 if (!process.IsValid()) { |
| 54 LOG(ERROR) << "Failed to open printer manager dialog "; | 54 LOG(ERROR) << "Failed to open printer manager dialog "; |
| 55 return; | 55 return; |
| 56 } | 56 } |
| 57 base::EnsureProcessGetsReaped(process.pid()); | 57 base::EnsureProcessGetsReaped(process.Pid()); |
| 58 } | 58 } |
| 59 | 59 |
| 60 } // anonymous namespace | 60 } // anonymous namespace |
| 61 | 61 |
| 62 namespace printing { | 62 namespace printing { |
| 63 | 63 |
| 64 void PrinterManagerDialog::ShowPrinterManagerDialog() { | 64 void PrinterManagerDialog::ShowPrinterManagerDialog() { |
| 65 BrowserThread::PostTask(BrowserThread::FILE, FROM_HERE, | 65 BrowserThread::PostTask(BrowserThread::FILE, FROM_HERE, |
| 66 base::Bind(&DetectAndOpenPrinterConfigDialog)); | 66 base::Bind(&DetectAndOpenPrinterConfigDialog)); |
| 67 } | 67 } |
| 68 | 68 |
| 69 } // namespace printing | 69 } // namespace printing |
| OLD | NEW |