| OLD | NEW |
| 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_process_host.h" | 5 #include "content/browser/worker_host/worker_process_host.h" |
| 6 | 6 |
| 7 #include <set> | 7 #include <set> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/callback.h" | 10 #include "base/callback.h" |
| (...skipping 467 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 478 } | 478 } |
| 479 | 479 |
| 480 std::string display_title; | 480 std::string display_title; |
| 481 for (std::set<std::string>::iterator i = titles.begin(); | 481 for (std::set<std::string>::iterator i = titles.begin(); |
| 482 i != titles.end(); ++i) { | 482 i != titles.end(); ++i) { |
| 483 if (!display_title.empty()) | 483 if (!display_title.empty()) |
| 484 display_title += ", "; | 484 display_title += ", "; |
| 485 display_title += *i; | 485 display_title += *i; |
| 486 } | 486 } |
| 487 | 487 |
| 488 set_name(ASCIIToWide(display_title)); | 488 set_name(ASCIIToUTF16(display_title)); |
| 489 } | 489 } |
| 490 | 490 |
| 491 void WorkerProcessHost::DocumentDetached(WorkerMessageFilter* filter, | 491 void WorkerProcessHost::DocumentDetached(WorkerMessageFilter* filter, |
| 492 unsigned long long document_id) { | 492 unsigned long long document_id) { |
| 493 // Walk all instances and remove the document from their document set. | 493 // Walk all instances and remove the document from their document set. |
| 494 for (Instances::iterator i = instances_.begin(); i != instances_.end();) { | 494 for (Instances::iterator i = instances_.begin(); i != instances_.end();) { |
| 495 if (!i->shared()) { | 495 if (!i->shared()) { |
| 496 ++i; | 496 ++i; |
| 497 } else { | 497 } else { |
| 498 i->worker_document_set()->Remove(filter, document_id); | 498 i->worker_document_set()->Remove(filter, document_id); |
| (...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 631 } | 631 } |
| 632 } | 632 } |
| 633 return false; | 633 return false; |
| 634 } | 634 } |
| 635 | 635 |
| 636 WorkerProcessHost::WorkerInstance::FilterInfo | 636 WorkerProcessHost::WorkerInstance::FilterInfo |
| 637 WorkerProcessHost::WorkerInstance::GetFilter() const { | 637 WorkerProcessHost::WorkerInstance::GetFilter() const { |
| 638 DCHECK(NumFilters() == 1); | 638 DCHECK(NumFilters() == 1); |
| 639 return *filters_.begin(); | 639 return *filters_.begin(); |
| 640 } | 640 } |
| OLD | NEW |