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

Side by Side Diff: content/browser/loader/resource_loader.cc

Issue 2561963002: base: Remove the string logging from CHECK(). (Closed)
Patch Set: checkstring: rebase Created 4 years 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
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 "content/browser/loader/resource_loader.h" 5 #include "content/browser/loader/resource_loader.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/callback_helpers.h" 9 #include "base/callback_helpers.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
191 } 191 }
192 192
193 void ResourceLoader::CancelWithError(int error_code) { 193 void ResourceLoader::CancelWithError(int error_code) {
194 TRACE_EVENT_WITH_FLOW0("loading", "ResourceLoader::CancelWithError", this, 194 TRACE_EVENT_WITH_FLOW0("loading", "ResourceLoader::CancelWithError", this,
195 TRACE_EVENT_FLAG_FLOW_IN); 195 TRACE_EVENT_FLAG_FLOW_IN);
196 CancelRequestInternal(error_code, false); 196 CancelRequestInternal(error_code, false);
197 } 197 }
198 198
199 void ResourceLoader::MarkAsTransferring( 199 void ResourceLoader::MarkAsTransferring(
200 const base::Closure& on_transfer_complete_callback) { 200 const base::Closure& on_transfer_complete_callback) {
201 CHECK(IsResourceTypeFrame(GetRequestInfo()->GetResourceType())) 201 // Can only transfer for navigations
202 << "Can only transfer for navigations"; 202 CHECK(IsResourceTypeFrame(GetRequestInfo()->GetResourceType()));
203 is_transferring_ = true; 203 is_transferring_ = true;
204 on_transfer_complete_callback_ = on_transfer_complete_callback; 204 on_transfer_complete_callback_ = on_transfer_complete_callback;
205 205
206 int child_id = GetRequestInfo()->GetChildID(); 206 int child_id = GetRequestInfo()->GetChildID();
207 AppCacheInterceptor::PrepareForCrossSiteTransfer(request(), child_id); 207 AppCacheInterceptor::PrepareForCrossSiteTransfer(request(), child_id);
208 ServiceWorkerRequestHandler* handler = 208 ServiceWorkerRequestHandler* handler =
209 ServiceWorkerRequestHandler::GetHandler(request()); 209 ServiceWorkerRequestHandler::GetHandler(request());
210 if (handler) 210 if (handler)
211 handler->PrepareForCrossSiteTransfer(child_id); 211 handler->PrepareForCrossSiteTransfer(child_id);
212 } 212 }
(...skipping 514 matching lines...) Expand 10 before | Expand all | Expand 10 after
727 UMA_HISTOGRAM_ENUMERATION("Net.Prefetch.Pattern", prefetch_status, 727 UMA_HISTOGRAM_ENUMERATION("Net.Prefetch.Pattern", prefetch_status,
728 STATUS_MAX); 728 STATUS_MAX);
729 } 729 }
730 } else if (request_->response_info().unused_since_prefetch) { 730 } else if (request_->response_info().unused_since_prefetch) {
731 TimeDelta total_time = base::TimeTicks::Now() - request_->creation_time(); 731 TimeDelta total_time = base::TimeTicks::Now() - request_->creation_time();
732 UMA_HISTOGRAM_TIMES("Net.Prefetch.TimeSpentOnPrefetchHit", total_time); 732 UMA_HISTOGRAM_TIMES("Net.Prefetch.TimeSpentOnPrefetchHit", total_time);
733 } 733 }
734 } 734 }
735 735
736 } // namespace content 736 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698