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

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

Issue 468005: Improve reporting of subprocess crashes.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/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
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 794 matching lines...) Expand 10 before | Expand all | Expand 10 after
805 // The OnChannelError notification can fire multiple times due to nested sync 805 // The OnChannelError notification can fire multiple times due to nested sync
806 // calls to a renderer. If we don't have a valid channel here it means we 806 // calls to a renderer. If we don't have a valid channel here it means we
807 // already handled the error. 807 // already handled the error.
808 if (!channel_.get()) 808 if (!channel_.get())
809 return; 809 return;
810 810
811 // NULL in single process mode or if fast termination happened. 811 // NULL in single process mode or if fast termination happened.
812 bool did_crash = 812 bool did_crash =
813 child_process_.get() ? child_process_->DidProcessCrash() : false; 813 child_process_.get() ? child_process_->DidProcessCrash() : false;
814 814
815 if (did_crash) {
816 UMA_HISTOGRAM_PERCENTAGE("BrowserRenderProcessHost.ChildCrashes",
817 extension_process_ ? 2 : 1);
jar (doing other things) 2009/12/18 16:28:14 I assume you're using 2 an 1 as specific bucket ty
asargent_no_longer_on_chrome 2010/01/05 01:01:19 That's a good suggestion. I'll add this to to my f
818 }
819
820 RendererClosedDetails details(did_crash, extension_process_);
815 NotificationService::current()->Notify( 821 NotificationService::current()->Notify(
816 NotificationType::RENDERER_PROCESS_CLOSED, 822 NotificationType::RENDERER_PROCESS_CLOSED,
817 Source<RenderProcessHost>(this), 823 Source<RenderProcessHost>(this),
818 Details<bool>(&did_crash)); 824 Details<RendererClosedDetails>(&details));
819 825
820 WebCacheManager::GetInstance()->Remove(id()); 826 WebCacheManager::GetInstance()->Remove(id());
821 child_process_.reset(); 827 child_process_.reset();
822 channel_.reset(); 828 channel_.reset();
823 829
824 IDMap<IPC::Channel::Listener>::iterator iter(&listeners_); 830 IDMap<IPC::Channel::Listener>::iterator iter(&listeners_);
825 while (!iter.IsAtEnd()) { 831 while (!iter.IsAtEnd()) {
826 iter.GetCurrentValue()->OnMessageReceived( 832 iter.GetCurrentValue()->OnMessageReceived(
827 ViewHostMsg_RenderViewGone(iter.GetCurrentKey())); 833 ViewHostMsg_RenderViewGone(iter.GetCurrentKey()));
828 iter.Advance(); 834 iter.Advance();
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
996 IPC::PlatformFileForTransit(), 1002 IPC::PlatformFileForTransit(),
997 std::vector<std::string>(), 1003 std::vector<std::string>(),
998 std::string(), 1004 std::string(),
999 false)); 1005 false));
1000 } 1006 }
1001 } 1007 }
1002 1008
1003 void BrowserRenderProcessHost::EnableAutoSpellCorrect(bool enable) { 1009 void BrowserRenderProcessHost::EnableAutoSpellCorrect(bool enable) {
1004 Send(new ViewMsg_SpellChecker_EnableAutoSpellCorrect(enable)); 1010 Send(new ViewMsg_SpellChecker_EnableAutoSpellCorrect(enable));
1005 } 1011 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698