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

Side by Side Diff: chrome/browser/net/connection_tester.cc

Issue 7846007: net: Rename URLRequestStatus::os_error_. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix os_error_code Created 9 years, 3 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "chrome/browser/net/connection_tester.h" 5 #include "chrome/browser/net/connection_tester.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/message_loop.h" 10 #include "base/message_loop.h"
(...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after
321 } else if (!request->status().is_io_pending()) { 321 } else if (!request->status().is_io_pending()) {
322 // Read failed synchronously. 322 // Read failed synchronously.
323 OnResponseCompleted(request); 323 OnResponseCompleted(request);
324 } 324 }
325 } 325 }
326 326
327 void ConnectionTester::TestRunner::OnResponseCompleted( 327 void ConnectionTester::TestRunner::OnResponseCompleted(
328 net::URLRequest* request) { 328 net::URLRequest* request) {
329 int result = net::OK; 329 int result = net::OK;
330 if (!request->status().is_success()) { 330 if (!request->status().is_success()) {
331 DCHECK_NE(net::ERR_IO_PENDING, request->status().os_error()); 331 DCHECK_NE(net::ERR_IO_PENDING, request->status().error());
332 result = request->status().os_error(); 332 result = request->status().error();
333 } 333 }
334 334
335 // Post a task to notify the parent rather than handling it right away, 335 // Post a task to notify the parent rather than handling it right away,
336 // to avoid re-entrancy problems with URLRequest. (Don't want the caller 336 // to avoid re-entrancy problems with URLRequest. (Don't want the caller
337 // to end up deleting the URLRequest while in the middle of processing). 337 // to end up deleting the URLRequest while in the middle of processing).
338 MessageLoop::current()->PostTask( 338 MessageLoop::current()->PostTask(
339 FROM_HERE, 339 FROM_HERE,
340 method_factory_.NewRunnableMethod( 340 method_factory_.NewRunnableMethod(
341 &TestRunner::OnExperimentCompletedWithResult, result)); 341 &TestRunner::OnExperimentCompletedWithResult, result));
342 } 342 }
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
460 460
461 // Notify the delegate of completion. 461 // Notify the delegate of completion.
462 delegate_->OnCompletedConnectionTestExperiment(current, result); 462 delegate_->OnCompletedConnectionTestExperiment(current, result);
463 463
464 if (remaining_experiments_.empty()) { 464 if (remaining_experiments_.empty()) {
465 delegate_->OnCompletedConnectionTestSuite(); 465 delegate_->OnCompletedConnectionTestSuite();
466 } else { 466 } else {
467 StartNextExperiment(); 467 StartNextExperiment();
468 } 468 }
469 } 469 }
OLDNEW
« no previous file with comments | « chrome/browser/net/chrome_network_delegate.cc ('k') | chrome/browser/net/gaia/gaia_oauth_fetcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698