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

Unified Diff: content/browser/indexed_db/indexed_db_dispatcher_host.cc

Issue 1145013004: Introduce bad_message.h for chrome and NaCl. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 years, 7 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: content/browser/indexed_db/indexed_db_dispatcher_host.cc
diff --git a/content/browser/indexed_db/indexed_db_dispatcher_host.cc b/content/browser/indexed_db/indexed_db_dispatcher_host.cc
index 0ac2a3a3d935ffc1b5d2f104161e87debb63e3fc..996e6a50ea73ac96d873744eb2d512cdca3a375b 100644
--- a/content/browser/indexed_db/indexed_db_dispatcher_host.cc
+++ b/content/browser/indexed_db/indexed_db_dispatcher_host.cc
@@ -12,6 +12,7 @@
#include "base/process/process.h"
#include "base/stl_util.h"
#include "base/strings/utf_string_conversions.h"
+#include "content/browser/bad_message.h"
#include "content/browser/child_process_security_policy_impl.h"
#include "content/browser/indexed_db/indexed_db_callbacks.h"
#include "content/browser/indexed_db/indexed_db_connection.h"
@@ -414,8 +415,7 @@ ObjectType* IndexedDBDispatcherHost::GetOrTerminateProcess(
if (!return_object) {
NOTREACHED() << "Uh oh, couldn't find object with id "
<< ipc_return_object_id;
- RecordAction(base::UserMetricsAction("BadMessageTerminate_IDBMF"));
- BadMessageReceived();
+ bad_message::ReceivedBadMessage(this, bad_message::IDBDH_GET_OR_TERMINATE);
}
return return_object;
}
@@ -429,8 +429,7 @@ ObjectType* IndexedDBDispatcherHost::GetOrTerminateProcess(
if (!return_object) {
NOTREACHED() << "Uh oh, couldn't find object with id "
<< ipc_return_object_id;
- RecordAction(base::UserMetricsAction("BadMessageTerminate_IDBMF"));
- BadMessageReceived();
+ bad_message::ReceivedBadMessage(this, bad_message::IDBDH_GET_OR_TERMINATE);
}
return return_object;
}
@@ -710,7 +709,8 @@ void IndexedDBDispatcherHost::DatabaseDispatcherHost::OnPut(
if (!info.file_path.empty()) {
path = base::FilePath::FromUTF16Unsafe(info.file_path);
if (!policy->CanReadFile(parent_->ipc_process_id_, path)) {
- parent_->BadMessageReceived();
+ bad_message::ReceivedBadMessage(parent_,
+ bad_message::IDBDH_CAN_READ_FILE);
return;
}
}
« no previous file with comments | « content/browser/fileapi/fileapi_message_filter.cc ('k') | content/browser/loader/resource_dispatcher_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698