Jumbo compile fix: Too many LoggingEnabled and DebugLogging

The temporary logging methods were copied to several
files and in jumbo builds, where those files are compiled
into the same translation unit, they clashed and
compilation broke.

This patch deletes the extra copies and exposes the one
in direct_manipulation_helper_win.cpp. The name
is not great for an exposed function but since this is
just very temporary code (right?), it should be fine and
we need the build to get going and I don't want to
revert anything.

Bug: 914914

TBR=chaopeng@chromium.org,sky@chromium.org

Change-Id: I35d96a655bbaeede01d081e96426bd7b8358f295
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1552799
Reviewed-by: Daniel Bratell <bratell@opera.com>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#647677}
diff --git a/content/browser/renderer_host/direct_manipulation_event_handler_win.cc b/content/browser/renderer_host/direct_manipulation_event_handler_win.cc
index 967467f..eec54fc 100644
--- a/content/browser/renderer_host/direct_manipulation_event_handler_win.cc
+++ b/content/browser/renderer_host/direct_manipulation_event_handler_win.cc
@@ -14,23 +14,6 @@
 
 namespace {
 
-bool LoggingEnabled() {
-  static bool logging_enabled =
-      base::FeatureList::IsEnabled(features::kPrecisionTouchpadLogging);
-
-  return logging_enabled;
-}
-
-// TODO(crbug.com/914914) This is added for help us getting debug log on
-// machine with scrolling issue on Windows Precision Touchpad. We will remove it
-// after Windows Precision Touchpad scrolling issue fixed.
-void DebugLogging(const std::string& s, HRESULT hr) {
-  if (!LoggingEnabled())
-    return;
-
-  LOG(ERROR) << "Windows PTP: " << s << " " << hr;
-}
-
 bool FloatEquals(float f1, float f2) {
   // The idea behind this is to use this fraction of the larger of the
   // two numbers as the limit of the difference.  This breaks down near
diff --git a/content/browser/renderer_host/direct_manipulation_helper_win.cc b/content/browser/renderer_host/direct_manipulation_helper_win.cc
index 3548205..d04c3e1 100644
--- a/content/browser/renderer_host/direct_manipulation_helper_win.cc
+++ b/content/browser/renderer_host/direct_manipulation_helper_win.cc
@@ -18,8 +18,6 @@
 
 namespace content {
 
-namespace {
-
 bool LoggingEnabled() {
   static bool logging_enabled =
       base::FeatureList::IsEnabled(features::kPrecisionTouchpadLogging);
@@ -37,8 +35,6 @@
   LOG(ERROR) << "Windows PTP: " << s << " " << hr;
 }
 
-}  // namespace
-
 // static
 std::unique_ptr<DirectManipulationHelper>
 DirectManipulationHelper::CreateInstance(HWND window,
diff --git a/content/browser/renderer_host/direct_manipulation_helper_win.h b/content/browser/renderer_host/direct_manipulation_helper_win.h
index 7f79818..76c889b 100644
--- a/content/browser/renderer_host/direct_manipulation_helper_win.h
+++ b/content/browser/renderer_host/direct_manipulation_helper_win.h
@@ -10,6 +10,7 @@
 #include <directmanipulation.h>
 #include <wrl.h>
 #include <memory>
+#include <string>
 
 #include "base/gtest_prod_util.h"
 #include "base/macros.h"
@@ -28,6 +29,12 @@
 class DirectManipulationBrowserTest;
 class DirectManipulationUnitTest;
 
+// TODO(crbug.com/914914) This is added for help us getting debug log on
+// machine with scrolling issue on Windows Precision Touchpad. We will remove it
+// after Windows Precision Touchpad scrolling issue fixed.
+void DebugLogging(const std::string& s, HRESULT hr = 0);
+bool LoggingEnabled();
+
 // Windows 10 provides a new API called Direct Manipulation which generates
 // smooth scroll and scale factor via IDirectManipulationViewportEventHandler
 // on precision touchpad.
diff --git a/content/browser/renderer_host/legacy_render_widget_host_win.cc b/content/browser/renderer_host/legacy_render_widget_host_win.cc
index f417c5e..e8acceb6 100644
--- a/content/browser/renderer_host/legacy_render_widget_host_win.cc
+++ b/content/browser/renderer_host/legacy_render_widget_host_win.cc
@@ -38,27 +38,6 @@
 // accessibility support.
 const int kIdScreenReaderHoneyPot = 1;
 
-namespace {
-
-bool LoggingEnabled() {
-  static bool logging_enabled =
-      base::FeatureList::IsEnabled(features::kPrecisionTouchpadLogging);
-
-  return logging_enabled;
-}
-
-// TODO(crbug.com/914914) This is added for help us getting debug log on
-// machine with scrolling issue on Windows Precision Touchpad. We will remove it
-// after Windows Precision Touchpad scrolling issue fixed.
-void DebugLogging(const std::string& s) {
-  if (!LoggingEnabled())
-    return;
-
-  LOG(ERROR) << "Windows PTP: " << s;
-}
-
-}  // namespace
-
 // DirectManipulation needs to poll for new events every frame while finger
 // gesturing on touchpad.
 class CompositorAnimationObserverForDirectManipulation