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

Side by Side Diff: content/ppapi_plugin/ppapi_plugin_main.cc

Issue 11411013: Initialize NSS in the PPAPI process for ClearKey CDM. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Address nits in comments. Created 8 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
« no previous file with comments | « no previous file | crypto/nss_util.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 "base/command_line.h" 5 #include "base/command_line.h"
6 #include "base/debug/debugger.h" 6 #include "base/debug/debugger.h"
7 #include "base/i18n/rtl.h" 7 #include "base/i18n/rtl.h"
8 #include "base/message_loop.h" 8 #include "base/message_loop.h"
9 #include "base/threading/platform_thread.h" 9 #include "base/threading/platform_thread.h"
10 #include "build/build_config.h" 10 #include "build/build_config.h"
11 #include "crypto/nss_util.h"
11 #include "content/common/child_process.h" 12 #include "content/common/child_process.h"
12 #include "content/ppapi_plugin/ppapi_thread.h" 13 #include "content/ppapi_plugin/ppapi_thread.h"
13 #include "content/public/common/content_switches.h" 14 #include "content/public/common/content_switches.h"
14 #include "content/public/common/main_function_params.h" 15 #include "content/public/common/main_function_params.h"
15 #include "ppapi/proxy/proxy_module.h" 16 #include "ppapi/proxy/proxy_module.h"
16 #include "ui/base/ui_base_switches.h" 17 #include "ui/base/ui_base_switches.h"
17 18
18 #if defined(OS_WIN) 19 #if defined(OS_WIN)
19 #include "sandbox/win/src/sandbox.h" 20 #include "sandbox/win/src/sandbox.h"
20 #endif 21 #endif
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 std::replace(locale.begin(), locale.end(), '-', '_'); 72 std::replace(locale.begin(), locale.end(), '-', '_');
72 locale.append(".UTF-8"); 73 locale.append(".UTF-8");
73 setlocale(LC_ALL, locale.c_str()); 74 setlocale(LC_ALL, locale.c_str());
74 setenv("LANG", locale.c_str(), 0); 75 setenv("LANG", locale.c_str(), 0);
75 #endif 76 #endif
76 } 77 }
77 78
78 MessageLoop main_message_loop; 79 MessageLoop main_message_loop;
79 base::PlatformThread::SetName("CrPPAPIMain"); 80 base::PlatformThread::SetName("CrPPAPIMain");
80 81
82 #if defined(OS_LINUX) && defined(USE_NSS)
83 // Some out-of-process PPAPI plugins need access to NSS.
brettw 2012/11/16 19:09:59 Can this comment explicitly say that this needs to
Jorge Lucangeli Obes 2012/11/16 19:41:43 Done.
84 crypto::WarmUpNSSSafely();
85 #endif
86
81 #if defined(OS_LINUX) 87 #if defined(OS_LINUX)
82 InitializeSandbox(); 88 InitializeSandbox();
83 #endif 89 #endif
84 90
85 ChildProcess ppapi_process; 91 ChildProcess ppapi_process;
86 ppapi_process.set_main_thread( 92 ppapi_process.set_main_thread(
87 new PpapiThread(parameters.command_line, false)); // Not a broker. 93 new PpapiThread(parameters.command_line, false)); // Not a broker.
88 94
89 main_message_loop.Run(); 95 main_message_loop.Run();
90 return 0; 96 return 0;
91 } 97 }
92 98
93 } // namespace content 99 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | crypto/nss_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698