Skip to content

Commit

Permalink
Remove disable-embedded-shared-worker flag and shared worker process …
Browse files Browse the repository at this point in the history
…related codes.

BUG=327256

Review URL: https://codereview.chromium.org/411283002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@285521 0039d316-1c4b-4281-b951-d872f2087c98
  • Loading branch information
horo@chromium.org committed Jul 25, 2014
1 parent a1f2452 commit f17a7bb
Show file tree
Hide file tree
Showing 78 changed files with 204 additions and 5,021 deletions.
6 changes: 0 additions & 6 deletions chrome/app/generated_resources.grd
Original file line number Diff line number Diff line change
Expand Up @@ -6559,12 +6559,6 @@ Keep your key file in a safe place. You will need it to create new versions of y
<message name="IDS_FLAGS_ENABLE_EASY_UNLOCK_DESCRIPTION" desc="Description for flag to Enable Easy Unlock.">
Easy Unlock allows you to unlock your Chromebook when in proximity to your phone.
</message>
<message name="IDS_FLAGS_DISABLE_EMBEDDED_SHARED_WORKER_NAME" desc="Name of the flag to disable In-renderer Shared Worker.">
Disable In-renderer Shared Worker.
</message>
<message name="IDS_FLAGS_DISABLE_EMBEDDED_SHARED_WORKER_DESCRIPTION" desc="Description of the flag to disable In-renderer Shared Worker.">
Disable In-Renderer Shared Worker to run Shared Worker in a legacy dedicated worker process.
</message>
<message name="IDS_FLAGS_ENABLE_APPS_FILE_ASSOCIATIONS_NAME" desc="Name for file associations for Chrome Apps.">
Apps file associations.
</message>
Expand Down
7 changes: 0 additions & 7 deletions chrome/browser/about_flags.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1790,13 +1790,6 @@ const Experiment kExperiments[] = {
SINGLE_VALUE_TYPE(switches::kEnableEasyUnlock)
},
#endif
{
"disable-embedded-shared-worker",
IDS_FLAGS_DISABLE_EMBEDDED_SHARED_WORKER_NAME,
IDS_FLAGS_DISABLE_EMBEDDED_SHARED_WORKER_DESCRIPTION,
kOsDesktop,
SINGLE_VALUE_TYPE(switches::kDisableEmbeddedSharedWorker)
},
#if defined(OS_CHROMEOS)
{
"enable-filemanager-mtp",
Expand Down
23 changes: 1 addition & 22 deletions chrome/browser/devtools/devtools_targets_ui.cc
Original file line number Diff line number Diff line change
Expand Up @@ -246,19 +246,12 @@ class WorkerObserver
// WorkerTargetsUIHandler -----------------------------------------------------

class WorkerTargetsUIHandler
: public DevToolsTargetsUIHandler,
public content::BrowserChildProcessObserver {
: public DevToolsTargetsUIHandler {
public:
explicit WorkerTargetsUIHandler(const Callback& callback);
virtual ~WorkerTargetsUIHandler();

private:
// content::BrowserChildProcessObserver overrides.
virtual void BrowserChildProcessHostConnected(
const content::ChildProcessData& data) OVERRIDE;
virtual void BrowserChildProcessHostDisconnected(
const content::ChildProcessData& data) OVERRIDE;

void UpdateTargets(const DevToolsTargetImpl::List& targets);

scoped_refptr<WorkerObserver> observer_;
Expand All @@ -269,26 +262,12 @@ WorkerTargetsUIHandler::WorkerTargetsUIHandler(const Callback& callback)
observer_(new WorkerObserver()) {
observer_->Start(base::Bind(&WorkerTargetsUIHandler::UpdateTargets,
base::Unretained(this)));
BrowserChildProcessObserver::Add(this);
}

WorkerTargetsUIHandler::~WorkerTargetsUIHandler() {
BrowserChildProcessObserver::Remove(this);
observer_->Stop();
}

void WorkerTargetsUIHandler::BrowserChildProcessHostConnected(
const content::ChildProcessData& data) {
if (data.process_type == content::PROCESS_TYPE_WORKER)
observer_->Enumerate();
}

void WorkerTargetsUIHandler::BrowserChildProcessHostDisconnected(
const content::ChildProcessData& data) {
if (data.process_type == content::PROCESS_TYPE_WORKER)
observer_->Enumerate();
}

void WorkerTargetsUIHandler::UpdateTargets(
const DevToolsTargetImpl::List& targets) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
Expand Down
7 changes: 0 additions & 7 deletions chrome/browser/memory_details.cc
Original file line number Diff line number Diff line change
Expand Up @@ -472,10 +472,6 @@ void MemoryDetails::UpdateHistograms() {
UMA_HISTOGRAM_MEMORY_KB("Memory.Plugin", sample);
plugin_count++;
continue;
case content::PROCESS_TYPE_WORKER:
UMA_HISTOGRAM_MEMORY_KB("Memory.Worker", sample);
worker_count++;
continue;
case content::PROCESS_TYPE_UTILITY:
UMA_HISTOGRAM_MEMORY_KB("Memory.Utility", sample);
other_count++;
Expand Down Expand Up @@ -584,9 +580,6 @@ void MemoryDetails::UpdateSwapHistograms() {
case content::PROCESS_TYPE_PLUGIN:
UMA_HISTOGRAM_MEMORY_KB("Memory.Swap.Plugin", sample);
continue;
case content::PROCESS_TYPE_WORKER:
UMA_HISTOGRAM_MEMORY_KB("Memory.Swap.Worker", sample);
continue;
case content::PROCESS_TYPE_UTILITY:
UMA_HISTOGRAM_MEMORY_KB("Memory.Swap.Utility", sample);
continue;
Expand Down
2 changes: 0 additions & 2 deletions chrome/browser/metrics/profiler_metrics_provider.cc
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@ ProfilerEventProto::TrackedObject::ProcessType AsProtobufProcessType(
return ProfilerEventProto::TrackedObject::RENDERER;
case content::PROCESS_TYPE_PLUGIN:
return ProfilerEventProto::TrackedObject::PLUGIN;
case content::PROCESS_TYPE_WORKER:
return ProfilerEventProto::TrackedObject::WORKER;
case content::PROCESS_TYPE_UTILITY:
return ProfilerEventProto::TrackedObject::UTILITY;
case content::PROCESS_TYPE_ZYGOTE:
Expand Down
7 changes: 0 additions & 7 deletions chrome/browser/performance_monitor/process_metrics_history.cc
Original file line number Diff line number Diff line change
Expand Up @@ -114,13 +114,6 @@ void ProcessMetricsHistory::RunPerformanceTriggers() {
if (min_cpu_usage_ > kHighCPUUtilizationThreshold)
UMA_HISTOGRAM_BOOLEAN("PerformanceMonitor.HighCPU.PluginProcess", true);
break;
case content::PROCESS_TYPE_WORKER:
UMA_HISTOGRAM_CUSTOM_COUNTS(
"PerformanceMonitor.AverageCPU.WorkerProcess", average_cpu_usage,
kHistogramMin, kHistogramMax, kHistogramBucketCount);
if (min_cpu_usage_ > kHighCPUUtilizationThreshold)
UMA_HISTOGRAM_BOOLEAN("PerformanceMonitor.HighCPU.WorkerProcess", true);
break;
case content::PROCESS_TYPE_GPU:
UMA_HISTOGRAM_CUSTOM_COUNTS(
"PerformanceMonitor.AverageCPU.GPUProcess", average_cpu_usage,
Expand Down
11 changes: 0 additions & 11 deletions chrome/browser/task_manager/child_process_resource_provider.cc
Original file line number Diff line number Diff line change
Expand Up @@ -193,10 +193,6 @@ base::string16 ChildProcessResource::GetLocalizedTitle() const {
case content::PROCESS_TYPE_MAX:
NOTREACHED();
break;

case content::PROCESS_TYPE_WORKER:
NOTREACHED() << "Workers are not handled by this provider.";
break;
case content::PROCESS_TYPE_UNKNOWN:
NOTREACHED() << "Need localized name for child process type.";
}
Expand Down Expand Up @@ -259,9 +255,6 @@ void ChildProcessResourceProvider::BrowserChildProcessHostConnected(
const content::ChildProcessData& data) {
DCHECK(updating_);

// Workers are handled by WorkerResourceProvider.
if (data.process_type == content::PROCESS_TYPE_WORKER)
return;
if (resources_.count(data.handle)) {
// The case may happen that we have added a child_process_info as part of
// the iteration performed during StartUpdating() call but the notification
Expand All @@ -277,8 +270,6 @@ void ChildProcessResourceProvider::
const content::ChildProcessData& data) {
DCHECK(updating_);

if (data.process_type == content::PROCESS_TYPE_WORKER)
return;
ChildProcessMap::iterator iter = resources_.find(data.handle);
if (iter == resources_.end()) {
// ChildProcessData disconnection notifications are asynchronous, so we
Expand Down Expand Up @@ -322,8 +313,6 @@ void ChildProcessResourceProvider::RetrieveChildProcessData() {
// Only add processes which are already started, since we need their handle.
if (iter.GetData().handle == base::kNullProcessHandle)
continue;
if (iter.GetData().process_type == content::PROCESS_TYPE_WORKER)
continue;
child_processes.push_back(iter.GetData());
}
// Now notify the UI thread that we have retrieved information about child
Expand Down
6 changes: 0 additions & 6 deletions chrome/browser/task_manager/task_manager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
#include "chrome/browser/task_manager/resource_provider.h"
#include "chrome/browser/task_manager/tab_contents_information.h"
#include "chrome/browser/task_manager/web_contents_resource_provider.h"
#include "chrome/browser/task_manager/worker_resource_provider.h"
#include "chrome/browser/ui/browser_navigator.h"
#include "chrome/common/pref_names.h"
#include "chrome/common/url_constants.h"
Expand Down Expand Up @@ -271,11 +270,6 @@ TaskManagerModel::TaskManagerModel(TaskManager* task_manager)
task_manager,
scoped_ptr<WebContentsInformation>(
new task_manager::GuestInformation())));

// We don't need to show the worker processes if "embedded-shared-worker" flag
// is enabled.
if (!content::WorkerService::EmbeddedSharedWorkerEnabled())
AddResourceProvider(new task_manager::WorkerResourceProvider(task_manager));
}

void TaskManagerModel::AddObserver(TaskManagerModelObserver* observer) {
Expand Down
Loading

0 comments on commit f17a7bb

Please sign in to comment.