Home | History | Annotate | Download | only in proxy

Lines Matching defs:Executor

24 // An "executor" is a job-runner for PAC requests. It encapsulates a worker
27 class MultiThreadedProxyResolver::Executor
28 : public base::RefCountedThreadSafe<MultiThreadedProxyResolver::Executor > {
31 // signal when the executor is ready to receive work by calling
35 Executor(MultiThreadedProxyResolver* coordinator,
39 // Submit a job to this executor.
42 // Callback for when a job has completed running on the executor's thread.
45 // Cleanup the executor. Cancels all outstanding work, and frees the thread
57 friend class base::RefCountedThreadSafe<Executor>;
58 ~Executor();
63 // The currently active job for this executor (either a SetPacScript or
96 void set_executor(Executor* executor) {
97 executor_ = executor;
100 // The "executor" is the job runner that is scheduling this job. If
101 // this job has not been submitted to an executor yet, this will be
103 Executor* executor() {
139 // |executor_| will be NULL if the executor has already been deleted.
159 Executor* executor_;
179 ProxyResolver* resolver = executor()->resolver();
231 DCHECK(executor());
239 NetLog::IntegerCallback("thread_number", executor()->thread_number()));
244 ProxyResolver* resolver = executor()->resolver();
283 // MultiThreadedProxyResolver::Executor ----------------------------------------
285 MultiThreadedProxyResolver::Executor::Executor(
300 void MultiThreadedProxyResolver::Executor::StartJob(Job* job) {
313 void MultiThreadedProxyResolver::Executor::OnJobCompleted(Job* job) {
319 void MultiThreadedProxyResolver::Executor::Destroy() {
333 // Orphan the job (since this executor may be deleted soon).
346 MultiThreadedProxyResolver::Executor::~Executor() {
388 // If there is an executor that is ready to run this request, submit it!
389 Executor* executor = FindIdleExecutor();
390 if (executor) {
392 executor->StartJob(job.get());
404 executor = AddNewExecutor();
405 executor->StartJob(
419 if (job->executor()) {
420 // If the job was already submitted to the executor, just mark it
468 // Provision a new executor, and run the SetPacScript request. On completion
470 Executor* executor = AddNewExecutor();
471 executor->StartJob(new SetPacScriptJob(script_data, callback));
481 const Executor* executor = it->get();
482 Job* job = executor->outstanding_job();
497 Executor* executor = it->get();
498 executor->Destroy();
503 MultiThreadedProxyResolver::Executor*
508 Executor* executor = it->get();
509 if (!executor->outstanding_job())
510 return executor;
515 MultiThreadedProxyResolver::Executor*
522 Executor* executor = new Executor(
524 executors_.push_back(make_scoped_refptr(executor));
525 return executor;
528 void MultiThreadedProxyResolver::OnExecutorReady(Executor* executor) {
534 // to the executor.
537 executor->StartJob(job.get());