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

Side by Side Diff: content/public/browser/render_process_host.h

Issue 1009583004: Add UMA histograms and logging for bad IPC message handling (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix mac Created 5 years, 9 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 #ifndef CONTENT_PUBLIC_BROWSER_RENDER_PROCESS_HOST_H_ 5 #ifndef CONTENT_PUBLIC_BROWSER_RENDER_PROCESS_HOST_H_
6 #define CONTENT_PUBLIC_BROWSER_RENDER_PROCESS_HOST_H_ 6 #define CONTENT_PUBLIC_BROWSER_RENDER_PROCESS_HOST_H_
7 7
8 #include <list> 8 #include <list>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 // listeners own it any more, it will delete itself. 81 // listeners own it any more, it will delete itself.
82 virtual void AddRoute(int32 routing_id, IPC::Listener* listener) = 0; 82 virtual void AddRoute(int32 routing_id, IPC::Listener* listener) = 0;
83 virtual void RemoveRoute(int32 routing_id) = 0; 83 virtual void RemoveRoute(int32 routing_id) = 0;
84 84
85 // Add and remove observers for lifecycle events. The order in which 85 // Add and remove observers for lifecycle events. The order in which
86 // notifications are sent to observers is undefined. Observers must be sure to 86 // notifications are sent to observers is undefined. Observers must be sure to
87 // remove the observer before they go away. 87 // remove the observer before they go away.
88 virtual void AddObserver(RenderProcessHostObserver* observer) = 0; 88 virtual void AddObserver(RenderProcessHostObserver* observer) = 0;
89 virtual void RemoveObserver(RenderProcessHostObserver* observer) = 0; 89 virtual void RemoveObserver(RenderProcessHostObserver* observer) = 0;
90 90
91 // Called when a received message cannot be decoded. 91 // Called when a received message cannot be decoded. Terminates the renderer.
Charlie Reis 2015/03/18 21:37:51 Emphasize up front that most callers should not ca
James Cook 2015/03/18 22:19:44 Done.
92 virtual void ReceivedBadMessage() = 0; 92 // Most embedders should use a wrapper method to log an error and record
93 // statistics before calling this method. The recommended name for the
94 // wrapper is ReceivedBadMessage().
95 virtual void ShutdownForBadMessage() = 0;
93 96
94 // Track the count of visible widgets. Called by listeners to register and 97 // Track the count of visible widgets. Called by listeners to register and
95 // unregister visibility. 98 // unregister visibility.
96 virtual void WidgetRestored() = 0; 99 virtual void WidgetRestored() = 0;
97 virtual void WidgetHidden() = 0; 100 virtual void WidgetHidden() = 0;
98 virtual int VisibleWidgetCount() const = 0; 101 virtual int VisibleWidgetCount() const = 0;
99 102
100 // Indicates whether the current RenderProcessHost is associated with an 103 // Indicates whether the current RenderProcessHost is associated with an
101 // isolated guest renderer process. Not all guest renderers are created equal. 104 // isolated guest renderer process. Not all guest renderers are created equal.
102 // A guest, as indicated by BrowserPluginGuest::IsGuest, may coexist with 105 // A guest, as indicated by BrowserPluginGuest::IsGuest, may coexist with
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after
332 static void SetMaxRendererProcessCount(size_t count); 335 static void SetMaxRendererProcessCount(size_t count);
333 336
334 // Returns the current maximum number of renderer process hosts kept by the 337 // Returns the current maximum number of renderer process hosts kept by the
335 // content module. 338 // content module.
336 static size_t GetMaxRendererProcessCount(); 339 static size_t GetMaxRendererProcessCount();
337 }; 340 };
338 341
339 } // namespace content. 342 } // namespace content.
340 343
341 #endif // CONTENT_PUBLIC_BROWSER_RENDER_PROCESS_HOST_H_ 344 #endif // CONTENT_PUBLIC_BROWSER_RENDER_PROCESS_HOST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698