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

Side by Side Diff: net/url_request/url_request_unittest.h

Issue 153001: Fix 15 coverity complaints.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 5 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
« no previous file with comments | « net/tools/dump_cache/upgrade.cc ('k') | net/url_request/url_request_unittest.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 #ifndef NET_URL_REQUEST_URL_REQUEST_UNITTEST_H_ 5 #ifndef NET_URL_REQUEST_URL_REQUEST_UNITTEST_H_
6 #define NET_URL_REQUEST_URL_REQUEST_UNITTEST_H_ 6 #define NET_URL_REQUEST_URL_REQUEST_UNITTEST_H_
7 7
8 #include <stdlib.h> 8 #include <stdlib.h>
9 9
10 #include <sstream> 10 #include <sstream>
(...skipping 459 matching lines...) Expand 10 before | Expand all | Expand 10 after
470 net::TestServerLauncher::kOKHTTPSPort, 470 net::TestServerLauncher::kOKHTTPSPort,
471 docroot, certpath, std::wstring())) { 471 docroot, certpath, std::wstring())) {
472 return NULL; 472 return NULL;
473 } 473 }
474 return test_server; 474 return test_server;
475 } 475 }
476 476
477 // Create a server with an expired certificate 477 // Create a server with an expired certificate
478 static scoped_refptr<HTTPSTestServer> CreateExpiredServer( 478 static scoped_refptr<HTTPSTestServer> CreateExpiredServer(
479 const std::wstring& document_root) { 479 const std::wstring& document_root) {
480 HTTPSTestServer* test_server = new HTTPSTestServer(); 480 scoped_refptr<HTTPSTestServer> test_server = new HTTPSTestServer();
481 FilePath docroot = FilePath::FromWStringHack(document_root); 481 FilePath docroot = FilePath::FromWStringHack(document_root);
482 FilePath certpath = test_server->launcher_.GetExpiredCertPath(); 482 FilePath certpath = test_server->launcher_.GetExpiredCertPath();
483 if (!test_server->Start(net::TestServerLauncher::ProtoHTTP, 483 if (!test_server->Start(net::TestServerLauncher::ProtoHTTP,
484 net::TestServerLauncher::kHostName, 484 net::TestServerLauncher::kHostName,
485 net::TestServerLauncher::kBadHTTPSPort, 485 net::TestServerLauncher::kBadHTTPSPort,
486 docroot, certpath, std::wstring())) { 486 docroot, certpath, std::wstring())) {
487 return NULL; 487 return NULL;
488 } 488 }
489 return test_server; 489 return test_server;
490 } 490 }
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
549 549
550 MessageLoop::current()->Run(); 550 MessageLoop::current()->Run();
551 if (request.is_pending()) 551 if (request.is_pending())
552 return false; 552 return false;
553 553
554 return true; 554 return true;
555 } 555 }
556 }; 556 };
557 557
558 #endif // NET_URL_REQUEST_URL_REQUEST_UNITTEST_H_ 558 #endif // NET_URL_REQUEST_URL_REQUEST_UNITTEST_H_
OLDNEW
« no previous file with comments | « net/tools/dump_cache/upgrade.cc ('k') | net/url_request/url_request_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698