| 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 <queue> | 7 #include <queue> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 53 id, | 53 id, |
| 54 SERVICE_UTILITY_EVENT_MAX); | 54 SERVICE_UTILITY_EVENT_MAX); |
| 55 } | 55 } |
| 56 | 56 |
| 57 // NOTE: changes to this class need to be reviewed by the security team. | 57 // NOTE: changes to this class need to be reviewed by the security team. |
| 58 class ServiceSandboxedProcessLauncherDelegate | 58 class ServiceSandboxedProcessLauncherDelegate |
| 59 : public content::SandboxedProcessLauncherDelegate { | 59 : public content::SandboxedProcessLauncherDelegate { |
| 60 public: | 60 public: |
| 61 ServiceSandboxedProcessLauncherDelegate() {} | 61 ServiceSandboxedProcessLauncherDelegate() {} |
| 62 | 62 |
| 63 virtual void PreSpawnTarget(sandbox::TargetPolicy* policy, | 63 void PreSpawnTarget(sandbox::TargetPolicy* policy, bool* success) override { |
| 64 bool* success) override { | |
| 65 // Service process may run as windows service and it fails to create a | 64 // Service process may run as windows service and it fails to create a |
| 66 // window station. | 65 // window station. |
| 67 policy->SetAlternateDesktop(false); | 66 policy->SetAlternateDesktop(false); |
| 68 } | 67 } |
| 69 | 68 |
| 70 private: | 69 private: |
| 71 DISALLOW_COPY_AND_ASSIGN(ServiceSandboxedProcessLauncherDelegate); | 70 DISALLOW_COPY_AND_ASSIGN(ServiceSandboxedProcessLauncherDelegate); |
| 72 }; | 71 }; |
| 73 | 72 |
| 74 } // namespace | 73 } // namespace |
| (...skipping 341 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 416 return false; | 415 return false; |
| 417 } | 416 } |
| 418 printing::Emf emf; | 417 printing::Emf emf; |
| 419 if (!emf.InitFromData(data.data(), data.size())) { | 418 if (!emf.InitFromData(data.data(), data.size())) { |
| 420 OnRenderPDFPagesToMetafileDone(false); | 419 OnRenderPDFPagesToMetafileDone(false); |
| 421 return false; | 420 return false; |
| 422 } | 421 } |
| 423 OnRenderPDFPagesToMetafilePageDone(scale_factor, emf); | 422 OnRenderPDFPagesToMetafilePageDone(scale_factor, emf); |
| 424 return true; | 423 return true; |
| 425 } | 424 } |
| OLD | NEW |