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

Side by Side Diff: native_client_sdk/src/tests/nacl_io_test/fake_pepper_interface_url_loader.cc

Issue 98713004: NaCl: Update revision in DEPS, r12488 -> r12497 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix out-of-bounds std::map access in nacl_io testing, and correspondingly broken test. All used pa… Created 7 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 | « DEPS ('k') | native_client_sdk/src/tests/nacl_io_test/mount_http_test.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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 "fake_pepper_interface_url_loader.h" 5 #include "fake_pepper_interface_url_loader.h"
6 6
7 #include <string.h> 7 #include <string.h>
8 #include <strings.h> 8 #include <strings.h>
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
224 224
225 FakeURLLoaderEntity* FakeURLLoaderServer::GetEntity(const std::string& url) { 225 FakeURLLoaderEntity* FakeURLLoaderServer::GetEntity(const std::string& url) {
226 EntityMap::iterator iter = entity_map_.find(url); 226 EntityMap::iterator iter = entity_map_.find(url);
227 if (iter == entity_map_.end()) 227 if (iter == entity_map_.end())
228 return NULL; 228 return NULL;
229 return &iter->second; 229 return &iter->second;
230 } 230 }
231 231
232 int FakeURLLoaderServer::GetError(const std::string& url) { 232 int FakeURLLoaderServer::GetError(const std::string& url) {
233 ErrorMap::iterator iter = error_map_.find(url); 233 ErrorMap::iterator iter = error_map_.find(url);
234 if (iter != error_map_.end()) 234 if (iter == error_map_.end())
235 return 0; 235 return 0;
236 return iter->second; 236 return iter->second;
237 } 237 }
238 238
239 FakeURLLoaderInterface::FakeURLLoaderInterface( 239 FakeURLLoaderInterface::FakeURLLoaderInterface(
240 FakeCoreInterface* core_interface) 240 FakeCoreInterface* core_interface)
241 : core_interface_(core_interface) {} 241 : core_interface_(core_interface) {}
242 242
243 PP_Resource FakeURLLoaderInterface::Create(PP_Instance instance) { 243 PP_Resource FakeURLLoaderInterface::Create(PP_Instance instance) {
244 FakeInstanceResource* instance_resource = 244 FakeInstanceResource* instance_resource =
(...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after
526 526
527 nacl_io::URLRequestInfoInterface* 527 nacl_io::URLRequestInfoInterface*
528 FakePepperInterfaceURLLoader::GetURLRequestInfoInterface() { 528 FakePepperInterfaceURLLoader::GetURLRequestInfoInterface() {
529 return &url_request_info_interface_; 529 return &url_request_info_interface_;
530 } 530 }
531 531
532 nacl_io::URLResponseInfoInterface* 532 nacl_io::URLResponseInfoInterface*
533 FakePepperInterfaceURLLoader::GetURLResponseInfoInterface() { 533 FakePepperInterfaceURLLoader::GetURLResponseInfoInterface() {
534 return &url_response_info_interface_; 534 return &url_response_info_interface_;
535 } 535 }
OLDNEW
« no previous file with comments | « DEPS ('k') | native_client_sdk/src/tests/nacl_io_test/mount_http_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698