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

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

Issue 7377010: This change will split the result codes between content and chrome. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: actually rename the files Created 9 years, 5 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_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 298 matching lines...) Expand 10 before | Expand all | Expand 10 after
309 IPC_MESSAGE_HANDLER(WorkerHostMsg_WorkerContextClosed, 309 IPC_MESSAGE_HANDLER(WorkerHostMsg_WorkerContextClosed,
310 OnWorkerContextClosed) 310 OnWorkerContextClosed)
311 IPC_MESSAGE_HANDLER(WorkerProcessHostMsg_AllowDatabase, OnAllowDatabase) 311 IPC_MESSAGE_HANDLER(WorkerProcessHostMsg_AllowDatabase, OnAllowDatabase)
312 IPC_MESSAGE_HANDLER(WorkerProcessHostMsg_AllowFileSystem, OnAllowFileSystem) 312 IPC_MESSAGE_HANDLER(WorkerProcessHostMsg_AllowFileSystem, OnAllowFileSystem)
313 IPC_MESSAGE_UNHANDLED(handled = false) 313 IPC_MESSAGE_UNHANDLED(handled = false)
314 IPC_END_MESSAGE_MAP_EX() 314 IPC_END_MESSAGE_MAP_EX()
315 315
316 if (!msg_is_ok) { 316 if (!msg_is_ok) {
317 NOTREACHED(); 317 NOTREACHED();
318 UserMetrics::RecordAction(UserMetricsAction("BadMessageTerminate_WPH")); 318 UserMetrics::RecordAction(UserMetricsAction("BadMessageTerminate_WPH"));
319 base::KillProcess(handle(), ResultCodes::KILLED_BAD_MESSAGE, false); 319 base::KillProcess(handle(), content::RESULT_CODE_KILLED_BAD_MESSAGE, false);
320 } 320 }
321 321
322 if (handled) 322 if (handled)
323 return true; 323 return true;
324 324
325 for (Instances::iterator i = instances_.begin(); i != instances_.end(); ++i) { 325 for (Instances::iterator i = instances_.begin(); i != instances_.end(); ++i) {
326 if (i->worker_route_id() == message.routing_id()) { 326 if (i->worker_route_id() == message.routing_id()) {
327 if (!i->shared()) { 327 if (!i->shared()) {
328 // Don't relay messages from shared workers (all communication is via 328 // Don't relay messages from shared workers (all communication is via
329 // the message port). 329 // the message port).
(...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698