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

Unified Diff: components/nacl/renderer/ppb_nacl_private_impl.cc

Issue 217133006: Pepper: Move LogToConsole to NexeLoadManager. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/nacl/renderer/nexe_load_manager.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/nacl/renderer/ppb_nacl_private_impl.cc
diff --git a/components/nacl/renderer/ppb_nacl_private_impl.cc b/components/nacl/renderer/ppb_nacl_private_impl.cc
index 3b89d184587e879d7b010da8234af9f46fec9c13..e4e2db21d9f4b1682f10d457c0a0253fb381907b 100644
--- a/components/nacl/renderer/ppb_nacl_private_impl.cc
+++ b/components/nacl/renderer/ppb_nacl_private_impl.cc
@@ -35,9 +35,6 @@
namespace {
-// Forward declare LogToConsole() we can use it in other functions here.
-void LogToConsole(PP_Instance instance, const char* message);
-
base::LazyInstance<scoped_refptr<PnaclTranslationResourceHost> >
g_pnacl_resource_host = LAZY_INSTANCE_INITIALIZER;
@@ -449,8 +446,7 @@ void ReportLoadError(PP_Instance instance,
const char* console_message) {
nacl::NexeLoadManager* load_manager = GetNexeLoadManager(instance);
if (load_manager)
- load_manager->ReportLoadError(error, error_message);
- LogToConsole(instance, console_message);
+ load_manager->ReportLoadError(error, error_message, console_message);
}
void InstanceCreated(PP_Instance instance) {
@@ -490,11 +486,10 @@ PP_UrlSchemeType GetUrlScheme(PP_Var url) {
}
void LogToConsole(PP_Instance instance, const char* message) {
- std::string source("NativeClient");
- ppapi::PpapiGlobals::Get()->LogWithSource(instance,
- PP_LOGLEVEL_LOG,
- source,
- std::string(message));
+ nacl::NexeLoadManager* load_manager = GetNexeLoadManager(instance);
+ DCHECK(load_manager);
+ if (load_manager)
+ load_manager->LogToConsole(std::string(message));
}
PP_Bool GetNexeErrorReported(PP_Instance instance) {
« no previous file with comments | « components/nacl/renderer/nexe_load_manager.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698