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

Side by Side Diff: chrome/browser/net/chrome_network_delegate.cc

Issue 655533002: Create a dump when an invalid referrer in the network stack is encountered. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/net/chrome_network_delegate.h" 5 #include "chrome/browser/net/chrome_network_delegate.h"
6 6
7 #include <stdlib.h> 7 #include <stdlib.h>
8 8
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/base_paths.h" 11 #include "base/base_paths.h"
12 #include "base/debug/dump_without_crashing.h"
12 #include "base/debug/trace_event.h" 13 #include "base/debug/trace_event.h"
13 #include "base/logging.h" 14 #include "base/logging.h"
14 #include "base/metrics/histogram.h" 15 #include "base/metrics/histogram.h"
15 #include "base/metrics/user_metrics.h" 16 #include "base/metrics/user_metrics.h"
16 #include "base/path_service.h" 17 #include "base/path_service.h"
17 #include "base/prefs/pref_member.h" 18 #include "base/prefs/pref_member.h"
18 #include "base/prefs/pref_service.h" 19 #include "base/prefs/pref_service.h"
19 #include "base/strings/string_number_conversions.h" 20 #include "base/strings/string_number_conversions.h"
20 #include "base/time/time.h" 21 #include "base/time/time.h"
21 #include "chrome/browser/browser_process.h" 22 #include "chrome/browser/browser_process.h"
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
224 base::TimeDelta request_lag = request_start - 225 base::TimeDelta request_lag = request_start -
225 g_browser_process->io_thread()->creation_time(); 226 g_browser_process->io_thread()->creation_time();
226 UMA_HISTOGRAM_TIMES("Net.IOThreadCreationToHTTPRequestStart", request_lag); 227 UMA_HISTOGRAM_TIMES("Net.IOThreadCreationToHTTPRequestStart", request_lag);
227 } 228 }
228 #endif // defined(OS_ANDROID) 229 #endif // defined(OS_ANDROID)
229 230
230 void ReportInvalidReferrerSend(const GURL& target_url, 231 void ReportInvalidReferrerSend(const GURL& target_url,
231 const GURL& referrer_url) { 232 const GURL& referrer_url) {
232 base::RecordAction( 233 base::RecordAction(
233 base::UserMetricsAction("Net.URLRequest_StartJob_InvalidReferrer")); 234 base::UserMetricsAction("Net.URLRequest_StartJob_InvalidReferrer"));
235 base::debug::DumpWithoutCrashing();
236 NOTREACHED();
234 } 237 }
235 238
236 } // namespace 239 } // namespace
237 240
238 ChromeNetworkDelegate::ChromeNetworkDelegate( 241 ChromeNetworkDelegate::ChromeNetworkDelegate(
239 extensions::EventRouterForwarder* event_router, 242 extensions::EventRouterForwarder* event_router,
240 BooleanPrefMember* enable_referrers) 243 BooleanPrefMember* enable_referrers)
241 : profile_(NULL), 244 : profile_(NULL),
242 enable_referrers_(enable_referrers), 245 enable_referrers_(enable_referrers),
243 enable_do_not_track_(NULL), 246 enable_do_not_track_(NULL),
(...skipping 591 matching lines...) Expand 10 before | Expand all | Expand 10 after
835 if (data_reduction_proxy_statistics_prefs_) { 838 if (data_reduction_proxy_statistics_prefs_) {
836 StoreAccumulatedContentLength(received_content_length, 839 StoreAccumulatedContentLength(received_content_length,
837 original_content_length, 840 original_content_length,
838 request_type, 841 request_type,
839 reinterpret_cast<Profile*>(profile_), 842 reinterpret_cast<Profile*>(profile_),
840 data_reduction_proxy_statistics_prefs_); 843 data_reduction_proxy_statistics_prefs_);
841 } 844 }
842 received_content_length_ += received_content_length; 845 received_content_length_ += received_content_length;
843 original_content_length_ += original_content_length; 846 original_content_length_ += original_content_length;
844 } 847 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698