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

Side by Side Diff: chrome/browser/installable/installable_logging.cc

Issue 2942513002: Allow banners to trigger on sites which don't register a service worker onload. (Closed)
Patch Set: Fix windows compile Created 3 years, 6 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
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/installable/installable_logging.h" 5 #include "chrome/browser/installable/installable_logging.h"
6 6
7 #include "base/macros.h" 7 #include "base/macros.h"
8 #include "base/strings/stringprintf.h" 8 #include "base/strings/stringprintf.h"
9 #include "content/public/browser/render_frame_host.h" 9 #include "content/public/browser/render_frame_host.h"
10 #include "content/public/browser/web_contents.h" 10 #include "content/public/browser/web_contents.h"
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 case NO_ERROR_DETECTED: 79 case NO_ERROR_DETECTED:
80 // These codes are solely used for UMA reporting. 80 // These codes are solely used for UMA reporting.
81 case ALREADY_INSTALLED: 81 case ALREADY_INSTALLED:
82 case INSUFFICIENT_ENGAGEMENT: 82 case INSUFFICIENT_ENGAGEMENT:
83 case PACKAGE_NAME_OR_START_URL_EMPTY: 83 case PACKAGE_NAME_OR_START_URL_EMPTY:
84 case PREVIOUSLY_BLOCKED: 84 case PREVIOUSLY_BLOCKED:
85 case PREVIOUSLY_IGNORED: 85 case PREVIOUSLY_IGNORED:
86 case SHOWING_NATIVE_APP_BANNER: 86 case SHOWING_NATIVE_APP_BANNER:
87 case SHOWING_WEB_APP_BANNER: 87 case SHOWING_WEB_APP_BANNER:
88 case FAILED_TO_CREATE_BANNER: 88 case FAILED_TO_CREATE_BANNER:
89 case WAITING_FOR_MANIFEST:
90 case WAITING_FOR_INSTALLABLE_CHECK:
89 case MAX_ERROR_CODE: 91 case MAX_ERROR_CODE:
90 return; 92 return;
91 case RENDERER_EXITING: 93 case RENDERER_EXITING:
92 pattern = kRendererExitingMessage; 94 pattern = kRendererExitingMessage;
93 break; 95 break;
94 case RENDERER_CANCELLED: 96 case RENDERER_CANCELLED:
95 pattern = kRendererCancelledMessage; 97 pattern = kRendererCancelledMessage;
96 severity = content::CONSOLE_MESSAGE_LEVEL_INFO; 98 severity = content::CONSOLE_MESSAGE_LEVEL_INFO;
97 break; 99 break;
98 case USER_NAVIGATED: 100 case USER_NAVIGATED:
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 break; 158 break;
157 } 159 }
158 160
159 if (!pattern) 161 if (!pattern)
160 return; 162 return;
161 std::string message = param.empty() ? 163 std::string message = param.empty() ?
162 pattern : base::StringPrintf(pattern, param.c_str()); 164 pattern : base::StringPrintf(pattern, param.c_str());
163 web_contents->GetMainFrame()->AddMessageToConsole( 165 web_contents->GetMainFrame()->AddMessageToConsole(
164 severity, GetMessagePrefix() + message); 166 severity, GetMessagePrefix() + message);
165 } 167 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698