| OLD | NEW |
| 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/save_package.h" | 5 #include "content/browser/download/save_package.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 124 : save_package_(save_package) {} | 124 : save_package_(save_package) {} |
| 125 | 125 |
| 126 // DownloadRequestHandleInterface | 126 // DownloadRequestHandleInterface |
| 127 WebContents* GetWebContents() const override { | 127 WebContents* GetWebContents() const override { |
| 128 return save_package_.get() ? save_package_->web_contents() : NULL; | 128 return save_package_.get() ? save_package_->web_contents() : NULL; |
| 129 } | 129 } |
| 130 DownloadManager* GetDownloadManager() const override { return NULL; } | 130 DownloadManager* GetDownloadManager() const override { return NULL; } |
| 131 void PauseRequest() const override {} | 131 void PauseRequest() const override {} |
| 132 void ResumeRequest() const override {} | 132 void ResumeRequest() const override {} |
| 133 void CancelRequest() const override {} | 133 void CancelRequest() const override {} |
| 134 std::string DebugString() const override { | |
| 135 return "SavePackage DownloadRequestHandle"; | |
| 136 } | |
| 137 | 134 |
| 138 private: | 135 private: |
| 139 base::WeakPtr<SavePackage> save_package_; | 136 base::WeakPtr<SavePackage> save_package_; |
| 140 }; | 137 }; |
| 141 | 138 |
| 142 } // namespace | 139 } // namespace |
| 143 | 140 |
| 144 const base::FilePath::CharType SavePackage::kDefaultHtmlExtension[] = | 141 const base::FilePath::CharType SavePackage::kDefaultHtmlExtension[] = |
| 145 FILE_PATH_LITERAL("html"); | 142 FILE_PATH_LITERAL("html"); |
| 146 | 143 |
| (...skipping 1368 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1515 | 1512 |
| 1516 void SavePackage::FinalizeDownloadEntry() { | 1513 void SavePackage::FinalizeDownloadEntry() { |
| 1517 DCHECK(download_); | 1514 DCHECK(download_); |
| 1518 DCHECK(download_manager_); | 1515 DCHECK(download_manager_); |
| 1519 | 1516 |
| 1520 download_manager_->OnSavePackageSuccessfullyFinished(download_); | 1517 download_manager_->OnSavePackageSuccessfullyFinished(download_); |
| 1521 StopObservation(); | 1518 StopObservation(); |
| 1522 } | 1519 } |
| 1523 | 1520 |
| 1524 } // namespace content | 1521 } // namespace content |
| OLD | NEW |