Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(144)

Side by Side Diff: chrome/browser/banners/app_banner_debug_log.cc

Issue 1129103003: Log messages regarding why app banners aren't displayed to the console (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Factoring out debug log message function Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(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.
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698