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

Side by Side Diff: chrome/browser/extensions/crx_installer_error.h

Issue 10559056: Use an infobar instead of alert box for extension install error. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: cleanup Created 8 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 | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2012 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_EXTENSIONS_CRX_INSTALLER_ERROR_H_
6 #define CHROME_BROWSER_EXTENSIONS_CRX_INSTALLER_ERROR_H_
7 #pragma once
8
9 #include "base/string16.h"
10
11 // Simple error class for CrxInstaller.
12 class CrxInstallerError {
13 public:
14 // Typed errors that need to be handled specially by clients.
15 enum Type {
16 ERROR_NONE,
17 ERROR_OFF_STORE,
18 ERROR_OTHER
19 };
20
21 CrxInstallerError() : type_(ERROR_NONE) {
22 }
23
24 explicit CrxInstallerError(const string16& message)
25 : type_(message.empty() ? ERROR_NONE : ERROR_OTHER),
26 message_(message) {
27 }
28
29 CrxInstallerError(Type type, const string16& message)
30 : type_(type), message_(message) {
31 }
32
33 Type type() const { return type_; }
34 const string16& message() const { return message_; }
35
36 private:
37 Type type_;
38 string16 message_;
39 };
40
41 #endif // CHROME_BROWSER_EXTENSIONS_CRX_INSTALLER_ERROR_H_
OLDNEW
« no previous file with comments | « chrome/browser/extensions/crx_installer.cc ('k') | chrome/browser/extensions/extension_install_prompt.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698