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

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

Issue 2745653008: [Media Router] Parse device description xml in utility process (Closed)
Patch Set: resolve code review comments from Mark Created 3 years, 9 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
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 #include <vector> 9 #include <vector>
10 10
11 #include "base/command_line.h" 11 #include "base/command_line.h"
12 #include "base/files/file_path.h" 12 #include "base/files/file_path.h"
13 #include "base/memory/ptr_util.h" 13 #include "base/memory/ptr_util.h"
14 #include "base/memory/ref_counted.h" 14 #include "base/memory/ref_counted.h"
15 #include "base/time/time.h" 15 #include "base/time/time.h"
16 #include "chrome/common/file_patcher.mojom.h" 16 #include "chrome/common/file_patcher.mojom.h"
17 #include "chrome/utility/media_router/dial_device_description_parser_impl.h"
17 #include "chrome/utility/utility_message_handler.h" 18 #include "chrome/utility/utility_message_handler.h"
18 #include "components/safe_json/utility/safe_json_parser_mojo_impl.h" 19 #include "components/safe_json/utility/safe_json_parser_mojo_impl.h"
19 #include "content/public/child/image_decoder_utils.h" 20 #include "content/public/child/image_decoder_utils.h"
20 #include "content/public/common/content_switches.h" 21 #include "content/public/common/content_switches.h"
21 #include "content/public/common/service_info.h" 22 #include "content/public/common/service_info.h"
22 #include "content/public/utility/utility_thread.h" 23 #include "content/public/utility/utility_thread.h"
23 #include "courgette/courgette.h" 24 #include "courgette/courgette.h"
24 #include "courgette/third_party/bsdiff/bsdiff.h" 25 #include "courgette/third_party/bsdiff/bsdiff.h"
25 #include "extensions/features/features.h" 26 #include "extensions/features/features.h"
26 #include "mojo/public/cpp/bindings/strong_binding.h" 27 #include "mojo/public/cpp/bindings/strong_binding.h"
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after
284 base::Bind(&safe_json::SafeJsonParserMojoImpl::Create)); 285 base::Bind(&safe_json::SafeJsonParserMojoImpl::Create));
285 #if defined(OS_WIN) 286 #if defined(OS_WIN)
286 registry->AddInterface(base::Bind(&ShellHandlerImpl::Create)); 287 registry->AddInterface(base::Bind(&ShellHandlerImpl::Create));
287 #endif 288 #endif
288 #if defined(OS_CHROMEOS) 289 #if defined(OS_CHROMEOS)
289 registry->AddInterface(base::Bind(&ZipFileCreatorImpl::Create)); 290 registry->AddInterface(base::Bind(&ZipFileCreatorImpl::Create));
290 #endif 291 #endif
291 #if defined(FULL_SAFE_BROWSING) 292 #if defined(FULL_SAFE_BROWSING)
292 registry->AddInterface(base::Bind(&SafeArchiveAnalyzerImpl::Create)); 293 registry->AddInterface(base::Bind(&SafeArchiveAnalyzerImpl::Create));
293 #endif 294 #endif
295 #if defined(ENABLE_MEDIA_ROUTER)
296 registry->AddInterface(
297 base::Bind(&media_router::DialDeviceDescriptionParserImpl::Create));
298 #endif // defined(ENABLE_MEDIA_ROUTER)
294 } 299 }
295 300
296 void ChromeContentUtilityClient::RegisterServices(StaticServiceMap* services) { 301 void ChromeContentUtilityClient::RegisterServices(StaticServiceMap* services) {
297 content::ServiceInfo image_decoder_info; 302 content::ServiceInfo image_decoder_info;
298 image_decoder_info.factory = base::Bind(&CreateImageDecoderService); 303 image_decoder_info.factory = base::Bind(&CreateImageDecoderService);
299 services->insert( 304 services->insert(
300 std::make_pair(image_decoder::mojom::kServiceName, image_decoder_info)); 305 std::make_pair(image_decoder::mojom::kServiceName, image_decoder_info));
301 } 306 }
302 307
303 // static 308 // static
304 void ChromeContentUtilityClient::PreSandboxStartup() { 309 void ChromeContentUtilityClient::PreSandboxStartup() {
305 #if BUILDFLAG(ENABLE_EXTENSIONS) 310 #if BUILDFLAG(ENABLE_EXTENSIONS)
306 extensions::ExtensionsHandler::PreSandboxStartup(); 311 extensions::ExtensionsHandler::PreSandboxStartup();
307 #endif 312 #endif
308 } 313 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698