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

Side by Side Diff: content/app/content_main_runner.cc

Issue 2582463003: media: Verify CDM Host files (Closed)
Patch Set: Created 4 years 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
« no previous file with comments | « no previous file | content/common/BUILD.gn » ('j') | content/common/media/cdm_host_file.h » ('J')
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 "content/public/app/content_main_runner.h" 5 #include "content/public/app/content_main_runner.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdlib.h> 8 #include <stdlib.h>
9 #include <string.h> 9 #include <string.h>
10 10
(...skipping 30 matching lines...) Expand all
41 #include "base/trace_event/trace_event.h" 41 #include "base/trace_event/trace_event.h"
42 #include "build/build_config.h" 42 #include "build/build_config.h"
43 #include "components/tracing/browser/trace_config_file.h" 43 #include "components/tracing/browser/trace_config_file.h"
44 #include "components/tracing/common/trace_to_console.h" 44 #include "components/tracing/common/trace_to_console.h"
45 #include "components/tracing/common/tracing_switches.h" 45 #include "components/tracing/common/tracing_switches.h"
46 #include "content/app/mojo/mojo_init.h" 46 #include "content/app/mojo/mojo_init.h"
47 #include "content/browser/browser_main.h" 47 #include "content/browser/browser_main.h"
48 #include "content/browser/gpu/gpu_process_host.h" 48 #include "content/browser/gpu/gpu_process_host.h"
49 #include "content/browser/renderer_host/render_process_host_impl.h" 49 #include "content/browser/renderer_host/render_process_host_impl.h"
50 #include "content/browser/utility_process_host_impl.h" 50 #include "content/browser/utility_process_host_impl.h"
51 #include "content/common/media/cdm_host_files.h"
51 #include "content/common/set_process_title.h" 52 #include "content/common/set_process_title.h"
52 #include "content/common/url_schemes.h" 53 #include "content/common/url_schemes.h"
53 #include "content/gpu/in_process_gpu_thread.h" 54 #include "content/gpu/in_process_gpu_thread.h"
54 #include "content/public/app/content_main.h" 55 #include "content/public/app/content_main.h"
55 #include "content/public/app/content_main_delegate.h" 56 #include "content/public/app/content_main_delegate.h"
56 #include "content/public/browser/content_browser_client.h" 57 #include "content/public/browser/content_browser_client.h"
57 #include "content/public/common/content_client.h" 58 #include "content/public/common/content_client.h"
58 #include "content/public/common/content_constants.h" 59 #include "content/public/common/content_constants.h"
59 #include "content/public/common/content_paths.h" 60 #include "content/public/common/content_paths.h"
60 #include "content/public/common/content_switches.h" 61 #include "content/public/common/content_switches.h"
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after
326 if (delegate) delegate->ZygoteForked(); 327 if (delegate) delegate->ZygoteForked();
327 328
328 // Zygote::HandleForkRequest may have reallocated the command 329 // Zygote::HandleForkRequest may have reallocated the command
329 // line so update it here with the new version. 330 // line so update it here with the new version.
330 const base::CommandLine& command_line = 331 const base::CommandLine& command_line =
331 *base::CommandLine::ForCurrentProcess(); 332 *base::CommandLine::ForCurrentProcess();
332 std::string process_type = 333 std::string process_type =
333 command_line.GetSwitchValueASCII(switches::kProcessType); 334 command_line.GetSwitchValueASCII(switches::kProcessType);
334 ContentClientInitializer::Set(process_type, delegate); 335 ContentClientInitializer::Set(process_type, delegate);
335 336
337 #if BUILDFLAG(ENABLE_PEPPER_CDMS)
338 if (process_type != switches::kPpapiPluginProcess) {
339 DVLOG(1) << "Closing CDM files for non-ppapi process.";
340 CdmHostFiles::TakeGlobalInstance().reset();
341 } else {
342 DVLOG(1) << "Not closing CDM files for ppapi process.";
343 }
344 #endif
345
336 MainFunctionParams main_params(command_line); 346 MainFunctionParams main_params(command_line);
337 main_params.zygote_child = true; 347 main_params.zygote_child = true;
338 348
339 std::unique_ptr<base::FieldTrialList> field_trial_list; 349 std::unique_ptr<base::FieldTrialList> field_trial_list;
340 InitializeFieldTrialAndFeatureList(&field_trial_list); 350 InitializeFieldTrialAndFeatureList(&field_trial_list);
341 351
342 for (size_t i = 0; i < arraysize(kMainFunctions); ++i) { 352 for (size_t i = 0; i < arraysize(kMainFunctions); ++i) {
343 if (process_type == kMainFunctions[i].name) 353 if (process_type == kMainFunctions[i].name)
344 return kMainFunctions[i].function(main_params); 354 return kMainFunctions[i].function(main_params);
345 } 355 }
(...skipping 507 matching lines...) Expand 10 before | Expand all | Expand 10 after
853 863
854 DISALLOW_COPY_AND_ASSIGN(ContentMainRunnerImpl); 864 DISALLOW_COPY_AND_ASSIGN(ContentMainRunnerImpl);
855 }; 865 };
856 866
857 // static 867 // static
858 ContentMainRunner* ContentMainRunner::Create() { 868 ContentMainRunner* ContentMainRunner::Create() {
859 return new ContentMainRunnerImpl(); 869 return new ContentMainRunnerImpl();
860 } 870 }
861 871
862 } // namespace content 872 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/common/BUILD.gn » ('j') | content/common/media/cdm_host_file.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698