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

Side by Side Diff: chrome/browser/plugin_process_host.cc

Issue 171099: Merge r21417 to 172.... (Closed) Base URL: svn://chrome-svn.corp.google.com/chrome/branches/172/src/
Patch Set: '' Created 11 years, 4 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
Property Changes:
Modified: svn:mergeinfo
Merged /trunk/src/chrome/browser/plugin_process_host.cc:r14162,14665,15308,15810,15899,15950,16015,16808,18093,18210,18321,18640,18871,19044,19692,19978,19995,21417,22284
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 "build/build_config.h" 5 #include "build/build_config.h"
6 6
7 #include "chrome/browser/plugin_process_host.h" 7 #include "chrome/browser/plugin_process_host.h"
8 8
9 #if defined(OS_WIN) 9 #if defined(OS_WIN)
10 #include <windows.h> 10 #include <windows.h>
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 class PluginDownloadUrlHelper : public URLRequest::Delegate { 61 class PluginDownloadUrlHelper : public URLRequest::Delegate {
62 static const int kDownloadFileBufferSize = 32768; 62 static const int kDownloadFileBufferSize = 32768;
63 public: 63 public:
64 PluginDownloadUrlHelper(const std::string& download_url, 64 PluginDownloadUrlHelper(const std::string& download_url,
65 int source_pid, gfx::NativeWindow caller_window); 65 int source_pid, gfx::NativeWindow caller_window);
66 ~PluginDownloadUrlHelper(); 66 ~PluginDownloadUrlHelper();
67 67
68 void InitiateDownload(); 68 void InitiateDownload();
69 69
70 // URLRequest::Delegate 70 // URLRequest::Delegate
71 virtual void OnReceivedRedirect(URLRequest* request,
72 const GURL& new_url);
73 virtual void OnAuthRequired(URLRequest* request, 71 virtual void OnAuthRequired(URLRequest* request,
74 net::AuthChallengeInfo* auth_info); 72 net::AuthChallengeInfo* auth_info);
75 virtual void OnSSLCertificateError(URLRequest* request, 73 virtual void OnSSLCertificateError(URLRequest* request,
76 int cert_error, 74 int cert_error,
77 net::X509Certificate* cert); 75 net::X509Certificate* cert);
78 virtual void OnResponseStarted(URLRequest* request); 76 virtual void OnResponseStarted(URLRequest* request);
79 virtual void OnReadCompleted(URLRequest* request, int bytes_read); 77 virtual void OnReadCompleted(URLRequest* request, int bytes_read);
80 78
81 void OnDownloadCompleted(URLRequest* request); 79 void OnDownloadCompleted(URLRequest* request);
82 80
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 } 120 }
123 } 121 }
124 122
125 void PluginDownloadUrlHelper::InitiateDownload() { 123 void PluginDownloadUrlHelper::InitiateDownload() {
126 download_file_request_= new URLRequest(GURL(download_url_), this); 124 download_file_request_= new URLRequest(GURL(download_url_), this);
127 download_file_request_->set_origin_pid(download_source_pid_); 125 download_file_request_->set_origin_pid(download_source_pid_);
128 download_file_request_->set_context(Profile::GetDefaultRequestContext()); 126 download_file_request_->set_context(Profile::GetDefaultRequestContext());
129 download_file_request_->Start(); 127 download_file_request_->Start();
130 } 128 }
131 129
132 void PluginDownloadUrlHelper::OnReceivedRedirect(URLRequest* request,
133 const GURL& new_url) {
134 }
135
136 void PluginDownloadUrlHelper::OnAuthRequired( 130 void PluginDownloadUrlHelper::OnAuthRequired(
137 URLRequest* request, 131 URLRequest* request,
138 net::AuthChallengeInfo* auth_info) { 132 net::AuthChallengeInfo* auth_info) {
139 URLRequest::Delegate::OnAuthRequired(request, auth_info); 133 URLRequest::Delegate::OnAuthRequired(request, auth_info);
140 DownloadCompletedHelper(false); 134 DownloadCompletedHelper(false);
141 } 135 }
142 136
143 void PluginDownloadUrlHelper::OnSSLCertificateError( 137 void PluginDownloadUrlHelper::OnSSLCertificateError(
144 URLRequest* request, 138 URLRequest* request,
145 int cert_error, 139 int cert_error,
(...skipping 418 matching lines...) Expand 10 before | Expand all | Expand 10 after
564 DCHECK(MessageLoop::current() == 558 DCHECK(MessageLoop::current() ==
565 ChromeThread::GetMessageLoop(ChromeThread::IO)); 559 ChromeThread::GetMessageLoop(ChromeThread::IO));
566 560
567 ChromePluginLib *chrome_plugin = ChromePluginLib::Find(info_.path); 561 ChromePluginLib *chrome_plugin = ChromePluginLib::Find(info_.path);
568 if (chrome_plugin) { 562 if (chrome_plugin) {
569 void *data_ptr = const_cast<void*>(reinterpret_cast<const void*>(&data[0])); 563 void *data_ptr = const_cast<void*>(reinterpret_cast<const void*>(&data[0]));
570 uint32 data_len = static_cast<uint32>(data.size()); 564 uint32 data_len = static_cast<uint32>(data.size());
571 chrome_plugin->functions().on_message(data_ptr, data_len); 565 chrome_plugin->functions().on_message(data_ptr, data_len);
572 } 566 }
573 } 567 }
OLDNEW
« no previous file with comments | « chrome/browser/net/url_fetcher.cc ('k') | chrome/browser/renderer_host/resource_dispatcher_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698