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

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

Issue 13243003: Move MessageLoop to base namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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
11 #include "base/string16.h" 11 #include "base/string16.h"
12 12
13 namespace base {
13 class MessageLoop; 14 class MessageLoop;
15 }
14 16
15 // Exposes an easy way for the various components of the extension system to 17 // Exposes an easy way for the various components of the extension system to
16 // report errors. This is a singleton that lives on the UI thread, with the 18 // report errors. This is a singleton that lives on the UI thread, with the
17 // exception of ReportError() which may be called from any thread. 19 // exception of ReportError() which may be called from any thread.
18 // TODO(aa): Hook this up to about:extensions, when we have about:extensions. 20 // TODO(aa): Hook this up to about:extensions, when we have about:extensions.
19 // TODO(aa): Consider exposing directly, or via a helper, to the renderer 21 // TODO(aa): Consider exposing directly, or via a helper, to the renderer
20 // process and plumbing the errors out to the browser. 22 // process and plumbing the errors out to the browser.
21 // TODO(aa): Add ReportError(extension_id, message, be_noisy), so that we can 23 // TODO(aa): Add ReportError(extension_id, message, be_noisy), so that we can
22 // report errors that are specific to a particular extension. 24 // report errors that are specific to a particular extension.
23 class ExtensionErrorReporter { 25 class ExtensionErrorReporter {
(...skipping 14 matching lines...) Expand all
38 40
39 // Clear the list of errors reported so far. 41 // Clear the list of errors reported so far.
40 void ClearErrors(); 42 void ClearErrors();
41 43
42 private: 44 private:
43 static ExtensionErrorReporter* instance_; 45 static ExtensionErrorReporter* instance_;
44 46
45 explicit ExtensionErrorReporter(bool enable_noisy_errors); 47 explicit ExtensionErrorReporter(bool enable_noisy_errors);
46 ~ExtensionErrorReporter(); 48 ~ExtensionErrorReporter();
47 49
48 MessageLoop* ui_loop_; 50 base::MessageLoop* ui_loop_;
49 std::vector<string16> errors_; 51 std::vector<string16> errors_;
50 bool enable_noisy_errors_; 52 bool enable_noisy_errors_;
51 }; 53 };
52 54
53 #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/devtools/devtools_adb_bridge.h ('k') | chrome/browser/extensions/extension_install_prompt.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698