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

Side by Side Diff: content/browser/worker_host/worker_service.cc

Issue 7046114: Remove content dependency on chrome/browser/accessibility/browser_accessibility_state.h and chrom... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 6 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "content/browser/worker_host/worker_service.h" 5 #include "content/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/logging.h" 10 #include "base/logging.h"
11 #include "base/sys_info.h" 11 #include "base/sys_info.h"
12 #include "base/threading/thread.h" 12 #include "base/threading/thread.h"
13 #include "chrome/common/chrome_switches.h"
14 #include "content/browser/resource_context.h" 13 #include "content/browser/resource_context.h"
15 #include "content/browser/worker_host/worker_message_filter.h" 14 #include "content/browser/worker_host/worker_message_filter.h"
16 #include "content/browser/worker_host/worker_process_host.h" 15 #include "content/browser/worker_host/worker_process_host.h"
16 #include "content/common/content_switches.h"
17 #include "content/common/view_messages.h" 17 #include "content/common/view_messages.h"
18 #include "content/common/worker_messages.h" 18 #include "content/common/worker_messages.h"
19 #include "net/base/registry_controlled_domain.h" 19 #include "net/base/registry_controlled_domain.h"
20 20
21 const int WorkerService::kMaxWorkerProcessesWhenSharing = 10; 21 const int WorkerService::kMaxWorkerProcessesWhenSharing = 10;
22 const int WorkerService::kMaxWorkersWhenSeparate = 64; 22 const int WorkerService::kMaxWorkersWhenSeparate = 64;
23 const int WorkerService::kMaxWorkersPerTabWhenSeparate = 16; 23 const int WorkerService::kMaxWorkersPerTabWhenSeparate = 16;
24 24
25 WorkerService* WorkerService::GetInstance() { 25 WorkerService* WorkerService::GetInstance() {
26 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); 26 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
(...skipping 524 matching lines...) Expand 10 before | Expand all | Expand 10 after
551 WorkerProcessHost::WorkerInstance* instance = 551 WorkerProcessHost::WorkerInstance* instance =
552 FindPendingInstance(url, name, resource_context); 552 FindPendingInstance(url, name, resource_context);
553 if (instance) 553 if (instance)
554 return instance; 554 return instance;
555 555
556 // No existing pending worker - create a new one. 556 // No existing pending worker - create a new one.
557 WorkerProcessHost::WorkerInstance pending(url, true, name, resource_context); 557 WorkerProcessHost::WorkerInstance pending(url, true, name, resource_context);
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 }
OLDNEW
« no previous file with comments | « content/browser/speech/speech_input_browsertest.cc ('k') | content/browser/zygote_host_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698