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

Side by Side Diff: chrome/browser/renderer_host/resource_queue_unittest.cc

Issue 5607004: net: Remove typedef net::URLRequestJob URLRequestJob; (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased 2 Created 10 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
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 "base/message_loop.h" 5 #include "base/message_loop.h"
6 #include "base/scoped_ptr.h" 6 #include "base/scoped_ptr.h"
7 #include "chrome/browser/browser_thread.h" 7 #include "chrome/browser/browser_thread.h"
8 #include "chrome/browser/renderer_host/global_request_id.h" 8 #include "chrome/browser/renderer_host/global_request_id.h"
9 #include "chrome/browser/renderer_host/resource_dispatcher_host_request_info.h" 9 #include "chrome/browser/renderer_host/resource_dispatcher_host_request_info.h"
10 #include "chrome/browser/renderer_host/resource_handler.h" 10 #include "chrome/browser/renderer_host/resource_handler.h"
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 ResourceQueueTest() 157 ResourceQueueTest()
158 : response_started_count_(0), 158 : response_started_count_(0),
159 message_loop_(MessageLoop::TYPE_IO), 159 message_loop_(MessageLoop::TYPE_IO),
160 ui_thread_(BrowserThread::UI, &message_loop_), 160 ui_thread_(BrowserThread::UI, &message_loop_),
161 io_thread_(BrowserThread::IO, &message_loop_) { 161 io_thread_(BrowserThread::IO, &message_loop_) {
162 } 162 }
163 163
164 virtual void OnResponseStarted(net::URLRequest* request) { 164 virtual void OnResponseStarted(net::URLRequest* request) {
165 response_started_count_++; 165 response_started_count_++;
166 // We're not going to do anything more with the request. Cancel it now 166 // We're not going to do anything more with the request. Cancel it now
167 // to avoid leaking URLRequestJob. 167 // to avoid leaking net::URLRequestJob.
168 request->Cancel(); 168 request->Cancel();
169 } 169 }
170 170
171 virtual void OnReadCompleted(net::URLRequest* request, int bytes_read) { 171 virtual void OnReadCompleted(net::URLRequest* request, int bytes_read) {
172 } 172 }
173 173
174 protected: 174 protected:
175 int response_started_count_; 175 int response_started_count_;
176 176
177 private: 177 private:
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
281 MessageLoop::current()->RunAllPending(); 281 MessageLoop::current()->RunAllPending();
282 EXPECT_EQ(0, response_started_count_); 282 EXPECT_EQ(0, response_started_count_);
283 283
284 queue.Shutdown(); 284 queue.Shutdown();
285 285
286 MessageLoop::current()->RunAllPending(); 286 MessageLoop::current()->RunAllPending();
287 EXPECT_EQ(0, response_started_count_); 287 EXPECT_EQ(0, response_started_count_);
288 } 288 }
289 289
290 } // namespace 290 } // namespace
OLDNEW
« no previous file with comments | « chrome/browser/renderer_host/resource_dispatcher_host_unittest.cc ('k') | chrome/browser/task_manager/task_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698