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

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

Issue 2160513002: Extract AppBannerDataFetcher into an InstallableManager. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressing reviewer comments Created 4 years, 5 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 2016 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 #ifndef CHROME_BROWSER_INSTALLABLE_INSTALLABLE_LOGGING_H_
6 #define CHROME_BROWSER_INSTALLABLE_INSTALLABLE_LOGGING_H_
7
8 #include <string>
9
10 namespace content {
11 class WebContents;
12 }
13
14 namespace installable {
15
16 // These values are a central reference for installability errors. The
17 // InstallableChecker will specify an ErrorCode (or NO_ERROR) in its result.
18 // Clients of the InstallableChecker may also add their own error codes to this
19 // list, and utilise the LogErrorToConsole method to write a message to the
20 // devtools console informing users of any issues.
21 // TODO(dominickn) add an UMA metric for this enum.
22 enum ErrorCode {
23 NO_ERROR,
24 RENDERER_EXITING,
25 RENDERER_CANCELLED,
26 USER_NAVIGATED,
27 NOT_IN_MAIN_FRAME,
28 NOT_FROM_SECURE_ORIGIN,
29 NO_MANIFEST,
30 MANIFEST_EMPTY,
31 START_URL_NOT_VALID,
32 MANIFEST_MISSING_NAME_OR_SHORT_NAME,
33 MANIFEST_DISPLAY_NOT_SUPPORTED,
34 MANIFEST_MISSING_SUITABLE_ICON,
35 NO_MATCHING_SERVICE_WORKER,
36 NO_ACCEPTABLE_ICON,
37 CANNOT_DOWNLOAD_ICON,
38 NO_ICON_AVAILABLE,
39 PLATFORM_NOT_SUPPORTED_ON_ANDROID,
40 NO_ID_SPECIFIED,
41 IDS_DO_NOT_MATCH,
42 MAX_ERROR_CODE,
43 };
44
45 // Logs a message associated with |code| with a parameter |param| to the
46 // devtools console attached to |web_contents|. Does nothing if |web_contents|
47 // is nullptr.
48 void LogErrorToConsole(content::WebContents* web_contents,
49 ErrorCode code,
50 const std::string& param);
51
52 } // namespace installable
53
54 #endif // CHROME_BROWSER_INSTALLABLE_INSTALLABLE_LOGGING_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698