PlzNavigate: Add helper method for checking if PlzNavigate is enabled.

In the interest of simplifying the code for checking if browser side
navigation is enabled this change creates a new helper method and
replaces all current occurrences of the "extended" form.

BUG=368813
[email protected]

Review URL: https://codereview.chromium.org/1517643002

Cr-Commit-Position: refs/heads/master@{#365527}
diff --git a/content/browser/security_exploit_browsertest.cc b/content/browser/security_exploit_browsertest.cc
index dcf51ef6..c39bfa2 100644
--- a/content/browser/security_exploit_browsertest.cc
+++ b/content/browser/security_exploit_browsertest.cc
@@ -21,6 +21,7 @@
 #include "content/public/browser/interstitial_page_delegate.h"
 #include "content/public/browser/storage_partition.h"
 #include "content/public/common/appcache_info.h"
+#include "content/public/common/browser_side_navigation_policy.h"
 #include "content/public/common/content_switches.h"
 #include "content/public/common/file_chooser_params.h"
 #include "content/public/test/browser_test_utils.h"
@@ -81,13 +82,10 @@
   // speculative/pending RenderFrameHost. Ensure it exists and is in a different
   // process than the initial page.
   RenderFrameHostImpl* next_rfh;
-  if (base::CommandLine::ForCurrentProcess()->HasSwitch(
-          switches::kEnableBrowserSideNavigation)) {
-    next_rfh =
-        wc->GetRenderManagerForTesting()->speculative_frame_host();
-  } else {
+  if (IsBrowserSideNavigationEnabled())
+    next_rfh = wc->GetRenderManagerForTesting()->speculative_frame_host();
+  else
     next_rfh = wc->GetRenderManagerForTesting()->pending_frame_host();
-  }
 
   EXPECT_TRUE(next_rfh);
   EXPECT_NE(shell->web_contents()->GetRenderProcessHost()->GetID(),