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

Side by Side Diff: webkit/glue/plugins/plugin_string_stream.cc

Issue 14122: Handle HTTP 200 responses received in response to byte range requests issued... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 12 years 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
« no previous file with comments | « webkit/glue/plugins/plugin_stream_url.cc ('k') | webkit/glue/webframeloaderclient_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "webkit/glue/plugins/plugin_string_stream.h" 5 #include "webkit/glue/plugins/plugin_string_stream.h"
6 6
7 namespace NPAPI { 7 namespace NPAPI {
8 8
9 PluginStringStream::PluginStringStream( 9 PluginStringStream::PluginStringStream(
10 PluginInstance *instance, 10 PluginInstance *instance,
11 const std::string &url, 11 const std::string &url,
12 bool notify_needed, 12 bool notify_needed,
13 void *notify_data) 13 void *notify_data)
14 : PluginStream(instance, url.c_str(), notify_needed, notify_data) { 14 : PluginStream(instance, url.c_str(), notify_needed, notify_data) {
15 } 15 }
16 16
17 PluginStringStream::~PluginStringStream() { 17 PluginStringStream::~PluginStringStream() {
18 } 18 }
19 19
20 void PluginStringStream::SendToPlugin(const std::string &data, 20 void PluginStringStream::SendToPlugin(const std::string &data,
21 const std::string &mime_type) { 21 const std::string &mime_type) {
22 int length = static_cast<int>(data.length()); 22 int length = static_cast<int>(data.length());
23 if (Open(mime_type, std::string(), length, 0)) { 23 if (Open(mime_type, std::string(), length, 0, false)) {
24 // TODO - check if it was not fully sent, and figure out a backup plan. 24 // TODO - check if it was not fully sent, and figure out a backup plan.
25 int written = Write(data.c_str(), length, 0); 25 int written = Write(data.c_str(), length, 0);
26 NPReason reason = written == length ? NPRES_DONE : NPRES_NETWORK_ERR; 26 NPReason reason = written == length ? NPRES_DONE : NPRES_NETWORK_ERR;
27 Close(reason); 27 Close(reason);
28 } 28 }
29 } 29 }
30 30
31 } 31 }
32 32
OLDNEW
« no previous file with comments | « webkit/glue/plugins/plugin_stream_url.cc ('k') | webkit/glue/webframeloaderclient_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698