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

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: 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 22 matching lines...) Expand all
33 class BrowserCdm; 33 class BrowserCdm;
34 } 34 }
35 35
36 namespace content { 36 namespace content {
37 class BrowserContext; 37 class BrowserContext;
38 class BrowserMessageFilter; 38 class BrowserMessageFilter;
39 class RenderProcessHostObserver; 39 class RenderProcessHostObserver;
40 class RenderWidgetHost; 40 class RenderWidgetHost;
41 class ServiceRegistry; 41 class ServiceRegistry;
42 class StoragePartition; 42 class StoragePartition;
43 enum class BadMessage;
43 struct GlobalRequestID; 44 struct GlobalRequestID;
44 45
45 // Interface that represents the browser side of the browser <-> renderer 46 // Interface that represents the browser side of the browser <-> renderer
46 // communication channel. There will generally be one RenderProcessHost per 47 // communication channel. There will generally be one RenderProcessHost per
47 // renderer process. 48 // renderer process.
48 class CONTENT_EXPORT RenderProcessHost : public IPC::Sender, 49 class CONTENT_EXPORT RenderProcessHost : public IPC::Sender,
49 public IPC::Listener, 50 public IPC::Listener,
50 public base::SupportsUserData { 51 public base::SupportsUserData {
51 public: 52 public:
52 typedef IDMap<RenderProcessHost>::iterator iterator; 53 typedef IDMap<RenderProcessHost>::iterator iterator;
(...skipping 28 matching lines...) Expand all
81 // listeners own it any more, it will delete itself. 82 // listeners own it any more, it will delete itself.
82 virtual void AddRoute(int32 routing_id, IPC::Listener* listener) = 0; 83 virtual void AddRoute(int32 routing_id, IPC::Listener* listener) = 0;
83 virtual void RemoveRoute(int32 routing_id) = 0; 84 virtual void RemoveRoute(int32 routing_id) = 0;
84 85
85 // Add and remove observers for lifecycle events. The order in which 86 // Add and remove observers for lifecycle events. The order in which
86 // notifications are sent to observers is undefined. Observers must be sure to 87 // notifications are sent to observers is undefined. Observers must be sure to
87 // remove the observer before they go away. 88 // remove the observer before they go away.
88 virtual void AddObserver(RenderProcessHostObserver* observer) = 0; 89 virtual void AddObserver(RenderProcessHostObserver* observer) = 0;
89 virtual void RemoveObserver(RenderProcessHostObserver* observer) = 0; 90 virtual void RemoveObserver(RenderProcessHostObserver* observer) = 0;
90 91
91 // Called when a received message cannot be decoded. 92 // Called when a received message cannot be decoded. The |reason| is logged to
92 virtual void ReceivedBadMessage() = 0; 93 // the console.
94 virtual void ReceivedBadMessage(BadMessage reason) = 0;
93 95
94 // Track the count of visible widgets. Called by listeners to register and 96 // Track the count of visible widgets. Called by listeners to register and
95 // unregister visibility. 97 // unregister visibility.
96 virtual void WidgetRestored() = 0; 98 virtual void WidgetRestored() = 0;
97 virtual void WidgetHidden() = 0; 99 virtual void WidgetHidden() = 0;
98 virtual int VisibleWidgetCount() const = 0; 100 virtual int VisibleWidgetCount() const = 0;
99 101
100 // Indicates whether the current RenderProcessHost is associated with an 102 // Indicates whether the current RenderProcessHost is associated with an
101 // isolated guest renderer process. Not all guest renderers are created equal. 103 // isolated guest renderer process. Not all guest renderers are created equal.
102 // A guest, as indicated by BrowserPluginGuest::IsGuest, may coexist with 104 // 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); 334 static void SetMaxRendererProcessCount(size_t count);
333 335
334 // Returns the current maximum number of renderer process hosts kept by the 336 // Returns the current maximum number of renderer process hosts kept by the
335 // content module. 337 // content module.
336 static size_t GetMaxRendererProcessCount(); 338 static size_t GetMaxRendererProcessCount();
337 }; 339 };
338 340
339 } // namespace content. 341 } // namespace content.
340 342
341 #endif // CONTENT_PUBLIC_BROWSER_RENDER_PROCESS_HOST_H_ 343 #endif // CONTENT_PUBLIC_BROWSER_RENDER_PROCESS_HOST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698