Index: components/password_manager/content/browser/bad_message.h |
diff --git a/chrome/browser/bad_message.h b/components/password_manager/content/browser/bad_message.h |
similarity index 64% |
copy from chrome/browser/bad_message.h |
copy to components/password_manager/content/browser/bad_message.h |
index 36026851192532bb710730ec60fa05c22f945af3..ff8f671b9d24978d6dfc07d246615de7a40abcae 100644 |
--- a/chrome/browser/bad_message.h |
+++ b/components/password_manager/content/browser/bad_message.h |
@@ -2,14 +2,14 @@ |
// Use of this source code is governed by a BSD-style license that can be |
// found in the LICENSE file. |
-#ifndef CHROME_BROWSER_BAD_MESSAGE_H_ |
-#define CHROME_BROWSER_BAD_MESSAGE_H_ |
+#ifndef COMPONENTS_PASSWORD_MANAGER_CONTENT_BROWSER_BAD_MESSAGE_H_ |
+#define COMPONENTS_PASSWORD_MANAGER_CONTENT_BROWSER_BAD_MESSAGE_H_ |
namespace content { |
-class BrowserMessageFilter; |
class RenderProcessHost; |
} |
+namespace password_manager { |
namespace bad_message { |
// The browser process often chooses to terminate a renderer if it receives |
@@ -22,12 +22,17 @@ namespace bad_message { |
// values in histograms. Also update histograms.xml with any new values by |
// running: |
// python tools/metrics/histograms/update_bad_message_reasons.py |
-enum BadMessageReason { |
- WRLHH_LOGGING_STOPPED_BAD_STATE = 0, |
+enum class BadMessageReason { |
ncarter (slow)
2015/07/09 21:47:30
Since it's an enum class now (which provides a nam
lfg
2015/07/16 17:01:11
Done.
|
+ CPMD_BAD_ORIGIN_FORMS_PARSED = 1, |
+ CPMD_BAD_ORIGIN_FORMS_RENDERED = 2, |
+ CPMD_BAD_ORIGIN_FORM_SUBMITTED = 3, |
+ CPMD_BAD_ORIGIN_FOCUSED_PASSWORD_FORM_FOUND = 4, |
+ CPMD_BAD_ORIGIN_IN_PAGE_NAVIGATION = 5, |
+ CPMD_BAD_ORIGIN_PASSWORD_NO_LONGER_GENERATED = 6, |
// Please add new elements here. The naming convention is abbreviated class |
- // name (e.g. RenderFrameHost becomes RFH) plus a unique description of the |
- // reason. |
+ // name (e.g. ContentPasswordManagerDriver becomes CPMD) plus a unique |
+ // description of the reason. |
BAD_MESSAGE_MAX |
}; |
@@ -37,12 +42,7 @@ enum BadMessageReason { |
void ReceivedBadMessage(content::RenderProcessHost* host, |
BadMessageReason reason); |
-// Called when a browser message filter receives a bad IPC message from a |
-// renderer or other child process. Logs the event, records a histogram metric |
-// for the |reason|, and terminates the process for |filter|. |
-void ReceivedBadMessage(content::BrowserMessageFilter* filter, |
- BadMessageReason reason); |
- |
} // namespace bad_message |
+} // namespace password_manager |
-#endif // CHROME_BROWSER_BAD_MESSAGE_H_ |
+#endif // COMPONENTS_PASSWORD_MANAGER_CONTENT_BROWSER_BAD_MESSAGE_H_ |