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

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

Issue 2259553002: Make AppBannerInfoBar install WebAPK. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 4 years, 4 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 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 switch (code) { 73 switch (code) {
74 case NO_ERROR_DETECTED: 74 case NO_ERROR_DETECTED:
75 // These codes are solely used for UMA reporting. 75 // These codes are solely used for UMA reporting.
76 case ALREADY_INSTALLED: 76 case ALREADY_INSTALLED:
77 case INSUFFICIENT_ENGAGEMENT: 77 case INSUFFICIENT_ENGAGEMENT:
78 case PACKAGE_NAME_OR_START_URL_EMPTY: 78 case PACKAGE_NAME_OR_START_URL_EMPTY:
79 case PREVIOUSLY_BLOCKED: 79 case PREVIOUSLY_BLOCKED:
80 case PREVIOUSLY_IGNORED: 80 case PREVIOUSLY_IGNORED:
81 case SHOWING_NATIVE_APP_BANNER: 81 case SHOWING_NATIVE_APP_BANNER:
82 case SHOWING_WEB_APP_BANNER: 82 case SHOWING_WEB_APP_BANNER:
83 case SHOWING_WEBAPK_BANNER:
dominickn 2016/08/20 23:44:08 Make sure the order matches the declaration.
83 case FAILED_TO_CREATE_BANNER: 84 case FAILED_TO_CREATE_BANNER:
84 case MAX_ERROR_CODE: 85 case MAX_ERROR_CODE:
85 return; 86 return;
86 case RENDERER_EXITING: 87 case RENDERER_EXITING:
87 pattern = kRendererExitingMessage; 88 pattern = kRendererExitingMessage;
88 break; 89 break;
89 case RENDERER_CANCELLED: 90 case RENDERER_CANCELLED:
90 pattern = kRendererCancelledMessage; 91 pattern = kRendererCancelledMessage;
91 severity = content::CONSOLE_MESSAGE_LEVEL_LOG; 92 severity = content::CONSOLE_MESSAGE_LEVEL_LOG;
92 break; 93 break;
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 break; 143 break;
143 } 144 }
144 145
145 if (!pattern) 146 if (!pattern)
146 return; 147 return;
147 std::string message = param.empty() ? 148 std::string message = param.empty() ?
148 pattern : base::StringPrintf(pattern, param.c_str()); 149 pattern : base::StringPrintf(pattern, param.c_str());
149 web_contents->GetMainFrame()->AddMessageToConsole( 150 web_contents->GetMainFrame()->AddMessageToConsole(
150 severity, GetMessagePrefix() + message); 151 severity, GetMessagePrefix() + message);
151 } 152 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698