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

Side by Side Diff: content/browser/renderer_host/render_process_host_impl.h

Issue 2412113002: Use SharedPersistentMemoryAllocator to share field trial state (Closed)
Patch Set: address comments 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_BROWSER_RENDERER_HOST_RENDER_PROCESS_HOST_IMPL_H_ 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_PROCESS_HOST_IMPL_H_
6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_PROCESS_HOST_IMPL_H_ 6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_PROCESS_HOST_IMPL_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 540 matching lines...) Expand 10 before | Expand all | Expand 10 after
551 // for UMA. 551 // for UMA.
552 size_t max_worker_count_; 552 size_t max_worker_count_;
553 553
554 // Context shared for each mojom::PermissionService instance created for this 554 // Context shared for each mojom::PermissionService instance created for this
555 // RPH. 555 // RPH.
556 std::unique_ptr<PermissionServiceContext> permission_service_context_; 556 std::unique_ptr<PermissionServiceContext> permission_service_context_;
557 557
558 // The memory allocator, if any, in which the renderer will write its metrics. 558 // The memory allocator, if any, in which the renderer will write its metrics.
559 std::unique_ptr<base::SharedPersistentMemoryAllocator> metrics_allocator_; 559 std::unique_ptr<base::SharedPersistentMemoryAllocator> metrics_allocator_;
560 560
561 // Anonymous shared memory segment to share with subprocess containing list of
562 // field trials (represented as a string).
563 // TODO(crbug.com/653874): Eventually remove this and use single shared memory
564 // object across processes.
565 std::unique_ptr<base::SharedMemory> field_trial_state_;
566
567 bool channel_connected_; 561 bool channel_connected_;
568 bool sent_render_process_ready_; 562 bool sent_render_process_ready_;
569 563
570 #if defined(OS_ANDROID) 564 #if defined(OS_ANDROID)
571 // UI thread is the source of sync IPCs and all shutdown signals. 565 // UI thread is the source of sync IPCs and all shutdown signals.
572 // Therefore a proper shutdown event to unblock the UI thread is not 566 // Therefore a proper shutdown event to unblock the UI thread is not
573 // possible without massive refactoring shutdown code. 567 // possible without massive refactoring shutdown code.
574 // Luckily Android never performs a clean shutdown. So explicitly 568 // Luckily Android never performs a clean shutdown. So explicitly
575 // ignore this problem. 569 // ignore this problem.
576 base::WaitableEvent never_signaled_; 570 base::WaitableEvent never_signaled_;
577 #endif 571 #endif
578 572
579 scoped_refptr<ResourceMessageFilter> resource_message_filter_; 573 scoped_refptr<ResourceMessageFilter> resource_message_filter_;
580 574
581 mojom::RouteProviderAssociatedPtr remote_route_provider_; 575 mojom::RouteProviderAssociatedPtr remote_route_provider_;
582 576
583 // A WeakPtrFactory which is reset every time Cleanup() runs. Used to vend 577 // A WeakPtrFactory which is reset every time Cleanup() runs. Used to vend
584 // WeakPtrs which are invalidated any time the RPHI is recycled. 578 // WeakPtrs which are invalidated any time the RPHI is recycled.
585 std::unique_ptr<base::WeakPtrFactory<RenderProcessHostImpl>> 579 std::unique_ptr<base::WeakPtrFactory<RenderProcessHostImpl>>
586 instance_weak_factory_; 580 instance_weak_factory_;
587 581
588 base::WeakPtrFactory<RenderProcessHostImpl> weak_factory_; 582 base::WeakPtrFactory<RenderProcessHostImpl> weak_factory_;
589 583
590 DISALLOW_COPY_AND_ASSIGN(RenderProcessHostImpl); 584 DISALLOW_COPY_AND_ASSIGN(RenderProcessHostImpl);
591 }; 585 };
592 586
593 } // namespace content 587 } // namespace content
594 588
595 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_PROCESS_HOST_IMPL_H_ 589 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_PROCESS_HOST_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698