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

Side by Side Diff: chrome/browser/download/download_item.cc

Issue 6881106: Treat ERR_CONNECTION_CLOSED as end-of-data marker for downloads. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Moved detection code to URLRequestHttpJob. Created 9 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/download/download_item.h" 5 #include "chrome/browser/download/download_item.h"
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/file_util.h" 8 #include "base/file_util.h"
9 #include "base/format_macros.h" 9 #include "base/format_macros.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 641 matching lines...) Expand 10 before | Expand all | Expand 10 after
652 std::string description = 652 std::string description =
653 base::StringPrintf("{ id_ = %d" 653 base::StringPrintf("{ id_ = %d"
654 " state = %s", 654 " state = %s",
655 id_, 655 id_,
656 DebugDownloadStateString(state())); 656 DebugDownloadStateString(state()));
657 657
658 if (verbose) { 658 if (verbose) {
659 description += base::StringPrintf( 659 description += base::StringPrintf(
660 " db_handle = %" PRId64 660 " db_handle = %" PRId64
661 " total_bytes = %" PRId64 661 " total_bytes = %" PRId64
662 " received_bytes = %" PRId64
662 " is_paused = " "%c" 663 " is_paused = " "%c"
663 " is_extension_install = " "%c" 664 " is_extension_install = " "%c"
664 " is_otr = " "%c" 665 " is_otr = " "%c"
665 " safety_state = " "%s" 666 " safety_state = " "%s"
666 " url = " "\"%s\"" 667 " url = " "\"%s\""
667 " target_name_ = \"%" PRFilePath "\"" 668 " target_name_ = \"%" PRFilePath "\""
668 " full_path = \"%" PRFilePath "\"", 669 " full_path = \"%" PRFilePath "\"",
669 db_handle(), 670 db_handle(),
670 total_bytes(), 671 total_bytes(),
672 received_bytes(),
671 is_paused() ? 'T' : 'F', 673 is_paused() ? 'T' : 'F',
672 is_extension_install() ? 'T' : 'F', 674 is_extension_install() ? 'T' : 'F',
673 is_otr() ? 'T' : 'F', 675 is_otr() ? 'T' : 'F',
674 DebugSafetyStateString(safety_state()), 676 DebugSafetyStateString(safety_state()),
675 url().spec().c_str(), 677 url().spec().c_str(),
676 target_name_.value().c_str(), 678 target_name_.value().c_str(),
677 full_path().value().c_str()); 679 full_path().value().c_str());
678 } else { 680 } else {
679 description += base::StringPrintf(" url = \"%s\"", url().spec().c_str()); 681 description += base::StringPrintf(" url = \"%s\"", url().spec().c_str());
680 } 682 }
681 683
682 description += " }"; 684 description += " }";
683 685
684 return description; 686 return description;
685 } 687 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698