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

Side by Side Diff: chrome/browser/renderer_host/browser_render_process_host.cc

Issue 451005: Merge 33269 - Revert 33255 Report active extensions in crash reports. This o... (Closed) Base URL: svn://svn.chromium.org/chrome/branches/249/src/
Patch Set: Created 11 years 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
« no previous file with comments | « chrome/browser/extensions/extensions_service.cc ('k') | chrome/common/child_process_logging.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 "chrome/browser/renderer_host/browser_render_process_host.h" 8 #include "chrome/browser/renderer_host/browser_render_process_host.h"
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 566 matching lines...) Expand 10 before | Expand all | Expand 10 after
577 void BrowserRenderProcessHost::InitExtensions() { 577 void BrowserRenderProcessHost::InitExtensions() {
578 // TODO(aa): Should only bother sending these function names if this is an 578 // TODO(aa): Should only bother sending these function names if this is an
579 // extension process. 579 // extension process.
580 std::vector<std::string> function_names; 580 std::vector<std::string> function_names;
581 ExtensionFunctionDispatcher::GetAllFunctionNames(&function_names); 581 ExtensionFunctionDispatcher::GetAllFunctionNames(&function_names);
582 Send(new ViewMsg_Extension_SetFunctionNames(function_names)); 582 Send(new ViewMsg_Extension_SetFunctionNames(function_names));
583 } 583 }
584 584
585 void BrowserRenderProcessHost::SendUserScriptsUpdate( 585 void BrowserRenderProcessHost::SendUserScriptsUpdate(
586 base::SharedMemory *shared_memory) { 586 base::SharedMemory *shared_memory) {
587 // Don't send user scripts to extension processes. We currently don't allow
588 // user scripts to run in extensions, so it would be pointless. It would also
589 // mess up the crash reporting, which sends a different set of "active"
590 // extensions depending on whether the process is an extension or renderer
591 // process.
592 if (extension_process_)
593 return;
594
595 // Process is being started asynchronously. We'll end up calling 587 // Process is being started asynchronously. We'll end up calling
596 // InitUserScripts when it's created which will call this again. 588 // InitUserScripts when it's created which will call this again.
597 if (child_process_.get() && child_process_->IsStarting()) 589 if (child_process_.get() && child_process_->IsStarting())
598 return; 590 return;
599 591
600 base::SharedMemoryHandle handle_for_process; 592 base::SharedMemoryHandle handle_for_process;
601 if (!shared_memory->ShareToProcess(GetHandle(), &handle_for_process)) { 593 if (!shared_memory->ShareToProcess(GetHandle(), &handle_for_process)) {
602 // This can legitimately fail if the renderer asserts at startup. 594 // This can legitimately fail if the renderer asserts at startup.
603 return; 595 return;
604 } 596 }
(...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after
920 profile()->GetExtensionMessageService()->RemoveEventListener( 912 profile()->GetExtensionMessageService()->RemoveEventListener(
921 event_name, id()); 913 event_name, id());
922 } 914 }
923 } 915 }
924 916
925 void BrowserRenderProcessHost::OnExtensionCloseChannel(int port_id) { 917 void BrowserRenderProcessHost::OnExtensionCloseChannel(int port_id) {
926 if (profile()->GetExtensionMessageService()) { 918 if (profile()->GetExtensionMessageService()) {
927 profile()->GetExtensionMessageService()->CloseChannel(port_id); 919 profile()->GetExtensionMessageService()->CloseChannel(port_id);
928 } 920 }
929 } 921 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extensions_service.cc ('k') | chrome/common/child_process_logging.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698