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

Unified Diff: content/browser/loader/resource_dispatcher_host_impl.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
« no previous file with comments | « content/browser/indexed_db/indexed_db_dispatcher_host.cc ('k') | content/browser/media/midi_host.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/loader/resource_dispatcher_host_impl.cc
diff --git a/content/browser/loader/resource_dispatcher_host_impl.cc b/content/browser/loader/resource_dispatcher_host_impl.cc
index ade6e5d1648e01c3304f968789c526f469e63511..c49cb3c6deceb5973737411f63c89794173a60fb 100644
--- a/content/browser/loader/resource_dispatcher_host_impl.cc
+++ b/content/browser/loader/resource_dispatcher_host_impl.cc
@@ -27,6 +27,7 @@
#include "base/time/time.h"
#include "content/browser/appcache/appcache_interceptor.h"
#include "content/browser/appcache/chrome_appcache_service.h"
+#include "content/browser/bad_message.h"
#include "content/browser/cert_store_impl.h"
#include "content/browser/child_process_security_policy_impl.h"
#include "content/browser/download/download_resource_handler.h"
@@ -1133,8 +1134,7 @@ void ResourceDispatcherHostImpl::BeginRequest(
// Reject invalid priority.
if (request_data.priority < net::MINIMUM_PRIORITY ||
request_data.priority > net::MAXIMUM_PRIORITY) {
- RecordAction(base::UserMetricsAction("BadMessageTerminate_RDH"));
- filter_->BadMessageReceived();
+ bad_message::ReceivedBadMessage(filter_, bad_message::RDH_INVALID_PRIORITY);
return;
}
@@ -1159,8 +1159,8 @@ void ResourceDispatcherHostImpl::BeginRequest(
deferred_loader->CompleteTransfer();
} else {
- RecordAction(base::UserMetricsAction("BadMessageTerminate_RDH"));
- filter_->BadMessageReceived();
+ bad_message::ReceivedBadMessage(
+ filter_, bad_message::RDH_REQUEST_NOT_TRANSFERRING);
}
return;
}
@@ -1354,8 +1354,7 @@ scoped_ptr<ResourceHandler> ResourceDispatcherHostImpl::CreateResourceHandler(
if (sync_result) {
// download_to_file is not supported for synchronous requests.
if (request_data.download_to_file) {
- RecordAction(base::UserMetricsAction("BadMessageTerminate_RDH"));
- filter_->BadMessageReceived();
+ bad_message::ReceivedBadMessage(filter_, bad_message::RDH_BAD_DOWNLOAD);
return scoped_ptr<ResourceHandler>();
}
« no previous file with comments | « content/browser/indexed_db/indexed_db_dispatcher_host.cc ('k') | content/browser/media/midi_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698