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

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

Issue 2470283002: Convert profile import IPCs to Mojo (Closed)
Patch Set: Use correct int types Created 4 years, 1 month 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
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 <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 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 105
106 std::unique_ptr<service_manager::Service> CreateImageDecoderService() { 106 std::unique_ptr<service_manager::Service> CreateImageDecoderService() {
107 content::UtilityThread::Get()->EnsureBlinkInitialized(); 107 content::UtilityThread::Get()->EnsureBlinkInitialized();
108 return image_decoder::ImageDecoderService::Create(); 108 return image_decoder::ImageDecoderService::Create();
109 } 109 }
110 110
111 } // namespace 111 } // namespace
112 112
113 ChromeContentUtilityClient::ChromeContentUtilityClient() 113 ChromeContentUtilityClient::ChromeContentUtilityClient()
114 : filter_messages_(false) { 114 : filter_messages_(false) {
115 #if !defined(OS_ANDROID)
116 handlers_.push_back(new ProfileImportHandler());
117 #endif
118
119 #if BUILDFLAG(ENABLE_EXTENSIONS) 115 #if BUILDFLAG(ENABLE_EXTENSIONS)
120 handlers_.push_back(new extensions::ExtensionsHandler(this)); 116 handlers_.push_back(new extensions::ExtensionsHandler(this));
121 handlers_.push_back(new image_writer::ImageWriterHandler()); 117 handlers_.push_back(new image_writer::ImageWriterHandler());
122 #endif 118 #endif
123 119
124 #if BUILDFLAG(ENABLE_PRINT_PREVIEW) || \ 120 #if BUILDFLAG(ENABLE_PRINT_PREVIEW) || \
125 (BUILDFLAG(ENABLE_BASIC_PRINTING) && defined(OS_WIN)) 121 (BUILDFLAG(ENABLE_BASIC_PRINTING) && defined(OS_WIN))
126 handlers_.push_back(new printing::PrintingHandler()); 122 handlers_.push_back(new printing::PrintingHandler());
127 #endif 123 #endif
128 124
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 // non-whitelisted Mojo services to the service_manager::InterfaceRegistry. 196 // non-whitelisted Mojo services to the service_manager::InterfaceRegistry.
201 // TODO(amistry): Use a whitelist once the whistlisted IPCs have been 197 // TODO(amistry): Use a whitelist once the whistlisted IPCs have been
202 // converted to Mojo. 198 // converted to Mojo.
203 if (filter_messages_) 199 if (filter_messages_)
204 return; 200 return;
205 201
206 #if !defined(OS_ANDROID) 202 #if !defined(OS_ANDROID)
207 registry->AddInterface<net::interfaces::ProxyResolverFactory>( 203 registry->AddInterface<net::interfaces::ProxyResolverFactory>(
208 base::Bind(CreateProxyResolverFactory)); 204 base::Bind(CreateProxyResolverFactory));
209 registry->AddInterface(base::Bind(CreateResourceUsageReporter)); 205 registry->AddInterface(base::Bind(CreateResourceUsageReporter));
206 registry->AddInterface(base::Bind(ProfileImportHandler::Create));
210 #endif 207 #endif
211 registry->AddInterface( 208 registry->AddInterface(
212 base::Bind(&safe_json::SafeJsonParserMojoImpl::Create)); 209 base::Bind(&safe_json::SafeJsonParserMojoImpl::Create));
213 #if defined(OS_WIN) 210 #if defined(OS_WIN)
214 registry->AddInterface(base::Bind(&ShellHandlerImpl::Create)); 211 registry->AddInterface(base::Bind(&ShellHandlerImpl::Create));
215 #endif 212 #endif
216 } 213 }
217 214
218 void ChromeContentUtilityClient::RegisterServices(StaticServiceMap* services) { 215 void ChromeContentUtilityClient::RegisterServices(StaticServiceMap* services) {
219 content::ServiceInfo image_decoder_info; 216 content::ServiceInfo image_decoder_info;
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
316 safe_browsing::zip_analyzer::Results results; 313 safe_browsing::zip_analyzer::Results results;
317 safe_browsing::dmg::AnalyzeDMGFile( 314 safe_browsing::dmg::AnalyzeDMGFile(
318 IPC::PlatformFileForTransitToFile(dmg_file), &results); 315 IPC::PlatformFileForTransitToFile(dmg_file), &results);
319 Send(new ChromeUtilityHostMsg_AnalyzeDmgFileForDownloadProtection_Finished( 316 Send(new ChromeUtilityHostMsg_AnalyzeDmgFileForDownloadProtection_Finished(
320 results)); 317 results));
321 ReleaseProcessIfNeeded(); 318 ReleaseProcessIfNeeded();
322 } 319 }
323 #endif // defined(OS_MACOSX) 320 #endif // defined(OS_MACOSX)
324 321
325 #endif // defined(FULL_SAFE_BROWSING) 322 #endif // defined(FULL_SAFE_BROWSING)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698