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

Unified Diff: chrome/browser/ui/global_error_service.h

Issue 7948003: Update error badge on wrench menu button (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: address review comments Created 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/cocoa/toolbar/toolbar_controller.mm ('k') | chrome/browser/ui/global_error_service.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/global_error_service.h
diff --git a/chrome/browser/ui/global_error_service.h b/chrome/browser/ui/global_error_service.h
index 500cf2f51112ab6ea10adff4ae2eecc5be247295..5ee29c6d4255db0dedb045a600401bf362957feb 100644
--- a/chrome/browser/ui/global_error_service.h
+++ b/chrome/browser/ui/global_error_service.h
@@ -12,6 +12,7 @@
#include "chrome/browser/profiles/profile_keyed_service.h"
class GlobalError;
+class Profile;
// This service manages a list of errors that are meant to be shown globally.
// If an error applies to an entire profile and not just to a tab then the
@@ -20,7 +21,9 @@ class GlobalError;
// - a sync error occurred
class GlobalErrorService : public ProfileKeyedService {
public:
- GlobalErrorService();
+ // Constructs a GlobalErrorService object for the given profile. The profile
+ // maybe NULL for tests.
+ explicit GlobalErrorService(Profile* profile);
virtual ~GlobalErrorService();
// Adds the given error to the list of global errors and displays it on
@@ -48,8 +51,14 @@ class GlobalErrorService : public ProfileKeyedService {
// Gets all errors.
const std::vector<GlobalError*>& errors() { return errors_; }
+ // Post a notification that a global error has changed and that the error UI
+ // should update it self. Pass NULL for the given error to mean all error UIs
+ // should update.
+ void NotifyErrorsChanged(GlobalError* error);
+
private:
std::vector<GlobalError*> errors_;
+ Profile* profile_;
DISALLOW_COPY_AND_ASSIGN(GlobalErrorService);
};
« no previous file with comments | « chrome/browser/ui/cocoa/toolbar/toolbar_controller.mm ('k') | chrome/browser/ui/global_error_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698