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

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

Issue 437078: Report active extensions in crash reports (windows only). (Closed)
Patch Set: Rework 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
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 569 matching lines...) Expand 10 before | Expand all | Expand 10 after
580 void BrowserRenderProcessHost::InitExtensions() { 580 void BrowserRenderProcessHost::InitExtensions() {
581 // TODO(aa): Should only bother sending these function names if this is an 581 // TODO(aa): Should only bother sending these function names if this is an
582 // extension process. 582 // extension process.
583 std::vector<std::string> function_names; 583 std::vector<std::string> function_names;
584 ExtensionFunctionDispatcher::GetAllFunctionNames(&function_names); 584 ExtensionFunctionDispatcher::GetAllFunctionNames(&function_names);
585 Send(new ViewMsg_Extension_SetFunctionNames(function_names)); 585 Send(new ViewMsg_Extension_SetFunctionNames(function_names));
586 } 586 }
587 587
588 void BrowserRenderProcessHost::SendUserScriptsUpdate( 588 void BrowserRenderProcessHost::SendUserScriptsUpdate(
589 base::SharedMemory *shared_memory) { 589 base::SharedMemory *shared_memory) {
590 // Don't send user scripts to extension processes. We currently don't allow
591 // user scripts to run in extensions, so it would be pointless. It would also
592 // mess up the crash reporting, which sends a different set of "active"
593 // extensions depending on whether the process is an extension or renderer
594 // process.
595 if (!extension_process_)
596 return;
597
590 // Process is being started asynchronously. We'll end up calling 598 // Process is being started asynchronously. We'll end up calling
591 // InitUserScripts when it's created which will call this again. 599 // InitUserScripts when it's created which will call this again.
592 if (child_process_.get() && child_process_->IsStarting()) 600 if (child_process_.get() && child_process_->IsStarting())
593 return; 601 return;
594 602
595 base::SharedMemoryHandle handle_for_process; 603 base::SharedMemoryHandle handle_for_process;
596 if (!shared_memory->ShareToProcess(GetHandle(), &handle_for_process)) { 604 if (!shared_memory->ShareToProcess(GetHandle(), &handle_for_process)) {
597 // This can legitimately fail if the renderer asserts at startup. 605 // This can legitimately fail if the renderer asserts at startup.
598 return; 606 return;
599 } 607 }
(...skipping 382 matching lines...) Expand 10 before | Expand all | Expand 10 after
982 IPC::PlatformFileForTransit(), 990 IPC::PlatformFileForTransit(),
983 std::vector<std::string>(), 991 std::vector<std::string>(),
984 std::string(), 992 std::string(),
985 false)); 993 false));
986 } 994 }
987 } 995 }
988 996
989 void BrowserRenderProcessHost::EnableAutoSpellCorrect(bool enable) { 997 void BrowserRenderProcessHost::EnableAutoSpellCorrect(bool enable) {
990 Send(new ViewMsg_SpellChecker_EnableAutoSpellCorrect(enable)); 998 Send(new ViewMsg_SpellChecker_EnableAutoSpellCorrect(enable));
991 } 999 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698