OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 "chrome/browser/worker_host/worker_service.h" | 5 #include "chrome/browser/worker_host/worker_service.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/singleton.h" | 10 #include "base/singleton.h" |
11 #include "base/sys_info.h" | 11 #include "base/sys_info.h" |
12 #include "base/thread.h" | 12 #include "base/threading/thread.h" |
13 #include "chrome/browser/content_settings/host_content_settings_map.h" | 13 #include "chrome/browser/content_settings/host_content_settings_map.h" |
14 #include "chrome/browser/worker_host/worker_message_filter.h" | 14 #include "chrome/browser/worker_host/worker_message_filter.h" |
15 #include "chrome/browser/worker_host/worker_process_host.h" | 15 #include "chrome/browser/worker_host/worker_process_host.h" |
16 #include "chrome/common/chrome_switches.h" | 16 #include "chrome/common/chrome_switches.h" |
17 #include "chrome/common/render_messages.h" | 17 #include "chrome/common/render_messages.h" |
18 #include "chrome/common/render_messages_params.h" | 18 #include "chrome/common/render_messages_params.h" |
19 #include "chrome/common/worker_messages.h" | 19 #include "chrome/common/worker_messages.h" |
20 #include "net/base/registry_controlled_domain.h" | 20 #include "net/base/registry_controlled_domain.h" |
21 | 21 |
22 const int WorkerService::kMaxWorkerProcessesWhenSharing = 10; | 22 const int WorkerService::kMaxWorkerProcessesWhenSharing = 10; |
(...skipping 528 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
551 FindPendingInstance(url, name, off_the_record); | 551 FindPendingInstance(url, name, off_the_record); |
552 if (instance) | 552 if (instance) |
553 return instance; | 553 return instance; |
554 | 554 |
555 // No existing pending worker - create a new one. | 555 // No existing pending worker - create a new one. |
556 WorkerProcessHost::WorkerInstance pending( | 556 WorkerProcessHost::WorkerInstance pending( |
557 url, true, off_the_record, name, MSG_ROUTING_NONE, 0, 0, 0, NULL); | 557 url, true, off_the_record, name, MSG_ROUTING_NONE, 0, 0, 0, NULL); |
558 pending_shared_workers_.push_back(pending); | 558 pending_shared_workers_.push_back(pending); |
559 return &pending_shared_workers_.back(); | 559 return &pending_shared_workers_.back(); |
560 } | 560 } |
OLD | NEW |