OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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 // Represents the browser side of the browser <--> renderer communication | 5 // Represents the browser side of the browser <--> renderer communication |
6 // channel. There will be one RenderProcessHost per renderer process. | 6 // channel. There will be one RenderProcessHost per renderer process. |
7 | 7 |
8 #include "content/browser/renderer_host/render_process_host_impl.h" | 8 #include "content/browser/renderer_host/render_process_host_impl.h" |
9 | 9 |
10 #include <algorithm> | 10 #include <algorithm> |
(...skipping 566 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
577 | 577 |
578 scoped_refptr<ConnectionFilterController> controller() { return controller_; } | 578 scoped_refptr<ConnectionFilterController> controller() { return controller_; } |
579 | 579 |
580 void Disable() { | 580 void Disable() { |
581 base::AutoLock lock(enabled_lock_); | 581 base::AutoLock lock(enabled_lock_); |
582 enabled_ = false; | 582 enabled_ = false; |
583 } | 583 } |
584 | 584 |
585 private: | 585 private: |
586 // ConnectionFilter: | 586 // ConnectionFilter: |
587 void OnBindInterface(const service_manager::ServiceInfo& source_info, | 587 void OnBindInterface(const service_manager::BindSourceInfo& source_info, |
588 const std::string& interface_name, | 588 const std::string& interface_name, |
589 mojo::ScopedMessagePipeHandle* interface_pipe, | 589 mojo::ScopedMessagePipeHandle* interface_pipe, |
590 service_manager::Connector* connector) override { | 590 service_manager::Connector* connector) override { |
591 DCHECK(thread_checker_.CalledOnValidThread()); | 591 DCHECK(thread_checker_.CalledOnValidThread()); |
592 DCHECK_CURRENTLY_ON(BrowserThread::IO); | 592 DCHECK_CURRENTLY_ON(BrowserThread::IO); |
593 // We only fulfill connections from the renderer we host. | 593 // We only fulfill connections from the renderer we host. |
594 if (child_identity_.name() != source_info.identity.name() || | 594 if (child_identity_.name() != source_info.identity.name() || |
595 child_identity_.instance() != source_info.identity.instance()) { | 595 child_identity_.instance() != source_info.identity.instance()) { |
596 return; | 596 return; |
597 } | 597 } |
(...skipping 2534 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3132 LOG(ERROR) << "Terminating render process for bad Mojo message: " << error; | 3132 LOG(ERROR) << "Terminating render process for bad Mojo message: " << error; |
3133 | 3133 |
3134 // The ReceivedBadMessage call below will trigger a DumpWithoutCrashing. | 3134 // The ReceivedBadMessage call below will trigger a DumpWithoutCrashing. |
3135 // Capture the error message in a crash key value. | 3135 // Capture the error message in a crash key value. |
3136 base::debug::ScopedCrashKey error_key_value("mojo-message-error", error); | 3136 base::debug::ScopedCrashKey error_key_value("mojo-message-error", error); |
3137 bad_message::ReceivedBadMessage(render_process_id, | 3137 bad_message::ReceivedBadMessage(render_process_id, |
3138 bad_message::RPH_MOJO_PROCESS_ERROR); | 3138 bad_message::RPH_MOJO_PROCESS_ERROR); |
3139 } | 3139 } |
3140 | 3140 |
3141 } // namespace content | 3141 } // namespace content |
OLD | NEW |