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

Unified Diff: components/password_manager/content/browser/bad_message.cc

Issue 1212163007: Kill renderers for bad password forms in --site-per-process. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: starting histogram samples from 1 Created 5 years, 5 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
Index: components/password_manager/content/browser/bad_message.cc
diff --git a/extensions/browser/bad_message.cc b/components/password_manager/content/browser/bad_message.cc
similarity index 53%
copy from extensions/browser/bad_message.cc
copy to components/password_manager/content/browser/bad_message.cc
index 85ce5d61899d5beb5df54261c4ee330413cd7647..b1525566e072a24ef5a02df87dd2820c84d92a53 100644
--- a/extensions/browser/bad_message.cc
+++ b/components/password_manager/content/browser/bad_message.cc
@@ -2,23 +2,26 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "extensions/browser/bad_message.h"
+#include "components/password_manager/content/browser/bad_message.h"
#include "base/logging.h"
#include "base/metrics/histogram_macros.h"
#include "content/public/browser/render_process_host.h"
-namespace extensions {
+namespace password_manager {
namespace bad_message {
void ReceivedBadMessage(content::RenderProcessHost* host,
BadMessageReason reason) {
- LOG(ERROR) << "Terminating extension renderer for bad IPC message, reason "
- << reason;
- UMA_HISTOGRAM_ENUMERATION("Stability.BadMessageTerminated.Extensions", reason,
- BAD_MESSAGE_MAX);
+ LOG(ERROR)
+ << "Terminating renderer for bad PasswordManager IPC message, reason "
+ << static_cast<int>(reason);
ncarter (slow) 2015/07/09 21:47:30 Leave this as log error, to match all the other ba
+ UMA_HISTOGRAM_ENUMERATION(
+ "Stability.BadMessageTerminated.PasswordManager",
+ static_cast<int>(reason),
+ static_cast<int>(BadMessageReason::BAD_MESSAGE_MAX));
host->ShutdownForBadMessage();
}
} // namespace bad_message
-} // namespace extensions
+} // namespace password_manager

Powered by Google App Engine
This is Rietveld 408576698