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

Side by Side Diff: content/browser/loader/resource_dispatcher_host_unittest.cc

Issue 11778016: net: Stop using base::WorkerPool from UploadFileElementReader (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: _ Created 7 years, 11 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
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 4
5 #include <vector> 5 #include <vector>
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/file_path.h" 8 #include "base/file_path.h"
9 #include "base/memory/scoped_vector.h" 9 #include "base/memory/scoped_vector.h"
10 #include "base/message_loop.h" 10 #include "base/message_loop.h"
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 // This is used to emulate different sub-processes, since this filter will 178 // This is used to emulate different sub-processes, since this filter will
179 // have a different ID than the original. For the test, we want all the incoming 179 // have a different ID than the original. For the test, we want all the incoming
180 // messages to go to the same place, which is why this forwards. 180 // messages to go to the same place, which is why this forwards.
181 class ForwardingFilter : public ResourceMessageFilter { 181 class ForwardingFilter : public ResourceMessageFilter {
182 public: 182 public:
183 explicit ForwardingFilter(IPC::Sender* dest, 183 explicit ForwardingFilter(IPC::Sender* dest,
184 ResourceContext* resource_context) 184 ResourceContext* resource_context)
185 : ResourceMessageFilter( 185 : ResourceMessageFilter(
186 ChildProcessHostImpl::GenerateChildProcessUniqueId(), 186 ChildProcessHostImpl::GenerateChildProcessUniqueId(),
187 PROCESS_TYPE_RENDERER, 187 PROCESS_TYPE_RENDERER,
188 resource_context, NULL, NULL, 188 resource_context, NULL, NULL, NULL,
189 new MockURLRequestContextSelector( 189 new MockURLRequestContextSelector(
190 resource_context->GetRequestContext())), 190 resource_context->GetRequestContext())),
191 dest_(dest) { 191 dest_(dest) {
192 OnChannelConnected(base::GetCurrentProcId()); 192 OnChannelConnected(base::GetCurrentProcId());
193 } 193 }
194 194
195 // ResourceMessageFilter override 195 // ResourceMessageFilter override
196 virtual bool Send(IPC::Message* msg) { 196 virtual bool Send(IPC::Message* msg) {
197 if (!dest_) 197 if (!dest_)
198 return false; 198 return false;
(...skipping 1755 matching lines...) Expand 10 before | Expand all | Expand 10 after
1954 } 1954 }
1955 1955
1956 MessageLoop::current()->RunUntilIdle(); 1956 MessageLoop::current()->RunUntilIdle();
1957 1957
1958 msgs.clear(); 1958 msgs.clear();
1959 accum_.GetClassifiedMessages(&msgs); 1959 accum_.GetClassifiedMessages(&msgs);
1960 } 1960 }
1961 } 1961 }
1962 1962
1963 } // namespace content 1963 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698