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

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

Issue 2749203002: Remove ScopedVector from content/. (Closed)
Patch Set: Remove ScopedVector from content/. Created 3 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_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>
11 #include <utility> 11 #include <utility>
12 #include <vector>
12 13
13 #include "base/macros.h" 14 #include "base/macros.h"
14 #include "base/memory/scoped_vector.h"
15 #include "base/metrics/persistent_memory_allocator.h" 15 #include "base/metrics/persistent_memory_allocator.h"
16 #include "base/observer_list.h" 16 #include "base/observer_list.h"
17 #include "content/public/browser/render_process_host.h" 17 #include "content/public/browser/render_process_host.h"
18 #include "content/public/browser/render_process_host_factory.h" 18 #include "content/public/browser/render_process_host_factory.h"
19 #include "ipc/ipc_test_sink.h" 19 #include "ipc/ipc_test_sink.h"
20 #include "media/media_features.h" 20 #include "media/media_features.h"
21 #include "mojo/public/cpp/bindings/associated_interface_ptr.h" 21 #include "mojo/public/cpp/bindings/associated_interface_ptr.h"
22 #include "services/service_manager/public/cpp/interface_provider.h" 22 #include "services/service_manager/public/cpp/interface_provider.h"
23 23
24 class StoragePartition; 24 class StoragePartition;
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
185 185
186 // Removes the given MockRenderProcessHost from the MockRenderProcessHost list 186 // Removes the given MockRenderProcessHost from the MockRenderProcessHost list
187 // without deleting it. When a test deletes a MockRenderProcessHost, we need 187 // without deleting it. When a test deletes a MockRenderProcessHost, we need
188 // to remove it from |processes_| to prevent it from being deleted twice. 188 // to remove it from |processes_| to prevent it from being deleted twice.
189 void Remove(MockRenderProcessHost* host) const; 189 void Remove(MockRenderProcessHost* host) const;
190 190
191 private: 191 private:
192 // A list of MockRenderProcessHosts created by this object. This list is used 192 // A list of MockRenderProcessHosts created by this object. This list is used
193 // for deleting all MockRenderProcessHosts that have not deleted by a test in 193 // for deleting all MockRenderProcessHosts that have not deleted by a test in
194 // the destructor and prevent them from being leaked. 194 // the destructor and prevent them from being leaked.
195 mutable ScopedVector<MockRenderProcessHost> processes_; 195 mutable std::vector<std::unique_ptr<MockRenderProcessHost>> processes_;
196 196
197 DISALLOW_COPY_AND_ASSIGN(MockRenderProcessHostFactory); 197 DISALLOW_COPY_AND_ASSIGN(MockRenderProcessHostFactory);
198 }; 198 };
199 199
200 } // namespace content 200 } // namespace content
201 201
202 #endif // CONTENT_PUBLIC_TEST_MOCK_RENDER_PROCESS_HOST_H_ 202 #endif // CONTENT_PUBLIC_TEST_MOCK_RENDER_PROCESS_HOST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698