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

Side by Side Diff: content/browser/download/download_resource_handler.cc

Issue 1463013003: Unexpose ResourceRequestInfo::GetRequestID. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: CONTENT_EXPORT Created 5 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
« no previous file with comments | « no previous file | content/browser/loader/resource_dispatcher_host_impl.cc » ('j') | 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 "content/browser/download/download_resource_handler.h" 5 #include "content/browser/download/download_resource_handler.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/location.h" 10 #include "base/location.h"
(...skipping 481 matching lines...) Expand 10 before | Expand all | Expand 10 after
492 total_pause_time_ += (base::TimeTicks::Now() - last_stream_pause_time_); 492 total_pause_time_ += (base::TimeTicks::Now() - last_stream_pause_time_);
493 last_stream_pause_time_ = base::TimeTicks(); 493 last_stream_pause_time_ = base::TimeTicks();
494 } 494 }
495 495
496 controller()->Resume(); 496 controller()->Resume();
497 } 497 }
498 498
499 void DownloadResourceHandler::CancelRequest() { 499 void DownloadResourceHandler::CancelRequest() {
500 DCHECK_CURRENTLY_ON(BrowserThread::IO); 500 DCHECK_CURRENTLY_ON(BrowserThread::IO);
501 501
502 const ResourceRequestInfo* info = GetRequestInfo(); 502 const ResourceRequestInfoImpl* info = GetRequestInfo();
503 ResourceDispatcherHostImpl::Get()->CancelRequest( 503 ResourceDispatcherHostImpl::Get()->CancelRequest(
504 info->GetChildID(), 504 info->GetChildID(),
505 info->GetRequestID()); 505 info->GetRequestID());
506 // This object has been deleted. 506 // This object has been deleted.
507 } 507 }
508 508
509 std::string DownloadResourceHandler::DebugString() const { 509 std::string DownloadResourceHandler::DebugString() const {
510 const ResourceRequestInfo* info = GetRequestInfo(); 510 const ResourceRequestInfoImpl* info = GetRequestInfo();
511 return base::StringPrintf("{" 511 return base::StringPrintf("{"
512 " url_ = " "\"%s\"" 512 " url_ = " "\"%s\""
513 " info = {" 513 " info = {"
514 " child_id = " "%d" 514 " child_id = " "%d"
515 " request_id = " "%d" 515 " request_id = " "%d"
516 " route_id = " "%d" 516 " route_id = " "%d"
517 " }" 517 " }"
518 " }", 518 " }",
519 request() ? 519 request() ?
520 request()->url().spec().c_str() : 520 request()->url().spec().c_str() :
(...skipping 21 matching lines...) Expand all
542 BrowserThread::PostTask( 542 BrowserThread::PostTask(
543 BrowserThread::UI, FROM_HERE, 543 BrowserThread::UI, FROM_HERE,
544 base::Bind(&DeleteOnUIThread, base::Passed(&tab_info_))); 544 base::Bind(&DeleteOnUIThread, base::Passed(&tab_info_)));
545 } 545 }
546 546
547 UMA_HISTOGRAM_TIMES("SB2.DownloadDuration", 547 UMA_HISTOGRAM_TIMES("SB2.DownloadDuration",
548 base::TimeTicks::Now() - download_start_time_); 548 base::TimeTicks::Now() - download_start_time_);
549 } 549 }
550 550
551 } // namespace content 551 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/browser/loader/resource_dispatcher_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698