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

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

Issue 666153002: Standardize usage of virtual/override/final in chrome/browser/extensions/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_MANAGEMENT_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_MANAGEMENT_H_
6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_MANAGEMENT_H_ 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_MANAGEMENT_H_
7 7
8 #include "base/containers/scoped_ptr_hash_map.h" 8 #include "base/containers/scoped_ptr_hash_map.h"
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 // * INSTALLATION_RECOMMENDED: Extension will be installed automatically but 56 // * INSTALLATION_RECOMMENDED: Extension will be installed automatically but
57 // can be disabled. 57 // can be disabled.
58 enum InstallationMode { 58 enum InstallationMode {
59 INSTALLATION_ALLOWED = 0, 59 INSTALLATION_ALLOWED = 0,
60 INSTALLATION_BLOCKED, 60 INSTALLATION_BLOCKED,
61 INSTALLATION_FORCED, 61 INSTALLATION_FORCED,
62 INSTALLATION_RECOMMENDED, 62 INSTALLATION_RECOMMENDED,
63 }; 63 };
64 64
65 explicit ExtensionManagement(PrefService* pref_service); 65 explicit ExtensionManagement(PrefService* pref_service);
66 virtual ~ExtensionManagement(); 66 ~ExtensionManagement() override;
67 67
68 void AddObserver(Observer* observer); 68 void AddObserver(Observer* observer);
69 void RemoveObserver(Observer* observer); 69 void RemoveObserver(Observer* observer);
70 70
71 // Get the ManagementPolicy::Provider controlled by extension management 71 // Get the ManagementPolicy::Provider controlled by extension management
72 // policy settings. 72 // policy settings.
73 ManagementPolicy::Provider* GetProvider() const; 73 ManagementPolicy::Provider* GetProvider() const;
74 74
75 // Checks if extensions are blacklisted by default, by policy. When true, 75 // Checks if extensions are blacklisted by default, by policy. When true,
76 // this means that even extensions without an ID should be blacklisted (e.g. 76 // this means that even extensions without an ID should be blacklisted (e.g.
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 class ExtensionManagementFactory : public BrowserContextKeyedServiceFactory { 161 class ExtensionManagementFactory : public BrowserContextKeyedServiceFactory {
162 public: 162 public:
163 static ExtensionManagement* GetForBrowserContext( 163 static ExtensionManagement* GetForBrowserContext(
164 content::BrowserContext* context); 164 content::BrowserContext* context);
165 static ExtensionManagementFactory* GetInstance(); 165 static ExtensionManagementFactory* GetInstance();
166 166
167 private: 167 private:
168 friend struct DefaultSingletonTraits<ExtensionManagementFactory>; 168 friend struct DefaultSingletonTraits<ExtensionManagementFactory>;
169 169
170 ExtensionManagementFactory(); 170 ExtensionManagementFactory();
171 virtual ~ExtensionManagementFactory(); 171 ~ExtensionManagementFactory() override;
172 172
173 // BrowserContextKeyedServiceExtensionManagementFactory: 173 // BrowserContextKeyedServiceExtensionManagementFactory:
174 virtual KeyedService* BuildServiceInstanceFor( 174 KeyedService* BuildServiceInstanceFor(
175 content::BrowserContext* context) const override; 175 content::BrowserContext* context) const override;
176 virtual content::BrowserContext* GetBrowserContextToUse( 176 content::BrowserContext* GetBrowserContextToUse(
177 content::BrowserContext* context) const override; 177 content::BrowserContext* context) const override;
178 virtual void RegisterProfilePrefs( 178 void RegisterProfilePrefs(
179 user_prefs::PrefRegistrySyncable* registry) override; 179 user_prefs::PrefRegistrySyncable* registry) override;
180 180
181 DISALLOW_COPY_AND_ASSIGN(ExtensionManagementFactory); 181 DISALLOW_COPY_AND_ASSIGN(ExtensionManagementFactory);
182 }; 182 };
183 183
184 } // namespace extensions 184 } // namespace extensions
185 185
186 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_MANAGEMENT_H_ 186 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_MANAGEMENT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698