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

Side by Side Diff: chrome/plugin/chrome_plugin_host.cc

Issue 7276: Adding security info to canceled requests (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 10 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) 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 "chrome/plugin/chrome_plugin_host.h" 5 #include "chrome/plugin/chrome_plugin_host.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/file_util.h" 8 #include "base/file_util.h"
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "chrome/common/chrome_constants.h" 10 #include "chrome/common/chrome_constants.h"
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 // If we had an asynchronous operation pending, read into that buffer 78 // If we had an asynchronous operation pending, read into that buffer
79 // and inform the plugin. 79 // and inform the plugin.
80 int rv = Read(read_buffer_, read_buffer_size_); 80 int rv = Read(read_buffer_, read_buffer_size_);
81 DCHECK(rv != CPERR_IO_PENDING); 81 DCHECK(rv != CPERR_IO_PENDING);
82 read_buffer_ = NULL; 82 read_buffer_ = NULL;
83 plugin_->functions().response_funcs->read_completed( 83 plugin_->functions().response_funcs->read_completed(
84 cprequest_.get(), rv); 84 cprequest_.get(), rv);
85 } 85 }
86 } 86 }
87 87
88 virtual void OnCompletedRequest(const URLRequestStatus& status) { 88 virtual void OnCompletedRequest(const URLRequestStatus& status,
89 const std::string& security_info) {
89 completed_ = true; 90 completed_ = true;
90 91
91 if (!status.is_success()) { 92 if (!status.is_success()) {
92 // TODO(mpcomplete): better error codes 93 // TODO(mpcomplete): better error codes
93 // Inform the plugin, calling the right function depending on whether 94 // Inform the plugin, calling the right function depending on whether
94 // we got the start_completed event or not. 95 // we got the start_completed event or not.
95 if (response_headers_) { 96 if (response_headers_) {
96 plugin_->functions().response_funcs->start_completed( 97 plugin_->functions().response_funcs->start_completed(
97 cprequest_.get(), CPERR_FAILURE); 98 cprequest_.get(), CPERR_FAILURE);
98 } else { 99 } else {
(...skipping 509 matching lines...) Expand 10 before | Expand all | Expand 10 after
608 response_funcs.size = sizeof(response_funcs); 609 response_funcs.size = sizeof(response_funcs);
609 response_funcs.received_redirect = CPRR_ReceivedRedirect; 610 response_funcs.received_redirect = CPRR_ReceivedRedirect;
610 response_funcs.start_completed = CPRR_StartCompleted; 611 response_funcs.start_completed = CPRR_StartCompleted;
611 response_funcs.read_completed = CPRR_ReadCompleted; 612 response_funcs.read_completed = CPRR_ReadCompleted;
612 response_funcs.upload_progress = CPRR_UploadProgress; 613 response_funcs.upload_progress = CPRR_UploadProgress;
613 } 614 }
614 615
615 return &browser_funcs; 616 return &browser_funcs;
616 } 617 }
617 618
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698