Index: chrome/browser/banners/app_banner_debug_log.cc |
diff --git a/chrome/browser/banners/app_banner_debug_log.cc b/chrome/browser/banners/app_banner_debug_log.cc |
new file mode 100644 |
index 0000000000000000000000000000000000000000..de8861873afb45d8f245663070c1cc1d3b1f5599 |
--- /dev/null |
+++ b/chrome/browser/banners/app_banner_debug_log.cc |
@@ -0,0 +1,27 @@ |
+// Copyright 2015 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#include "chrome/browser/banners/app_banner_debug_log.h" |
+ |
+#include "base/command_line.h" |
+#include "chrome/common/chrome_switches.h" |
+#include "chrome/common/render_messages.h" |
+#include "content/public/browser/render_frame_host.h" |
+#include "content/public/browser/web_contents.h" |
+#include "content/public/browser/web_contents_observer.h" |
+ |
+namespace banners { |
+ |
+void SendDebugMessage(content::WebContents* web_contents, |
benwells
2015/05/11 08:08:40
This name is very vague. Debug usually refers to c
dominickn (DO NOT USE)
2015/05/12 07:41:31
Done.
|
+ const std::string& message) { |
+ std::string log_message = "App banner " + message; |
benwells
2015/05/11 08:08:40
Should this be "App banner: " with a colon?
Edit:
dominickn (DO NOT USE)
2015/05/12 07:41:31
Done.
|
+ if (base::CommandLine::ForCurrentProcess()->HasSwitch( |
+ switches::kBypassAppBannerEngagementChecks) && web_contents) { |
+ web_contents->GetMainFrame()->Send( |
+ new ChromeViewMsg_AppBannerDebugMessageRequest( |
+ web_contents->GetMainFrame()->GetRoutingID(), log_message)); |
+ } |
+} |
+ |
+}; // namespace banners |
benwells
2015/05/11 08:08:40
Nit: no ";"
dominickn (DO NOT USE)
2015/05/12 07:41:31
Done.
|