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

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

Issue 22938005: Add ErrorConsole UI for Extension Install Warnings (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@dc_ec_install_warnings
Patch Set: License Created 7 years, 3 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_ERROR_CONSOLE_ERROR_CONSOLE_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_ERROR_CONSOLE_ERROR_CONSOLE_H_
6 #define CHROME_BROWSER_EXTENSIONS_ERROR_CONSOLE_ERROR_CONSOLE_H_ 6 #define CHROME_BROWSER_EXTENSIONS_ERROR_CONSOLE_ERROR_CONSOLE_H_
7 7
8 #include <deque> 8 #include <deque>
9 #include <map> 9 #include <map>
10 10
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 62
63 // Get a collection of weak pointers to all errors relating to the extension 63 // Get a collection of weak pointers to all errors relating to the extension
64 // with the given |extension_id|. 64 // with the given |extension_id|.
65 const ErrorList& GetErrorsForExtension(const std::string& extension_id) const; 65 const ErrorList& GetErrorsForExtension(const std::string& extension_id) const;
66 66
67 // Add or remove observers of the ErrorConsole to be notified of any errors 67 // Add or remove observers of the ErrorConsole to be notified of any errors
68 // added. 68 // added.
69 void AddObserver(Observer* observer); 69 void AddObserver(Observer* observer);
70 void RemoveObserver(Observer* observer); 70 void RemoveObserver(Observer* observer);
71 71
72 bool enabled() const { return enabled_; }
72 const ErrorMap& errors() const { return errors_; } 73 const ErrorMap& errors() const { return errors_; }
73 74
74 private: 75 private:
75 FRIEND_TEST_ALL_PREFIXES(ErrorConsoleUnitTest, AddAndRemoveErrors); 76 FRIEND_TEST_ALL_PREFIXES(ErrorConsoleUnitTest, AddAndRemoveErrors);
76 77
77 // Enable the error console for error collection and retention. This involves 78 // Enable the error console for error collection and retention. This involves
78 // subscribing to the appropriate notifications and fetching manifest errors. 79 // subscribing to the appropriate notifications and fetching manifest errors.
79 void Enable(ExtensionService* extension_service); 80 void Enable(ExtensionService* extension_service);
80 // Disable the error console, removing the subscriptions to notifications and 81 // Disable the error console, removing the subscriptions to notifications and
81 // removing all current errors. 82 // removing all current errors.
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 126
126 content::NotificationRegistrar notification_registrar_; 127 content::NotificationRegistrar notification_registrar_;
127 PrefChangeRegistrar pref_registrar_; 128 PrefChangeRegistrar pref_registrar_;
128 129
129 DISALLOW_COPY_AND_ASSIGN(ErrorConsole); 130 DISALLOW_COPY_AND_ASSIGN(ErrorConsole);
130 }; 131 };
131 132
132 } // namespace extensions 133 } // namespace extensions
133 134
134 #endif // CHROME_BROWSER_EXTENSIONS_ERROR_CONSOLE_ERROR_CONSOLE_H_ 135 #endif // CHROME_BROWSER_EXTENSIONS_ERROR_CONSOLE_ERROR_CONSOLE_H_
OLDNEW
« no previous file with comments | « chrome/app/generated_resources.grd ('k') | chrome/browser/resources/extensions/extension_error.css » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698