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

Side by Side Diff: ppapi/proxy/ppb_url_loader_proxy.cc

Issue 9391013: Make a global enum to differentiate impl & proxy. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "ppapi/proxy/ppb_url_loader_proxy.h" 5 #include "ppapi/proxy/ppb_url_loader_proxy.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <deque> 8 #include <deque>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 150
151 // Cached copy of the response info. When nonzero, we're holding a reference 151 // Cached copy of the response info. When nonzero, we're holding a reference
152 // to this resource. 152 // to this resource.
153 PP_Resource response_info_; 153 PP_Resource response_info_;
154 154
155 private: 155 private:
156 DISALLOW_COPY_AND_ASSIGN(URLLoader); 156 DISALLOW_COPY_AND_ASSIGN(URLLoader);
157 }; 157 };
158 158
159 URLLoader::URLLoader(const HostResource& resource) 159 URLLoader::URLLoader(const HostResource& resource)
160 : Resource(resource), 160 : Resource(OBJECT_IS_PROXY, resource),
161 bytes_sent_(-1), 161 bytes_sent_(-1),
162 total_bytes_to_be_sent_(-1), 162 total_bytes_to_be_sent_(-1),
163 bytes_received_(-1), 163 bytes_received_(-1),
164 total_bytes_to_be_received_(-1), 164 total_bytes_to_be_received_(-1),
165 current_read_buffer_(NULL), 165 current_read_buffer_(NULL),
166 current_read_buffer_size_(0), 166 current_read_buffer_size_(0),
167 response_info_(0) { 167 response_info_(0) {
168 } 168 }
169 169
170 URLLoader::~URLLoader() { 170 URLLoader::~URLLoader() {
(...skipping 424 matching lines...) Expand 10 before | Expand all | Expand 10 after
595 } 595 }
596 596
597 void PPB_URLLoader_Proxy::OnCallback(int32_t result, 597 void PPB_URLLoader_Proxy::OnCallback(int32_t result,
598 const HostResource& resource) { 598 const HostResource& resource) {
599 dispatcher()->Send(new PpapiMsg_PPBURLLoader_CallbackComplete( 599 dispatcher()->Send(new PpapiMsg_PPBURLLoader_CallbackComplete(
600 API_ID_PPB_URL_LOADER, resource, result)); 600 API_ID_PPB_URL_LOADER, resource, result));
601 } 601 }
602 602
603 } // namespace proxy 603 } // namespace proxy
604 } // namespace ppapi 604 } // namespace ppapi
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698