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

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

Issue 2787002: Take 2 at working around a multipart crash (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: style Created 10 years, 6 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
« no previous file with comments | « webkit/glue/multipart_response_delegate_unittest.cc ('k') | no next file » | 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 "base/logging.h" 5 #include "base/logging.h"
6 #include "base/message_loop.h" 6 #include "base/message_loop.h"
7 #include "base/string_util.h" 7 #include "base/string_util.h"
8 #include "base/utf_string_conversions.h" 8 #include "base/utf_string_conversions.h"
9 #include "gfx/rect.h" 9 #include "gfx/rect.h"
10 #include "net/base/escape.h" 10 #include "net/base/escape.h"
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 } 102 }
103 103
104 // Receives individual part data from a multipart response. 104 // Receives individual part data from a multipart response.
105 virtual void didReceiveData( 105 virtual void didReceiveData(
106 WebURLLoader*, const char* data, int data_size) { 106 WebURLLoader*, const char* data, int data_size) {
107 // TODO(ananta) 107 // TODO(ananta)
108 // We should defer further loads on multipart resources on the same lines 108 // We should defer further loads on multipart resources on the same lines
109 // as regular resources requested by plugins to prevent reentrancy. 109 // as regular resources requested by plugins to prevent reentrancy.
110 resource_client_->DidReceiveData( 110 resource_client_->DidReceiveData(
111 data, data_size, byte_range_lower_bound_); 111 data, data_size, byte_range_lower_bound_);
112 byte_range_lower_bound_ += data_size;
112 } 113 }
113 114
114 virtual void didFinishLoading(WebURLLoader*) {} 115 virtual void didFinishLoading(WebURLLoader*) {}
115 virtual void didFail(WebURLLoader*, const WebURLError&) {} 116 virtual void didFail(WebURLLoader*, const WebURLError&) {}
116 117
117 void Clear() { 118 void Clear() {
118 resource_response_.reset(); 119 resource_response_.reset();
119 byte_range_lower_bound_ = 0; 120 byte_range_lower_bound_ = 0;
120 byte_range_upper_bound_ = 0; 121 byte_range_upper_bound_ = 0;
121 } 122 }
(...skipping 1109 matching lines...) Expand 10 before | Expand all | Expand 10 after
1231 WebDevToolsAgent* WebPluginImpl::GetDevToolsAgent() { 1232 WebDevToolsAgent* WebPluginImpl::GetDevToolsAgent() {
1232 if (!webframe_) 1233 if (!webframe_)
1233 return NULL; 1234 return NULL;
1234 WebView* view = webframe_->view(); 1235 WebView* view = webframe_->view();
1235 if (!view) 1236 if (!view)
1236 return NULL; 1237 return NULL;
1237 return view->devToolsAgent(); 1238 return view->devToolsAgent();
1238 } 1239 }
1239 1240
1240 } // namespace webkit_glue 1241 } // namespace webkit_glue
OLDNEW
« no previous file with comments | « webkit/glue/multipart_response_delegate_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698