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

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

Issue 252593003: Improve UI for unpacked extensions failing to load (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Android fix Created 6 years, 8 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
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_ERROR_REPORTER_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_ERROR_REPORTER_H_
6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_ERROR_REPORTER_H_ 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_ERROR_REPORTER_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 15 matching lines...) Expand all
26 public: 26 public:
27 // Initializes the error reporter. Must be called before any other methods 27 // Initializes the error reporter. Must be called before any other methods
28 // and on the UI thread. 28 // and on the UI thread.
29 static void Init(bool enable_noisy_errors); 29 static void Init(bool enable_noisy_errors);
30 30
31 // Get the singleton instance. 31 // Get the singleton instance.
32 static ExtensionErrorReporter* GetInstance(); 32 static ExtensionErrorReporter* GetInstance();
33 33
34 // Report an error. Errors always go to VLOG(1). Optionally, they can also 34 // Report an error. Errors always go to VLOG(1). Optionally, they can also
35 // cause a noisy alert box. 35 // cause a noisy alert box.
36 // 36 void ReportError(const base::string16& message, bool be_noisy);
37 // If |user_response| is non-NULL and |be_noisy| is true (and the
38 // ErrorReporter hasn't turned off noisy errors), the user will be asked if
39 // they want to retry and the answer noted in |user_response|.
40 void ReportError(const base::string16& message,
41 bool be_noisy,
42 bool* user_response);
43 37
44 // Get the errors that have been reported so far. 38 // Get the errors that have been reported so far.
45 const std::vector<base::string16>* GetErrors(); 39 const std::vector<base::string16>* GetErrors();
46 40
47 // Clear the list of errors reported so far. 41 // Clear the list of errors reported so far.
48 void ClearErrors(); 42 void ClearErrors();
49 43
50 private: 44 private:
51 static ExtensionErrorReporter* instance_; 45 static ExtensionErrorReporter* instance_;
52 46
53 explicit ExtensionErrorReporter(bool enable_noisy_errors); 47 explicit ExtensionErrorReporter(bool enable_noisy_errors);
54 ~ExtensionErrorReporter(); 48 ~ExtensionErrorReporter();
55 49
56 base::MessageLoop* ui_loop_; 50 base::MessageLoop* ui_loop_;
57 std::vector<base::string16> errors_; 51 std::vector<base::string16> errors_;
58 bool enable_noisy_errors_; 52 bool enable_noisy_errors_;
59 }; 53 };
60 54
61 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_ERROR_REPORTER_H_ 55 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_ERROR_REPORTER_H_
OLDNEW
« no previous file with comments | « chrome/browser/extensions/crx_installer.cc ('k') | chrome/browser/extensions/extension_error_reporter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698