Home | History | Annotate | Download | only in proxy

Lines Matching defs:Executor

25 // An "executor" is a job-runner for PAC requests. It encapsulates a worker
28 class MultiThreadedProxyResolver::Executor
29 : public base::RefCountedThreadSafe<MultiThreadedProxyResolver::Executor > {
32 // signal when the executor is ready to receive work by calling
36 Executor(MultiThreadedProxyResolver* coordinator,
40 // Submit a job to this executor.
43 // Callback for when a job has completed running on the executor's thread.
46 // Cleanup the executor. Cancels all outstanding work, and frees the thread
60 friend class base::RefCountedThreadSafe<Executor>;
61 ~Executor();
66 // The currently active job for this executor (either a SetPacScript or
99 void set_executor(Executor* executor) {
100 executor_ = executor;
103 // The "executor" is the job runner that is scheduling this job. If
104 // this job has not been submitted to an executor yet, this will be
106 Executor* executor() {
142 // |executor_| will be NULL if the executor has already been deleted.
162 Executor* executor_;
182 ProxyResolver* resolver = executor()->resolver();
235 DCHECK(executor());
245 NetLog::IntegerCallback("thread_number", executor()->thread_number()));
250 ProxyResolver* resolver = executor()->resolver();
307 // MultiThreadedProxyResolver::Executor ----------------------------------------
309 MultiThreadedProxyResolver::Executor::Executor(
327 void MultiThreadedProxyResolver::Executor::StartJob(Job* job) {
340 void MultiThreadedProxyResolver::Executor::OnJobCompleted(Job* job) {
346 void MultiThreadedProxyResolver::Executor::Destroy() {
360 // Orphan the job (since this executor may be deleted soon).
373 void MultiThreadedProxyResolver::Executor::PurgeMemory() {
380 MultiThreadedProxyResolver::Executor::~Executor() {
422 // If there is an executor that is ready to run this request, submit it!
423 Executor* executor = FindIdleExecutor();
424 if (executor) {
426 executor->StartJob(job.get());
438 executor = AddNewExecutor();
439 executor->StartJob(
453 if (job->executor()) {
454 // If the job was already submitted to the executor, just mark it
490 Executor* executor = it->get();
491 executor->PurgeMemory();
511 // Provision a new executor, and run the SetPacScript request. On completion
513 Executor* executor = AddNewExecutor();
514 executor->StartJob(new SetPacScriptJob(script_data, callback));
524 const Executor* executor = it->get();
525 Job* job = executor->outstanding_job();
540 Executor* executor = it->get();
541 executor->Destroy();
546 MultiThreadedProxyResolver::Executor*
551 Executor* executor = it->get();
552 if (!executor->outstanding_job())
553 return executor;
558 MultiThreadedProxyResolver::Executor*
565 Executor* executor = new Executor(
567 executors_.push_back(make_scoped_refptr(executor));
568 return executor;
571 void MultiThreadedProxyResolver::OnExecutorReady(Executor* executor) {
577 // to the executor.
580 executor->StartJob(job.get());