| 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/utility/chrome_content_utility_client.h" | 5 #include "chrome/utility/chrome_content_utility_client.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 20 matching lines...) Expand all Loading... |
| 31 | 31 |
| 32 #if !defined(OS_ANDROID) | 32 #if !defined(OS_ANDROID) |
| 33 #include "chrome/common/resource_usage_reporter.mojom.h" | 33 #include "chrome/common/resource_usage_reporter.mojom.h" |
| 34 #include "chrome/utility/profile_import_handler.h" | 34 #include "chrome/utility/profile_import_handler.h" |
| 35 #include "mojo/public/cpp/bindings/strong_binding.h" | 35 #include "mojo/public/cpp/bindings/strong_binding.h" |
| 36 #include "net/proxy/mojo_proxy_resolver_factory_impl.h" | 36 #include "net/proxy/mojo_proxy_resolver_factory_impl.h" |
| 37 #include "net/proxy/proxy_resolver_v8.h" | 37 #include "net/proxy/proxy_resolver_v8.h" |
| 38 #endif | 38 #endif |
| 39 | 39 |
| 40 #if defined(OS_WIN) | 40 #if defined(OS_WIN) |
| 41 #include "chrome/utility/shell_handler_impl_win.h" |
| 41 #include "chrome/utility/shell_handler_win.h" | 42 #include "chrome/utility/shell_handler_win.h" |
| 42 #endif | 43 #endif |
| 43 | 44 |
| 44 #if defined(ENABLE_EXTENSIONS) | 45 #if defined(ENABLE_EXTENSIONS) |
| 45 #include "chrome/utility/extensions/extensions_handler.h" | 46 #include "chrome/utility/extensions/extensions_handler.h" |
| 46 #include "chrome/utility/image_writer/image_writer_handler.h" | 47 #include "chrome/utility/image_writer/image_writer_handler.h" |
| 47 #endif | 48 #endif |
| 48 | 49 |
| 49 #if defined(ENABLE_PRINT_PREVIEW) || \ | 50 #if defined(ENABLE_PRINT_PREVIEW) || \ |
| 50 (defined(ENABLE_BASIC_PRINTING) && defined(OS_WIN)) | 51 (defined(ENABLE_BASIC_PRINTING) && defined(OS_WIN)) |
| (...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 202 return; | 203 return; |
| 203 | 204 |
| 204 #if !defined(OS_ANDROID) | 205 #if !defined(OS_ANDROID) |
| 205 registry->AddInterface<net::interfaces::ProxyResolverFactory>( | 206 registry->AddInterface<net::interfaces::ProxyResolverFactory>( |
| 206 base::Bind(CreateProxyResolverFactory)); | 207 base::Bind(CreateProxyResolverFactory)); |
| 207 registry->AddInterface(base::Bind(CreateResourceUsageReporter)); | 208 registry->AddInterface(base::Bind(CreateResourceUsageReporter)); |
| 208 #endif | 209 #endif |
| 209 registry->AddInterface(base::Bind(&CreateImageDecoder)); | 210 registry->AddInterface(base::Bind(&CreateImageDecoder)); |
| 210 registry->AddInterface( | 211 registry->AddInterface( |
| 211 base::Bind(&safe_json::SafeJsonParserMojoImpl::Create)); | 212 base::Bind(&safe_json::SafeJsonParserMojoImpl::Create)); |
| 213 #if defined(OS_WIN) |
| 214 registry->AddInterface(base::Bind(&ShellHandlerImpl::Create)); |
| 215 #endif |
| 212 } | 216 } |
| 213 | 217 |
| 214 void ChromeContentUtilityClient::AddHandler( | 218 void ChromeContentUtilityClient::AddHandler( |
| 215 std::unique_ptr<UtilityMessageHandler> handler) { | 219 std::unique_ptr<UtilityMessageHandler> handler) { |
| 216 handlers_.push_back(std::move(handler)); | 220 handlers_.push_back(std::move(handler)); |
| 217 } | 221 } |
| 218 | 222 |
| 219 // static | 223 // static |
| 220 void ChromeContentUtilityClient::PreSandboxStartup() { | 224 void ChromeContentUtilityClient::PreSandboxStartup() { |
| 221 #if defined(ENABLE_EXTENSIONS) | 225 #if defined(ENABLE_EXTENSIONS) |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 305 safe_browsing::zip_analyzer::Results results; | 309 safe_browsing::zip_analyzer::Results results; |
| 306 safe_browsing::dmg::AnalyzeDMGFile( | 310 safe_browsing::dmg::AnalyzeDMGFile( |
| 307 IPC::PlatformFileForTransitToFile(dmg_file), &results); | 311 IPC::PlatformFileForTransitToFile(dmg_file), &results); |
| 308 Send(new ChromeUtilityHostMsg_AnalyzeDmgFileForDownloadProtection_Finished( | 312 Send(new ChromeUtilityHostMsg_AnalyzeDmgFileForDownloadProtection_Finished( |
| 309 results)); | 313 results)); |
| 310 ReleaseProcessIfNeeded(); | 314 ReleaseProcessIfNeeded(); |
| 311 } | 315 } |
| 312 #endif // defined(OS_MACOSX) | 316 #endif // defined(OS_MACOSX) |
| 313 | 317 |
| 314 #endif // defined(FULL_SAFE_BROWSING) | 318 #endif // defined(FULL_SAFE_BROWSING) |
| OLD | NEW |