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

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: Remove newline 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 5284af054ff881d22e3f58d6e3d8b95f280a7d8a..67a658025ab921d9c768a640f48c640a3411f2c9 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);
Charlie Reis 2015/05/22 20:55:51 Should we distinguish from the kill above?
ncarter (slow) 2015/05/26 22:59:04 These are really just two versions of the same tem
}
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;
}
}

Powered by Google App Engine
This is Rietveld 408576698