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

Side by Side Diff: chrome/utility/chrome_content_utility_client.cc

Issue 419523006: Experimentally isolate GetOpenFileName in a utility process. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase. Created 6 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « chrome/common/chrome_utility_messages.h ('k') | chrome/utility/shell_handler_win.h » ('j') | 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/utility/chrome_content_utility_client.h" 5 #include "chrome/utility/chrome_content_utility_client.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/files/file_path.h" 8 #include "base/files/file_path.h"
9 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "base/time/time.h" 10 #include "base/time/time.h"
11 #include "chrome/common/chrome_utility_messages.h" 11 #include "chrome/common/chrome_utility_messages.h"
12 #include "chrome/common/safe_browsing/zip_analyzer.h" 12 #include "chrome/common/safe_browsing/zip_analyzer.h"
13 #include "chrome/utility/chrome_content_utility_ipc_whitelist.h" 13 #include "chrome/utility/chrome_content_utility_ipc_whitelist.h"
14 #include "chrome/utility/utility_message_handler.h" 14 #include "chrome/utility/utility_message_handler.h"
15 #include "chrome/utility/web_resource_unpacker.h" 15 #include "chrome/utility/web_resource_unpacker.h"
16 #include "content/public/child/image_decoder_utils.h" 16 #include "content/public/child/image_decoder_utils.h"
17 #include "content/public/common/content_switches.h" 17 #include "content/public/common/content_switches.h"
18 #include "content/public/utility/utility_thread.h" 18 #include "content/public/utility/utility_thread.h"
19 #include "courgette/courgette.h" 19 #include "courgette/courgette.h"
20 #include "courgette/third_party/bsdiff.h" 20 #include "courgette/third_party/bsdiff.h"
21 #include "third_party/skia/include/core/SkBitmap.h" 21 #include "third_party/skia/include/core/SkBitmap.h"
22 #include "third_party/zlib/google/zip.h" 22 #include "third_party/zlib/google/zip.h"
23 #include "ui/gfx/codec/jpeg_codec.h" 23 #include "ui/gfx/codec/jpeg_codec.h"
24 #include "ui/gfx/size.h" 24 #include "ui/gfx/size.h"
25 25
26 #if !defined(OS_ANDROID) 26 #if !defined(OS_ANDROID)
27 #include "chrome/utility/profile_import_handler.h" 27 #include "chrome/utility/profile_import_handler.h"
28 #endif 28 #endif
29 29
30 #if defined(OS_WIN)
31 #include "chrome/utility/shell_handler_win.h"
32 #endif
33
30 #if defined(ENABLE_EXTENSIONS) 34 #if defined(ENABLE_EXTENSIONS)
31 #include "chrome/common/extensions/chrome_utility_extensions_messages.h" 35 #include "chrome/common/extensions/chrome_utility_extensions_messages.h"
32 #include "chrome/utility/extensions/extensions_handler.h" 36 #include "chrome/utility/extensions/extensions_handler.h"
33 #include "chrome/utility/image_writer/image_writer_handler.h" 37 #include "chrome/utility/image_writer/image_writer_handler.h"
34 #include "chrome/utility/media_galleries/ipc_data_source.h" 38 #include "chrome/utility/media_galleries/ipc_data_source.h"
35 #include "chrome/utility/media_galleries/media_metadata_parser.h" 39 #include "chrome/utility/media_galleries/media_metadata_parser.h"
36 #endif 40 #endif
37 41
38 #if defined(ENABLE_FULL_PRINTING) 42 #if defined(ENABLE_FULL_PRINTING)
39 #include "chrome/utility/printing_handler.h" 43 #include "chrome/utility/printing_handler.h"
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 #if defined(ENABLE_FULL_PRINTING) 84 #if defined(ENABLE_FULL_PRINTING)
81 handlers_.push_back(new PrintingHandler()); 85 handlers_.push_back(new PrintingHandler());
82 #endif 86 #endif
83 87
84 #if defined(ENABLE_MDNS) 88 #if defined(ENABLE_MDNS)
85 if (base::CommandLine::ForCurrentProcess()->HasSwitch( 89 if (base::CommandLine::ForCurrentProcess()->HasSwitch(
86 switches::kUtilityProcessEnableMDns)) { 90 switches::kUtilityProcessEnableMDns)) {
87 handlers_.push_back(new local_discovery::ServiceDiscoveryMessageHandler()); 91 handlers_.push_back(new local_discovery::ServiceDiscoveryMessageHandler());
88 } 92 }
89 #endif 93 #endif
94
95 #if defined(OS_WIN)
96 handlers_.push_back(new ShellHandler());
97 #endif
90 } 98 }
91 99
92 ChromeContentUtilityClient::~ChromeContentUtilityClient() { 100 ChromeContentUtilityClient::~ChromeContentUtilityClient() {
93 } 101 }
94 102
95 void ChromeContentUtilityClient::UtilityThreadStarted() { 103 void ChromeContentUtilityClient::UtilityThreadStarted() {
96 #if defined(ENABLE_EXTENSIONS) 104 #if defined(ENABLE_EXTENSIONS)
97 extensions::ExtensionsHandler::UtilityThreadStarted(); 105 extensions::ExtensionsHandler::UtilityThreadStarted();
98 #endif 106 #endif
99 107
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
307 const std::string& mime_type, int64 total_size, bool get_attached_images) { 315 const std::string& mime_type, int64 total_size, bool get_attached_images) {
308 // Only one IPCDataSource may be created and added to the list of handlers. 316 // Only one IPCDataSource may be created and added to the list of handlers.
309 metadata::IPCDataSource* source = new metadata::IPCDataSource(total_size); 317 metadata::IPCDataSource* source = new metadata::IPCDataSource(total_size);
310 handlers_.push_back(source); 318 handlers_.push_back(source);
311 319
312 metadata::MediaMetadataParser* parser = new metadata::MediaMetadataParser( 320 metadata::MediaMetadataParser* parser = new metadata::MediaMetadataParser(
313 source, mime_type, get_attached_images); 321 source, mime_type, get_attached_images);
314 parser->Start(base::Bind(&FinishParseMediaMetadata, base::Owned(parser))); 322 parser->Start(base::Bind(&FinishParseMediaMetadata, base::Owned(parser)));
315 } 323 }
316 #endif 324 #endif
OLDNEW
« no previous file with comments | « chrome/common/chrome_utility_messages.h ('k') | chrome/utility/shell_handler_win.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698