Avoid having two GetWebContents and GetBrowserClient in content/browser

There are currently two GetWebContents and two GetBrowserClient in
content/browser. In certain non-default extreme jumbo builds
GetWebContents in storage_partition_impl.cc and GetWebContents in
network_service_client.cc could end up in the same
translation unit and it would not compile. There were also
one GetBrowserClient in storage_partition_impl.cc and one in
clear_site_data_throttle.cc

This renames one of the functions
GetWebContents -> GetWebContentsForStoragePartition
and one
GetBrowserContext -> GetBrowserContextFromStoragePartition

Bug: 952723
Change-Id: I85207edde5fcb85eaa6f32cf22ca05a6e324237b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1617837
Auto-Submit: Daniel Bratell <bratell@opera.com>
Commit-Queue: Kinuko Yasuda <kinuko@chromium.org>
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Cr-Commit-Position: refs/heads/master@{#661348}
diff --git a/content/browser/storage_partition_impl.cc b/content/browser/storage_partition_impl.cc
index 8a3f147..4b4afb4 100644
--- a/content/browser/storage_partition_impl.cc
+++ b/content/browser/storage_partition_impl.cc
@@ -272,14 +272,15 @@
       origin_matcher, perform_storage_cleanup, std::move(callback)));
 }
 
-WebContents* GetWebContents(uint32_t process_id, uint32_t routing_id) {
+WebContents* GetWebContentsForStoragePartition(uint32_t process_id,
+                                               uint32_t routing_id) {
   if (process_id != network::mojom::kBrowserProcessId) {
     return WebContentsImpl::FromRenderFrameHostID(process_id, routing_id);
   }
   return WebContents::FromFrameTreeNodeId(routing_id);
 }
 
-BrowserContext* GetBrowserContext(
+BrowserContext* GetBrowserContextFromStoragePartition(
     base::WeakPtr<StoragePartitionImpl> weak_partition_ptr) {
   return weak_partition_ptr ? weak_partition_ptr->browser_context() : nullptr;
 }
@@ -1012,10 +1013,10 @@
                                            const std::string& header_value,
                                            int load_flags,
                                            OnClearSiteDataCallback callback) {
-  auto browser_context_getter =
-      base::BindRepeating(GetBrowserContext, weak_factory_.GetWeakPtr());
-  auto web_contents_getter =
-      base::BindRepeating(GetWebContents, process_id, routing_id);
+  auto browser_context_getter = base::BindRepeating(
+      GetBrowserContextFromStoragePartition, weak_factory_.GetWeakPtr());
+  auto web_contents_getter = base::BindRepeating(
+      GetWebContentsForStoragePartition, process_id, routing_id);
   ClearSiteDataHandler::HandleHeader(browser_context_getter,
                                      web_contents_getter, url, header_value,
                                      load_flags, std::move(callback));