summaryrefslogtreecommitdiffstats
path: root/chrome/service/service_utility_process_host.cc
Commit message (Collapse)AuthorAgeFilesLines
* Convert Pass()→std::move() on Windowsdcheng2016-03-021-4/+5
| | | | | | | | | | | | | Also cleaned up a few stragglers from grepping the source: it's unclear if these are just building with weird defines, don't build at all, only build on obscure platforms, or something else… either way, Pass() itself will be removed shortly after this. BUG=557422 Review URL: https://codereview.chromium.org/1752233002 Cr-Commit-Position: refs/heads/master@{#378872}
* Windows: Expose handle inheritance to the sandboxed launcherrockot2016-02-261-1/+2
| | | | | | | | | | | | Handles to be inherited by a child process can now be set in a delegate passed to StartSandboxedProcess(), and/or through the TargetPolicy API. TEST=sbox_integration_tests, content_unittests BUG=588190 Review URL: https://codereview.chromium.org/1703953002 Cr-Commit-Position: refs/heads/master@{#378007}
* Use a valid /prefetch argument when launching a process.fdoray2016-02-031-0/+9
| | | | | | | | | | | | | | | | The /prefetch:# argument that is currently added to the command line of processes launched with content::StartSandboxedProcess is ignored by Windows because # doesn't respect the [1, 8] constraint. This CL ensures that a valid /prefetch:# argument is used for every process launch (except when the feature is disabled by the PreRead field trial). BUG=577698 Review URL: https://codereview.chromium.org/1612663002 Cr-Commit-Position: refs/heads/master@{#373241}
* Do not check result of SetAlternateDesktopvitalybuka2016-01-261-3/+4
| | | | | | | | | | | | Fixed regression introduced by https://codereview.chromium.org/1415483008 Seems comment nearby was not noticed. BUG=581134 Review URL: https://codereview.chromium.org/1638773002 Cr-Commit-Position: refs/heads/master@{#371533}
* Switch to standard integer types in chrome/.avi2015-12-261-1/+5
| | | | | | | | | | BUG=138542 TBR=thakis@chromium.org NOPRESUBMIT=true Review URL: https://codereview.chromium.org/1548153002 Cr-Commit-Position: refs/heads/master@{#366893}
* Get rid of SandboxedProcessLauncherDelegate::PreSandbox.rickyz2015-11-111-3/+4
| | | | | | | | | | | | | The exposed_dir argument is only used in utility processes, so that logic is moved to PreSpawnTarget in UtilityProcessHostImpl instead. The disable_default_policy argument is replaced with a DisableDefaultPolicy method instead. BUG=549319 Review URL: https://codereview.chromium.org/1415483008 Cr-Commit-Position: refs/heads/master@{#358978}
* Add content_switches include to files that need it.brettw2015-10-101-0/+1
| | | | | | | | | | | | | | | | | | This patch is from grepping for any identifier in content_switches.h and adds an include for it in those files. The reason for this is to be able to remove the include of content_switches.h from chrome_switches.h. That needs to be removed because the minimal chrome constants target that chrome_switches is part of technically doesn't depend on content. I want to be able to turn on GN header checking for the Chrome Windows installer targets so we can keep the dependencies under control (these targets try to be as small as possible). TBR=jam@chromium.org Review URL: https://codereview.chromium.org/1395263002 Cr-Commit-Position: refs/heads/master@{#353430}
* chrome: Remove use of MessageLoopProxy and deprecated MessageLoop APIsskyostil2015-06-101-20/+17
| | | | | | | | | | This patch was mostly autogenerated with https://codereview.chromium.org/1010073002/. BUG=465354 Review URL: https://codereview.chromium.org/1167163002 Cr-Commit-Position: refs/heads/master@{#333745}
* Update {virtual,override} to follow C++11 style in chrome.nick2015-04-241-2/+1
| | | | | | | | | | | | The Google style guide states that only one of {virtual,override,final} should be used for each declaration, since override implies virtual and final implies both virtual and override. This patch was manually generated using a regex and a text editor. BUG=417463 Review URL: https://codereview.chromium.org/1100223002 Cr-Commit-Position: refs/heads/master@{#326870}
* Remove uses of KillProcess()rvargas2015-03-181-3/+1
| | | | | | | | BUG=417532 Review URL: https://codereview.chromium.org/999033003 Cr-Commit-Position: refs/heads/master@{#321045}
* Update cloud_print and chrome/service to use the new version of LaunchProcess.rvargas2014-12-131-3/+1
| | | | | | | | BUG=417532 Review URL: https://codereview.chromium.org/785353003 Cr-Commit-Position: refs/heads/master@{#308206}
* Make content::StartSandboxedProcess return a Process instead of a handle.rvargas2014-11-241-2/+1
| | | | | | | | BUG=417532 Review URL: https://codereview.chromium.org/744523002 Cr-Commit-Position: refs/heads/master@{#305471}
* Don't pass ProcessHandle through ChildProcessHostDelegate.rvargas2014-11-181-8/+11
| | | | | | | | | | | | | | | | | | | | ChildProcessHostDelegate doesn't make clear what ownership rules apply to the process handle and as a result one of the implementations assume that the caller has to delete the handle (ServiceUtilityProcessHost) while the other one assumes that it does not (BrowserChildProcessHostImpl). On the other hand, one caller closes the handle (ChildProcessHostImpl) and the other does not (PpapiPluginProcessHost). This CL enforces the API of not transfering ownership when getting the process handle (as both implementations keep using the handle after they receive the call). BUG=417532 Review URL: https://codereview.chromium.org/725353003 Cr-Commit-Position: refs/heads/master@{#304664}
* Remove implicit conversions from scoped_refptr to T* in chrome/dcheng2014-11-121-5/+2
| | | | | | | | | | | This patch was generated by running the rewrite_scoped_refptr clang tool on a Windows build. BUG=110610 Review URL: https://codereview.chromium.org/721783003 Cr-Commit-Position: refs/heads/master@{#303925}
* Misc. cleanup, primarily removing unused locals.pkasting2014-10-131-1/+0
| | | | | | | | | | | Also various other fixes, e.g. condensing code, converting DCHECK_LT(0, a) -> DCHECK_GT(a, 0) (and the like) for readability, inserting a few typecasts. BUG=none TEST=none Review URL: https://codereview.chromium.org/637023002 Cr-Commit-Position: refs/heads/master@{#299362}
* Change PDF scaling factor from double to float.pkasting2014-10-091-2/+2
| | | | | | | | | | | | | | | | This ultimate consumers of this want a float anyway, so changing to be a float all the way through is less misleading. This also avoids some "value possibly truncated" warnings (currently disabled) on MSVC. This also removes a couple of scale-related functions in metafile_skia_wrapper.* that seem to be entirely unused. BUG=none TEST=none Review URL: https://codereview.chromium.org/641923002 Cr-Commit-Position: refs/heads/master@{#298980}
* Replacing the OVERRIDE with override and FINAL with final in chrome/servicemohan.reddy2014-10-071-1/+1
| | | | | | | | | | | This step is a giant search and replace for OVERRIDE and FINAL to replace them with their lowercase versions. BUG=417463 Review URL: https://codereview.chromium.org/628083002 Cr-Commit-Position: refs/heads/master@{#298562}
* Use file handles to interact with utility process.vitalybuka2014-09-171-153/+196
| | | | | | | | | | | Spool pages as they returned from conversion instead of waiting for entire document. Service process loads each PDFs once per print job, instead of once per page. BUG=408184 Review URL: https://codereview.chromium.org/566693002 Cr-Commit-Position: refs/heads/master@{#295360}
* Added helper function to log CloudPrint.ServiceUtilityProcessHostEvent ↵vitalybuka2014-09-161-36/+20
| | | | | | | | histogram. Review URL: https://codereview.chromium.org/576823002 Cr-Commit-Position: refs/heads/master@{#295118}
* Added value to ServiceUtilityProcessHostEventType to track when utility ↵vitalybuka2014-09-161-0/+4
| | | | | | | | | | | process failed to start. BUG=408184 TBR=asvitkine@chromium.org Review URL: https://codereview.chromium.org/556823004 Cr-Commit-Position: refs/heads/master@{#295030}
* Use SetAlternateDesktop(false) for service process.vitalybuka2014-09-051-0/+8
| | | | | | | | | | Service process may run as windows service and it fails to create a window station. BUG=410237 Review URL: https://codereview.chromium.org/534413002 Cr-Commit-Position: refs/heads/master@{#293391}
* Removed print_web_view_helper_win.ccvitalybuka2014-08-281-3/+3
| | | | | | | | | | | | Removed win_pdf_metafile_for_printing gyp option. Removed WIN_PDF_METAFILE_FOR_PRINTING define. BUG=170859 TBR=yzshen Review URL: https://codereview.chromium.org/516823002 Cr-Commit-Position: refs/heads/master@{#292501}
* Change base/file_utils.h includes to base/files/file_utils.h in chrome/thestig2014-08-261-1/+1
| | | | | | Review URL: https://codereview.chromium.org/486843004 Cr-Commit-Position: refs/heads/master@{#291880}
* Split printing utility IPC messages into its own file.thestig@chromium.org2014-06-181-1/+5
| | | | | | Review URL: https://codereview.chromium.org/323693002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@278042 0039d316-1c4b-4281-b951-d872f2087c98
* Printing on Windows via PDFscottmg@chromium.org2014-05-201-29/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | Currently: - Based on #if, switches renderer rendering to PDF for preview - Add PdfToEmfConvert based on PWGRasterConverter - Various plumbing. Preview works the same as other PDF based platforms. For getting to EMF, the when PRINTING_WIN_USES_PDF_AS_METAFILE is on, the renderer generates a PDF instead of EMF directly (this contains all the pages in the desired range). This is returned to PrintViewManagerBase, where it's passed to PdfToEmfConverter which uses the sandboxed utility process and pdf.dll to convert via RenderPDFPageToDC. The utility process renderers one emf page at at time (into numbered files) to avoid having a very large emf file. As this uses pdf.dll this is currently off-by-default controlled by the gyp variable win_pdf_metafile_for_printing. R=vitalybuka@chromium.org BUG=170859 Review URL: https://codereview.chromium.org/255543006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@271772 0039d316-1c4b-4281-b951-d872f2087c98
* Creates a way to launch the utility process with elevated privileges on ↵haven@chromium.org2014-02-111-0/+4
| | | | | | | | | | | | Windows systems for the rare operations that require administrator access. IPCs to the utility process will be filtered when it is running elevated. BUG=331881 Review URL: https://codereview.chromium.org/98603007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@250409 0039d316-1c4b-4281-b951-d872f2087c98
* Added ChromeUtilityMsg_GetPrinterSemanticCapsAndDefaults message and handler.vitalybuka@chromium.org2014-02-071-1/+59
| | | | | | | | | BUG=317027 NOTRY=true Review URL: https://codereview.chromium.org/155223002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@249554 0039d316-1c4b-4281-b951-d872f2087c98
* Remove ServiceUtilityProcessHost::Client::OnGetPrinterCapsAndDefaultsFailed.vitalybuka@chromium.org2014-02-061-3/+3
| | | | | | | | NOTRY=true Review URL: https://codereview.chromium.org/155133002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@249238 0039d316-1c4b-4281-b951-d872f2087c98
* Move temp file functions to base namespace.brettw@chromium.org2013-12-031-2/+2
| | | | | | | | BUG= Review URL: https://codereview.chromium.org/99923002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@238427 0039d316-1c4b-4281-b951-d872f2087c98
* UMA instrumentation for CloudPrint connector.vitalybuka@chromium.org2013-11-041-2/+58
| | | | | | | | | | BUG=314284 NOTRY=true R=noamsml@chromium.org Review URL: https://codereview.chromium.org/57373005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@232801 0039d316-1c4b-4281-b951-d872f2087c98
* Update include paths in chrome/service for base/process changes.rsesek@chromium.org2013-07-231-1/+2
| | | | | | | | | BUG=242290 R=scottbyer@chromium.org Review URL: https://codereview.chromium.org/19638016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@213112 0039d316-1c4b-4281-b951-d872f2087c98
* Use a direct include of the message_loop header in chrome/app, ↵avi@chromium.org2013-07-171-1/+1
| | | | | | | | | | | | chrome/common, chrome/nacl/, chrome/renderer/, chrome/service/. BUG=260807 TEST=none TBR=ben@chromium.org Review URL: https://chromiumcodereview.appspot.com/19579004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@212174 0039d316-1c4b-4281-b951-d872f2087c98
* Use a direct include of utf_string_conversions.h in chrome/renderer/, ↵avi@chromium.org2013-06-071-1/+1
| | | | | | | | | | | | chrome/service/, chrome/test/, chrome/third_party/, chrome/tools/. BUG=none TEST=none TBR=ben@chromium.org Review URL: https://chromiumcodereview.appspot.com/15709008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@204931 0039d316-1c4b-4281-b951-d872f2087c98
* chrome: Update the include paths of base/message_loop_proxy.h to its new ↵tfarina@chromium.org2013-05-101-1/+1
| | | | | | | | | | | | | | location. message_loop_proxy.h was moved into base/message_loop/ in r191422 - https://codereview.chromium.org/13333003 BUG=None TBR=darin@chromium.org,brettw@chromium.org Review URL: https://chromiumcodereview.appspot.com/14979003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@199389 0039d316-1c4b-4281-b951-d872f2087c98
* Refactor sandbox_policy.cc so that it doesn't contain the sandbox policies ↵jam@chromium.org2013-03-201-2/+26
| | | | | | | | | | | | | | | | | | | | for all processes. Instead have whoever creates a sandboxed process set this data. This allows us to clean a few NaCl related changes in content: -remove NaCl sandbox rules from content -remove the hack for ifdef'ing out the GPU policy since it didn't link for nacl64.exe -remove the 1GB memory reservation for the NaCl loader process out of content Other cleanup: -renamed sandbox_policy.* to sandbox_win.* to match the other platform-specific sandbox files -moved BrokerGetFileHandleForProcess to internal content files since it's not called from outside -remove AddGpuDllEvictionPolicy since it was redundant (the one dll it removed was already listed in the generic list) There's still more cleanup to be done in the sandbox code (i.e. remove chrome frame switch, nacl process type switch etc). I will do that in future changes. BUG=191682 Review URL: https://codereview.chromium.org/12805004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@189175 0039d316-1c4b-4281-b951-d872f2087c98
* Move file_path.h to base/files.brettw@chromium.org2013-02-241-1/+1
| | | | | | TBR=sky git-svn-id: svn://svn.chromium.org/chrome/trunk/src@184344 0039d316-1c4b-4281-b951-d872f2087c98
* Rename FilePath to base::FilePath and use new location of ↵brettw@chromium.org2013-02-081-8/+9
| | | | | | | | string_number_conversions in some chrome subdirectories. Review URL: https://codereview.chromium.org/12218065 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@181564 0039d316-1c4b-4281-b951-d872f2087c98
* Move scoped_temp_dir from base to base/filesbrettw@chromium.org2012-11-161-4/+4
| | | | | | | | | | Also add to base namespace. BUG= Review URL: https://codereview.chromium.org/11359217 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@168281 0039d316-1c4b-4281-b951-d872f2087c98
* Get rid of internal content includes for sandbox code from chrome.jam@chromium.org2012-06-041-2/+2
| | | | | | | BUG=98716 Review URL: https://chromiumcodereview.appspot.com/10512016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@140357 0039d316-1c4b-4281-b951-d872f2087c98
* Fixed printing gets cut-off issue for CloudPrint and Chrome.gene@chromium.org2012-01-281-5/+8
| | | | | | | | | | | | Background: Print output is rendering to metafile that is based on the screen DC. The metafile was scaled to 72/600 for Chrome printing and 96/600 for CloudPrint. When the resolution of the screen is low and print output is large, it is possible for metafile output to go outside of the boundaries and be cut-off the print out. Fix: This CL calculates scaling dynamically based on the printer and metafile sizes and revert scaling correspondingly in the browser/service for the actual printout. BUG=chromium-os:16088 TEST=Verify Chrome and CloudPrint printing is working fine. Lower screen resolution (to 800x600 for Chrome, for CloudPrint it is enough to lower to 1280x800). Run Chrome and enable CloudPrint support. Try printing files from the bug 16088. Review URL: http://codereview.chromium.org/9288081 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@119546 0039d316-1c4b-4281-b951-d872f2087c98
* Add a Content API around BrowserChildProcessHost, similar to what was done ↵jam@chromium.org2012-01-201-7/+0
| | | | | | | | | | | | with ChildProcessHost. Now classes like PluginProcessHost don't derive from it, but instead use composition. I've also moved the iterator class into its own file in the public directory. Since classes don't derive from BrowserChildProcessHost and so can't static_cast from it, I added a template helper that does this. BUG=98716 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=118415 Review URL: https://chromiumcodereview.appspot.com/9150017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@118516 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 118415 - Add a Content API around BrowserChildProcessHost, similar to ↵jam@chromium.org2012-01-201-0/+7
| | | | | | | | | | | | | what was done with ChildProcessHost. Now classes like PluginProcessHost don't derive from it, but instead use composition. I've also moved the iterator class into its own file in the public directory. Since classes don't derive from BrowserChildProcessHost and so can't static_cast from it, I added a template helper that does this. BUG=98716 Review URL: https://chromiumcodereview.appspot.com/9150017 TBR=jam@chromium.org git-svn-id: svn://svn.chromium.org/chrome/trunk/src@118420 0039d316-1c4b-4281-b951-d872f2087c98
* Add a Content API around BrowserChildProcessHost, similar to what was done ↵jam@chromium.org2012-01-201-7/+0
| | | | | | | | | | | with ChildProcessHost. Now classes like PluginProcessHost don't derive from it, but instead use composition. I've also moved the iterator class into its own file in the public directory. Since classes don't derive from BrowserChildProcessHost and so can't static_cast from it, I added a template helper that does this. BUG=98716 Review URL: https://chromiumcodereview.appspot.com/9150017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@118415 0039d316-1c4b-4281-b951-d872f2087c98
* Make ChildProcessHost be used through an interface in content/public, ↵jam@chromium.org2011-12-031-5/+7
| | | | | | | | | instead of by inheritence. BUG=98716 Review URL: http://codereview.chromium.org/8787004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@112878 0039d316-1c4b-4281-b951-d872f2087c98
* Don't make classes derive from ChildProcessHost, and instead have them use ↵jam@chromium.org2011-12-021-11/+45
| | | | | | | | | it through composition. This cleans up the code and makes it easier to understand (as well as more closely conform to the Google C++ style guide). It also makes it possible to add an interface around ChildProcessHost in a future change. BUG=98716 Review URL: http://codereview.chromium.org/8774040 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@112769 0039d316-1c4b-4281-b951-d872f2087c98
* Dispatch the Windows font caching IPCs in one filter. This avoids having the ↵jam@chromium.org2011-12-011-23/+5
| | | | | | | | | code that calls those functions be duplicated and also makes the chrome service code not know about internal content IPCs. It also cleans up ChildProcessHost a bit, which will be useful when it gets an interface around it for the Content API. BUG=98716 Review URL: http://codereview.chromium.org/8759013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@112492 0039d316-1c4b-4281-b951-d872f2087c98
* Don't make ServiceChildProcessHost derive from ChildProcessInfo. It didn't ↵jam@chromium.org2011-11-301-6/+2
| | | | | | | | | really need to. This is needed since code in chrome will only be able to see interfaces from content's public API. BUG=98716 Review URL: http://codereview.chromium.org/8755002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@112312 0039d316-1c4b-4281-b951-d872f2087c98
* base::Bind: Convert chrome/service.jhawkins@chromium.org2011-11-151-15/+9
| | | | | | | | | | | BUG=none TEST=none R=csilv@chromium.org Review URL: http://codereview.chromium.org/8553002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@110163 0039d316-1c4b-4281-b951-d872f2087c98
* Fixed issues with Cloud Print proxy.gene@chromium.org2011-10-131-26/+39
| | | | | | | | | | | | Currently, we are clearing waiting_for_reply_ ONLY on handled messages. Previously, we cleared waiting_for_reply_ on ANY message. Because message was forwarded to a different thread, and flag was cleared irrespective of message handling. BUG=none TEST=Verify CloudPrint proxy works. Review URL: http://codereview.chromium.org/8252002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@105375 0039d316-1c4b-4281-b951-d872f2087c98
* Added autorotate flag in PDF rendering and wiring it through service-utility ↵gene@chromium.org2011-10-061-4/+2
| | | | | | | | channel. Review URL: http://codereview.chromium.org/8146004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@104371 0039d316-1c4b-4281-b951-d872f2087c98