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

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

Issue 1146693004: [Extensions] Move remaining notifications out of ExtensionSettingsHandler (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Ben's Created 5 years, 7 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 (c) 2012 The Chromium Authors. All rights reserved. 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 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_WARNING_BADGE_SERVICE_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_WARNING_BADGE_SERVICE_H_
6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_WARNING_BADGE_SERVICE_H_ 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_WARNING_BADGE_SERVICE_H_
7 7
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/threading/non_thread_safe.h" 9 #include "base/threading/non_thread_safe.h"
10 #include "components/keyed_service/core/keyed_service.h" 10 #include "components/keyed_service/core/keyed_service.h"
(...skipping 18 matching lines...) Expand all
29 // Black lists all currently active extension warnings, so that they do not 29 // Black lists all currently active extension warnings, so that they do not
30 // trigger a warning badge again for the life-time of the browsing session. 30 // trigger a warning badge again for the life-time of the browsing session.
31 void SuppressCurrentWarnings(); 31 void SuppressCurrentWarnings();
32 32
33 protected: 33 protected:
34 // Virtual for testing. 34 // Virtual for testing.
35 virtual const std::set<Warning>& GetCurrentWarnings() const; 35 virtual const std::set<Warning>& GetCurrentWarnings() const;
36 36
37 private: 37 private:
38 // Implementation of WarningService::Observer. 38 // Implementation of WarningService::Observer.
39 void ExtensionWarningsChanged() override; 39 void ExtensionWarningsChanged(
40 const ExtensionIdSet& affected_extensions) override;
40 41
41 void UpdateBadgeStatus(); 42 void UpdateBadgeStatus();
42 virtual void ShowBadge(bool show); 43 virtual void ShowBadge(bool show);
43 44
44 Profile* profile_; 45 Profile* profile_;
45 46
46 ScopedObserver<WarningService, WarningService::Observer> 47 ScopedObserver<WarningService, WarningService::Observer>
47 warning_service_observer_; 48 warning_service_observer_;
48 49
49 // Warnings that do not trigger a badge on the wrench menu. 50 // Warnings that do not trigger a badge on the wrench menu.
50 WarningSet suppressed_warnings_; 51 WarningSet suppressed_warnings_;
51 52
52 DISALLOW_COPY_AND_ASSIGN(WarningBadgeService); 53 DISALLOW_COPY_AND_ASSIGN(WarningBadgeService);
53 }; 54 };
54 55
55 } // namespace extensions 56 } // namespace extensions
56 57
57 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_WARNING_BADGE_SERVICE_H_ 58 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_WARNING_BADGE_SERVICE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698