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

Side by Side Diff: net/url_request/url_request.cc

Issue 136613002: Stop generating dumps in the referrer check, but log in all developer builds (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 11 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 | Annotate | Revision Log
« 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 "net/url_request/url_request.h" 5 #include "net/url_request/url_request.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/callback.h" 9 #include "base/callback.h"
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
11 #include "base/debug/dump_without_crashing.h"
12 #include "base/debug/stack_trace.h" 11 #include "base/debug/stack_trace.h"
13 #include "base/lazy_instance.h" 12 #include "base/lazy_instance.h"
14 #include "base/memory/singleton.h" 13 #include "base/memory/singleton.h"
15 #include "base/message_loop/message_loop.h" 14 #include "base/message_loop/message_loop.h"
16 #include "base/metrics/histogram.h" 15 #include "base/metrics/histogram.h"
17 #include "base/metrics/stats_counters.h" 16 #include "base/metrics/stats_counters.h"
18 #include "base/stl_util.h" 17 #include "base/stl_util.h"
19 #include "base/strings/utf_string_conversions.h" 18 #include "base/strings/utf_string_conversions.h"
20 #include "base/synchronization/lock.h" 19 #include "base/synchronization/lock.h"
21 #include "base/values.h" 20 #include "base/values.h"
(...skipping 674 matching lines...) Expand 10 before | Expand all | Expand 10 after
696 is_redirecting_ = false; 695 is_redirecting_ = false;
697 696
698 response_info_.was_cached = false; 697 response_info_.was_cached = false;
699 698
700 // If the referrer is secure, but the requested URL is not, the referrer 699 // If the referrer is secure, but the requested URL is not, the referrer
701 // policy should be something non-default. If you hit this, please file a 700 // policy should be something non-default. If you hit this, please file a
702 // bug. 701 // bug.
703 if (referrer_policy_ == 702 if (referrer_policy_ ==
704 CLEAR_REFERRER_ON_TRANSITION_FROM_SECURE_TO_INSECURE && 703 CLEAR_REFERRER_ON_TRANSITION_FROM_SECURE_TO_INSECURE &&
705 GURL(referrer_).SchemeIsSecure() && !url().SchemeIsSecure()) { 704 GURL(referrer_).SchemeIsSecure() && !url().SchemeIsSecure()) {
706 DLOG(FATAL) << "Trying to send secure referrer for insecure load"; 705 #if !defined(OFFICIAL_BUILD)
707 base::debug::DumpWithoutCrashing(); 706 LOG(FATAL) << "Trying to send secure referrer for insecure load";
707 #endif
708 referrer_.clear(); 708 referrer_.clear();
709 } 709 }
710 710
711 // Don't allow errors to be sent from within Start(). 711 // Don't allow errors to be sent from within Start().
712 // TODO(brettw) this may cause NotifyDone to be sent synchronously, 712 // TODO(brettw) this may cause NotifyDone to be sent synchronously,
713 // we probably don't want this: they should be sent asynchronously so 713 // we probably don't want this: they should be sent asynchronously so
714 // the caller does not get reentered. 714 // the caller does not get reentered.
715 job_->Start(); 715 job_->Start();
716 } 716 }
717 717
(...skipping 515 matching lines...) Expand 10 before | Expand all | Expand 10 after
1233 new base::debug::StackTrace(NULL, 0); 1233 new base::debug::StackTrace(NULL, 0);
1234 *stack_trace_copy = stack_trace; 1234 *stack_trace_copy = stack_trace;
1235 stack_trace_.reset(stack_trace_copy); 1235 stack_trace_.reset(stack_trace_copy);
1236 } 1236 }
1237 1237
1238 const base::debug::StackTrace* URLRequest::stack_trace() const { 1238 const base::debug::StackTrace* URLRequest::stack_trace() const {
1239 return stack_trace_.get(); 1239 return stack_trace_.get();
1240 } 1240 }
1241 1241
1242 } // namespace net 1242 } // namespace net
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