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

Side by Side Diff: content/test/net/url_request_abort_on_end_job.cc

Issue 11275088: Remove implicit scoped_refptr operator T* Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 8 years, 1 month 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
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 // This class simulates what wininet does when a dns lookup fails. 4 // This class simulates what wininet does when a dns lookup fails.
5 5
6 #include <algorithm> 6 #include <algorithm>
7 #include <cstring> 7 #include <cstring>
8 8
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/string_util.h" 10 #include "base/string_util.h"
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 URLRequestAbortOnEndJob::~URLRequestAbortOnEndJob() { 69 URLRequestAbortOnEndJob::~URLRequestAbortOnEndJob() {
70 } 70 }
71 71
72 void URLRequestAbortOnEndJob::GetResponseInfo(net::HttpResponseInfo* info) { 72 void URLRequestAbortOnEndJob::GetResponseInfo(net::HttpResponseInfo* info) {
73 GetResponseInfoConst(info); 73 GetResponseInfoConst(info);
74 } 74 }
75 75
76 bool URLRequestAbortOnEndJob::GetMimeType(std::string* mime_type) const { 76 bool URLRequestAbortOnEndJob::GetMimeType(std::string* mime_type) const {
77 net::HttpResponseInfo info; 77 net::HttpResponseInfo info;
78 GetResponseInfoConst(&info); 78 GetResponseInfoConst(&info);
79 return info.headers && info.headers->GetMimeType(mime_type); 79 return info.headers.get() && info.headers->GetMimeType(mime_type);
80 } 80 }
81 81
82 void URLRequestAbortOnEndJob::StartAsync() { 82 void URLRequestAbortOnEndJob::StartAsync() {
83 NotifyHeadersComplete(); 83 NotifyHeadersComplete();
84 } 84 }
85 85
86 void URLRequestAbortOnEndJob::Start() { 86 void URLRequestAbortOnEndJob::Start() {
87 MessageLoop::current()->PostTask( 87 MessageLoop::current()->PostTask(
88 FROM_HERE, 88 FROM_HERE,
89 base::Bind(&URLRequestAbortOnEndJob::StartAsync, 89 base::Bind(&URLRequestAbortOnEndJob::StartAsync,
(...skipping 10 matching lines...) Expand all
100 return true; 100 return true;
101 } 101 }
102 102
103 SetStatus(net::URLRequestStatus(net::URLRequestStatus::FAILED, 103 SetStatus(net::URLRequestStatus(net::URLRequestStatus::FAILED,
104 net::ERR_CONNECTION_ABORTED)); 104 net::ERR_CONNECTION_ABORTED));
105 *bytes_read = -1; 105 *bytes_read = -1;
106 return false; 106 return false;
107 } 107 }
108 108
109 } // namespace content 109 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/plugin_channel_host.cc ('k') | content/test/net/url_request_slow_download_job.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698