bad_message.cc 745 B

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