| OLD | NEW |
| 1 // Copyright (c) 2010 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/plugin_download_helper.h" | 5 #include "chrome/browser/plugin_download_helper.h" |
| 6 | 6 |
| 7 #if defined(OS_WIN) | 7 #if defined(OS_WIN) |
| 8 #include <windows.h> | 8 #include <windows.h> |
| 9 | 9 |
| 10 #include "base/file_util.h" | 10 #include "base/file_util.h" |
| 11 #include "chrome/browser/net/url_request_tracking.h" | 11 #include "chrome/browser/net/url_request_tracking.h" |
| (...skipping 15 matching lines...) Expand all Loading... |
| 27 } | 27 } |
| 28 | 28 |
| 29 PluginDownloadUrlHelper::~PluginDownloadUrlHelper() { | 29 PluginDownloadUrlHelper::~PluginDownloadUrlHelper() { |
| 30 if (download_file_request_) { | 30 if (download_file_request_) { |
| 31 delete download_file_request_; | 31 delete download_file_request_; |
| 32 download_file_request_ = NULL; | 32 download_file_request_ = NULL; |
| 33 } | 33 } |
| 34 } | 34 } |
| 35 | 35 |
| 36 void PluginDownloadUrlHelper::InitiateDownload( | 36 void PluginDownloadUrlHelper::InitiateDownload( |
| 37 URLRequestContext* request_context) { | 37 net::URLRequestContext* request_context) { |
| 38 download_file_request_ = new net::URLRequest(GURL(download_url_), this); | 38 download_file_request_ = new net::URLRequest(GURL(download_url_), this); |
| 39 chrome_browser_net::SetOriginProcessUniqueIDForRequest( | 39 chrome_browser_net::SetOriginProcessUniqueIDForRequest( |
| 40 download_source_child_unique_id_, download_file_request_); | 40 download_source_child_unique_id_, download_file_request_); |
| 41 download_file_request_->set_context(request_context); | 41 download_file_request_->set_context(request_context); |
| 42 download_file_request_->Start(); | 42 download_file_request_->Start(); |
| 43 } | 43 } |
| 44 | 44 |
| 45 void PluginDownloadUrlHelper::OnAuthRequired( | 45 void PluginDownloadUrlHelper::OnAuthRequired( |
| 46 net::URLRequest* request, | 46 net::URLRequest* request, |
| 47 net::AuthChallengeInfo* auth_info) { | 47 net::AuthChallengeInfo* auth_info) { |
| (...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 181 | 181 |
| 182 // Don't access any members after this. | 182 // Don't access any members after this. |
| 183 delete this; | 183 delete this; |
| 184 } | 184 } |
| 185 | 185 |
| 186 #endif // OS_WIN | 186 #endif // OS_WIN |
| 187 | 187 |
| 188 | 188 |
| 189 | 189 |
| 190 | 190 |
| OLD | NEW |