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

Side by Side Diff: content/zygote/zygote_main_linux.cc

Issue 206713004: Report PPAPI plugin load error code to UMA. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: BASE_EXPORT Created 6 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 | Annotate | Revision Log
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/zygote/zygote_main.h" 5 #include "content/zygote/zygote_main.h"
6 6
7 #include <dlfcn.h> 7 #include <dlfcn.h>
8 #include <errno.h> 8 #include <errno.h>
9 #include <fcntl.h> 9 #include <fcntl.h>
10 #include <pthread.h> 10 #include <pthread.h>
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after
285 285
286 #if defined(ENABLE_PLUGINS) 286 #if defined(ENABLE_PLUGINS)
287 // Loads the (native) libraries but does not initialize them (i.e., does not 287 // Loads the (native) libraries but does not initialize them (i.e., does not
288 // call PPP_InitializeModule). This is needed by the zygote on Linux to get 288 // call PPP_InitializeModule). This is needed by the zygote on Linux to get
289 // access to the plugins before entering the sandbox. 289 // access to the plugins before entering the sandbox.
290 void PreloadPepperPlugins() { 290 void PreloadPepperPlugins() {
291 std::vector<PepperPluginInfo> plugins; 291 std::vector<PepperPluginInfo> plugins;
292 ComputePepperPluginList(&plugins); 292 ComputePepperPluginList(&plugins);
293 for (size_t i = 0; i < plugins.size(); ++i) { 293 for (size_t i = 0; i < plugins.size(); ++i) {
294 if (!plugins[i].is_internal && plugins[i].is_sandboxed) { 294 if (!plugins[i].is_internal && plugins[i].is_sandboxed) {
295 std::string error; 295 base::NativeLibraryLoadError error;
296 base::NativeLibrary library = base::LoadNativeLibrary(plugins[i].path, 296 base::NativeLibrary library = base::LoadNativeLibrary(plugins[i].path,
297 &error); 297 &error);
298 VLOG_IF(1, !library) << "Unable to load plugin " 298 VLOG_IF(1, !library) << "Unable to load plugin "
299 << plugins[i].path.value() << " " 299 << plugins[i].path.value() << " "
300 << error; 300 << error.ToString();
301 301
302 (void)library; // Prevent release-mode warning. 302 (void)library; // Prevent release-mode warning.
303 } 303 }
304 } 304 }
305 } 305 }
306 #endif 306 #endif
307 307
308 // This function triggers the static and lazy construction of objects that need 308 // This function triggers the static and lazy construction of objects that need
309 // to be created before imposing the sandbox. 309 // to be created before imposing the sandbox.
310 static void ZygotePreSandboxInit() { 310 static void ZygotePreSandboxInit() {
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
466 EnterLayerOneSandbox(linux_sandbox); 466 EnterLayerOneSandbox(linux_sandbox);
467 467
468 int sandbox_flags = linux_sandbox->GetStatus(); 468 int sandbox_flags = linux_sandbox->GetStatus();
469 469
470 Zygote zygote(sandbox_flags, forkdelegate); 470 Zygote zygote(sandbox_flags, forkdelegate);
471 // This function call can return multiple times, once per fork(). 471 // This function call can return multiple times, once per fork().
472 return zygote.ProcessRequests(); 472 return zygote.ProcessRequests();
473 } 473 }
474 474
475 } // namespace content 475 } // namespace content
OLDNEW
« no previous file with comments | « content/ppapi_plugin/ppapi_thread.cc ('k') | mojo/examples/pepper_container_app/plugin_module.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698