[M108 Aura Migration][NaCl][PPFwk] Add error logs + SVACE/DLOG/Static analysis fix
[platform/framework/web/chromium-efl.git] / ppapi / proxy / network_monitor_resource.cc
index 777652a..51bf4dd 100644 (file)
@@ -4,6 +4,7 @@
 
 #include "ppapi/proxy/network_monitor_resource.h"
 
+#include "base/logging.h"
 #include "ppapi/proxy/dispatch_reply_message.h"
 #include "ppapi/proxy/ppapi_messages.h"
 #include "ppapi/thunk/enter.h"
@@ -44,12 +45,18 @@ void NetworkMonitorResource::OnReplyReceived(
 int32_t NetworkMonitorResource::UpdateNetworkList(
     PP_Resource* network_list,
     scoped_refptr<TrackedCallback> callback) {
-  if (!network_list)
+  if (!network_list) {
+    LOG(ERROR) << "Network list is NULL";
     return PP_ERROR_BADARGUMENT;
-  if (TrackedCallback::IsPending(update_callback_))
+  }
+  if (TrackedCallback::IsPending(update_callback_)) {
+    LOG(ERROR) << "Update Network List is pending";
     return PP_ERROR_INPROGRESS;
-  if (forbidden_)
+  }
+  if (forbidden_) {
+    LOG(ERROR) << "Insufficient permissions";
     return PP_ERROR_NOACCESS;
+  }
 
   if (current_list_.get()) {
     *network_list = current_list_.Release();