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

Side by Side Diff: content/public/test/mock_render_process_host.h

Issue 2350423003: [Tentaive patch for discussion] Add Purge+Suspend metrics as UMA.
Patch Set: Fixed misuse of CanPurgeAndSuspend Created 4 years, 2 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_TEST_MOCK_RENDER_PROCESS_HOST_H_ 5 #ifndef CONTENT_PUBLIC_TEST_MOCK_RENDER_PROCESS_HOST_H_
6 #define CONTENT_PUBLIC_TEST_MOCK_RENDER_PROCESS_HOST_H_ 6 #define CONTENT_PUBLIC_TEST_MOCK_RENDER_PROCESS_HOST_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 #include <memory> 10 #include <memory>
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 int cdm_id) const override; 102 int cdm_id) const override;
103 #endif 103 #endif
104 bool IsProcessBackgrounded() const override; 104 bool IsProcessBackgrounded() const override;
105 void IncrementServiceWorkerRefCount() override; 105 void IncrementServiceWorkerRefCount() override;
106 void DecrementServiceWorkerRefCount() override; 106 void DecrementServiceWorkerRefCount() override;
107 void IncrementSharedWorkerRefCount() override; 107 void IncrementSharedWorkerRefCount() override;
108 void DecrementSharedWorkerRefCount() override; 108 void DecrementSharedWorkerRefCount() override;
109 void ForceReleaseWorkerRefCounts() override; 109 void ForceReleaseWorkerRefCounts() override;
110 bool IsWorkerRefCountDisabled() override; 110 bool IsWorkerRefCountDisabled() override;
111 void PurgeAndSuspend() override; 111 void PurgeAndSuspend() override;
112 const base::TimeTicks& GetLastPurgeAndSuspendTime() const override;
112 113
113 // IPC::Sender via RenderProcessHost. 114 // IPC::Sender via RenderProcessHost.
114 bool Send(IPC::Message* msg) override; 115 bool Send(IPC::Message* msg) override;
115 116
116 // IPC::Listener via RenderProcessHost. 117 // IPC::Listener via RenderProcessHost.
117 bool OnMessageReceived(const IPC::Message& msg) override; 118 bool OnMessageReceived(const IPC::Message& msg) override;
118 void OnChannelConnected(int32_t peer_pid) override; 119 void OnChannelConnected(int32_t peer_pid) override;
119 120
120 // Attaches the factory object so we can remove this object in its destructor 121 // Attaches the factory object so we can remove this object in its destructor
121 // and prevent MockRenderProcessHostFacotry from deleting it. 122 // and prevent MockRenderProcessHostFacotry from deleting it.
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
188 // for deleting all MockRenderProcessHosts that have not deleted by a test in 189 // for deleting all MockRenderProcessHosts that have not deleted by a test in
189 // the destructor and prevent them from being leaked. 190 // the destructor and prevent them from being leaked.
190 mutable ScopedVector<MockRenderProcessHost> processes_; 191 mutable ScopedVector<MockRenderProcessHost> processes_;
191 192
192 DISALLOW_COPY_AND_ASSIGN(MockRenderProcessHostFactory); 193 DISALLOW_COPY_AND_ASSIGN(MockRenderProcessHostFactory);
193 }; 194 };
194 195
195 } // namespace content 196 } // namespace content
196 197
197 #endif // CONTENT_PUBLIC_TEST_MOCK_RENDER_PROCESS_HOST_H_ 198 #endif // CONTENT_PUBLIC_TEST_MOCK_RENDER_PROCESS_HOST_H_
OLDNEW
« no previous file with comments | « content/public/common/content_features.cc ('k') | content/public/test/mock_render_process_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698