1 // Copyright 2015 The Chromium Authors 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 #include "components/nacl/browser/bad_message.h" 6 7 #include "base/logging.h" 8 #include "base/metrics/histogram_functions.h" 9 #include "content/public/browser/browser_message_filter.h" 10 11 namespace nacl { 12 namespace bad_message { 13 ReceivedBadMessage(content::BrowserMessageFilter * filter,BadMessageReason reason)14void ReceivedBadMessage(content::BrowserMessageFilter* filter, 15 BadMessageReason reason) { 16 LOG(ERROR) << "Terminating renderer for bad IPC message, reason " << reason; 17 base::UmaHistogramSparse("Stability.BadMessageTerminated.NaCl", reason); 18 filter->ShutdownForBadMessage(); 19 } 20 21 } // namespace bad_message 22 } // namespace nacl 23