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/service/service_utility_process_host.h" | 5 #include "chrome/service/service_utility_process_host.h" |
6 | 6 |
7 #include <stdint.h> | 7 #include <stdint.h> |
8 | 8 |
9 #include <queue> | 9 #include <queue> |
10 | 10 |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 SERVICE_UTILITY_EVENT_MAX); | 60 SERVICE_UTILITY_EVENT_MAX); |
61 } | 61 } |
62 | 62 |
63 // NOTE: changes to this class need to be reviewed by the security team. | 63 // NOTE: changes to this class need to be reviewed by the security team. |
64 class ServiceSandboxedProcessLauncherDelegate | 64 class ServiceSandboxedProcessLauncherDelegate |
65 : public content::SandboxedProcessLauncherDelegate { | 65 : public content::SandboxedProcessLauncherDelegate { |
66 public: | 66 public: |
67 ServiceSandboxedProcessLauncherDelegate() {} | 67 ServiceSandboxedProcessLauncherDelegate() {} |
68 | 68 |
69 bool PreSpawnTarget(sandbox::TargetPolicy* policy) override { | 69 bool PreSpawnTarget(sandbox::TargetPolicy* policy) override { |
70 // Service process may run as windows service and it fails to create a | 70 // Ignore result of SetAlternateDesktop. Service process may run as windows |
71 // window station. | 71 // service and it fails to create a window station. |
72 return policy->SetAlternateDesktop(false) == sandbox::SBOX_ALL_OK; | 72 base::IgnoreResult(policy->SetAlternateDesktop(false)); |
| 73 return true; |
73 } | 74 } |
74 | 75 |
75 private: | 76 private: |
76 DISALLOW_COPY_AND_ASSIGN(ServiceSandboxedProcessLauncherDelegate); | 77 DISALLOW_COPY_AND_ASSIGN(ServiceSandboxedProcessLauncherDelegate); |
77 }; | 78 }; |
78 | 79 |
79 } // namespace | 80 } // namespace |
80 | 81 |
81 class ServiceUtilityProcessHost::PdfToEmfState { | 82 class ServiceUtilityProcessHost::PdfToEmfState { |
82 public: | 83 public: |
(...skipping 335 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
418 return false; | 419 return false; |
419 } | 420 } |
420 printing::Emf emf; | 421 printing::Emf emf; |
421 if (!emf.InitFromData(data.data(), data.size())) { | 422 if (!emf.InitFromData(data.data(), data.size())) { |
422 OnRenderPDFPagesToMetafileDone(false); | 423 OnRenderPDFPagesToMetafileDone(false); |
423 return false; | 424 return false; |
424 } | 425 } |
425 OnRenderPDFPagesToMetafilePageDone(scale_factor, emf); | 426 OnRenderPDFPagesToMetafilePageDone(scale_factor, emf); |
426 return true; | 427 return true; |
427 } | 428 } |
OLD | NEW |