Change RenderProcessHost::GetID to RenderProcessHost::GetDeprecatedID
This change bulk changes RenderProcessHost::GetID to RenderProcessHost::GetDeprecatedID to support the transition to a strongly typed ChildProcessId. Bug: 379869738 Change-Id: Ib0c991536486ef29702ea166cdcf12ea68ed70ee Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6065543 Reviewed-by: Arthur Sonzogni <arthursonzogni@chromium.org> Owners-Override: Arthur Sonzogni <arthursonzogni@chromium.org> Reviewed-by: Avi Drissman <avi@chromium.org> Reviewed-by: Alex Moshchuk <alexmos@chromium.org> Commit-Queue: Emily Andrews <emiled@microsoft.com> Cr-Commit-Position: refs/heads/main@{#1394500}
This commit is contained in:

committed by
Chromium LUCI CQ

parent
532f00958d
commit
d15fd76ecb
android_webview/browser
aw_content_browser_client.ccaw_content_browser_client_receiver_bindings.ccaw_contents.ccaw_context_menu_helper.ccaw_permission_manager.ccaw_web_contents_delegate.cc
apps
chrome/browser
android
oom_intervention
apps
ash
chromebox_for_meetings
browser
extensions
file_manager
file_manager
fileapi
policy
power
background
badging
browsing_data
chrome_content_browser_client.ccchrome_content_browser_client_browsertest.ccchrome_content_browser_client_receiver_bindings.ccchrome_content_browser_client_unittest.ccchromeos
policy
reporting
websites
controlled_frame
devtools
direct_sockets
dom_distiller
download
extensions
api
developer_private
downloads
processes
settings_private
tab_capture
web_navigation
web_request
web_view
file_system_access
chrome_file_system_access_permission_context_browsertest.ccchrome_file_system_access_permission_context_unittest.cc
font_prewarmer_tab_helper.ccguest_view
mime_handler_view
media
android
cast_mirroring_service_host.cccast_mirroring_service_host_browsertest.ccoutput_protection_impl.ccrouter
unified_autoplay_browsertest.ccwebrtc
audio_debug_recordings_handler.cccurrent_tab_desktop_media_list.ccdesktop_capture_access_handler.ccdesktop_capture_access_handler_unittest.ccdesktop_capture_devices_util.ccdisplay_media_access_handler_unittest.ccmedia_stream_devices_controller_browsertest.ccmedia_stream_focus_delegate_unittest.cctab_capture_access_handler_unittest.cctab_desktop_media_list.ccwebrtc_desktop_capture_browsertest.ccwebrtc_event_log_manager.ccwebrtc_event_log_manager_unittest.ccwebrtc_logging_controller.cc
metrics
chrome_metrics_extensions_helper.ccchrome_metrics_extensions_helper_unittest.cc
power
process_memory_metrics_emitter.ccnet
offline_pages
pdf
permissions
plugins
chrome_content_browser_client_plugins_part.ccchrome_plugin_service_filter.ccchrome_plugin_service_filter_unittest.ccplugin_info_host_impl_browsertest.ccplugin_observer.ccplugin_observer_common.cc
policy
predictors
preloading
prefetch
search_prefetch
printing
renderer_context_menu
renderer_host
resource_coordinator
search
signin
site_isolation
spellchecker
spell_check_host_chrome_impl_mac_browsertest.ccspell_check_host_chrome_impl_win_browsertest.ccspellcheck_service_browsertest.cc
supervised_user
support_tool
tab_contents
task_manager
providers
ui
android
aura
accessibility
blocked_content
browser.ccbrowser_instant_controller.ccbrowser_instant_controller_unittest.ccbrowser_navigator.ccbrowser_navigator_browsertest.ccextensions
search
views
desktop_capture
payments
sync
tab_sharing
webui
accessibility
downloads
new_tab_page
top_chrome
web_applications
chromecast/browser
components
autofill
content
browser
blocked_content
content_capture
browser
content_settings
crash
content
guest_view
browser
metrics
network_hints
no_state_prefetch
page_load_metrics
browser
paint_preview
browser
password_manager
content
browser
performance_manager
binders.cc
public
render_process_user_data.ccresource_attribution
v8_memory
permissions
contexts
permission_manager.ccprinting
browser
renderer_context_menu
safe_browsing
content
browser
subresource_filter
content
visitedlink
web_cache
browser
content
browser
android
back_forward_cache_features_browsertest.ccbackground_fetch
background_sync
blob_storage
browser_child_process_observer_browsertest.ccbrowser_interface_binders.ccchild_process_security_policy_impl.cccross_site_transfer_browsertest.ccdevtools
devtools_instrumentation.cc
protocol
render_frame_devtools_agent_host.ccservice_worker_devtools_agent_host.ccshared_storage_worklet_devtools_agent_host.ccshared_worker_devtools_agent_host.ccdownload
download_browsertest.ccdownload_manager_impl.ccdownload_request_utils.ccdrag_download_file.ccsave_file_manager.ccsave_package.cc
fenced_frame
file_system
file_system_access
font_access
image_capture
interest_group
isolated_origin_browsertest.ccloader
media
android
capture
captured_surface_controller_unittest.ccflinging_renderer.ccforwarding_audio_stream_factory.ccforwarding_audio_stream_factory_unittest.ccmedia_devices_permission_checker_unittest.ccmedia_interface_proxy.ccmedia_internals.ccmidi_host_unittest.ccnetwork
notifications
permissions
preloading
prefetch
prefetch_network_context.ccprefetch_network_context_unittest.ccprefetch_service_unittest.ccprefetch_url_loader_interceptor.ccprefetch_url_loader_interceptor_unittest.cc
prerender
presentation
process_internals
push_messaging
renderer_host
agent_scheduling_group_host.ccclipboard_host_impl.cccross_process_frame_connector.ccdocument_token_browsertest.ccframe_tree.ccframe_tree_unittest.ccipc_utils.cckeep_alive_handle_factory.cc
media
audio_output_authorization_handler_unittest.cccapture_handle_manager_unittest.ccmedia_stream_ui_proxy_unittest.ccrender_frame_audio_input_stream_factory.ccrender_frame_audio_input_stream_factory_unittest.ccrender_frame_audio_output_stream_factory.cc
navigation_controller_impl.ccnavigation_controller_impl_browsertest.ccnavigation_policy_container_builder_browsertest.ccnavigation_request.ccnavigation_request_browsertest.ccnavigator.ccp2p
render_document_host_browsertest.ccrender_frame_host_impl.ccrender_frame_host_impl_browsertest.ccrender_frame_host_impl_interface_binders.ccrender_frame_host_manager.ccrender_frame_host_manager_browsertest.ccrender_frame_host_manager_unittest.ccrender_frame_proxy_host.ccrender_frame_proxy_host.hrender_process_host_browsertest.ccrender_process_host_impl.ccrender_process_host_impl.hrender_process_host_impl_receiver_bindings.ccrender_process_host_unittest.ccrender_view_host_impl.ccrender_view_host_unittest.ccrender_widget_host_browsertest.ccrender_widget_host_impl.ccrender_widget_host_unittest.ccrender_widget_host_view_child_frame_browsertest.ccrender_widget_host_view_mac.mmspare_render_process_host_manager_browsertest.ccspare_render_process_host_manager_impl.ccunassigned_site_instance_browsertest.ccsecurity
security_exploit_browsertest.ccservice_worker
embedded_worker_instance.ccembedded_worker_test_helper.ccservice_worker_browsertest.ccservice_worker_fetch_dispatcher.ccservice_worker_file_upload_browsertest.ccservice_worker_host.ccservice_worker_process_browsertest.ccservice_worker_process_manager.ccservice_worker_process_manager.hservice_worker_process_manager_unittest.ccservice_worker_version_unittest.cc
shared_storage
site_instance_group.ccsite_instance_impl.ccsite_instance_impl_unittest.ccsite_per_process_browsertest.ccsite_per_process_hit_test_browsertest.ccspeech
ssl
storage_access
storage_partition_impl.ccsynthetic_trial_syncer.ccurl_loader_factory_params_helper.ccweb_contents
file_chooser_impl.ccweb_contents_impl.ccweb_contents_impl_browsertest.ccweb_contents_impl_unittest.ccweb_contents_observer_browsertest.ccweb_contents_view_aura.cc
web_database
web_package
webauth
webrtc
webui
worker_host
dedicated_worker_host.ccdedicated_worker_host_factory_impl.ccdedicated_worker_service_impl.ccdedicated_worker_service_impl_unittest.ccshared_worker_host.ccshared_worker_host_unittest.ccshared_worker_service_impl.ccshared_worker_service_impl_unittest.ccworker_script_fetcher.cc
xr
service
public
browser
common
test
test
content_browser_test_utils_internal.cctest_render_view_host.cctest_web_contents.ccweb_contents_observer_consistency_checker.cc
web_test
docs
extensions
browser
api
app_window
automation_internal
guest_view
messaging
storage
web_request
app_window
event_router.ccevent_router_unittest.ccextension_function_dispatcher.ccextension_util.ccextension_web_contents_observer.ccguest_view
process_manager.ccprocess_map.ccrenderer_startup_helper.ccscript_executor.ccscript_injection_tracker.ccservice_worker
user_script_loader.ccshell
services/network/public/mojom
ui/webui/examples/browser/ui/web
@ -339,7 +339,7 @@ void AwContentBrowserClient::RenderProcessWillLaunch(
|
||||
// per-view access checks, and access is granted by default (see
|
||||
// AwSettings.mAllowContentUrlAccess).
|
||||
content::ChildProcessSecurityPolicy::GetInstance()->GrantRequestScheme(
|
||||
host->GetID(), url::kContentScheme);
|
||||
host->GetDeprecatedID(), url::kContentScheme);
|
||||
}
|
||||
|
||||
bool AwContentBrowserClient::IsExplicitNavigation(
|
||||
|
@ -240,7 +240,7 @@ void AwContentBrowserClient::ExposeInterfacesToRenderer(
|
||||
content::RenderProcessHost* render_process_host) {
|
||||
registry->AddInterface<safe_browsing::mojom::SafeBrowsing>(
|
||||
base::BindRepeating(
|
||||
&MaybeCreateSafeBrowsing, render_process_host->GetID(),
|
||||
&MaybeCreateSafeBrowsing, render_process_host->GetDeprecatedID(),
|
||||
base::BindRepeating(
|
||||
&AwContentBrowserClient::GetSafeBrowsingUrlCheckerDelegate,
|
||||
base::Unretained(this))),
|
||||
@ -249,7 +249,7 @@ void AwContentBrowserClient::ExposeInterfacesToRenderer(
|
||||
// Add the RenderMessageFilter creation callback, the callbkack will happen on
|
||||
// the IO thread.
|
||||
registry->AddInterface<mojom::RenderMessageFilter>(base::BindRepeating(
|
||||
&CreateRenderMessageFilter, render_process_host->GetID()));
|
||||
&CreateRenderMessageFilter, render_process_host->GetDeprecatedID()));
|
||||
}
|
||||
|
||||
void AwContentBrowserClient::RegisterBrowserInterfaceBindersForFrame(
|
||||
|
@ -1593,7 +1593,7 @@ void AwContents::TrimMemory(JNIEnv* env, jint level, jboolean visible) {
|
||||
|
||||
void AwContents::GrantFileSchemeAccesstoChildProcess(JNIEnv* env) {
|
||||
content::ChildProcessSecurityPolicy::GetInstance()->GrantRequestScheme(
|
||||
web_contents_->GetPrimaryMainFrame()->GetProcess()->GetID(),
|
||||
web_contents_->GetPrimaryMainFrame()->GetProcess()->GetDeprecatedID(),
|
||||
url::kFileScheme);
|
||||
}
|
||||
|
||||
|
@ -36,7 +36,7 @@ void AwContextMenuHelper::ShowContextMenu(
|
||||
Java_AwContextMenuHelper_showContextMenu(
|
||||
env, java_obj_,
|
||||
context_menu::BuildJavaContextMenuParams(
|
||||
params, render_frame_host.GetProcess()->GetID(),
|
||||
params, render_frame_host.GetProcess()->GetDeprecatedID(),
|
||||
render_frame_host.GetFrameToken().value()),
|
||||
view->GetContainerView());
|
||||
}
|
||||
|
@ -847,7 +847,7 @@ void AwPermissionManager::ClearEnumerateDevicesCachedPermission(
|
||||
|
||||
int AwPermissionManager::GetRenderProcessID(
|
||||
content::RenderFrameHost* render_frame_host) {
|
||||
return render_frame_host->GetProcess()->GetID();
|
||||
return render_frame_host->GetProcess()->GetDeprecatedID();
|
||||
}
|
||||
|
||||
int AwPermissionManager::GetRenderFrameID(
|
||||
|
@ -136,7 +136,7 @@ void AwWebContentsDelegate::RunFileChooser(
|
||||
<< "Multiple concurrent FileChooser requests are not supported.";
|
||||
file_select_listener_ = std::move(listener);
|
||||
Java_AwWebContentsDelegate_runFileChooser(
|
||||
env, java_delegate, render_frame_host->GetProcess()->GetID(),
|
||||
env, java_delegate, render_frame_host->GetProcess()->GetDeprecatedID(),
|
||||
render_frame_host->GetRoutingID(), params.mode, params.open_writable,
|
||||
ConvertUTF16ToJavaString(env,
|
||||
base::JoinString(params.accept_types, u",")),
|
||||
|
@ -340,7 +340,7 @@ class PlatformAppPathLauncher
|
||||
std::vector<GrantedFileEntry> granted_entries;
|
||||
for (size_t i = 0; i < entry_paths_.size(); ++i) {
|
||||
granted_entries.push_back(CreateFileEntry(
|
||||
context_, app, context_info->render_process_host->GetID(),
|
||||
context_, app, context_info->render_process_host->GetDeprecatedID(),
|
||||
entries_[i].path, entries_[i].is_directory));
|
||||
}
|
||||
|
||||
|
@ -165,9 +165,13 @@ void OomInterventionTabHelper::OnCrashDumpProcessed(
|
||||
int rph_id,
|
||||
const crash_reporter::CrashMetricsReporter::ReportedCrashTypeSet&
|
||||
reported_counts) {
|
||||
if (rph_id !=
|
||||
web_contents()->GetPrimaryPage().GetMainDocument().GetProcess()->GetID())
|
||||
if (rph_id != web_contents()
|
||||
->GetPrimaryPage()
|
||||
.GetMainDocument()
|
||||
.GetProcess()
|
||||
->GetDeprecatedID()) {
|
||||
return;
|
||||
}
|
||||
if (!reported_counts.count(
|
||||
crash_reporter::CrashMetricsReporter::ProcessedCrashCounts::
|
||||
kRendererForegroundVisibleOom)) {
|
||||
|
@ -4425,14 +4425,14 @@ IN_PROC_BROWSER_TEST_P(WebViewTest, Shim_TestLoadDataAPI) {
|
||||
url::Origin base_origin =
|
||||
url::Origin::Create(embedded_test_server()->GetURL("localhost", "/"));
|
||||
EXPECT_TRUE(security_policy->CanAccessDataForOrigin(
|
||||
guest_main_frame->GetProcess()->GetID(), base_origin));
|
||||
guest_main_frame->GetProcess()->GetDeprecatedID(), base_origin));
|
||||
|
||||
// Ensure the process doesn't have access to some other origin. This
|
||||
// verifies that site isolation is enforced.
|
||||
url::Origin another_origin =
|
||||
url::Origin::Create(embedded_test_server()->GetURL("foo.com", "/"));
|
||||
EXPECT_FALSE(security_policy->CanAccessDataForOrigin(
|
||||
guest_main_frame->GetProcess()->GetID(), another_origin));
|
||||
guest_main_frame->GetProcess()->GetDeprecatedID(), another_origin));
|
||||
}
|
||||
|
||||
IN_PROC_BROWSER_TEST_P(WebViewTest, Shim_TestLoadDataAPIAccessibleResources) {
|
||||
@ -4813,7 +4813,7 @@ IN_PROC_BROWSER_TEST_P(
|
||||
Profile* profile = browser()->profile();
|
||||
int rules_registry_id =
|
||||
extensions::WebViewGuest::GetOrGenerateRulesRegistryID(
|
||||
guest_view->owner_rfh()->GetProcess()->GetID(),
|
||||
guest_view->owner_rfh()->GetProcess()->GetDeprecatedID(),
|
||||
guest_view->view_instance_id());
|
||||
|
||||
extensions::RulesRegistryService* registry_service =
|
||||
@ -4853,7 +4853,7 @@ IN_PROC_BROWSER_TEST_P(WebViewChannelTest,
|
||||
extensions::RulesRegistryService::Get(profile);
|
||||
int rules_registry_id =
|
||||
extensions::WebViewGuest::GetOrGenerateRulesRegistryID(
|
||||
guest_view->owner_rfh()->GetProcess()->GetID(),
|
||||
guest_view->owner_rfh()->GetProcess()->GetDeprecatedID(),
|
||||
guest_view->view_instance_id());
|
||||
|
||||
// Get an existing registered rule for the guest.
|
||||
@ -5145,8 +5145,9 @@ IN_PROC_BROWSER_TEST_P(WebViewTest, NavigateGuestToWebviewAccessibleResource) {
|
||||
|
||||
auto* process_map = extensions::ProcessMap::Get(guest->GetBrowserContext());
|
||||
auto* guest_process = guest->GetProcess();
|
||||
EXPECT_FALSE(process_map->Contains(guest_process->GetID()));
|
||||
EXPECT_FALSE(process_map->GetExtensionIdForProcess(guest_process->GetID()));
|
||||
EXPECT_FALSE(process_map->Contains(guest_process->GetDeprecatedID()));
|
||||
EXPECT_FALSE(
|
||||
process_map->GetExtensionIdForProcess(guest_process->GetDeprecatedID()));
|
||||
|
||||
extensions::ExtensionRegistry* registry =
|
||||
extensions::ExtensionRegistry::Get(browser()->profile());
|
||||
@ -5154,7 +5155,7 @@ IN_PROC_BROWSER_TEST_P(WebViewTest, NavigateGuestToWebviewAccessibleResource) {
|
||||
registry->enabled_extensions().GetByID(guest_url.host());
|
||||
EXPECT_EQ(extensions::mojom::ContextType::kUnprivilegedExtension,
|
||||
process_map->GetMostLikelyContextType(
|
||||
extension, guest_process->GetID(), &guest_url));
|
||||
extension, guest_process->GetDeprecatedID(), &guest_url));
|
||||
}
|
||||
|
||||
// Tests that a WebView can reload a WebView accessible resource. See
|
||||
@ -6626,9 +6627,9 @@ IN_PROC_BROWSER_TEST_P(WebstoreWebViewTest, NoRendererKillWithChromeWebStore) {
|
||||
// considered an extension process and does not have the privileged webstore
|
||||
// API.
|
||||
auto* process_map = extensions::ProcessMap::Get(guest->GetBrowserContext());
|
||||
EXPECT_FALSE(process_map->Contains(guest->GetProcess()->GetID()));
|
||||
EXPECT_FALSE(
|
||||
process_map->GetExtensionIdForProcess(guest->GetProcess()->GetID()));
|
||||
EXPECT_FALSE(process_map->Contains(guest->GetProcess()->GetDeprecatedID()));
|
||||
EXPECT_FALSE(process_map->GetExtensionIdForProcess(
|
||||
guest->GetProcess()->GetDeprecatedID()));
|
||||
EXPECT_EQ(false, content::EvalJs(guest, "!!chrome.webstorePrivate"));
|
||||
}
|
||||
|
||||
@ -6845,7 +6846,7 @@ IN_PROC_BROWSER_TEST_P(SitePerProcessWebViewTest, ErrorPageInSubframe) {
|
||||
// crash the browser.
|
||||
content::RenderFrameHost* guest_subframe =
|
||||
ChildFrameAt(GetGuestRenderFrameHost(), 0);
|
||||
int initial_process_id = guest_subframe->GetProcess()->GetID();
|
||||
int initial_process_id = guest_subframe->GetProcess()->GetDeprecatedID();
|
||||
const GURL error_url = GURL("unknownscheme:foo");
|
||||
{
|
||||
content::TestFrameNavigationObserver load_observer(guest_subframe);
|
||||
@ -6863,7 +6864,7 @@ IN_PROC_BROWSER_TEST_P(SitePerProcessWebViewTest, ErrorPageInSubframe) {
|
||||
EXPECT_FALSE(error_origin.GetTupleOrPrecursorTupleIfOpaque().IsValid());
|
||||
|
||||
// The error page should not load in the initiator's process.
|
||||
EXPECT_NE(initial_process_id, error_rfh->GetProcess()->GetID());
|
||||
EXPECT_NE(initial_process_id, error_rfh->GetProcess()->GetDeprecatedID());
|
||||
}
|
||||
}
|
||||
|
||||
@ -7051,7 +7052,8 @@ IN_PROC_BROWSER_TEST_P(SitePerProcessWebViewTest, ContentScript) {
|
||||
{
|
||||
extensions::WebViewRendererState::WebViewInfo info;
|
||||
ASSERT_TRUE(web_view_renderer_state->GetInfo(
|
||||
main_frame->GetProcess()->GetID(), main_frame->GetRoutingID(), &info));
|
||||
main_frame->GetProcess()->GetDeprecatedID(), main_frame->GetRoutingID(),
|
||||
&info));
|
||||
EXPECT_TRUE(info.content_script_ids.empty());
|
||||
}
|
||||
|
||||
@ -7092,9 +7094,9 @@ IN_PROC_BROWSER_TEST_P(SitePerProcessWebViewTest, ContentScript) {
|
||||
main_frame = GetGuestRenderFrameHost();
|
||||
{
|
||||
extensions::WebViewRendererState::WebViewInfo info;
|
||||
ASSERT_TRUE(
|
||||
web_view_renderer_state->GetInfo(main_frame->GetProcess()->GetID(),
|
||||
main_frame->GetRoutingID(), &info));
|
||||
ASSERT_TRUE(web_view_renderer_state->GetInfo(
|
||||
main_frame->GetProcess()->GetDeprecatedID(),
|
||||
main_frame->GetRoutingID(), &info));
|
||||
EXPECT_EQ(1U, info.content_script_ids.size());
|
||||
}
|
||||
}
|
||||
@ -7118,7 +7120,8 @@ IN_PROC_BROWSER_TEST_P(SitePerProcessWebViewTest, ContentScript) {
|
||||
{
|
||||
extensions::WebViewRendererState::WebViewInfo info;
|
||||
ASSERT_TRUE(web_view_renderer_state->GetInfo(
|
||||
main_frame->GetProcess()->GetID(), main_frame->GetRoutingID(), &info));
|
||||
main_frame->GetProcess()->GetDeprecatedID(), main_frame->GetRoutingID(),
|
||||
&info));
|
||||
EXPECT_EQ(1U, info.content_script_ids.size());
|
||||
}
|
||||
|
||||
|
@ -169,7 +169,7 @@ std::optional<base::Value::List> ConstructFileSystemList(
|
||||
bool has_delete_permission = permissions_data->CheckAPIPermissionWithParam(
|
||||
extensions::mojom::APIPermissionID::kMediaGalleries, &delete_param);
|
||||
|
||||
const int child_id = rfh->GetProcess()->GetID();
|
||||
const int child_id = rfh->GetProcess()->GetDeprecatedID();
|
||||
base::Value::List list;
|
||||
for (const auto& filesystem : filesystems) {
|
||||
base::Value::Dict file_system_dict_value;
|
||||
|
@ -137,7 +137,7 @@ void CfmMemoryDetails::CollectExtensionsInformation() {
|
||||
// needed
|
||||
if (const extensions::Extension* extension =
|
||||
extensions::ProcessMap::Get(host->GetBrowserContext())
|
||||
->GetEnabledExtensionByProcessID(host->GetID())) {
|
||||
->GetEnabledExtensionByProcessID(host->GetDeprecatedID())) {
|
||||
proc_mem_info->extension_info.push_back(mojom::ExtensionData::New(
|
||||
extension->name(), extension->GetVersionForDisplay(), extension->id(),
|
||||
extension->hashed_id().value(), extension->description()));
|
||||
|
@ -312,7 +312,8 @@ void OnImageSearchDone(
|
||||
ExtensionFunction::ResponseAction
|
||||
FileManagerPrivateEnableExternalFileSchemeFunction::Run() {
|
||||
ChildProcessSecurityPolicy::GetInstance()->GrantRequestScheme(
|
||||
render_frame_host()->GetProcess()->GetID(), content::kExternalFileScheme);
|
||||
render_frame_host()->GetProcess()->GetDeprecatedID(),
|
||||
content::kExternalFileScheme);
|
||||
return RespondNow(NoArguments());
|
||||
}
|
||||
|
||||
@ -352,8 +353,9 @@ ExtensionFunction::ResponseAction FileManagerPrivateGrantAccessFunction::Run() {
|
||||
backend->GrantFileAccessToOrigin(url::Origin::Create(source_url()),
|
||||
file_system_url.virtual_path());
|
||||
content::ChildProcessSecurityPolicy::GetInstance()
|
||||
->GrantCreateReadWriteFile(render_frame_host()->GetProcess()->GetID(),
|
||||
file_system_url.path());
|
||||
->GrantCreateReadWriteFile(
|
||||
render_frame_host()->GetProcess()->GetDeprecatedID(),
|
||||
file_system_url.path());
|
||||
}
|
||||
}
|
||||
return RespondNow(NoArguments());
|
||||
|
@ -275,7 +275,7 @@ void FileBrowserHandlerExecutor::SetupPermissionsAndDispatchEvent(
|
||||
return;
|
||||
}
|
||||
|
||||
int handler_pid = context_info->render_process_host->GetID();
|
||||
int handler_pid = context_info->render_process_host->GetDeprecatedID();
|
||||
if (handler_pid <= 0) {
|
||||
ExecuteDoneOnUIThread(false, "No app available");
|
||||
return;
|
||||
|
@ -212,7 +212,7 @@ class SubresourceExternalFileURLLoaderFactoryTest
|
||||
: public ExternalFileURLLoaderFactoryTest {
|
||||
protected:
|
||||
int render_process_host_id() override {
|
||||
return render_process_host()->GetID();
|
||||
return render_process_host()->GetDeprecatedID();
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -119,7 +119,7 @@ content::MediaStreamRequest CreateMediaStreamRequest(
|
||||
std::string requested_video_device_id,
|
||||
blink::mojom::MediaStreamType video_type) {
|
||||
return content::MediaStreamRequest(
|
||||
web_contents->GetPrimaryMainFrame()->GetProcess()->GetID(),
|
||||
web_contents->GetPrimaryMainFrame()->GetProcess()->GetDeprecatedID(),
|
||||
web_contents->GetPrimaryMainFrame()->GetRoutingID(),
|
||||
/*page_request_id=*/0, url::Origin::Create(GURL(kExampleUrl)),
|
||||
/*user_gesture=*/false, blink::MEDIA_GENERATE_STREAM,
|
||||
@ -967,7 +967,9 @@ class DlpContentManagerAshScreenShareBrowserTest
|
||||
content::DesktopMediaID::kFakeId);
|
||||
const std::string requested_video_device_id =
|
||||
content::DesktopStreamsRegistry::GetInstance()->RegisterStream(
|
||||
web_contents->GetPrimaryMainFrame()->GetProcess()->GetID(),
|
||||
web_contents->GetPrimaryMainFrame()
|
||||
->GetProcess()
|
||||
->GetDeprecatedID(),
|
||||
web_contents->GetPrimaryMainFrame()->GetRoutingID(),
|
||||
url::Origin::Create(GURL(kExampleUrl)), media_id,
|
||||
content::DesktopStreamRegistryType::kRegistryStreamTypeDesktop);
|
||||
@ -991,7 +993,8 @@ class DlpContentManagerAshScreenShareBrowserTest
|
||||
content::WebContents* web_contents,
|
||||
bool expect_allowed = true,
|
||||
bool expect_warning = false) {
|
||||
int process_id = web_contents->GetPrimaryMainFrame()->GetProcess()->GetID();
|
||||
int process_id =
|
||||
web_contents->GetPrimaryMainFrame()->GetProcess()->GetDeprecatedID();
|
||||
int frame_id = web_contents->GetPrimaryMainFrame()->GetRoutingID();
|
||||
const content::DesktopMediaID media_id(
|
||||
content::DesktopMediaID::TYPE_WEB_CONTENTS,
|
||||
@ -1297,7 +1300,7 @@ IN_PROC_BROWSER_TEST_F(DlpContentManagerAshScreenShareBrowserTest,
|
||||
content::DesktopMediaID::TYPE_WEB_CONTENTS,
|
||||
content::DesktopMediaID::kNullId,
|
||||
content::WebContentsMediaCaptureId(
|
||||
web_contents->GetPrimaryMainFrame()->GetProcess()->GetID(),
|
||||
web_contents->GetPrimaryMainFrame()->GetProcess()->GetDeprecatedID(),
|
||||
web_contents->GetPrimaryMainFrame()->GetRoutingID()));
|
||||
manager->OnScreenShareStarted(kLabel, {media_id}, kApplicationTitle,
|
||||
stop_cb_.Get(), state_change_cb_.Get(),
|
||||
@ -1335,7 +1338,9 @@ IN_PROC_BROWSER_TEST_F(DlpContentManagerAshScreenShareBrowserTest,
|
||||
content::DesktopMediaID::TYPE_WEB_CONTENTS,
|
||||
content::DesktopMediaID::kNullId,
|
||||
content::WebContentsMediaCaptureId(
|
||||
new_web_contents->GetPrimaryMainFrame()->GetProcess()->GetID(),
|
||||
new_web_contents->GetPrimaryMainFrame()
|
||||
->GetProcess()
|
||||
->GetDeprecatedID(),
|
||||
new_web_contents->GetPrimaryMainFrame()->GetRoutingID()));
|
||||
// Simulate changing the source to another tab.
|
||||
manager->OnScreenShareSourceChanging(
|
||||
|
@ -1180,7 +1180,7 @@ TEST_F(DlpContentManagerAshTest, ScreenShareRestricted) {
|
||||
content::DesktopMediaID::TYPE_WEB_CONTENTS,
|
||||
content::DesktopMediaID::kNullId,
|
||||
content::WebContentsMediaCaptureId(
|
||||
web_contents->GetPrimaryMainFrame()->GetProcess()->GetID(),
|
||||
web_contents->GetPrimaryMainFrame()->GetProcess()->GetDeprecatedID(),
|
||||
web_contents->GetPrimaryMainFrame()->GetRoutingID()));
|
||||
GetManager()->CheckScreenShareRestriction(media_id, kApplicationName,
|
||||
cb.Get());
|
||||
@ -1239,7 +1239,7 @@ TEST_F(DlpContentManagerAshTest, ScreenShareWarnedContinued) {
|
||||
content::DesktopMediaID::TYPE_WEB_CONTENTS,
|
||||
content::DesktopMediaID::kNullId,
|
||||
content::WebContentsMediaCaptureId(
|
||||
web_contents->GetPrimaryMainFrame()->GetProcess()->GetID(),
|
||||
web_contents->GetPrimaryMainFrame()->GetProcess()->GetDeprecatedID(),
|
||||
web_contents->GetPrimaryMainFrame()->GetRoutingID()));
|
||||
|
||||
// Warn restriction is enforced: allow and remember that the user proceeded.
|
||||
@ -1293,7 +1293,7 @@ TEST_F(DlpContentManagerAshTest, ScreenShareWarnedCancelled) {
|
||||
content::DesktopMediaID::TYPE_WEB_CONTENTS,
|
||||
content::DesktopMediaID::kNullId,
|
||||
content::WebContentsMediaCaptureId(
|
||||
web_contents->GetPrimaryMainFrame()->GetProcess()->GetID(),
|
||||
web_contents->GetPrimaryMainFrame()->GetProcess()->GetDeprecatedID(),
|
||||
web_contents->GetPrimaryMainFrame()->GetRoutingID()));
|
||||
|
||||
// Warn restriction is enforced: reject since the user canceled.
|
||||
|
@ -58,7 +58,7 @@ void RendererFreezer::OnRenderProcessHostCreated(
|
||||
return;
|
||||
}
|
||||
|
||||
const int rph_id = rph->GetID();
|
||||
const int rph_id = rph->GetDeprecatedID();
|
||||
|
||||
if (gcm_extension_processes_.find(rph_id) != gcm_extension_processes_.end()) {
|
||||
LOG(ERROR) << "Received duplicate notifications about the creation of a "
|
||||
@ -103,7 +103,7 @@ void RendererFreezer::OnRenderProcessHostCreated(
|
||||
void RendererFreezer::RenderProcessExited(
|
||||
content::RenderProcessHost* host,
|
||||
const content::ChildProcessTerminationInfo& info) {
|
||||
auto it = gcm_extension_processes_.find(host->GetID());
|
||||
auto it = gcm_extension_processes_.find(host->GetDeprecatedID());
|
||||
if (it == gcm_extension_processes_.end()) {
|
||||
LOG(ERROR) << "Received unrequested RenderProcessExited message";
|
||||
return;
|
||||
@ -120,7 +120,7 @@ void RendererFreezer::RenderProcessExited(
|
||||
|
||||
void RendererFreezer::RenderProcessHostDestroyed(
|
||||
content::RenderProcessHost* host) {
|
||||
auto it = gcm_extension_processes_.find(host->GetID());
|
||||
auto it = gcm_extension_processes_.find(host->GetDeprecatedID());
|
||||
if (it == gcm_extension_processes_.end()) {
|
||||
LOG(ERROR) << "Received unrequested RenderProcessHostDestroyed message";
|
||||
return;
|
||||
|
@ -265,7 +265,7 @@ class RendererFreezerTestWithExtensions : public RendererFreezerTest {
|
||||
|
||||
// Fake that the RenderProcessHost is hosting the gcm app.
|
||||
extensions::ProcessMap::Get(profile_)->Insert(extension->id(),
|
||||
rph->GetID());
|
||||
rph->GetDeprecatedID());
|
||||
|
||||
SimulateRenderProcessHostCreated(rph);
|
||||
}
|
||||
|
@ -44,7 +44,7 @@ BackgroundContents::BackgroundContents(
|
||||
|
||||
WebContents::CreateParams create_params(profile_, std::move(site_instance));
|
||||
create_params.opener_render_process_id =
|
||||
opener ? opener->GetProcess()->GetID() : MSG_ROUTING_NONE;
|
||||
opener ? opener->GetProcess()->GetDeprecatedID() : MSG_ROUTING_NONE;
|
||||
create_params.opener_render_frame_id =
|
||||
opener ? opener->GetRoutingID() : MSG_ROUTING_NONE;
|
||||
|
||||
|
@ -98,7 +98,7 @@ void BadgeManager::BindFrameReceiverIfAllowed(
|
||||
return;
|
||||
|
||||
auto context = std::make_unique<FrameBindingContext>(
|
||||
frame->GetProcess()->GetID(), frame->GetRoutingID());
|
||||
frame->GetProcess()->GetDeprecatedID(), frame->GetRoutingID());
|
||||
badge_manager->receivers_.Add(badge_manager, std::move(receiver),
|
||||
std::move(context));
|
||||
}
|
||||
@ -125,7 +125,7 @@ void BadgeManager::BindServiceWorkerReceiverIfAllowed(
|
||||
return;
|
||||
|
||||
auto context = std::make_unique<BadgeManager::ServiceWorkerBindingContext>(
|
||||
service_worker_process_host->GetID(), info.scope);
|
||||
service_worker_process_host->GetDeprecatedID(), info.scope);
|
||||
|
||||
badge_manager->receivers_.Add(badge_manager, std::move(receiver),
|
||||
std::move(context));
|
||||
|
@ -1125,7 +1125,7 @@ void ChromeBrowsingDataRemoverDelegate::RemoveEmbedderData(
|
||||
if (render_process_host->GetBrowserContext() == profile_ &&
|
||||
render_process_host->IsInitializedAndNotDead()) {
|
||||
web_cache::WebCacheManager::GetInstance()->ClearCacheForProcess(
|
||||
render_process_host->GetID());
|
||||
render_process_host->GetDeprecatedID());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1937,8 +1937,9 @@ void ChromeContentBrowserClient::RenderProcessWillLaunch(
|
||||
|
||||
#if BUILDFLAG(ENABLE_NACL)
|
||||
if (IsNaclAllowed() && !profile->IsSystemProfile()) {
|
||||
host->AddFilter(new nacl::NaClHostMessageFilter(
|
||||
host->GetID(), profile->IsOffTheRecord(), profile->GetPath()));
|
||||
host->AddFilter(new nacl::NaClHostMessageFilter(host->GetDeprecatedID(),
|
||||
profile->IsOffTheRecord(),
|
||||
profile->GetPath()));
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -2374,7 +2375,7 @@ bool ChromeContentBrowserClient::IsSuitableHost(
|
||||
InstantServiceFactory::GetForProfile(profile);
|
||||
if (instant_service) {
|
||||
bool is_instant_process =
|
||||
instant_service->IsInstantProcess(process_host->GetID());
|
||||
instant_service->IsInstantProcess(process_host->GetDeprecatedID());
|
||||
bool should_be_in_instant_process =
|
||||
search::ShouldAssignURLToInstantRenderer(site_url, profile);
|
||||
if (is_instant_process || should_be_in_instant_process)
|
||||
@ -2823,7 +2824,7 @@ void ChromeContentBrowserClient::AppendExtraCommandLineSwitches(
|
||||
InstantService* instant_service =
|
||||
InstantServiceFactory::GetForProfile(profile);
|
||||
if (instant_service &&
|
||||
instant_service->IsInstantProcess(process->GetID())) {
|
||||
instant_service->IsInstantProcess(process->GetDeprecatedID())) {
|
||||
command_line->AppendSwitch(switches::kInstantProcess);
|
||||
}
|
||||
|
||||
@ -4236,7 +4237,7 @@ bool ChromeContentBrowserClient::CanCreateWindow(
|
||||
auto* process_map = extensions::ProcessMap::Get(profile);
|
||||
auto* registry = extensions::ExtensionRegistry::Get(profile);
|
||||
if (!URLHasExtensionPermission(process_map, registry, opener_url,
|
||||
opener->GetProcess()->GetID(),
|
||||
opener->GetProcess()->GetDeprecatedID(),
|
||||
APIPermissionID::kBackground)) {
|
||||
return false;
|
||||
}
|
||||
@ -4258,7 +4259,7 @@ bool ChromeContentBrowserClient::CanCreateWindow(
|
||||
|
||||
#if BUILDFLAG(ENABLE_GUEST_VIEW)
|
||||
if (extensions::WebViewRendererState::GetInstance()->IsGuest(
|
||||
opener->GetProcess()->GetID())) {
|
||||
opener->GetProcess()->GetDeprecatedID())) {
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
@ -7688,10 +7689,10 @@ bool ChromeContentBrowserClient::IsClipboardPasteAllowed(
|
||||
render_frame_host->GetMainFrame()->GetLastCommittedOrigin().GetURL();
|
||||
auto* registry = extensions::ExtensionRegistry::Get(profile);
|
||||
if (url.SchemeIs(extensions::kExtensionScheme)) {
|
||||
return URLHasExtensionPermission(extensions::ProcessMap::Get(profile),
|
||||
registry, url,
|
||||
render_frame_host->GetProcess()->GetID(),
|
||||
APIPermissionID::kClipboardRead);
|
||||
return URLHasExtensionPermission(
|
||||
extensions::ProcessMap::Get(profile), registry, url,
|
||||
render_frame_host->GetProcess()->GetDeprecatedID(),
|
||||
APIPermissionID::kClipboardRead);
|
||||
}
|
||||
|
||||
// or (4) origination from a process that at least might be running a
|
||||
|
@ -222,7 +222,7 @@ IN_PROC_BROWSER_TEST_F(IsolatedOriginNTPBrowserTest,
|
||||
InstantService* instant_service =
|
||||
InstantServiceFactory::GetForProfile(browser()->profile());
|
||||
EXPECT_TRUE(instant_service->IsInstantProcess(
|
||||
contents->GetPrimaryMainFrame()->GetProcess()->GetID()));
|
||||
contents->GetPrimaryMainFrame()->GetProcess()->GetDeprecatedID()));
|
||||
EXPECT_EQ(contents->GetPrimaryMainFrame()->GetSiteInstance()->GetSiteURL(),
|
||||
ntp_site_instance->GetSiteURL());
|
||||
|
||||
@ -230,7 +230,7 @@ IN_PROC_BROWSER_TEST_F(IsolatedOriginNTPBrowserTest,
|
||||
// process.
|
||||
ASSERT_TRUE(ui_test_utils::NavigateToURL(browser(), isolated_url));
|
||||
EXPECT_FALSE(instant_service->IsInstantProcess(
|
||||
contents->GetPrimaryMainFrame()->GetProcess()->GetID()));
|
||||
contents->GetPrimaryMainFrame()->GetProcess()->GetDeprecatedID()));
|
||||
EXPECT_EQ(contents->GetPrimaryMainFrame()->GetSiteInstance()->GetSiteURL(),
|
||||
site_instance->GetSiteURL());
|
||||
}
|
||||
@ -276,7 +276,7 @@ IN_PROC_BROWSER_TEST_F(OpenWindowFromNTPBrowserTest,
|
||||
InstantService* instant_service =
|
||||
InstantServiceFactory::GetForProfile(browser()->profile());
|
||||
EXPECT_TRUE(instant_service->IsInstantProcess(
|
||||
ntp_tab->GetPrimaryMainFrame()->GetProcess()->GetID()));
|
||||
ntp_tab->GetPrimaryMainFrame()->GetProcess()->GetDeprecatedID()));
|
||||
|
||||
// Execute script that creates new window from ntp tab with
|
||||
// ntp.com/title1.html as target url. Host is same as remote-ntp host, yet
|
||||
@ -298,7 +298,7 @@ IN_PROC_BROWSER_TEST_F(OpenWindowFromNTPBrowserTest,
|
||||
EXPECT_EQ(generic_url, opened_tab->GetLastCommittedURL());
|
||||
// New created tab should not reside in an Instant process.
|
||||
EXPECT_FALSE(instant_service->IsInstantProcess(
|
||||
opened_tab->GetPrimaryMainFrame()->GetProcess()->GetID()));
|
||||
opened_tab->GetPrimaryMainFrame()->GetProcess()->GetDeprecatedID()));
|
||||
}
|
||||
|
||||
// Test that the System AccentColor keyword is supported ONLY for installed
|
||||
|
@ -224,7 +224,7 @@ void ChromeContentBrowserClient::ExposeInterfacesToRenderer(
|
||||
base::BindRepeating(
|
||||
&NetBenchmarking::Create,
|
||||
loading_predictor ? loading_predictor->GetWeakPtr() : nullptr,
|
||||
render_process_host->GetID()),
|
||||
render_process_host->GetDeprecatedID()),
|
||||
ui_task_runner);
|
||||
}
|
||||
|
||||
@ -232,7 +232,8 @@ void ChromeContentBrowserClient::ExposeInterfacesToRenderer(
|
||||
if (safe_browsing_service_) {
|
||||
registry->AddInterface<safe_browsing::mojom::SafeBrowsing>(
|
||||
base::BindRepeating(
|
||||
&MaybeCreateSafeBrowsingForRenderer, render_process_host->GetID(),
|
||||
&MaybeCreateSafeBrowsingForRenderer,
|
||||
render_process_host->GetDeprecatedID(),
|
||||
base::BindRepeating(
|
||||
&ChromeContentBrowserClient::GetSafeBrowsingUrlCheckerDelegate,
|
||||
base::Unretained(this))),
|
||||
@ -240,7 +241,7 @@ void ChromeContentBrowserClient::ExposeInterfacesToRenderer(
|
||||
#if BUILDFLAG(ENABLE_EXTENSIONS)
|
||||
registry->AddInterface<safe_browsing::mojom::ExtensionWebRequestReporter>(
|
||||
base::BindRepeating(&MaybeCreateExtensionWebRequestReporterForRenderer,
|
||||
render_process_host->GetID()),
|
||||
render_process_host->GetDeprecatedID()),
|
||||
ui_task_runner);
|
||||
#endif // BUILDFLAG(ENABLE_EXTENSIONS)
|
||||
}
|
||||
@ -259,7 +260,7 @@ void ChromeContentBrowserClient::ExposeInterfacesToRenderer(
|
||||
return host->GetProcess().Duplicate();
|
||||
return base::Process();
|
||||
},
|
||||
render_process_host->GetID());
|
||||
render_process_host->GetDeprecatedID());
|
||||
registry->AddInterface<mojom::ModuleEventSink>(
|
||||
base::BindRepeating(
|
||||
&ModuleEventSinkImpl::Create, std::move(get_process),
|
||||
@ -276,7 +277,7 @@ void ChromeContentBrowserClient::ExposeInterfacesToRenderer(
|
||||
base::BindRepeating(
|
||||
&performance_manager::mechanism::userspace_swap::
|
||||
UserspaceSwapInitializationImpl::Create,
|
||||
render_process_host->GetID()),
|
||||
render_process_host->GetDeprecatedID()),
|
||||
performance_manager::PerformanceManager::GetTaskRunner());
|
||||
}
|
||||
#endif // BUILDFLAG(IS_CHROMEOS) && defined(ARCH_CPU_X86_64)
|
||||
@ -329,8 +330,8 @@ void ChromeContentBrowserClient::RegisterBrowserInterfaceBindersForFrame(
|
||||
map->Add<spellcheck::mojom::SpellCheckHost>(base::BindRepeating(
|
||||
[](content::RenderFrameHost* frame_host,
|
||||
mojo::PendingReceiver<spellcheck::mojom::SpellCheckHost> receiver) {
|
||||
SpellCheckHostChromeImpl::Create(frame_host->GetProcess()->GetID(),
|
||||
std::move(receiver));
|
||||
SpellCheckHostChromeImpl::Create(
|
||||
frame_host->GetProcess()->GetDeprecatedID(), std::move(receiver));
|
||||
}));
|
||||
#endif // BUILDFLAG(ENABLE_SPELLCHECK)
|
||||
|
||||
@ -669,15 +670,15 @@ void ChromeContentBrowserClient::BindHostReceiverForRenderer(
|
||||
#if BUILDFLAG(ENABLE_SPELLCHECK)
|
||||
if (auto host_receiver =
|
||||
receiver.As<spellcheck::mojom::SpellCheckInitializationHost>()) {
|
||||
SpellCheckInitializationHostImpl::Create(render_process_host->GetID(),
|
||||
std::move(host_receiver));
|
||||
SpellCheckInitializationHostImpl::Create(
|
||||
render_process_host->GetDeprecatedID(), std::move(host_receiver));
|
||||
return;
|
||||
}
|
||||
|
||||
#if BUILDFLAG(HAS_SPELLCHECK_PANEL)
|
||||
if (auto host_receiver =
|
||||
receiver.As<spellcheck::mojom::SpellCheckPanelHost>()) {
|
||||
SpellCheckPanelHostImpl::Create(render_process_host->GetID(),
|
||||
SpellCheckPanelHostImpl::Create(render_process_host->GetDeprecatedID(),
|
||||
std::move(host_receiver));
|
||||
return;
|
||||
}
|
||||
|
@ -1398,7 +1398,8 @@ class ChromeContentBrowserClientSwitchTest
|
||||
command_line.AppendSwitchASCII(switches::kProcessType,
|
||||
switches::kRendererProcess);
|
||||
|
||||
client_.AppendExtraCommandLineSwitches(&command_line, process()->GetID());
|
||||
client_.AppendExtraCommandLineSwitches(&command_line,
|
||||
process()->GetDeprecatedID());
|
||||
return command_line;
|
||||
}
|
||||
|
||||
|
@ -377,11 +377,11 @@ void DlpContentManager::ScreenShareInfo::Resume() {
|
||||
content::RenderFrameHost* main_frame = web_contents_->GetPrimaryMainFrame();
|
||||
DCHECK(main_frame);
|
||||
source_callback_.Run(
|
||||
content::DesktopMediaID(
|
||||
content::DesktopMediaID::TYPE_WEB_CONTENTS,
|
||||
content::DesktopMediaID::kNullId,
|
||||
content::WebContentsMediaCaptureId(
|
||||
main_frame->GetProcess()->GetID(), main_frame->GetRoutingID())),
|
||||
content::DesktopMediaID(content::DesktopMediaID::TYPE_WEB_CONTENTS,
|
||||
content::DesktopMediaID::kNullId,
|
||||
content::WebContentsMediaCaptureId(
|
||||
main_frame->GetProcess()->GetDeprecatedID(),
|
||||
main_frame->GetRoutingID())),
|
||||
captured_surface_control_active_);
|
||||
// Start after source will be changed and notified.
|
||||
pending_start_on_source_change_ = true;
|
||||
|
@ -644,7 +644,7 @@ IN_PROC_BROWSER_TEST_F(DlpContentManagerReportingBrowserTest,
|
||||
content::DesktopMediaID::TYPE_WEB_CONTENTS,
|
||||
content::DesktopMediaID::kNullId,
|
||||
content::WebContentsMediaCaptureId(
|
||||
web_contents->GetPrimaryMainFrame()->GetProcess()->GetID(),
|
||||
web_contents->GetPrimaryMainFrame()->GetProcess()->GetDeprecatedID(),
|
||||
web_contents->GetPrimaryMainFrame()->GetRoutingID()));
|
||||
|
||||
DlpContentManager* manager = helper_->GetContentManager();
|
||||
|
@ -61,7 +61,7 @@ void WebsiteEventsObserver::OnUrlOpened(const GURL& url_opened,
|
||||
->mutable_website_opened_data();
|
||||
website_opened_data->set_url(url_opened.spec());
|
||||
website_opened_data->set_render_process_host_id(
|
||||
web_contents->GetRenderViewHost()->GetProcess()->GetID());
|
||||
web_contents->GetRenderViewHost()->GetProcess()->GetDeprecatedID());
|
||||
website_opened_data->set_render_frame_routing_id(
|
||||
web_contents->GetRenderViewHost()->GetRoutingID());
|
||||
|
||||
@ -84,7 +84,7 @@ void WebsiteEventsObserver::OnUrlClosed(const GURL& url_closed,
|
||||
->mutable_website_closed_data();
|
||||
website_closed_data->set_url(url_closed.spec());
|
||||
website_closed_data->set_render_process_host_id(
|
||||
web_contents->GetRenderViewHost()->GetProcess()->GetID());
|
||||
web_contents->GetRenderViewHost()->GetProcess()->GetDeprecatedID());
|
||||
website_closed_data->set_render_frame_routing_id(
|
||||
web_contents->GetRenderViewHost()->GetRoutingID());
|
||||
|
||||
|
@ -34,7 +34,7 @@ ControlledFrameInternalContextMenusCreateFunction::Run() {
|
||||
Profile::FromBrowserContext(browser_context())->IsOffTheRecord(),
|
||||
extensions::MenuItem::ExtensionKey(
|
||||
/*extension_id=*/std::string(),
|
||||
render_frame_host()->GetProcess()->GetID(),
|
||||
render_frame_host()->GetProcess()->GetDeprecatedID(),
|
||||
render_frame_host()->GetRoutingID(), params->instance_id));
|
||||
|
||||
auto* menu_manager = extensions::MenuManager::Get(browser_context());
|
||||
|
@ -262,7 +262,8 @@ IN_PROC_BROWSER_TEST_F(ControlledFrameApiTest, ContextMenusCreate) {
|
||||
auto* menu_manager = extensions::MenuManager::Get(profile());
|
||||
|
||||
const extensions::MenuItem::ExtensionKey extension_key(
|
||||
/*extension_id=*/"", web_view_guest->owner_rfh()->GetProcess()->GetID(),
|
||||
/*extension_id=*/"",
|
||||
web_view_guest->owner_rfh()->GetProcess()->GetDeprecatedID(),
|
||||
web_view_guest->owner_rfh()->GetRoutingID(),
|
||||
web_view_guest->view_instance_id());
|
||||
EXPECT_EQ(0u, menu_manager->MenuItemsSize(extension_key));
|
||||
@ -305,7 +306,8 @@ IN_PROC_BROWSER_TEST_F(ControlledFrameApiTest, ContextMenusUpdate) {
|
||||
CreateContextMenuItem(app_frame, kItem1ID, kItem1Title));
|
||||
|
||||
const extensions::MenuItem::ExtensionKey extension_key(
|
||||
/*extension_id=*/"", web_view_guest->owner_rfh()->GetProcess()->GetID(),
|
||||
/*extension_id=*/"",
|
||||
web_view_guest->owner_rfh()->GetProcess()->GetDeprecatedID(),
|
||||
web_view_guest->owner_rfh()->GetRoutingID(),
|
||||
web_view_guest->view_instance_id());
|
||||
ASSERT_EQ(1u, menu_manager->MenuItemsSize(extension_key));
|
||||
@ -339,7 +341,8 @@ IN_PROC_BROWSER_TEST_F(ControlledFrameApiTest, ContextMenusRemove) {
|
||||
EXPECT_EQ(kEvalSuccessStr, RemoveContextMenuItem(app_frame, kItem1ID));
|
||||
|
||||
const extensions::MenuItem::ExtensionKey extension_key(
|
||||
/*extension_id=*/"", web_view_guest->owner_rfh()->GetProcess()->GetID(),
|
||||
/*extension_id=*/"",
|
||||
web_view_guest->owner_rfh()->GetProcess()->GetDeprecatedID(),
|
||||
web_view_guest->owner_rfh()->GetRoutingID(),
|
||||
web_view_guest->view_instance_id());
|
||||
ASSERT_EQ(1u, menu_manager->MenuItemsSize(extension_key));
|
||||
@ -367,7 +370,8 @@ IN_PROC_BROWSER_TEST_F(ControlledFrameApiTest, ContextMenusRemoveAll) {
|
||||
EXPECT_EQ(kEvalSuccessStr, RemoveAllContextMenuItems(app_frame));
|
||||
|
||||
const extensions::MenuItem::ExtensionKey extension_key(
|
||||
/*extension_id=*/"", web_view_guest->owner_rfh()->GetProcess()->GetID(),
|
||||
/*extension_id=*/"",
|
||||
web_view_guest->owner_rfh()->GetProcess()->GetDeprecatedID(),
|
||||
web_view_guest->owner_rfh()->GetRoutingID(),
|
||||
web_view_guest->view_instance_id());
|
||||
ASSERT_EQ(0u, menu_manager->MenuItemsSize(extension_key));
|
||||
|
@ -113,7 +113,7 @@ TEST_F(ControlledFrameMenuIconLoaderTest, LoadGetAndRemoveIcon) {
|
||||
ControlledFrameMenuIconLoader menu_icon_loader;
|
||||
|
||||
extensions::MenuItem::ExtensionKey extension_key(
|
||||
/*extension_id=*/"", main_rfh()->GetProcess()->GetID(),
|
||||
/*extension_id=*/"", main_rfh()->GetProcess()->GetDeprecatedID(),
|
||||
main_rfh()->GetRoutingID(), kTestWebViewInstanceId);
|
||||
|
||||
base::test::TestFuture<void> future;
|
||||
@ -144,7 +144,7 @@ TEST_F(ControlledFrameMenuIconLoaderTest, MenuManager) {
|
||||
// is able to be accessed through GetIcon. Also check that the icon is removed
|
||||
// when the context item is removed.
|
||||
std::unique_ptr<extensions::MenuItem> item = CreateTestItem(
|
||||
main_rfh()->GetProcess()->GetID(), main_rfh()->GetRoutingID(),
|
||||
main_rfh()->GetProcess()->GetDeprecatedID(), main_rfh()->GetRoutingID(),
|
||||
/*webview_instance_id=*/kTestWebViewInstanceId, /*string_id=*/"test",
|
||||
/*visible=*/true);
|
||||
const extensions::MenuItem::Id& item_id = item->id();
|
||||
@ -176,7 +176,7 @@ TEST_F(ControlledFrameMenuIconLoaderTest, ContextMenuMatcher) {
|
||||
extensions::MenuManager* menu_manager = CreateMenuManager();
|
||||
|
||||
std::unique_ptr<extensions::MenuItem> item = CreateTestItem(
|
||||
main_rfh()->GetProcess()->GetID(), main_rfh()->GetRoutingID(),
|
||||
main_rfh()->GetProcess()->GetDeprecatedID(), main_rfh()->GetRoutingID(),
|
||||
/*webview_instance_id=*/kTestWebViewInstanceId, /*string_id=*/"test",
|
||||
/*visible=*/true);
|
||||
const extensions::MenuItem::Id& item_id = item->id();
|
||||
|
@ -2057,7 +2057,7 @@ IN_PROC_BROWSER_TEST_F(DevToolsExtensionTest,
|
||||
content::WebContents* offscreen_contents =
|
||||
offscreen_document->host_contents();
|
||||
EXPECT_EQ(offscreen_url.spec(), view.url);
|
||||
EXPECT_EQ(offscreen_document->render_process_host()->GetID(),
|
||||
EXPECT_EQ(offscreen_document->render_process_host()->GetDeprecatedID(),
|
||||
view.render_process_id);
|
||||
EXPECT_EQ(offscreen_contents->GetPrimaryMainFrame()->GetRoutingID(),
|
||||
view.render_view_id);
|
||||
|
@ -174,7 +174,7 @@ std::string RegisterFileSystem(WebContents* web_contents,
|
||||
content::ChildProcessSecurityPolicy::GetInstance();
|
||||
RenderViewHost* render_view_host =
|
||||
web_contents->GetPrimaryMainFrame()->GetRenderViewHost();
|
||||
int renderer_id = render_view_host->GetProcess()->GetID();
|
||||
int renderer_id = render_view_host->GetProcess()->GetDeprecatedID();
|
||||
policy->GrantReadFileSystem(renderer_id, file_system.id());
|
||||
policy->GrantWriteFileSystem(renderer_id, file_system.id());
|
||||
policy->GrantCreateFileForFileSystem(renderer_id, file_system.id());
|
||||
|
@ -2135,7 +2135,7 @@ void DevToolsUIBindings::AddDevToolsExtensionsToClient() {
|
||||
// process. Grant the devtools process the ability to request URLs from the
|
||||
// extension.
|
||||
content::ChildProcessSecurityPolicy::GetInstance()->GrantRequestOrigin(
|
||||
web_contents_->GetPrimaryMainFrame()->GetProcess()->GetID(),
|
||||
web_contents_->GetPrimaryMainFrame()->GetProcess()->GetDeprecatedID(),
|
||||
url::Origin::Create(extension->url()));
|
||||
|
||||
base::Value::List runtime_allowed_hosts;
|
||||
|
@ -1667,7 +1667,7 @@ void DevToolsWindow::OpenInNewTab(const GURL& url) {
|
||||
content::RenderViewHost* render_view_host =
|
||||
inspected_web_contents->GetPrimaryMainFrame()->GetRenderViewHost();
|
||||
if (render_view_host)
|
||||
child_id = render_view_host->GetProcess()->GetID();
|
||||
child_id = render_view_host->GetProcess()->GetDeprecatedID();
|
||||
}
|
||||
// Use about:blank instead of an empty GURL. The browser treats an empty GURL
|
||||
// as navigating to the home page, which may be privileged (chrome://newtab/).
|
||||
@ -1965,8 +1965,9 @@ void DevToolsWindow::MaybeShowSharedProcessInfobar() {
|
||||
}
|
||||
|
||||
// Only show the infobar only if the RenderProcessHost id changes.
|
||||
int rph_id =
|
||||
inspected_web_contents->GetPrimaryMainFrame()->GetProcess()->GetID();
|
||||
int rph_id = inspected_web_contents->GetPrimaryMainFrame()
|
||||
->GetProcess()
|
||||
->GetDeprecatedID();
|
||||
if (checked_sharing_process_id_ == rph_id) {
|
||||
return;
|
||||
}
|
||||
|
@ -77,7 +77,7 @@ bool ChromeDirectSocketsDelegate::IsAPIAccessAllowed(
|
||||
content::RenderFrameHost& rfh) {
|
||||
// No additional rules for Chrome Apps.
|
||||
if (extensions::ProcessMap::Get(rfh.GetBrowserContext())
|
||||
->Contains(rfh.GetProcess()->GetID())) {
|
||||
->Contains(rfh.GetProcess()->GetDeprecatedID())) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -97,7 +97,8 @@ bool ChromeDirectSocketsDelegate::ValidateAddressAndPort(
|
||||
// model.
|
||||
if (const extensions::Extension* extension =
|
||||
extensions::ProcessMap::Get(rfh.GetBrowserContext())
|
||||
->GetEnabledExtensionByProcessID(rfh.GetProcess()->GetID())) {
|
||||
->GetEnabledExtensionByProcessID(
|
||||
rfh.GetProcess()->GetDeprecatedID())) {
|
||||
return ValidateAddressAndPortForChromeApp(extension, address, port,
|
||||
protocol);
|
||||
}
|
||||
@ -115,7 +116,7 @@ void ChromeDirectSocketsDelegate::RequestPrivateNetworkAccess(
|
||||
base::OnceCallback<void(bool)> callback) {
|
||||
// No additional rules for Chrome Apps.
|
||||
if (extensions::ProcessMap::Get(rfh.GetBrowserContext())
|
||||
->Contains(rfh.GetProcess()->GetID())) {
|
||||
->Contains(rfh.GetProcess()->GetDeprecatedID())) {
|
||||
std::move(callback).Run(/*allow_access=*/true);
|
||||
return;
|
||||
}
|
||||
|
@ -282,7 +282,7 @@ IN_PROC_BROWSER_TEST_F(DomDistillerTabUtilsBrowserTest,
|
||||
->tab_strip_model()
|
||||
->GetActiveWebContents()
|
||||
->GetPrimaryMainFrame();
|
||||
int process_id = main_frame->GetProcess()->GetID();
|
||||
int process_id = main_frame->GetProcess()->GetDeprecatedID();
|
||||
int frame_routing_id = main_frame->GetRoutingID();
|
||||
distillability_observer.WaitForResult(expected_result);
|
||||
|
||||
|
@ -591,7 +591,8 @@ void DownloadController::StartContextMenuDownload(
|
||||
const ContextMenuParams& params,
|
||||
WebContents* web_contents,
|
||||
bool is_link) {
|
||||
int process_id = web_contents->GetRenderViewHost()->GetProcess()->GetID();
|
||||
int process_id =
|
||||
web_contents->GetRenderViewHost()->GetProcess()->GetDeprecatedID();
|
||||
int routing_id = web_contents->GetRenderViewHost()->GetRoutingID();
|
||||
|
||||
const content::WebContents::Getter& wc_getter(
|
||||
|
@ -100,8 +100,9 @@ void InterceptOMADownloadNavigationThrottle::InterceptDownload() {
|
||||
.value_or(std::string());
|
||||
content::WebContents* web_contents = navigation_handle()->GetWebContents();
|
||||
int process_id =
|
||||
web_contents ? web_contents->GetRenderViewHost()->GetProcess()->GetID()
|
||||
: 0;
|
||||
web_contents
|
||||
? web_contents->GetRenderViewHost()->GetProcess()->GetDeprecatedID()
|
||||
: 0;
|
||||
int routing_id =
|
||||
web_contents ? web_contents->GetRenderViewHost()->GetRoutingID() : 0;
|
||||
|
||||
|
@ -137,7 +137,7 @@ SavePackageFilePicker::SavePackageFilePicker(
|
||||
DownloadPrefs* download_prefs,
|
||||
content::SavePackagePathPickedCallback callback)
|
||||
: render_process_id_(
|
||||
web_contents->GetPrimaryMainFrame()->GetProcess()->GetID()),
|
||||
web_contents->GetPrimaryMainFrame()->GetProcess()->GetDeprecatedID()),
|
||||
can_save_as_complete_(can_save_as_complete),
|
||||
download_prefs_(download_prefs),
|
||||
callback_(std::move(callback)) {
|
||||
|
@ -1172,9 +1172,10 @@ IN_PROC_BROWSER_TEST_F(SavePageSitePerProcessBrowserTest,
|
||||
[web_contents, &did_kill_a_process](RenderFrameHost* frame) {
|
||||
if (frame->GetLastCommittedURL().host() == "bar.com") {
|
||||
RenderProcessHost* process_to_kill = frame->GetProcess();
|
||||
EXPECT_NE(
|
||||
web_contents->GetPrimaryMainFrame()->GetProcess()->GetID(),
|
||||
process_to_kill->GetID())
|
||||
EXPECT_NE(web_contents->GetPrimaryMainFrame()
|
||||
->GetProcess()
|
||||
->GetDeprecatedID(),
|
||||
process_to_kill->GetDeprecatedID())
|
||||
<< "a.com and bar.com should be in different processes.";
|
||||
|
||||
EXPECT_TRUE(process_to_kill->FastShutdownIfPossible());
|
||||
|
@ -437,7 +437,7 @@ IN_PROC_BROWSER_TEST_F(DeveloperPrivateApiTest, InspectOffscreenDocument) {
|
||||
content::WebContents* offscreen_contents =
|
||||
offscreen_document->host_contents();
|
||||
EXPECT_EQ(offscreen_url.spec(), view.url);
|
||||
EXPECT_EQ(offscreen_document->render_process_host()->GetID(),
|
||||
EXPECT_EQ(offscreen_document->render_process_host()->GetDeprecatedID(),
|
||||
view.render_process_id);
|
||||
EXPECT_EQ(offscreen_contents->GetPrimaryMainFrame()->GetRoutingID(),
|
||||
view.render_view_id);
|
||||
|
@ -191,9 +191,9 @@ void InspectableViewsFinder::GetViewsForExtensionProcess(
|
||||
}
|
||||
|
||||
content::RenderProcessHost* process = host->GetProcess();
|
||||
result->push_back(ConstructView(url, process->GetID(), host->GetRoutingID(),
|
||||
is_incognito, !host->IsInPrimaryMainFrame(),
|
||||
ConvertViewType(host_type)));
|
||||
result->push_back(ConstructView(
|
||||
url, process->GetDeprecatedID(), host->GetRoutingID(), is_incognito,
|
||||
!host->IsInPrimaryMainFrame(), ConvertViewType(host_type)));
|
||||
}
|
||||
|
||||
std::vector<WorkerId> service_worker_ids =
|
||||
@ -227,9 +227,10 @@ void InspectableViewsFinder::GetAppWindowViewsForExtension(
|
||||
url = window->initial_url();
|
||||
|
||||
content::RenderFrameHost* main_frame = web_contents->GetPrimaryMainFrame();
|
||||
result->push_back(ConstructView(
|
||||
url, main_frame->GetProcess()->GetID(), main_frame->GetRoutingID(),
|
||||
false, false, ConvertViewType(GetViewType(web_contents))));
|
||||
result->push_back(
|
||||
ConstructView(url, main_frame->GetProcess()->GetDeprecatedID(),
|
||||
main_frame->GetRoutingID(), false, false,
|
||||
ConvertViewType(GetViewType(web_contents))));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -723,7 +723,7 @@ class DownloadExtensionTest : public ExtensionApiTest {
|
||||
function->set_extension(extension);
|
||||
function->SetRenderFrameHost(tab->GetPrimaryMainFrame());
|
||||
function->set_source_process_id(
|
||||
tab->GetPrimaryMainFrame()->GetProcess()->GetID());
|
||||
tab->GetPrimaryMainFrame()->GetProcess()->GetDeprecatedID());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -472,7 +472,8 @@ ExtensionFunction::ResponseAction ProcessesGetProcessIdForTabFunction::Run() {
|
||||
|
||||
// TODO(crbug.com/41345944): chrome.processes.getProcessIdForTab API
|
||||
// incorrectly assumes a *single* renderer process per tab.
|
||||
const int process_id = contents->GetPrimaryMainFrame()->GetProcess()->GetID();
|
||||
const int process_id =
|
||||
contents->GetPrimaryMainFrame()->GetProcess()->GetDeprecatedID();
|
||||
return RespondNow(ArgumentList(
|
||||
api::processes::GetProcessIdForTab::Results::Create(process_id)));
|
||||
}
|
||||
|
@ -137,9 +137,9 @@ TEST_F(SettingsPrivateEventRouterTest, IncognitoEventRouting) {
|
||||
api::settings_private::OnPrefsChanged::kEventName, &otr_rph, kDummyURL);
|
||||
|
||||
// Hook up some test observers
|
||||
EventRouterObserver regular_counter(regular_rph.GetID());
|
||||
EventRouterObserver regular_counter(regular_rph.GetDeprecatedID());
|
||||
regular_event_router->AddObserverForTesting(®ular_counter);
|
||||
EventRouterObserver otr_counter(otr_rph.GetID());
|
||||
EventRouterObserver otr_counter(otr_rph.GetDeprecatedID());
|
||||
otr_event_router->AddObserverForTesting(&otr_counter);
|
||||
|
||||
EXPECT_EQ(0, regular_counter.dispatch_count);
|
||||
|
@ -74,7 +74,7 @@ DesktopMediaID BuildDesktopMediaID(content::WebContents* target_contents,
|
||||
target_contents->GetPrimaryMainFrame();
|
||||
DesktopMediaID source(
|
||||
DesktopMediaID::TYPE_WEB_CONTENTS, DesktopMediaID::kNullId,
|
||||
WebContentsMediaCaptureId(target_frame->GetProcess()->GetID(),
|
||||
WebContentsMediaCaptureId(target_frame->GetProcess()->GetDeprecatedID(),
|
||||
target_frame->GetRoutingID()));
|
||||
return source;
|
||||
}
|
||||
@ -192,7 +192,7 @@ ExtensionFunction::ResponseAction TabCaptureCaptureFunction::Run() {
|
||||
TabCaptureRegistry* registry = TabCaptureRegistry::Get(browser_context());
|
||||
content::RenderFrameHost* main_frame =
|
||||
extension_web_contents->GetPrimaryMainFrame();
|
||||
int caller_process_id = main_frame->GetProcess()->GetID();
|
||||
int caller_process_id = main_frame->GetProcess()->GetDeprecatedID();
|
||||
int frame_id = main_frame->GetRoutingID();
|
||||
std::string device_id = registry->AddRequest(
|
||||
target_contents, extension_id, false, extension()->url(), source,
|
||||
@ -283,7 +283,7 @@ ExtensionFunction::ResponseAction TabCaptureGetMediaStreamIdFunction::Run() {
|
||||
|
||||
content::RenderFrameHost* main_frame =
|
||||
consumer_contents->GetPrimaryMainFrame();
|
||||
caller_process_id = main_frame->GetProcess()->GetID();
|
||||
caller_process_id = main_frame->GetProcess()->GetDeprecatedID();
|
||||
restrict_to_render_frame_id = main_frame->GetRoutingID();
|
||||
} else if (should_restrict_to_render_frame) {
|
||||
content::WebContents* sender_contents = GetSenderWebContents();
|
||||
@ -298,7 +298,7 @@ ExtensionFunction::ResponseAction TabCaptureGetMediaStreamIdFunction::Run() {
|
||||
origin = extension()->url();
|
||||
content::RenderFrameHost* main_frame =
|
||||
sender_contents->GetPrimaryMainFrame();
|
||||
caller_process_id = main_frame->GetProcess()->GetID();
|
||||
caller_process_id = main_frame->GetProcess()->GetDeprecatedID();
|
||||
restrict_to_render_frame_id = main_frame->GetRoutingID();
|
||||
} else {
|
||||
// TODO(crbug.com/40805196): Use url::Origin directly here and
|
||||
|
@ -168,7 +168,7 @@ IN_PROC_BROWSER_TEST_F(TabCaptureApiTest, GetUserMediaTest) {
|
||||
web_contents->GetPrimaryMainFrame();
|
||||
ASSERT_TRUE(main_frame);
|
||||
listener.Reply(base::StringPrintf("web-contents-media-stream://%i:%i",
|
||||
main_frame->GetProcess()->GetID(),
|
||||
main_frame->GetProcess()->GetDeprecatedID(),
|
||||
main_frame->GetRoutingID()));
|
||||
|
||||
ResultCatcher catcher;
|
||||
|
@ -43,8 +43,9 @@ class TabCaptureRegistry::LiveRequest : public content::WebContentsObserver {
|
||||
extension_id_(extension_id),
|
||||
is_anonymous_(is_anonymous),
|
||||
registry_(registry),
|
||||
render_process_id_(
|
||||
target_contents->GetPrimaryMainFrame()->GetProcess()->GetID()),
|
||||
render_process_id_(target_contents->GetPrimaryMainFrame()
|
||||
->GetProcess()
|
||||
->GetDeprecatedID()),
|
||||
render_frame_id_(
|
||||
target_contents->GetPrimaryMainFrame()->GetRoutingID()) {
|
||||
DCHECK(web_contents());
|
||||
|
@ -356,7 +356,7 @@ void WebNavigationTabObserver::DidOpenRequestedURL(
|
||||
bool new_contents_is_present_in_tabstrip = ExtensionTabUtil::GetTabStripModel(
|
||||
new_contents, &ignored_tab_strip_model, &ignored_tab_index);
|
||||
router->RecordNewWebContents(
|
||||
web_contents(), source_render_frame_host->GetProcess()->GetID(),
|
||||
web_contents(), source_render_frame_host->GetProcess()->GetDeprecatedID(),
|
||||
source_render_frame_host->GetRoutingID(), url, new_contents,
|
||||
!new_contents_is_present_in_tabstrip);
|
||||
}
|
||||
@ -628,7 +628,8 @@ ExtensionFunction::ResponseAction WebNavigationGetAllFramesFunction::Run() {
|
||||
ExtensionApiFrameIdMap::GetFrameType(render_frame_host);
|
||||
frame.document_lifecycle =
|
||||
ExtensionApiFrameIdMap::GetDocumentLifecycle(render_frame_host);
|
||||
frame.process_id = render_frame_host->GetProcess()->GetID();
|
||||
frame.process_id =
|
||||
render_frame_host->GetProcess()->GetDeprecatedID();
|
||||
frame.error_occurred = navigation_state->GetErrorOccurredInFrame();
|
||||
result_list.push_back(std::move(frame));
|
||||
return content::RenderFrameHost::FrameIterationAction::kContinue;
|
||||
|
@ -112,7 +112,7 @@ void DispatchOnCommitted(events::HistogramValue histogram_value,
|
||||
ExtensionTabUtil::GetTabId(web_contents));
|
||||
dict.Set(web_navigation_api_constants::kUrlKey, url.spec());
|
||||
dict.Set(web_navigation_api_constants::kProcessIdKey,
|
||||
frame_host->GetProcess()->GetID());
|
||||
frame_host->GetProcess()->GetDeprecatedID());
|
||||
dict.Set(web_navigation_api_constants::kFrameIdKey,
|
||||
ExtensionApiFrameIdMap::GetFrameId(frame_host));
|
||||
dict.Set(web_navigation_api_constants::kParentFrameIdKey,
|
||||
@ -174,7 +174,7 @@ void DispatchOnDOMContentLoaded(content::WebContents* web_contents,
|
||||
web_navigation::OnDOMContentLoaded::Details details;
|
||||
details.tab_id = ExtensionTabUtil::GetTabId(web_contents);
|
||||
details.url = url.spec();
|
||||
details.process_id = frame_host->GetProcess()->GetID();
|
||||
details.process_id = frame_host->GetProcess()->GetDeprecatedID();
|
||||
details.frame_id = ExtensionApiFrameIdMap::GetFrameId(frame_host);
|
||||
details.parent_frame_id =
|
||||
ExtensionApiFrameIdMap::GetParentFrameId(frame_host);
|
||||
@ -206,7 +206,7 @@ void DispatchOnCompleted(content::WebContents* web_contents,
|
||||
web_navigation::OnCompleted::Details details;
|
||||
details.tab_id = ExtensionTabUtil::GetTabId(web_contents);
|
||||
details.url = url.spec();
|
||||
details.process_id = frame_host->GetProcess()->GetID();
|
||||
details.process_id = frame_host->GetProcess()->GetDeprecatedID();
|
||||
details.frame_id = ExtensionApiFrameIdMap::GetFrameId(frame_host);
|
||||
details.parent_frame_id =
|
||||
ExtensionApiFrameIdMap::GetParentFrameId(frame_host);
|
||||
@ -276,7 +276,7 @@ void DispatchOnErrorOccurred(content::WebContents* web_contents,
|
||||
web_navigation::OnErrorOccurred::Details details;
|
||||
details.tab_id = ExtensionTabUtil::GetTabId(web_contents);
|
||||
details.url = url.spec();
|
||||
details.process_id = frame_host->GetProcess()->GetID();
|
||||
details.process_id = frame_host->GetProcess()->GetDeprecatedID();
|
||||
details.frame_id = ExtensionApiFrameIdMap::GetFrameId(frame_host);
|
||||
details.parent_frame_id =
|
||||
ExtensionApiFrameIdMap::GetParentFrameId(frame_host);
|
||||
|
@ -2634,7 +2634,7 @@ IN_PROC_BROWSER_TEST_F(ExtensionWebRequestApiTest,
|
||||
content::RenderFrameHost* frame = temp_web_contents->GetPrimaryMainFrame();
|
||||
EXPECT_TRUE(api->MaybeProxyURLLoaderFactory(
|
||||
frame->GetProcess()->GetBrowserContext(), frame,
|
||||
frame->GetProcess()->GetID(),
|
||||
frame->GetProcess()->GetDeprecatedID(),
|
||||
content::ContentBrowserClient::URLLoaderFactoryType::kDocumentSubResource,
|
||||
std::nullopt, ukm::kInvalidSourceIdObj, factory_builder, nullptr,
|
||||
nullptr));
|
||||
|
@ -28,10 +28,10 @@ ChromeWebViewInternalContextMenusCreateFunction::Run() {
|
||||
|
||||
MenuItem::Id id(
|
||||
Profile::FromBrowserContext(browser_context())->IsOffTheRecord(),
|
||||
MenuItem::ExtensionKey(MaybeGetExtensionId(extension()),
|
||||
render_frame_host()->GetProcess()->GetID(),
|
||||
render_frame_host()->GetRoutingID(),
|
||||
params->instance_id));
|
||||
MenuItem::ExtensionKey(
|
||||
MaybeGetExtensionId(extension()),
|
||||
render_frame_host()->GetProcess()->GetDeprecatedID(),
|
||||
render_frame_host()->GetRoutingID(), params->instance_id));
|
||||
|
||||
if (params->create_properties.id) {
|
||||
id.string_uid = *params->create_properties.id;
|
||||
@ -63,10 +63,10 @@ ChromeWebViewInternalContextMenusUpdateFunction::Run() {
|
||||
Profile* profile = Profile::FromBrowserContext(browser_context());
|
||||
MenuItem::Id item_id(
|
||||
profile->IsOffTheRecord(),
|
||||
MenuItem::ExtensionKey(MaybeGetExtensionId(extension()),
|
||||
render_frame_host()->GetProcess()->GetID(),
|
||||
render_frame_host()->GetRoutingID(),
|
||||
params->instance_id));
|
||||
MenuItem::ExtensionKey(
|
||||
MaybeGetExtensionId(extension()),
|
||||
render_frame_host()->GetProcess()->GetDeprecatedID(),
|
||||
render_frame_host()->GetRoutingID(), params->instance_id));
|
||||
|
||||
if (params->id.as_string) {
|
||||
item_id.string_uid = *params->id.as_string;
|
||||
@ -94,10 +94,10 @@ ChromeWebViewInternalContextMenusRemoveFunction::Run() {
|
||||
|
||||
MenuItem::Id id(
|
||||
Profile::FromBrowserContext(browser_context())->IsOffTheRecord(),
|
||||
MenuItem::ExtensionKey(MaybeGetExtensionId(extension()),
|
||||
render_frame_host()->GetProcess()->GetID(),
|
||||
render_frame_host()->GetRoutingID(),
|
||||
params->instance_id));
|
||||
MenuItem::ExtensionKey(
|
||||
MaybeGetExtensionId(extension()),
|
||||
render_frame_host()->GetProcess()->GetDeprecatedID(),
|
||||
render_frame_host()->GetRoutingID(), params->instance_id));
|
||||
|
||||
if (params->menu_item_id.as_string) {
|
||||
id.string_uid = *params->menu_item_id.as_string;
|
||||
@ -130,7 +130,7 @@ ChromeWebViewInternalContextMenusRemoveAllFunction::Run() {
|
||||
MenuManager::Get(Profile::FromBrowserContext(browser_context()));
|
||||
menu_manager->RemoveAllContextItems(MenuItem::ExtensionKey(
|
||||
MaybeGetExtensionId(extension()),
|
||||
render_frame_host()->GetProcess()->GetID(),
|
||||
render_frame_host()->GetProcess()->GetDeprecatedID(),
|
||||
render_frame_host()->GetRoutingID(), params->instance_id));
|
||||
|
||||
return RespondNow(NoArguments());
|
||||
|
@ -103,7 +103,7 @@ class AppApiTest : public extensions::ExtensionApiTest {
|
||||
->GetWebContentsAt(1)
|
||||
->GetPrimaryMainFrame()
|
||||
->GetProcess()
|
||||
->GetID()));
|
||||
->GetDeprecatedID()));
|
||||
EXPECT_FALSE(browser()->tab_strip_model()->GetWebContentsAt(1)->GetWebUI());
|
||||
|
||||
ui_test_utils::TabAddedWaiter tab_add(browser());
|
||||
@ -118,7 +118,7 @@ class AppApiTest : public extensions::ExtensionApiTest {
|
||||
->GetWebContentsAt(2)
|
||||
->GetPrimaryMainFrame()
|
||||
->GetProcess()
|
||||
->GetID()));
|
||||
->GetDeprecatedID()));
|
||||
EXPECT_FALSE(browser()->tab_strip_model()->GetWebContentsAt(2)->GetWebUI());
|
||||
|
||||
// We should have opened 2 new extension tabs. Including the original blank
|
||||
@ -183,7 +183,7 @@ IN_PROC_BROWSER_TEST_F(AppApiTest, AppProcess) {
|
||||
->GetWebContentsAt(1)
|
||||
->GetPrimaryMainFrame()
|
||||
->GetProcess()
|
||||
->GetID()));
|
||||
->GetDeprecatedID()));
|
||||
EXPECT_FALSE(browser()->tab_strip_model()->GetWebContentsAt(1)->GetWebUI());
|
||||
|
||||
ui_test_utils::NavigateToURLWithDisposition(
|
||||
@ -195,7 +195,7 @@ IN_PROC_BROWSER_TEST_F(AppApiTest, AppProcess) {
|
||||
->GetWebContentsAt(2)
|
||||
->GetPrimaryMainFrame()
|
||||
->GetProcess()
|
||||
->GetID()));
|
||||
->GetDeprecatedID()));
|
||||
EXPECT_FALSE(browser()->tab_strip_model()->GetWebContentsAt(2)->GetWebUI());
|
||||
|
||||
ui_test_utils::TabAddedWaiter tab_add(browser());
|
||||
@ -208,7 +208,7 @@ IN_PROC_BROWSER_TEST_F(AppApiTest, AppProcess) {
|
||||
->GetWebContentsAt(3)
|
||||
->GetPrimaryMainFrame()
|
||||
->GetProcess()
|
||||
->GetID()));
|
||||
->GetDeprecatedID()));
|
||||
EXPECT_FALSE(browser()->tab_strip_model()->GetWebContentsAt(3)->GetWebUI());
|
||||
|
||||
// We should have opened 3 new extension tabs. Including the original blank
|
||||
@ -360,7 +360,7 @@ IN_PROC_BROWSER_TEST_F(AppApiTest, NavigateIntoAppProcess) {
|
||||
LOG(INFO) << "Loading path1/empty.html - done.";
|
||||
WebContents* contents = browser()->tab_strip_model()->GetWebContentsAt(0);
|
||||
EXPECT_FALSE(process_map->Contains(
|
||||
contents->GetPrimaryMainFrame()->GetProcess()->GetID()));
|
||||
contents->GetPrimaryMainFrame()->GetProcess()->GetDeprecatedID()));
|
||||
|
||||
// Load app and re-navigate to the page.
|
||||
LOG(INFO) << "Loading extension.";
|
||||
@ -373,7 +373,7 @@ IN_PROC_BROWSER_TEST_F(AppApiTest, NavigateIntoAppProcess) {
|
||||
browser(), base_url.Resolve("path1/empty.html")));
|
||||
LOG(INFO) << "Loading path1/empty.html - done.";
|
||||
EXPECT_TRUE(process_map->Contains(
|
||||
contents->GetPrimaryMainFrame()->GetProcess()->GetID()));
|
||||
contents->GetPrimaryMainFrame()->GetProcess()->GetDeprecatedID()));
|
||||
|
||||
// Disable app and re-navigate to the page.
|
||||
LOG(INFO) << "Disabling extension.";
|
||||
@ -384,7 +384,7 @@ IN_PROC_BROWSER_TEST_F(AppApiTest, NavigateIntoAppProcess) {
|
||||
browser(), base_url.Resolve("path1/empty.html")));
|
||||
LOG(INFO) << "Loading path1/empty.html - done.";
|
||||
EXPECT_FALSE(process_map->Contains(
|
||||
contents->GetPrimaryMainFrame()->GetProcess()->GetID()));
|
||||
contents->GetPrimaryMainFrame()->GetProcess()->GetDeprecatedID()));
|
||||
}
|
||||
|
||||
// Ensure that reloading a URL after installing or uninstalling it as an app
|
||||
@ -416,7 +416,7 @@ IN_PROC_BROWSER_TEST_F(AppApiTest, ReloadIntoAppProcess) {
|
||||
WebContents* contents = browser()->tab_strip_model()->GetWebContentsAt(0);
|
||||
content::NavigationController& controller = contents->GetController();
|
||||
EXPECT_FALSE(process_map->Contains(
|
||||
contents->GetPrimaryMainFrame()->GetProcess()->GetID()));
|
||||
contents->GetPrimaryMainFrame()->GetProcess()->GetDeprecatedID()));
|
||||
// The test starts with about:blank, then navigates to path1/empty.html,
|
||||
// so there should be two entries.
|
||||
EXPECT_EQ(2, controller.GetEntryCount());
|
||||
@ -432,7 +432,7 @@ IN_PROC_BROWSER_TEST_F(AppApiTest, ReloadIntoAppProcess) {
|
||||
reload_observer.Wait();
|
||||
LOG(INFO) << "Reloading - done.";
|
||||
EXPECT_TRUE(process_map->Contains(
|
||||
contents->GetPrimaryMainFrame()->GetProcess()->GetID()));
|
||||
contents->GetPrimaryMainFrame()->GetProcess()->GetDeprecatedID()));
|
||||
// Reloading, even with changing SiteInstance/process should not add any
|
||||
// more entries.
|
||||
EXPECT_EQ(2, controller.GetEntryCount());
|
||||
@ -448,7 +448,7 @@ IN_PROC_BROWSER_TEST_F(AppApiTest, ReloadIntoAppProcess) {
|
||||
reload_observer2.Wait();
|
||||
LOG(INFO) << "Reloading - done.";
|
||||
EXPECT_FALSE(process_map->Contains(
|
||||
contents->GetPrimaryMainFrame()->GetProcess()->GetID()));
|
||||
contents->GetPrimaryMainFrame()->GetProcess()->GetDeprecatedID()));
|
||||
EXPECT_EQ(2, controller.GetEntryCount());
|
||||
}
|
||||
|
||||
@ -480,7 +480,7 @@ IN_PROC_BROWSER_TEST_F(AppApiTest, ReloadIntoAppProcessWithJavaScript) {
|
||||
LOG(INFO) << "Navigate to path1/empty.html - done.";
|
||||
WebContents* contents = browser()->tab_strip_model()->GetWebContentsAt(0);
|
||||
EXPECT_FALSE(process_map->Contains(
|
||||
contents->GetPrimaryMainFrame()->GetProcess()->GetID()));
|
||||
contents->GetPrimaryMainFrame()->GetProcess()->GetDeprecatedID()));
|
||||
|
||||
// Enable app and reload via JavaScript.
|
||||
LOG(INFO) << "Enabling extension.";
|
||||
@ -493,7 +493,7 @@ IN_PROC_BROWSER_TEST_F(AppApiTest, ReloadIntoAppProcessWithJavaScript) {
|
||||
js_reload_observer.Wait();
|
||||
LOG(INFO) << "Executing location.reload() - done.";
|
||||
EXPECT_TRUE(process_map->Contains(
|
||||
contents->GetPrimaryMainFrame()->GetProcess()->GetID()));
|
||||
contents->GetPrimaryMainFrame()->GetProcess()->GetDeprecatedID()));
|
||||
|
||||
// Disable app and reload via JavaScript.
|
||||
LOG(INFO) << "Disabling extension.";
|
||||
@ -506,7 +506,7 @@ IN_PROC_BROWSER_TEST_F(AppApiTest, ReloadIntoAppProcessWithJavaScript) {
|
||||
js_reload_observer2.Wait();
|
||||
LOG(INFO) << "Executing location = location - done.";
|
||||
EXPECT_FALSE(process_map->Contains(
|
||||
contents->GetPrimaryMainFrame()->GetProcess()->GetID()));
|
||||
contents->GetPrimaryMainFrame()->GetProcess()->GetDeprecatedID()));
|
||||
}
|
||||
|
||||
// Similar to the previous test, but ensure that popup blocking bypass
|
||||
@ -614,7 +614,7 @@ IN_PROC_BROWSER_TEST_F(AppApiTest, OpenWebPopupFromWebIframe) {
|
||||
->GetWebContentsAt(0)
|
||||
->GetPrimaryMainFrame()
|
||||
->GetProcess();
|
||||
EXPECT_TRUE(process_map->Contains(process->GetID()));
|
||||
EXPECT_TRUE(process_map->Contains(process->GetDeprecatedID()));
|
||||
|
||||
// Popup window should be in the app's process.
|
||||
const WindowControllerList* active_window_list =
|
||||
@ -628,7 +628,7 @@ IN_PROC_BROWSER_TEST_F(AppApiTest, OpenWebPopupFromWebIframe) {
|
||||
content::RenderProcessHost* popup_process =
|
||||
popup_contents->GetPrimaryMainFrame()->GetProcess();
|
||||
EXPECT_EQ(process, popup_process);
|
||||
EXPECT_TRUE(process_map->Contains(popup_process->GetID()));
|
||||
EXPECT_TRUE(process_map->Contains(popup_process->GetDeprecatedID()));
|
||||
}
|
||||
|
||||
IN_PROC_BROWSER_TEST_F(AppApiTest, ReloadAppAfterCrash) {
|
||||
@ -644,7 +644,7 @@ IN_PROC_BROWSER_TEST_F(AppApiTest, ReloadAppAfterCrash) {
|
||||
browser(), base_url.Resolve("path1/empty.html")));
|
||||
WebContents* contents = browser()->tab_strip_model()->GetWebContentsAt(0);
|
||||
EXPECT_TRUE(process_map->Contains(
|
||||
contents->GetPrimaryMainFrame()->GetProcess()->GetID()));
|
||||
contents->GetPrimaryMainFrame()->GetProcess()->GetDeprecatedID()));
|
||||
ASSERT_EQ(true, content::EvalJs(contents, "chrome.app.isInstalled"));
|
||||
|
||||
// Crash the tab and reload it, chrome.app.isInstalled should still be true.
|
||||
@ -675,7 +675,8 @@ IN_PROC_BROWSER_TEST_F(AppApiTest, NavigatePopupFromAppToOutsideApp) {
|
||||
browser(), base_url.Resolve("path1/iframe.html")));
|
||||
content::SiteInstance* app_instance =
|
||||
browser()->tab_strip_model()->GetWebContentsAt(0)->GetSiteInstance();
|
||||
EXPECT_TRUE(process_map->Contains(app_instance->GetProcess()->GetID()));
|
||||
EXPECT_TRUE(
|
||||
process_map->Contains(app_instance->GetProcess()->GetDeprecatedID()));
|
||||
|
||||
// Popup window should be in the app's process.
|
||||
const WindowControllerList* active_window_list =
|
||||
|
@ -205,7 +205,7 @@ size_t GetExtensionBackgroundProcessCount() {
|
||||
if (!epm)
|
||||
continue;
|
||||
for (ExtensionHost* host : epm->background_hosts())
|
||||
process_ids.insert(host->render_process_host()->GetID());
|
||||
process_ids.insert(host->render_process_host()->GetDeprecatedID());
|
||||
}
|
||||
return process_ids.size();
|
||||
}
|
||||
@ -405,7 +405,7 @@ bool ChromeContentBrowserClientExtensionsPart::CanCommitURL(
|
||||
// commit. This accounts for cases where an extension might have multiple
|
||||
// processes, such as incognito split mode.
|
||||
ProcessMap* process_map = ProcessMap::Get(process_host->GetBrowserContext());
|
||||
if (process_map->Contains(extension->id(), process_host->GetID())) {
|
||||
if (process_map->Contains(extension->id(), process_host->GetDeprecatedID())) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -430,13 +430,14 @@ bool ChromeContentBrowserClientExtensionsPart::CanCommitURL(
|
||||
// well, but their pages load in their own extension process and are allowed
|
||||
// through above.)
|
||||
#if BUILDFLAG(ENABLE_GUEST_VIEW)
|
||||
bool is_guest =
|
||||
WebViewRendererState::GetInstance()->IsGuest(process_host->GetID());
|
||||
bool is_guest = WebViewRendererState::GetInstance()->IsGuest(
|
||||
process_host->GetDeprecatedID());
|
||||
if (is_guest) {
|
||||
ExtensionId owner_extension_id;
|
||||
int owner_process_id = -1;
|
||||
bool found_owner = WebViewRendererState::GetInstance()->GetOwnerInfo(
|
||||
process_host->GetID(), &owner_process_id, &owner_extension_id);
|
||||
process_host->GetDeprecatedID(), &owner_process_id,
|
||||
&owner_extension_id);
|
||||
DCHECK(found_owner);
|
||||
return extension->is_platform_app() &&
|
||||
extension->permissions_data()->HasAPIPermission(
|
||||
@ -475,8 +476,8 @@ bool ChromeContentBrowserClientExtensionsPart::IsSuitableHost(
|
||||
// SiteInstances for both extensions and hosted apps.
|
||||
const Extension* extension =
|
||||
GetEnabledExtensionFromSiteURL(profile, site_url);
|
||||
if (extension &&
|
||||
!process_map->Contains(extension->id(), process_host->GetID())) {
|
||||
if (extension && !process_map->Contains(extension->id(),
|
||||
process_host->GetDeprecatedID())) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -484,7 +485,7 @@ bool ChromeContentBrowserClientExtensionsPart::IsSuitableHost(
|
||||
// map to an enabled extension. For example, this prevents a reload of an
|
||||
// extension or app that has just been disabled from staying in the
|
||||
// privileged extension process.
|
||||
if (!extension && process_map->Contains(process_host->GetID())) {
|
||||
if (!extension && process_map->Contains(process_host->GetDeprecatedID())) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -598,8 +599,9 @@ bool ChromeContentBrowserClientExtensionsPart::
|
||||
ProcessMap* process_map = ProcessMap::Get(site_instance->GetBrowserContext());
|
||||
if (is_dest_url_for_webstore_app && site_instance->HasProcess() &&
|
||||
!process_map->Contains(dest_extension->id(),
|
||||
site_instance->GetProcess()->GetID()))
|
||||
site_instance->GetProcess()->GetDeprecatedID())) {
|
||||
return true;
|
||||
}
|
||||
|
||||
// Otherwise, swap BrowsingInstances when transitioning to/from Chrome Web
|
||||
// Store.
|
||||
@ -810,8 +812,8 @@ void ChromeContentBrowserClientExtensionsPart::SiteInstanceGotProcessAndSite(
|
||||
// unrelated tabs. This call will ignore duplicate insertions, which is fine,
|
||||
// since we only need to track if the extension is in the process, rather
|
||||
// than how many instances it has in that process.
|
||||
ProcessMap::Get(context)->Insert(extension->id(),
|
||||
site_instance->GetProcess()->GetID());
|
||||
ProcessMap::Get(context)->Insert(
|
||||
extension->id(), site_instance->GetProcess()->GetDeprecatedID());
|
||||
}
|
||||
|
||||
bool ChromeContentBrowserClientExtensionsPart::
|
||||
@ -913,8 +915,9 @@ void ChromeContentBrowserClientExtensionsPart::
|
||||
return;
|
||||
}
|
||||
|
||||
if (auto* extension = ProcessMap::Get(process.GetBrowserContext())
|
||||
->GetEnabledExtensionByProcessID(process.GetID())) {
|
||||
if (auto* extension =
|
||||
ProcessMap::Get(process.GetBrowserContext())
|
||||
->GetEnabledExtensionByProcessID(process.GetDeprecatedID())) {
|
||||
command_line->AppendSwitch(switches::kExtensionProcess);
|
||||
|
||||
// Blink usually initializes the main-thread Isolate in background mode for
|
||||
|
@ -31,7 +31,7 @@ void ChromeContentBrowserClientExtensionsPart::ExposeInterfacesToRenderer(
|
||||
blink::AssociatedInterfaceRegistry* associated_registry,
|
||||
content::RenderProcessHost* host) {
|
||||
associated_registry->AddInterface<mojom::RendererHost>(base::BindRepeating(
|
||||
&RendererStartupHelper::BindForRenderer, host->GetID()));
|
||||
&RendererStartupHelper::BindForRenderer, host->GetDeprecatedID()));
|
||||
}
|
||||
|
||||
void ChromeContentBrowserClientExtensionsPart::
|
||||
@ -60,7 +60,7 @@ void ChromeContentBrowserClientExtensionsPart::
|
||||
ExposeInterfacesToRendererForRenderFrameHost(
|
||||
content::RenderFrameHost& frame_host,
|
||||
blink::AssociatedInterfaceRegistry& associated_registry) {
|
||||
int render_process_id = frame_host.GetProcess()->GetID();
|
||||
int render_process_id = frame_host.GetProcess()->GetDeprecatedID();
|
||||
associated_registry.AddInterface<mojom::RendererHost>(base::BindRepeating(
|
||||
&RendererStartupHelper::BindForRenderer, render_process_id));
|
||||
#if BUILDFLAG(ENABLE_EXTENSIONS)
|
||||
|
@ -90,7 +90,7 @@ void ChromeExtensionFrameHost::DetailedConsoleMessageAdded(
|
||||
stack_trace, web_contents_->GetLastCommittedURL(),
|
||||
blink::ConsoleMessageLevelToLogSeverity(level),
|
||||
render_frame_host->GetRoutingID(),
|
||||
render_frame_host->GetProcess()->GetID())));
|
||||
render_frame_host->GetProcess()->GetDeprecatedID())));
|
||||
}
|
||||
|
||||
void ChromeExtensionFrameHost::ContentScriptsExecuting(
|
||||
|
@ -104,7 +104,7 @@ void ChromeExtensionWebContentsObserver::SetUpRenderFrameHost(
|
||||
return;
|
||||
}
|
||||
|
||||
int process_id = render_frame_host->GetProcess()->GetID();
|
||||
int process_id = render_frame_host->GetProcess()->GetDeprecatedID();
|
||||
auto* policy = content::ChildProcessSecurityPolicy::GetInstance();
|
||||
|
||||
// Components of chrome that are implemented as extensions or platform apps
|
||||
|
@ -332,19 +332,22 @@ IN_PROC_BROWSER_TEST_F(CrossOriginIsolationTest, WebAccessibleFrame) {
|
||||
ASSERT_TRUE(process_map);
|
||||
EXPECT_TRUE(process_map->Contains(
|
||||
coi_extension->id(),
|
||||
coi_background_render_frame_host->GetProcess()->GetID()));
|
||||
EXPECT_TRUE(process_map->Contains(coi_extension->id(),
|
||||
extension_iframe->GetProcess()->GetID()));
|
||||
coi_background_render_frame_host->GetProcess()->GetDeprecatedID()));
|
||||
EXPECT_TRUE(process_map->Contains(
|
||||
coi_extension->id(),
|
||||
extension_iframe->GetProcess()->GetDeprecatedID()));
|
||||
|
||||
GURL* url = nullptr;
|
||||
EXPECT_EQ(
|
||||
mojom::ContextType::kPrivilegedExtension,
|
||||
process_map->GetMostLikelyContextType(
|
||||
coi_extension,
|
||||
coi_background_render_frame_host->GetProcess()->GetID(), url));
|
||||
coi_background_render_frame_host->GetProcess()->GetDeprecatedID(),
|
||||
url));
|
||||
EXPECT_EQ(mojom::ContextType::kPrivilegedExtension,
|
||||
process_map->GetMostLikelyContextType(
|
||||
coi_extension, extension_iframe->GetProcess()->GetID(), url));
|
||||
coi_extension,
|
||||
extension_iframe->GetProcess()->GetDeprecatedID(), url));
|
||||
}
|
||||
|
||||
// Ensure both cross-origin-isolated and non-cross-origin-isolated extension
|
||||
@ -444,18 +447,19 @@ IN_PROC_BROWSER_TEST_F(CrossOriginIsolationTest, ServiceWorker) {
|
||||
// extension has multiple processes for the same profile.
|
||||
ProcessMap* process_map = ProcessMap::Get(profile());
|
||||
ASSERT_TRUE(process_map);
|
||||
EXPECT_TRUE(process_map->Contains(
|
||||
coi_extension->id(), extension_tab->GetProcess()->GetDeprecatedID()));
|
||||
EXPECT_TRUE(process_map->Contains(coi_extension->id(),
|
||||
extension_tab->GetProcess()->GetID()));
|
||||
EXPECT_TRUE(process_map->Contains(coi_extension->id(),
|
||||
service_worker_process->GetID()));
|
||||
service_worker_process->GetDeprecatedID()));
|
||||
|
||||
GURL* url = nullptr;
|
||||
EXPECT_EQ(
|
||||
mojom::ContextType::kPrivilegedExtension,
|
||||
process_map->GetMostLikelyContextType(
|
||||
coi_extension, extension_tab->GetProcess()->GetDeprecatedID(), url));
|
||||
EXPECT_EQ(mojom::ContextType::kPrivilegedExtension,
|
||||
process_map->GetMostLikelyContextType(
|
||||
coi_extension, extension_tab->GetProcess()->GetID(), url));
|
||||
EXPECT_EQ(mojom::ContextType::kPrivilegedExtension,
|
||||
process_map->GetMostLikelyContextType(
|
||||
coi_extension, service_worker_process->GetID(), url));
|
||||
coi_extension, service_worker_process->GetDeprecatedID(), url));
|
||||
}
|
||||
|
||||
// Tests certain extension APIs which retrieve in-process extension windows.
|
||||
|
@ -976,7 +976,7 @@ IN_PROC_BROWSER_TEST_F(ServiceWorkerEventAckBrowserTest,
|
||||
content::RenderProcessHost::FromID(unacked_event_info->render_process_id);
|
||||
ASSERT_TRUE(worker_render_process_host);
|
||||
ASSERT_EQ(unacked_event_info->render_process_id,
|
||||
worker_render_process_host->GetID());
|
||||
worker_render_process_host->GetDeprecatedID());
|
||||
|
||||
// Terminate worker's RenderProcessHost which triggers the cleanup logic.
|
||||
content::RenderProcessHostWatcher process_exit_observer(
|
||||
|
@ -107,7 +107,8 @@ class ExtensionCrashRecoveryTest : public extensions::ExtensionBrowserTest {
|
||||
extensions::ProcessMap* process_map =
|
||||
extensions::ProcessMap::Get(browser()->profile());
|
||||
ASSERT_TRUE(process_map->Contains(
|
||||
extension_id, extension_host->render_process_host()->GetID()));
|
||||
extension_id,
|
||||
extension_host->render_process_host()->GetDeprecatedID()));
|
||||
}
|
||||
|
||||
void LoadTestExtension() {
|
||||
|
@ -357,13 +357,17 @@ class OpenChannelToExtensionExploitTest
|
||||
// RenderProcessHost on all platforms.)
|
||||
GURL test_page_url =
|
||||
embedded_test_server()->GetURL("foo.com", "/title1.html");
|
||||
int old_process_id =
|
||||
active_web_contents()->GetPrimaryMainFrame()->GetProcess()->GetID();
|
||||
int old_process_id = active_web_contents()
|
||||
->GetPrimaryMainFrame()
|
||||
->GetProcess()
|
||||
->GetDeprecatedID();
|
||||
EXPECT_TRUE(
|
||||
ui_test_utils::NavigateToURL(browser(), GURL("chrome://version")));
|
||||
EXPECT_TRUE(ui_test_utils::NavigateToURL(browser(), test_page_url));
|
||||
int new_process_id =
|
||||
active_web_contents()->GetPrimaryMainFrame()->GetProcess()->GetID();
|
||||
int new_process_id = active_web_contents()
|
||||
->GetPrimaryMainFrame()
|
||||
->GetProcess()
|
||||
->GetDeprecatedID();
|
||||
EXPECT_NE(old_process_id, new_process_id);
|
||||
|
||||
// Install the extensions (and potentially spawn new RenderProcessHosts)
|
||||
|
@ -2185,7 +2185,7 @@ void ExtensionService::RenderProcessHostDestroyed(
|
||||
// An extension process was terminated, this might have resulted in an
|
||||
// app or extension becoming idle.
|
||||
if (std::optional<std::string> extension_id =
|
||||
process_map->GetExtensionIdForProcess(host->GetID())) {
|
||||
process_map->GetExtensionIdForProcess(host->GetDeprecatedID())) {
|
||||
// The extension running in this process might also be referencing a shared
|
||||
// module which is waiting for idle to update. Check all imports of this
|
||||
// extension too.
|
||||
@ -2213,7 +2213,7 @@ void ExtensionService::RenderProcessHostDestroyed(
|
||||
}
|
||||
}
|
||||
}
|
||||
process_map->Remove(host->GetID());
|
||||
process_map->Remove(host->GetDeprecatedID());
|
||||
}
|
||||
|
||||
int ExtensionService::GetDisableReasonsOnInstalled(const Extension* extension) {
|
||||
|
@ -137,7 +137,8 @@ IN_PROC_BROWSER_TEST_F(OffscreenDocumentBrowserTest,
|
||||
{
|
||||
mojom::ContextType context_type =
|
||||
ProcessMap::Get(profile())->GetMostLikelyContextType(
|
||||
extension, contents->GetPrimaryMainFrame()->GetProcess()->GetID(),
|
||||
extension,
|
||||
contents->GetPrimaryMainFrame()->GetProcess()->GetDeprecatedID(),
|
||||
&offscreen_url);
|
||||
// TODO(crbug.com/40849649): The following check should be:
|
||||
// EXPECT_EQ(mojom::ContextType::kOffscreenExtension, context_type);
|
||||
|
@ -418,7 +418,8 @@ IN_PROC_BROWSER_TEST_F(OmniboxFocusInteractiveTest, TabFocusStealingFromOopif) {
|
||||
content::RenderFrameHost* main_frame = web_contents->GetPrimaryMainFrame();
|
||||
EXPECT_NE(subframe->GetLastCommittedURL().scheme(),
|
||||
main_frame->GetLastCommittedURL().scheme());
|
||||
EXPECT_NE(subframe->GetProcess()->GetID(), main_frame->GetProcess()->GetID());
|
||||
EXPECT_NE(subframe->GetProcess()->GetDeprecatedID(),
|
||||
main_frame->GetProcess()->GetDeprecatedID());
|
||||
|
||||
// Trigger a subframe-initiated navigation of the main frame.
|
||||
const char kLinkClickingScriptTemplate[] = R"(
|
||||
|
@ -340,7 +340,7 @@ IN_PROC_BROWSER_TEST_F(ProcessManagementTest, ExtensionAndWebProcessOverflow) {
|
||||
<< "When testing extension: " << host->extension_id());
|
||||
// The process should be locked.
|
||||
EXPECT_TRUE(host->render_process_host()->IsProcessLockedToSiteForTesting());
|
||||
process_ids.insert(host->render_process_host()->GetID());
|
||||
process_ids.insert(host->render_process_host()->GetDeprecatedID());
|
||||
}
|
||||
// Each extension is in a locked process, unavailable for sharing.
|
||||
EXPECT_EQ(3u, process_ids.size());
|
||||
@ -367,11 +367,11 @@ IN_PROC_BROWSER_TEST_F(ProcessManagementTest, ExtensionAndWebProcessOverflow) {
|
||||
|
||||
// Verify the number of processes across extensions and tabs.
|
||||
process_ids.insert(
|
||||
web_contents1->GetPrimaryMainFrame()->GetProcess()->GetID());
|
||||
web_contents1->GetPrimaryMainFrame()->GetProcess()->GetDeprecatedID());
|
||||
process_ids.insert(
|
||||
web_contents2->GetPrimaryMainFrame()->GetProcess()->GetID());
|
||||
web_contents2->GetPrimaryMainFrame()->GetProcess()->GetDeprecatedID());
|
||||
process_ids.insert(
|
||||
web_contents3->GetPrimaryMainFrame()->GetProcess()->GetID());
|
||||
web_contents3->GetPrimaryMainFrame()->GetProcess()->GetDeprecatedID());
|
||||
|
||||
// The web processes still share 2 processes as if there were a single
|
||||
// extension process (making a total of 5 processes counting the existing 3
|
||||
@ -394,7 +394,7 @@ IN_PROC_BROWSER_TEST_F(ProcessManagementTest, ExtensionAndWebProcessOverflow) {
|
||||
WebContents* web_contents4 =
|
||||
browser()->tab_strip_model()->GetActiveWebContents();
|
||||
process_ids.insert(
|
||||
web_contents4->GetPrimaryMainFrame()->GetProcess()->GetID());
|
||||
web_contents4->GetPrimaryMainFrame()->GetProcess()->GetDeprecatedID());
|
||||
// The cross-site process adds 1 more process to the total, to avoid sharing
|
||||
// with the existing web renderer processes (due to Site Isolation).
|
||||
EXPECT_EQ(6u, process_ids.size());
|
||||
@ -552,7 +552,7 @@ IN_PROC_BROWSER_TEST_P(ChromeWebStoreProcessTest,
|
||||
web_contents->GetPrimaryMainFrame()->GetProcess();
|
||||
if (GetParam() == kWebstoreURL) {
|
||||
EXPECT_TRUE(extensions::ProcessMap::Get(profile())->Contains(
|
||||
extensions::kWebStoreAppId, new_process_host->GetID()));
|
||||
extensions::kWebStoreAppId, new_process_host->GetDeprecatedID()));
|
||||
}
|
||||
|
||||
// Verify that Webstore is isolated in a separate renderer process.
|
||||
@ -598,7 +598,7 @@ IN_PROC_BROWSER_TEST_P(ChromeWebStoreInIsolatedOriginTest,
|
||||
content::RenderProcessHost* render_process_host =
|
||||
web_contents->GetPrimaryMainFrame()->GetProcess();
|
||||
EXPECT_TRUE(extensions::ProcessMap::Get(profile())->Contains(
|
||||
extensions::kWebStoreAppId, render_process_host->GetID()));
|
||||
extensions::kWebStoreAppId, render_process_host->GetDeprecatedID()));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -750,7 +750,7 @@ IN_PROC_BROWSER_TEST_F(ProcessManagerBrowserTest, ExtensionProcessReuse) {
|
||||
EXPECT_EQ(extension->url(),
|
||||
extension_host->host_contents()->GetSiteInstance()->GetSiteURL());
|
||||
|
||||
processes.insert(extension_host->render_process_host()->GetID());
|
||||
processes.insert(extension_host->render_process_host()->GetDeprecatedID());
|
||||
}
|
||||
|
||||
EXPECT_EQ(kNumExtensions, installed_extensions.size());
|
||||
@ -831,23 +831,23 @@ IN_PROC_BROWSER_TEST_F(ProcessManagerBrowserTest,
|
||||
// to the process of the extension iframe.
|
||||
content::ChildProcessSecurityPolicy* policy =
|
||||
content::ChildProcessSecurityPolicy::GetInstance();
|
||||
EXPECT_TRUE(policy->CanRequestURL(extension_frame->GetProcess()->GetID(),
|
||||
EXPECT_TRUE(policy->CanRequestURL(
|
||||
extension_frame->GetProcess()->GetDeprecatedID(), extension_blob_url));
|
||||
EXPECT_TRUE(policy->CanRequestURL(main_frame->GetProcess()->GetDeprecatedID(),
|
||||
extension_blob_url));
|
||||
EXPECT_TRUE(policy->CanRequestURL(main_frame->GetProcess()->GetID(),
|
||||
extension_blob_url));
|
||||
EXPECT_TRUE(policy->CanRequestURL(extension_frame->GetProcess()->GetID(),
|
||||
EXPECT_TRUE(policy->CanRequestURL(
|
||||
extension_frame->GetProcess()->GetDeprecatedID(), extension_url));
|
||||
EXPECT_TRUE(policy->CanRequestURL(main_frame->GetProcess()->GetDeprecatedID(),
|
||||
extension_url));
|
||||
EXPECT_TRUE(
|
||||
policy->CanRequestURL(main_frame->GetProcess()->GetID(), extension_url));
|
||||
|
||||
EXPECT_TRUE(content::CanCommitURLForTesting(
|
||||
extension_frame->GetProcess()->GetID(), extension_blob_url));
|
||||
extension_frame->GetProcess()->GetDeprecatedID(), extension_blob_url));
|
||||
EXPECT_FALSE(content::CanCommitURLForTesting(
|
||||
main_frame->GetProcess()->GetID(), extension_blob_url));
|
||||
main_frame->GetProcess()->GetDeprecatedID(), extension_blob_url));
|
||||
EXPECT_TRUE(content::CanCommitURLForTesting(
|
||||
extension_frame->GetProcess()->GetID(), extension_url));
|
||||
extension_frame->GetProcess()->GetDeprecatedID(), extension_url));
|
||||
EXPECT_FALSE(content::CanCommitURLForTesting(
|
||||
main_frame->GetProcess()->GetID(), extension_url));
|
||||
main_frame->GetProcess()->GetDeprecatedID(), extension_url));
|
||||
|
||||
// Open a new about:blank popup from main frame. This should stay in the web
|
||||
// process.
|
||||
@ -1180,10 +1180,11 @@ IN_PROC_BROWSER_TEST_F(ProcessManagerBrowserTest,
|
||||
content::ChildProcessSecurityPolicy* policy =
|
||||
content::ChildProcessSecurityPolicy::GetInstance();
|
||||
EXPECT_FALSE(policy->CanRequestURL(
|
||||
web_tab->GetPrimaryMainFrame()->GetProcess()->GetID(),
|
||||
web_tab->GetPrimaryMainFrame()->GetProcess()->GetDeprecatedID(),
|
||||
app_origin.GetURL()));
|
||||
EXPECT_TRUE(policy->CanRequestURL(
|
||||
guest_render_frame_host->GetProcess()->GetID(), app_origin.GetURL()));
|
||||
guest_render_frame_host->GetProcess()->GetDeprecatedID(),
|
||||
app_origin.GetURL()));
|
||||
|
||||
// Try navigating the web tab to each nested URL with the app's origin. This
|
||||
// should be blocked.
|
||||
|
@ -58,7 +58,7 @@ class ProcessMapBrowserTest : public ExtensionBrowserTest {
|
||||
}
|
||||
|
||||
int GetActiveMainFrameProcessID() {
|
||||
return GetActiveMainFrameProcess().GetID();
|
||||
return GetActiveMainFrameProcess().GetDeprecatedID();
|
||||
}
|
||||
|
||||
// Adds a new extension with the given `extension_name` and host permission to
|
||||
@ -755,8 +755,8 @@ IN_PROC_BROWSER_TEST_F(
|
||||
EXPECT_TRUE(content::EvalJs(sandboxed_E2_frame, "window.origin == 'null';")
|
||||
.ExtractBool());
|
||||
// The E2 frame has access to extension APIs.
|
||||
EXPECT_TRUE(
|
||||
process_map()->Contains(sandboxed_E2_frame->GetProcess()->GetID()));
|
||||
EXPECT_TRUE(process_map()->Contains(
|
||||
sandboxed_E2_frame->GetProcess()->GetDeprecatedID()));
|
||||
EXPECT_TRUE(FrameHasAccessToExtensionApis(sandboxed_E2_frame));
|
||||
// The E2 frame is sandboxed by virtue of being loaded in an iframe with
|
||||
// a sandbox attribute set, but it is not a manifest-sandboxed frame. As such,
|
||||
@ -986,10 +986,11 @@ void ProcessMapBrowserTest::VerifyWhetherSubframesAreIsolated(
|
||||
|
||||
EXPECT_FALSE(ExtensionFrameIsSandboxed(main_frame));
|
||||
|
||||
int main_frame_process_id = main_frame->GetProcess()->GetID();
|
||||
int sandboxed_frame_process_id = sandboxed_child_frame->GetProcess()->GetID();
|
||||
int main_frame_process_id = main_frame->GetProcess()->GetDeprecatedID();
|
||||
int sandboxed_frame_process_id =
|
||||
sandboxed_child_frame->GetProcess()->GetDeprecatedID();
|
||||
int non_sandboxed_frame_process_id =
|
||||
non_sandboxed_child_frame->GetProcess()->GetID();
|
||||
non_sandboxed_child_frame->GetProcess()->GetDeprecatedID();
|
||||
|
||||
if (expect_subframes_isolated_from_each_other) {
|
||||
EXPECT_NE(sandboxed_frame_process_id, non_sandboxed_frame_process_id);
|
||||
@ -1090,7 +1091,8 @@ void ProcessMapBrowserTest::
|
||||
|
||||
content::RenderFrameHost* sandboxed_child_frame =
|
||||
content::ChildFrameAt(main_frame, 0);
|
||||
int sandboxed_frame_process_id = sandboxed_child_frame->GetProcess()->GetID();
|
||||
int sandboxed_frame_process_id =
|
||||
sandboxed_child_frame->GetProcess()->GetDeprecatedID();
|
||||
// Sandboxed extension frames should still have access to other extension
|
||||
// resources. Verify the extension script (resource.js) was properly loaded
|
||||
// by looking for foo variable.
|
||||
@ -1171,8 +1173,9 @@ IN_PROC_BROWSER_TEST_F(ProcessMapBrowserTest,
|
||||
content::RenderFrameHost* sandboxed_child_frame =
|
||||
content::ChildFrameAt(main_frame, 0);
|
||||
|
||||
int main_frame_process_id = main_frame->GetProcess()->GetID();
|
||||
int sandboxed_frame_process_id = sandboxed_child_frame->GetProcess()->GetID();
|
||||
int main_frame_process_id = main_frame->GetProcess()->GetDeprecatedID();
|
||||
int sandboxed_frame_process_id =
|
||||
sandboxed_child_frame->GetProcess()->GetDeprecatedID();
|
||||
|
||||
// Since we normally process-isolate E1 from E2, placing E1 in a sandboxed
|
||||
// iframe will make no difference.
|
||||
@ -1235,10 +1238,11 @@ IN_PROC_BROWSER_TEST_F(ProcessMapBrowserTest,
|
||||
EXPECT_TRUE(ExtensionFrameIsSandboxed(sandboxed_frame));
|
||||
EXPECT_TRUE(ExtensionFrameIsSandboxed(other_sandboxed_frame));
|
||||
|
||||
int main_frame_process_id = main_frame->GetProcess()->GetID();
|
||||
int sandboxed_frame_process_id = sandboxed_frame->GetProcess()->GetID();
|
||||
int main_frame_process_id = main_frame->GetProcess()->GetDeprecatedID();
|
||||
int sandboxed_frame_process_id =
|
||||
sandboxed_frame->GetProcess()->GetDeprecatedID();
|
||||
int other_sandboxed_frame_process_id =
|
||||
other_sandboxed_frame->GetProcess()->GetID();
|
||||
other_sandboxed_frame->GetProcess()->GetDeprecatedID();
|
||||
|
||||
// The two manifest-sandboxed frames will be in the same process, regardless
|
||||
// of whether IsolateSandboxedIframes is enabled or not.
|
||||
@ -1315,7 +1319,8 @@ IN_PROC_BROWSER_TEST_P(ProcessMapAboutSrcdocBrowserTest,
|
||||
EXPECT_FALSE(content::EvalJs(srcdoc_frame, "!!chrome && !!chrome.tabs;")
|
||||
.ExtractBool());
|
||||
|
||||
EXPECT_FALSE(process_map()->Contains(srcdoc_frame->GetProcess()->GetID()));
|
||||
EXPECT_FALSE(
|
||||
process_map()->Contains(srcdoc_frame->GetProcess()->GetDeprecatedID()));
|
||||
|
||||
// Make sure the resulting srcdoc frame cannot fetch() extension resources.
|
||||
// The only way `success` in the JS below can become true is if the fetch()
|
||||
@ -1372,9 +1377,11 @@ IN_PROC_BROWSER_TEST_F(ProcessMapBrowserTest,
|
||||
*sandboxed_frame->GetProcess();
|
||||
|
||||
if (content::SiteIsolationPolicy::AreIsolatedSandboxedIframesEnabled()) {
|
||||
EXPECT_NE(main_frame_process.GetID(), sandboxed_frame_process.GetID());
|
||||
EXPECT_NE(main_frame_process.GetDeprecatedID(),
|
||||
sandboxed_frame_process.GetDeprecatedID());
|
||||
} else {
|
||||
EXPECT_EQ(main_frame_process.GetID(), sandboxed_frame_process.GetID());
|
||||
EXPECT_EQ(main_frame_process.GetDeprecatedID(),
|
||||
sandboxed_frame_process.GetDeprecatedID());
|
||||
}
|
||||
|
||||
RunCanProcessHostContextTypeChecks(
|
||||
@ -1423,9 +1430,11 @@ IN_PROC_BROWSER_TEST_F(ProcessMapBrowserTest,
|
||||
// The embedder (the app window) should be a privileged extension process,
|
||||
// but the webview should not.
|
||||
EXPECT_TRUE(process_map()->IsPrivilegedExtensionProcess(
|
||||
*extension, embedder->GetPrimaryMainFrame()->GetProcess()->GetID()));
|
||||
*extension,
|
||||
embedder->GetPrimaryMainFrame()->GetProcess()->GetDeprecatedID()));
|
||||
EXPECT_FALSE(process_map()->IsPrivilegedExtensionProcess(
|
||||
*extension, webview->GetPrimaryMainFrame()->GetProcess()->GetID()));
|
||||
*extension,
|
||||
webview->GetPrimaryMainFrame()->GetProcess()->GetDeprecatedID()));
|
||||
}
|
||||
|
||||
IN_PROC_BROWSER_TEST_F(ProcessMapBrowserTest, CanHostContextType_WebViews) {
|
||||
|
@ -223,7 +223,8 @@ bool ServiceWorkerBasedBackgroundTest::ExtensionHasRenderProcessHost(
|
||||
content::RenderProcessHost::iterator it =
|
||||
content::RenderProcessHost::AllHostsIterator();
|
||||
while (!it.IsAtEnd()) {
|
||||
if (process_map->Contains(extension_id, it.GetCurrentValue()->GetID())) {
|
||||
if (process_map->Contains(extension_id,
|
||||
it.GetCurrentValue()->GetDeprecatedID())) {
|
||||
return true;
|
||||
}
|
||||
it.Advance();
|
||||
|
@ -586,7 +586,7 @@ void WebstoreInstaller::StartDownload(
|
||||
int render_process_host_id = web_contents_->GetPrimaryMainFrame()
|
||||
->GetRenderViewHost()
|
||||
->GetProcess()
|
||||
->GetID();
|
||||
->GetDeprecatedID();
|
||||
|
||||
content::RenderFrameHost* render_frame_host =
|
||||
web_contents_->GetPrimaryMainFrame();
|
||||
|
@ -340,11 +340,12 @@ IN_PROC_BROWSER_TEST_F(FileSystemChromeAppTest,
|
||||
content::FileSystemAccessPermissionGrant::PermissionRequestOutcome>
|
||||
future;
|
||||
auto* rfh = web_contents->GetPrimaryMainFrame();
|
||||
grant->RequestPermission(content::GlobalRenderFrameHostId(
|
||||
rfh->GetProcess()->GetID(), rfh->GetRoutingID()),
|
||||
content::FileSystemAccessPermissionGrant::
|
||||
UserActivationState::kNotRequired,
|
||||
future.GetCallback());
|
||||
grant->RequestPermission(
|
||||
content::GlobalRenderFrameHostId(rfh->GetProcess()->GetDeprecatedID(),
|
||||
rfh->GetRoutingID()),
|
||||
content::FileSystemAccessPermissionGrant::UserActivationState::
|
||||
kNotRequired,
|
||||
future.GetCallback());
|
||||
auto result = future.Get();
|
||||
EXPECT_NE(result, content::FileSystemAccessPermissionGrant::
|
||||
PermissionRequestOutcome::kGrantedByRestorePrompt);
|
||||
|
@ -449,7 +449,10 @@ class ChromeFileSystemAccessPermissionContextTest : public testing::Test {
|
||||
WebContents* web_contents() { return web_contents_.get(); }
|
||||
|
||||
int process_id() {
|
||||
return web_contents()->GetPrimaryMainFrame()->GetProcess()->GetID();
|
||||
return web_contents()
|
||||
->GetPrimaryMainFrame()
|
||||
->GetProcess()
|
||||
->GetDeprecatedID();
|
||||
}
|
||||
|
||||
content::GlobalRenderFrameHostId frame_id() {
|
||||
|
@ -227,8 +227,10 @@ void FontPrewarmerTabHelper::ReadyToCommitNavigation(
|
||||
DCHECK(rfh);
|
||||
FontPrewarmerCoordinator& coordinator =
|
||||
FontPrewarmerCoordinator::ForProfile(GetProfile());
|
||||
if (expected_render_process_host_id_ != rfh->GetProcess()->GetID())
|
||||
if (expected_render_process_host_id_ !=
|
||||
rfh->GetProcess()->GetDeprecatedID()) {
|
||||
coordinator.SendFontsToPrewarm(rfh->GetProcess());
|
||||
}
|
||||
coordinator.RequestFonts(rfh);
|
||||
}
|
||||
|
||||
|
@ -680,7 +680,7 @@ IN_PROC_BROWSER_TEST_F(ChromeMimeHandlerViewTest, FrameIterationBeforeAttach) {
|
||||
base::OnceClosure resume_attach;
|
||||
auto* web_contents = browser()->tab_strip_model()->GetActiveWebContents();
|
||||
auto* mime_handler_view_helper = extensions::MimeHandlerViewAttachHelper::Get(
|
||||
web_contents->GetPrimaryMainFrame()->GetProcess()->GetID());
|
||||
web_contents->GetPrimaryMainFrame()->GetProcess()->GetDeprecatedID());
|
||||
mime_handler_view_helper->set_resume_attach_callback_for_testing(
|
||||
base::BindLambdaForTesting([&](base::OnceClosure resume_closure) {
|
||||
resume_attach = std::move(resume_closure);
|
||||
|
@ -65,7 +65,9 @@ void MediaCapturePickerDialogBridge::OnResult(
|
||||
content::DesktopMediaID::TYPE_WEB_CONTENTS,
|
||||
content::DesktopMediaID::kNullId,
|
||||
content::WebContentsMediaCaptureId(
|
||||
web_contents->GetPrimaryMainFrame()->GetProcess()->GetID(),
|
||||
web_contents->GetPrimaryMainFrame()
|
||||
->GetProcess()
|
||||
->GetDeprecatedID(),
|
||||
web_contents->GetPrimaryMainFrame()->GetRoutingID()));
|
||||
}
|
||||
std::move(callback_).Run(desktop_media_id);
|
||||
|
@ -255,7 +255,7 @@ content::DesktopMediaID CastMirroringServiceHost::BuildMediaIdForWebContents(
|
||||
}
|
||||
media_id.type = content::DesktopMediaID::TYPE_WEB_CONTENTS;
|
||||
media_id.web_contents_id = content::WebContentsMediaCaptureId(
|
||||
contents->GetPrimaryMainFrame()->GetProcess()->GetID(),
|
||||
contents->GetPrimaryMainFrame()->GetProcess()->GetDeprecatedID(),
|
||||
contents->GetPrimaryMainFrame()->GetRoutingID(),
|
||||
true /* disable_local_echo */);
|
||||
return media_id;
|
||||
|
@ -73,7 +73,7 @@ content::DesktopMediaID BuildMediaIdForTabMirroring(
|
||||
content::DesktopMediaID media_id;
|
||||
content::RenderFrameHost* const main_frame =
|
||||
target_web_contents->GetPrimaryMainFrame();
|
||||
const int process_id = main_frame->GetProcess()->GetID();
|
||||
const int process_id = main_frame->GetProcess()->GetDeprecatedID();
|
||||
const int frame_id = main_frame->GetRoutingID();
|
||||
media_id.type = content::DesktopMediaID::TYPE_WEB_CONTENTS;
|
||||
media_id.web_contents_id = content::WebContentsMediaCaptureId(
|
||||
|
@ -33,7 +33,7 @@ OutputProtectionImpl::OutputProtectionImpl(
|
||||
content::RenderFrameHost& render_frame_host,
|
||||
mojo::PendingReceiver<media::mojom::OutputProtection> receiver)
|
||||
: DocumentService(render_frame_host, std::move(receiver)),
|
||||
render_process_id_(render_frame_host.GetProcess()->GetID()),
|
||||
render_process_id_(render_frame_host.GetProcess()->GetDeprecatedID()),
|
||||
render_frame_id_(render_frame_host.GetRoutingID()) {}
|
||||
|
||||
OutputProtectionImpl::~OutputProtectionImpl() {
|
||||
|
2
chrome/browser/media/router/presentation/controller_presentation_service_delegate_impl_unittest.cc
2
chrome/browser/media/router/presentation/controller_presentation_service_delegate_impl_unittest.cc
@ -232,7 +232,7 @@ class ControllerPresentationServiceDelegateImplTest
|
||||
content::RenderFrameHost* main_frame =
|
||||
GetWebContents()->GetPrimaryMainFrame();
|
||||
ASSERT_TRUE(main_frame);
|
||||
main_frame_process_id_ = main_frame->GetProcess()->GetID();
|
||||
main_frame_process_id_ = main_frame->GetProcess()->GetDeprecatedID();
|
||||
main_frame_routing_id_ = main_frame->GetRoutingID();
|
||||
}
|
||||
|
||||
|
@ -145,7 +145,7 @@ class UnifiedAutoplayBrowserTest : public InProcessBrowserTest {
|
||||
open_url_params.initiator_origin =
|
||||
active_contents->GetPrimaryMainFrame()->GetLastCommittedOrigin();
|
||||
open_url_params.source_render_process_id =
|
||||
active_contents->GetPrimaryMainFrame()->GetProcess()->GetID();
|
||||
active_contents->GetPrimaryMainFrame()->GetProcess()->GetDeprecatedID();
|
||||
open_url_params.source_render_frame_id =
|
||||
active_contents->GetPrimaryMainFrame()->GetRoutingID();
|
||||
open_url_params.user_gesture = user_gesture;
|
||||
|
@ -76,7 +76,7 @@ void AudioDebugRecordingsHandler::StartAudioDebugRecordings(
|
||||
base::BindOnce(&GetLogDirectoryAndEnsureExists,
|
||||
browser_context_->GetPath()),
|
||||
base::BindOnce(&AudioDebugRecordingsHandler::DoStartAudioDebugRecordings,
|
||||
this, host->GetID(), delay, std::move(callback),
|
||||
this, host->GetDeprecatedID(), delay, std::move(callback),
|
||||
std::move(error_callback)));
|
||||
}
|
||||
|
||||
@ -93,7 +93,7 @@ void AudioDebugRecordingsHandler::StopAudioDebugRecordings(
|
||||
base::BindOnce(&GetLogDirectoryAndEnsureExists,
|
||||
browser_context_->GetPath()),
|
||||
base::BindOnce(&AudioDebugRecordingsHandler::DoStopAudioDebugRecordings,
|
||||
this, host->GetID(), is_manual_stop,
|
||||
this, host->GetDeprecatedID(), is_manual_stop,
|
||||
current_audio_debug_recordings_id_, std::move(callback),
|
||||
std::move(error_callback)));
|
||||
}
|
||||
|
@ -64,7 +64,9 @@ CurrentTabDesktopMediaList::CurrentTabDesktopMediaList(
|
||||
media_id_(content::DesktopMediaID::TYPE_WEB_CONTENTS,
|
||||
content::DesktopMediaID::kNullId,
|
||||
content::WebContentsMediaCaptureId(
|
||||
web_contents->GetPrimaryMainFrame()->GetProcess()->GetID(),
|
||||
web_contents->GetPrimaryMainFrame()
|
||||
->GetProcess()
|
||||
->GetDeprecatedID(),
|
||||
web_contents->GetPrimaryMainFrame()->GetRoutingID())),
|
||||
thumbnail_task_runner_(base::ThreadPool::CreateSequencedTaskRunner(
|
||||
{base::MayBlock(), base::TaskPriority::USER_VISIBLE})) {
|
||||
|
@ -414,7 +414,8 @@ void DesktopCaptureAccessHandler::HandleRequest(
|
||||
media_id =
|
||||
content::DesktopStreamsRegistry::GetInstance()->RequestMediaForStreamId(
|
||||
request.requested_video_device_ids.front(),
|
||||
main_frame->GetProcess()->GetID(), main_frame->GetRoutingID(),
|
||||
main_frame->GetProcess()->GetDeprecatedID(),
|
||||
main_frame->GetRoutingID(),
|
||||
url::Origin::Create(request.security_origin),
|
||||
content::kRegistryStreamTypeDesktop);
|
||||
}
|
||||
|
@ -70,7 +70,7 @@ class DesktopCaptureAccessHandlerTest : public ChromeRenderViewHostTestHarness {
|
||||
features::kMacSystemScreenCapturePermissionCheck);
|
||||
#endif
|
||||
content::MediaStreamRequest request(
|
||||
web_contents()->GetPrimaryMainFrame()->GetProcess()->GetID(),
|
||||
web_contents()->GetPrimaryMainFrame()->GetProcess()->GetDeprecatedID(),
|
||||
web_contents()->GetPrimaryMainFrame()->GetRoutingID(),
|
||||
/*page_request_id=*/0, url::Origin::Create(origin),
|
||||
/*user_gesture=*/false, blink::MEDIA_GENERATE_STREAM,
|
||||
@ -365,7 +365,10 @@ TEST_F(DesktopCaptureAccessHandlerTest, GenerateStreamSuccess) {
|
||||
const GURL origin(kOrigin);
|
||||
const std::string id =
|
||||
content::DesktopStreamsRegistry::GetInstance()->RegisterStream(
|
||||
web_contents()->GetPrimaryMainFrame()->GetProcess()->GetID(),
|
||||
web_contents()
|
||||
->GetPrimaryMainFrame()
|
||||
->GetProcess()
|
||||
->GetDeprecatedID(),
|
||||
web_contents()->GetPrimaryMainFrame()->GetRoutingID(),
|
||||
url::Origin::Create(origin),
|
||||
content::DesktopMediaID(content::DesktopMediaID::TYPE_SCREEN,
|
||||
@ -527,7 +530,10 @@ TEST_F(DesktopCaptureAccessHandlerTest, GenerateStreamDlpRestricted) {
|
||||
|
||||
const std::string id =
|
||||
content::DesktopStreamsRegistry::GetInstance()->RegisterStream(
|
||||
web_contents()->GetPrimaryMainFrame()->GetProcess()->GetID(),
|
||||
web_contents()
|
||||
->GetPrimaryMainFrame()
|
||||
->GetProcess()
|
||||
->GetDeprecatedID(),
|
||||
web_contents()->GetPrimaryMainFrame()->GetRoutingID(),
|
||||
url::Origin::Create(GURL(kOrigin)),
|
||||
content::DesktopMediaID(content::DesktopMediaID::TYPE_SCREEN,
|
||||
@ -559,7 +565,10 @@ TEST_F(DesktopCaptureAccessHandlerTest, GenerateStreamDlpNotRestricted) {
|
||||
|
||||
const std::string id =
|
||||
content::DesktopStreamsRegistry::GetInstance()->RegisterStream(
|
||||
web_contents()->GetPrimaryMainFrame()->GetProcess()->GetID(),
|
||||
web_contents()
|
||||
->GetPrimaryMainFrame()
|
||||
->GetProcess()
|
||||
->GetDeprecatedID(),
|
||||
web_contents()->GetPrimaryMainFrame()->GetRoutingID(),
|
||||
url::Origin::Create(GURL(kOrigin)),
|
||||
content::DesktopMediaID(content::DesktopMediaID::TYPE_SCREEN,
|
||||
|
@ -224,7 +224,7 @@ std::string DeviceNamePrefix(
|
||||
// dialog for DISPLAY_VIDEO_CAPTURE_THIS_TAB could still return something
|
||||
// other than the current tab - be it a screen, window, or another tab.
|
||||
if (media_id.type == content::DesktopMediaID::TYPE_WEB_CONTENTS &&
|
||||
web_contents->GetPrimaryMainFrame()->GetProcess()->GetID() ==
|
||||
web_contents->GetPrimaryMainFrame()->GetProcess()->GetDeprecatedID() ==
|
||||
media_id.web_contents_id.render_process_id &&
|
||||
web_contents->GetPrimaryMainFrame()->GetRoutingID() ==
|
||||
media_id.web_contents_id.main_render_frame_id) {
|
||||
|
@ -63,7 +63,8 @@ class DisplayMediaAccessHandlerTest : public ChromeRenderViewHostTestHarness {
|
||||
|
||||
content::WebContentsMediaCaptureId GetWebContentsMediaCaptureId() {
|
||||
return content::WebContentsMediaCaptureId(
|
||||
web_contents()->GetPrimaryMainFrame()->GetProcess()->GetID(), 1);
|
||||
web_contents()->GetPrimaryMainFrame()->GetProcess()->GetDeprecatedID(),
|
||||
1);
|
||||
}
|
||||
|
||||
FakeDesktopMediaPickerFactory::TestFlags MakePickerTestFlags(
|
||||
@ -81,7 +82,7 @@ class DisplayMediaAccessHandlerTest : public ChromeRenderViewHostTestHarness {
|
||||
|
||||
content::MediaStreamRequest MakeRequest(bool request_audio) {
|
||||
return content::MediaStreamRequest(
|
||||
web_contents()->GetPrimaryMainFrame()->GetProcess()->GetID(),
|
||||
web_contents()->GetPrimaryMainFrame()->GetProcess()->GetDeprecatedID(),
|
||||
web_contents()->GetPrimaryMainFrame()->GetRoutingID(), 0,
|
||||
url::Origin::Create(GURL("http://origin/")), false,
|
||||
blink::MEDIA_GENERATE_STREAM, /*requested_audio_device_ids=*/{},
|
||||
@ -402,7 +403,7 @@ TEST_F(DisplayMediaAccessHandlerTest, DlpWebContentsDestroyed) {
|
||||
|
||||
TEST_F(DisplayMediaAccessHandlerTest, UpdateMediaRequestStateWithClosing) {
|
||||
const int render_process_id =
|
||||
web_contents()->GetPrimaryMainFrame()->GetProcess()->GetID();
|
||||
web_contents()->GetPrimaryMainFrame()->GetProcess()->GetDeprecatedID();
|
||||
const int render_frame_id =
|
||||
web_contents()->GetPrimaryMainFrame()->GetRoutingID();
|
||||
const int page_request_id = 0;
|
||||
@ -442,7 +443,7 @@ TEST_F(DisplayMediaAccessHandlerTest, UpdateMediaRequestStateWithClosing) {
|
||||
|
||||
TEST_F(DisplayMediaAccessHandlerTest, CorrectHostAsksForPermissions) {
|
||||
const int render_process_id =
|
||||
web_contents()->GetPrimaryMainFrame()->GetProcess()->GetID();
|
||||
web_contents()->GetPrimaryMainFrame()->GetProcess()->GetDeprecatedID();
|
||||
const int render_frame_id =
|
||||
web_contents()->GetPrimaryMainFrame()->GetRoutingID();
|
||||
const int page_request_id = 0;
|
||||
@ -479,7 +480,7 @@ TEST_F(DisplayMediaAccessHandlerTest, CorrectHostAsksForPermissions) {
|
||||
|
||||
TEST_F(DisplayMediaAccessHandlerTest, CorrectHostAsksForPermissionsNormalURLs) {
|
||||
const int render_process_id =
|
||||
web_contents()->GetPrimaryMainFrame()->GetProcess()->GetID();
|
||||
web_contents()->GetPrimaryMainFrame()->GetProcess()->GetDeprecatedID();
|
||||
const int render_frame_id =
|
||||
web_contents()->GetPrimaryMainFrame()->GetRoutingID();
|
||||
const int page_request_id = 0;
|
||||
@ -535,7 +536,7 @@ TEST_F(DisplayMediaAccessHandlerTest, IsolatedWebAppNameAsksForPermissions) {
|
||||
url_info.origin().GetURL());
|
||||
|
||||
const int render_process_id =
|
||||
web_contents()->GetPrimaryMainFrame()->GetProcess()->GetID();
|
||||
web_contents()->GetPrimaryMainFrame()->GetProcess()->GetDeprecatedID();
|
||||
const int render_frame_id =
|
||||
web_contents()->GetPrimaryMainFrame()->GetRoutingID();
|
||||
const int page_request_id = 0;
|
||||
@ -571,7 +572,7 @@ TEST_F(DisplayMediaAccessHandlerTest, WebContentsDestroyed) {
|
||||
false /* expect_audio */, content::DesktopMediaID(),
|
||||
true /* cancelled */}});
|
||||
content::MediaStreamRequest request(
|
||||
web_contents()->GetPrimaryMainFrame()->GetProcess()->GetID(),
|
||||
web_contents()->GetPrimaryMainFrame()->GetProcess()->GetDeprecatedID(),
|
||||
web_contents()->GetPrimaryMainFrame()->GetRoutingID(), 0,
|
||||
url::Origin::Create(GURL("http://origin/")), false,
|
||||
blink::MEDIA_GENERATE_STREAM, /*requested_audio_device_ids=*/{},
|
||||
@ -613,7 +614,7 @@ TEST_F(DisplayMediaAccessHandlerTest, MultipleRequests) {
|
||||
std::array<base::RunLoop, kTestFlagCount> wait_loop;
|
||||
for (size_t i = 0; i < kTestFlagCount; ++i) {
|
||||
content::MediaStreamRequest request(
|
||||
web_contents()->GetPrimaryMainFrame()->GetProcess()->GetID(),
|
||||
web_contents()->GetPrimaryMainFrame()->GetProcess()->GetDeprecatedID(),
|
||||
web_contents()->GetPrimaryMainFrame()->GetRoutingID(), 0,
|
||||
url::Origin::Create(GURL("http://origin/")), false,
|
||||
blink::MEDIA_GENERATE_STREAM, /*requested_audio_device_ids=*/{},
|
||||
|
@ -179,8 +179,10 @@ class MediaStreamDevicesControllerTest : public WebRtcTestBase {
|
||||
->GetLastCommittedOrigin()
|
||||
.GetURL());
|
||||
}
|
||||
int render_process_id =
|
||||
GetWebContents()->GetPrimaryMainFrame()->GetProcess()->GetID();
|
||||
int render_process_id = GetWebContents()
|
||||
->GetPrimaryMainFrame()
|
||||
->GetProcess()
|
||||
->GetDeprecatedID();
|
||||
int render_frame_id =
|
||||
GetWebContents()->GetPrimaryMainFrame()->GetRoutingID();
|
||||
return content::MediaStreamRequest(
|
||||
@ -956,7 +958,7 @@ IN_PROC_BROWSER_TEST_F(MediaStreamDevicesControllerTest,
|
||||
content::MediaStreamRequest request =
|
||||
CreateRequest(example_audio_id(), example_video_id(), false);
|
||||
// Make the child frame the source of the request.
|
||||
request.render_process_id = child_frame->GetProcess()->GetID();
|
||||
request.render_process_id = child_frame->GetProcess()->GetDeprecatedID();
|
||||
request.render_frame_id = child_frame->GetRoutingID();
|
||||
request.security_origin = child_frame->GetLastCommittedOrigin().GetURL();
|
||||
|
||||
@ -987,7 +989,7 @@ IN_PROC_BROWSER_TEST_F(MediaStreamDevicesControllerTest,
|
||||
content::MediaStreamRequest request =
|
||||
CreateRequest(std::string(), example_video_id(), false);
|
||||
// Make the child frame the source of the request.
|
||||
request.render_process_id = child_frame->GetProcess()->GetID();
|
||||
request.render_process_id = child_frame->GetProcess()->GetDeprecatedID();
|
||||
request.render_frame_id = child_frame->GetRoutingID();
|
||||
request.security_origin = child_frame->GetLastCommittedOrigin().GetURL();
|
||||
|
||||
|
@ -59,7 +59,7 @@ class MediaStreamFocusDelegateTest : public BrowserWithTestWindowTest {
|
||||
content::DesktopMediaID::TYPE_WEB_CONTENTS,
|
||||
content::DesktopMediaID::kNullId,
|
||||
content::WebContentsMediaCaptureId(
|
||||
tab->GetPrimaryMainFrame()->GetProcess()->GetID(),
|
||||
tab->GetPrimaryMainFrame()->GetProcess()->GetDeprecatedID(),
|
||||
tab->GetPrimaryMainFrame()->GetRoutingID()));
|
||||
}
|
||||
|
||||
|
@ -50,7 +50,7 @@ class TabCaptureAccessHandlerTest : public ChromeRenderViewHostTestHarness {
|
||||
blink::mojom::StreamDevices* devices_result,
|
||||
bool expect_result = true) {
|
||||
content::MediaStreamRequest request(
|
||||
web_contents()->GetPrimaryMainFrame()->GetProcess()->GetID(),
|
||||
web_contents()->GetPrimaryMainFrame()->GetProcess()->GetDeprecatedID(),
|
||||
web_contents()->GetPrimaryMainFrame()->GetRoutingID(),
|
||||
/*page_request_id=*/0, url::Origin::Create(GURL(kOrigin)),
|
||||
/*user_gesture=*/false, blink::MEDIA_GENERATE_STREAM,
|
||||
@ -101,7 +101,7 @@ class TabCaptureAccessHandlerTest : public ChromeRenderViewHostTestHarness {
|
||||
return web_contents()->GetPrimaryMainFrame();
|
||||
}
|
||||
int main_frame_id() { return main_frame()->GetRoutingID(); }
|
||||
int process_id() { return main_frame()->GetProcess()->GetID(); }
|
||||
int process_id() { return main_frame()->GetProcess()->GetDeprecatedID(); }
|
||||
|
||||
protected:
|
||||
std::unique_ptr<TabCaptureAccessHandler> access_handler_;
|
||||
@ -112,7 +112,10 @@ TEST_F(TabCaptureAccessHandlerTest, PermissionGiven) {
|
||||
content::DesktopMediaID::TYPE_WEB_CONTENTS,
|
||||
content::DesktopMediaID::kNullId,
|
||||
content::WebContentsMediaCaptureId(
|
||||
web_contents()->GetPrimaryMainFrame()->GetProcess()->GetID(),
|
||||
web_contents()
|
||||
->GetPrimaryMainFrame()
|
||||
->GetProcess()
|
||||
->GetDeprecatedID(),
|
||||
web_contents()->GetPrimaryMainFrame()->GetRoutingID()));
|
||||
|
||||
extensions::TabCaptureRegistry::Get(profile())->AddRequest(
|
||||
@ -136,7 +139,10 @@ TEST_F(TabCaptureAccessHandlerTest, DlpRestricted) {
|
||||
content::DesktopMediaID::TYPE_WEB_CONTENTS,
|
||||
content::DesktopMediaID::kNullId,
|
||||
content::WebContentsMediaCaptureId(
|
||||
web_contents()->GetPrimaryMainFrame()->GetProcess()->GetID(),
|
||||
web_contents()
|
||||
->GetPrimaryMainFrame()
|
||||
->GetProcess()
|
||||
->GetDeprecatedID(),
|
||||
web_contents()->GetPrimaryMainFrame()->GetRoutingID()));
|
||||
|
||||
// Setup Data Leak Prevention restriction.
|
||||
@ -168,7 +174,10 @@ TEST_F(TabCaptureAccessHandlerTest, DlpNotRestricted) {
|
||||
content::DesktopMediaID::TYPE_WEB_CONTENTS,
|
||||
content::DesktopMediaID::kNullId,
|
||||
content::WebContentsMediaCaptureId(
|
||||
web_contents()->GetPrimaryMainFrame()->GetProcess()->GetID(),
|
||||
web_contents()
|
||||
->GetPrimaryMainFrame()
|
||||
->GetProcess()
|
||||
->GetDeprecatedID(),
|
||||
web_contents()->GetPrimaryMainFrame()->GetRoutingID()));
|
||||
|
||||
// Setup Data Leak Prevention restriction.
|
||||
@ -200,7 +209,10 @@ TEST_F(TabCaptureAccessHandlerTest, DlpWebContentsDestroyed) {
|
||||
content::DesktopMediaID::TYPE_WEB_CONTENTS,
|
||||
content::DesktopMediaID::kNullId,
|
||||
content::WebContentsMediaCaptureId(
|
||||
web_contents()->GetPrimaryMainFrame()->GetProcess()->GetID(),
|
||||
web_contents()
|
||||
->GetPrimaryMainFrame()
|
||||
->GetProcess()
|
||||
->GetDeprecatedID(),
|
||||
web_contents()->GetPrimaryMainFrame()->GetRoutingID()));
|
||||
|
||||
// Setup Data Leak Prevention restriction.
|
||||
|
@ -200,10 +200,11 @@ void TabDesktopMediaList::Refresh(bool update_thumnails) {
|
||||
continue;
|
||||
content::RenderFrameHost* main_frame = contents->GetPrimaryMainFrame();
|
||||
DCHECK(main_frame);
|
||||
DesktopMediaID media_id(
|
||||
DesktopMediaID::TYPE_WEB_CONTENTS, DesktopMediaID::kNullId,
|
||||
content::WebContentsMediaCaptureId(main_frame->GetProcess()->GetID(),
|
||||
main_frame->GetRoutingID()));
|
||||
DesktopMediaID media_id(DesktopMediaID::TYPE_WEB_CONTENTS,
|
||||
DesktopMediaID::kNullId,
|
||||
content::WebContentsMediaCaptureId(
|
||||
main_frame->GetProcess()->GetDeprecatedID(),
|
||||
main_frame->GetRoutingID()));
|
||||
|
||||
// Get tab's last active time stamp.
|
||||
const base::TimeTicks t = contents->GetLastActiveTimeTicks();
|
||||
|
@ -59,8 +59,9 @@ content::DesktopMediaID GetDesktopMediaIDForTab(Browser* browser, int tab) {
|
||||
return content::DesktopMediaID(
|
||||
content::DesktopMediaID::TYPE_WEB_CONTENTS,
|
||||
content::DesktopMediaID::kNullId,
|
||||
content::WebContentsMediaCaptureId(main_frame->GetProcess()->GetID(),
|
||||
main_frame->GetRoutingID()));
|
||||
content::WebContentsMediaCaptureId(
|
||||
main_frame->GetProcess()->GetDeprecatedID(),
|
||||
main_frame->GetRoutingID()));
|
||||
}
|
||||
|
||||
infobars::ContentInfoBarManager* GetInfoBarManager(Browser* browser, int tab) {
|
||||
|
@ -471,7 +471,7 @@ void WebRtcEventLogManager::RenderProcessHostExitedDestroyed(
|
||||
task_runner_->PostTask(
|
||||
FROM_HERE,
|
||||
base::BindOnce(&WebRtcEventLogManager::RenderProcessExitedInternal,
|
||||
base::Unretained(this), host->GetID()));
|
||||
base::Unretained(this), host->GetDeprecatedID()));
|
||||
}
|
||||
|
||||
void WebRtcEventLogManager::OnPeerConnectionAdded(
|
||||
|
@ -143,7 +143,8 @@ constexpr int kFrameId = 57;
|
||||
PeerConnectionKey GetPeerConnectionKey(RenderProcessHost* rph, int lid) {
|
||||
const BrowserContext* browser_context = rph->GetBrowserContext();
|
||||
const auto browser_context_id = GetBrowserContextId(browser_context);
|
||||
return PeerConnectionKey(rph->GetID(), lid, browser_context_id, kFrameId);
|
||||
return PeerConnectionKey(rph->GetDeprecatedID(), lid, browser_context_id,
|
||||
kFrameId);
|
||||
}
|
||||
|
||||
bool CreateRemoteBoundLogFile(const base::FilePath& dir,
|
||||
@ -1799,7 +1800,7 @@ TEST_F(WebRtcEventLogManagerTest, LocalLogMultipleActiveFiles) {
|
||||
|
||||
std::vector<std::string> logs;
|
||||
for (size_t i = 0; i < keys.size(); ++i) {
|
||||
logs.emplace_back(base::NumberToString(rph_->GetID()) +
|
||||
logs.emplace_back(base::NumberToString(rph_->GetDeprecatedID()) +
|
||||
base::NumberToString(kLid));
|
||||
ASSERT_EQ(OnWebRtcEventLogWrite(keys[i], logs[i]),
|
||||
std::make_pair(true, false));
|
||||
@ -1984,7 +1985,7 @@ TEST_F(WebRtcEventLogManagerTest, LocalLogFilenameMatchesExpectedFormat) {
|
||||
base::FilePath expected_path = local_logs_base_path;
|
||||
expected_path = local_logs_base_path.InsertBeforeExtension(
|
||||
FILE_PATH_LITERAL("_") + date + FILE_PATH_LITERAL("_") + time +
|
||||
FILE_PATH_LITERAL("_") + NumberToStringType(rph_->GetID()) +
|
||||
FILE_PATH_LITERAL("_") + NumberToStringType(rph_->GetDeprecatedID()) +
|
||||
FILE_PATH_LITERAL("_") + NumberToStringType(kLid));
|
||||
expected_path = expected_path.AddExtension(local_log_extension_);
|
||||
|
||||
@ -2028,7 +2029,7 @@ TEST_F(WebRtcEventLogManagerTest,
|
||||
base::FilePath expected_path_1 = local_logs_base_path;
|
||||
expected_path_1 = local_logs_base_path.InsertBeforeExtension(
|
||||
FILE_PATH_LITERAL("_") + date + FILE_PATH_LITERAL("_") + time +
|
||||
FILE_PATH_LITERAL("_") + NumberToStringType(rph_->GetID()) +
|
||||
FILE_PATH_LITERAL("_") + NumberToStringType(rph_->GetDeprecatedID()) +
|
||||
FILE_PATH_LITERAL("_") + NumberToStringType(kLid));
|
||||
expected_path_1 = expected_path_1.AddExtension(local_log_extension_);
|
||||
|
||||
@ -2499,7 +2500,7 @@ TEST_F(WebRtcEventLogManagerTest,
|
||||
|
||||
std::vector<std::string> logs;
|
||||
for (size_t i = 0; i < keys.size(); ++i) {
|
||||
logs.emplace_back(base::NumberToString(rph_->GetID()) +
|
||||
logs.emplace_back(base::NumberToString(rph_->GetDeprecatedID()) +
|
||||
base::NumberToString(i));
|
||||
ASSERT_EQ(OnWebRtcEventLogWrite(keys[i], logs[i]),
|
||||
std::make_pair(false, true));
|
||||
@ -2545,7 +2546,7 @@ TEST_F(WebRtcEventLogManagerTest,
|
||||
|
||||
std::vector<std::string> logs;
|
||||
for (size_t i = 0; i < keys.size(); ++i) {
|
||||
logs.emplace_back(base::NumberToString(rph_->GetID()) +
|
||||
logs.emplace_back(base::NumberToString(rph_->GetDeprecatedID()) +
|
||||
base::NumberToString(i));
|
||||
ASSERT_EQ(OnWebRtcEventLogWrite(keys[i], logs[i]),
|
||||
std::make_pair(false, true));
|
||||
|
@ -45,7 +45,7 @@ void WebRtcLoggingController::AttachToRenderProcessHost(
|
||||
host->SetUserData(
|
||||
kRenderProcessHostKey,
|
||||
std::make_unique<base::UserDataAdapter<WebRtcLoggingController>>(
|
||||
new WebRtcLoggingController(host->GetID(),
|
||||
new WebRtcLoggingController(host->GetDeprecatedID(),
|
||||
host->GetBrowserContext())));
|
||||
}
|
||||
|
||||
|
@ -306,7 +306,7 @@ void MemoryDetails::CollectChildInfoOnUIThread() {
|
||||
extensions::ProcessMap* process_map =
|
||||
extensions::ProcessMap::Get(context);
|
||||
DCHECK(process_map);
|
||||
int rph_id = render_process_host->GetID();
|
||||
int rph_id = render_process_host->GetDeprecatedID();
|
||||
process_is_for_extensions = process_map->Contains(rph_id);
|
||||
|
||||
// For our purposes, don't count processes running hosted apps as
|
||||
|
@ -27,7 +27,7 @@ bool ChromeMetricsExtensionsHelper::IsExtensionProcess(
|
||||
auto* process_map =
|
||||
extensions::ProcessMap::Get(render_process_host->GetBrowserContext());
|
||||
CHECK(process_map);
|
||||
return process_map->Contains(render_process_host->GetID());
|
||||
return process_map->Contains(render_process_host->GetDeprecatedID());
|
||||
#else
|
||||
return false;
|
||||
#endif
|
||||
|
@ -39,7 +39,7 @@ TEST(ChromeMetricsExtensionsHelperTest, Basic) {
|
||||
|
||||
#if BUILDFLAG(ENABLE_EXTENSIONS)
|
||||
// Tag |host| so that it's an extensions host.
|
||||
extensions::ProcessMap::Get(profile)->Insert("1", host->GetID());
|
||||
extensions::ProcessMap::Get(profile)->Insert("1", host->GetDeprecatedID());
|
||||
EXPECT_TRUE(extensions_helper.IsExtensionProcess(host));
|
||||
#endif
|
||||
rph_factory.reset();
|
||||
|
@ -114,7 +114,7 @@ MonitoredProcessType GetMonitoredProcessTypeForRenderProcess(
|
||||
|
||||
const extensions::Extension* extension =
|
||||
extensions::ProcessMap::Get(browser_context)
|
||||
->GetEnabledExtensionByProcessID(host->GetID());
|
||||
->GetEnabledExtensionByProcessID(host->GetDeprecatedID());
|
||||
if (!extension) {
|
||||
return kRenderer;
|
||||
}
|
||||
|
@ -1347,7 +1347,7 @@ int ProcessMemoryMetricsEmitter::GetNumberOfExtensions(base::ProcessId pid) {
|
||||
}
|
||||
|
||||
const extensions::Extension* extension =
|
||||
process_map->GetEnabledExtensionByProcessID(rph->GetID());
|
||||
process_map->GetEnabledExtensionByProcessID(rph->GetDeprecatedID());
|
||||
// Only include this extension if it's not a hosted app.
|
||||
return (extension && !extension->is_hosted_app()) ? 1 : 0;
|
||||
#else
|
||||
|
@ -157,12 +157,12 @@ class WebSocketBrowserTest : public InProcessBrowserTest {
|
||||
process->GetStoragePartition()->GetNetworkContext()->CreateWebSocket(
|
||||
url, requested_protocols, site_for_cookies,
|
||||
net::StorageAccessApiStatus::kNone, isolation_info,
|
||||
std::move(additional_headers), process->GetID(), origin,
|
||||
std::move(additional_headers), process->GetDeprecatedID(), origin,
|
||||
network::mojom::kWebSocketOptionNone,
|
||||
net::MutableNetworkTrafficAnnotationTag(TRAFFIC_ANNOTATION_FOR_TESTS),
|
||||
std::move(handshake_client),
|
||||
process->GetStoragePartition()->CreateURLLoaderNetworkObserverForFrame(
|
||||
process->GetID(), frame->GetRoutingID()),
|
||||
process->GetDeprecatedID(), frame->GetRoutingID()),
|
||||
/*auth_handler=*/mojo::NullRemote(),
|
||||
/*header_client=*/mojo::NullRemote(),
|
||||
/*throttling_profile_id=*/std::nullopt);
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user