Chromium Code Reviews

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

Issue 5874002: Create a ResourceMessageFilter to filter resource related IPCs. This gets ri... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 "app/app_switches.h" 7 #include "app/app_switches.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/file_util.h" 9 #include "base/file_util.h"
10 #include "base/message_loop.h" 10 #include "base/message_loop.h"
(...skipping 49 matching lines...)
60 NULL)); 60 NULL));
61 if (pdf_file == INVALID_HANDLE_VALUE) 61 if (pdf_file == INVALID_HANDLE_VALUE)
62 return false; 62 return false;
63 HANDLE pdf_file_in_utility_process = NULL; 63 HANDLE pdf_file_in_utility_process = NULL;
64 ::DuplicateHandle(::GetCurrentProcess(), pdf_file, handle(), 64 ::DuplicateHandle(::GetCurrentProcess(), pdf_file, handle(),
65 &pdf_file_in_utility_process, 0, false, 65 &pdf_file_in_utility_process, 0, false,
66 DUPLICATE_SAME_ACCESS); 66 DUPLICATE_SAME_ACCESS);
67 if (!pdf_file_in_utility_process) 67 if (!pdf_file_in_utility_process)
68 return false; 68 return false;
69 waiting_for_reply_ = true; 69 waiting_for_reply_ = true;
70 return SendOnChannel( 70 return Send(
71 new UtilityMsg_RenderPDFPagesToMetafile(pdf_file_in_utility_process, 71 new UtilityMsg_RenderPDFPagesToMetafile(pdf_file_in_utility_process,
72 metafile_path_, 72 metafile_path_,
73 render_area, 73 render_area,
74 render_dpi, 74 render_dpi,
75 page_ranges)); 75 page_ranges));
76 #endif // !defined(OS_WIN) 76 #endif // !defined(OS_WIN)
77 } 77 }
78 78
79 bool ServiceUtilityProcessHost::StartProcess(const FilePath& exposed_dir) { 79 bool ServiceUtilityProcessHost::StartProcess(const FilePath& exposed_dir) {
80 // Name must be set or metrics_service will crash in any test which 80 // Name must be set or metrics_service will crash in any test which
(...skipping 101 matching lines...)
182 if (!metafile.CreateFromFile(metafile_path)) { 182 if (!metafile.CreateFromFile(metafile_path)) {
183 OnRenderPDFPagesToMetafileFailed(); 183 OnRenderPDFPagesToMetafileFailed();
184 } else { 184 } else {
185 OnRenderPDFPagesToMetafileSucceeded(metafile, highest_rendered_page_number); 185 OnRenderPDFPagesToMetafileSucceeded(metafile, highest_rendered_page_number);
186 // Close it so that ScopedTempDir can delete the folder. 186 // Close it so that ScopedTempDir can delete the folder.
187 metafile.CloseEmf(); 187 metafile.CloseEmf();
188 } 188 }
189 #endif // defined(OS_WIN) 189 #endif // defined(OS_WIN)
190 } 190 }
191 191
OLDNEW
« chrome/common/child_process_host.h ('K') | « chrome/service/service_utility_process_host.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine