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

Side by Side Diff: chrome/service/service_utility_process_host.cc

Issue 1638773002: Do not check result of SetAlternateDesktop (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698