diff options
author | dimich@google.com <dimich@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-19 21:39:54 +0000 |
---|---|---|
committer | dimich@google.com <dimich@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-19 21:39:54 +0000 |
commit | 523b6f9530faa6429f2ed4ad96442d1b53ee6190 (patch) | |
tree | 432175be8bb07b19b5adf93deb3e3b1b64e48c6a /chrome/browser/worker_host | |
parent | 34d28ddce64512e2227c566d47ca238401c57e48 (diff) | |
download | chromium_src-523b6f9530faa6429f2ed4ad96442d1b53ee6190.zip chromium_src-523b6f9530faa6429f2ed4ad96442d1b53ee6190.tar.gz chromium_src-523b6f9530faa6429f2ed4ad96442d1b53ee6190.tar.bz2 |
Degrade the https color and lock icon for the page that has a worker that loads subresource with bad cert.
The idea is to make UI reflect loading of resources with bad certificates that were previously approved by the user.
bug=20176
TEST=SSLUITest.TestUnsafeContentsInWorker unit_test.
Review URL: http://codereview.chromium.org/268006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29461 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/worker_host')
-rw-r--r-- | chrome/browser/worker_host/worker_service.cc | 15 | ||||
-rw-r--r-- | chrome/browser/worker_host/worker_service.h | 5 |
2 files changed, 20 insertions, 0 deletions
diff --git a/chrome/browser/worker_host/worker_service.cc b/chrome/browser/worker_host/worker_service.cc index a8ce3f0..d37314b 100644 --- a/chrome/browser/worker_host/worker_service.cc +++ b/chrome/browser/worker_host/worker_service.cc @@ -265,3 +265,18 @@ void WorkerService::WorkerProcessDestroyed(WorkerProcessHost* process) { } } } + +const WorkerProcessHost::WorkerInstance* WorkerService::FindWorkerInstance( + int worker_process_id) { + for (ChildProcessHost::Iterator iter(ChildProcessInfo::WORKER_PROCESS); + !iter.Done(); ++iter) { + if (iter->id() != worker_process_id) + continue; + + WorkerProcessHost* worker = static_cast<WorkerProcessHost*>(*iter); + WorkerProcessHost::Instances::const_iterator instance = + worker->instances().begin(); + return instance == worker->instances().end() ? NULL : &*instance; + } + return NULL; +} diff --git a/chrome/browser/worker_host/worker_service.h b/chrome/browser/worker_host/worker_service.h index 0887b32..a3e71031 100644 --- a/chrome/browser/worker_host/worker_service.h +++ b/chrome/browser/worker_host/worker_service.h @@ -46,6 +46,11 @@ class WorkerService : public NotificationObserver { int next_worker_route_id() { return ++next_worker_route_id_; } + // TODO(dimich): This code assumes there is 1 worker per worker process, which + // is how it is today until V8 can run in separate threads. + const WorkerProcessHost::WorkerInstance* FindWorkerInstance( + int worker_process_id); + // Used when multiple workers can run in the same process. static const int kMaxWorkerProcessesWhenSharing; |