OLD | NEW |
---|---|
(Empty) | |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #include "chrome/browser/banners/app_banner_debug_log.h" | |
6 | |
7 #include "base/command_line.h" | |
8 #include "chrome/common/chrome_switches.h" | |
9 #include "chrome/common/render_messages.h" | |
10 #include "content/public/browser/render_frame_host.h" | |
11 #include "content/public/browser/web_contents.h" | |
12 #include "content/public/browser/web_contents_observer.h" | |
13 | |
14 namespace banners { | |
15 | |
16 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.
| |
17 const std::string& message) { | |
18 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.
| |
19 if (base::CommandLine::ForCurrentProcess()->HasSwitch( | |
20 switches::kBypassAppBannerEngagementChecks) && web_contents) { | |
21 web_contents->GetMainFrame()->Send( | |
22 new ChromeViewMsg_AppBannerDebugMessageRequest( | |
23 web_contents->GetMainFrame()->GetRoutingID(), log_message)); | |
24 } | |
25 } | |
26 | |
27 }; // namespace banners | |
benwells
2015/05/11 08:08:40
Nit: no ";"
dominickn (DO NOT USE)
2015/05/12 07:41:31
Done.
| |
OLD | NEW |