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

Unified Diff: chrome/browser/extensions/extension_management.h

Issue 2144313002: Plumbing for login apps device policy to extensions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix comment Created 3 years, 10 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
Index: chrome/browser/extensions/extension_management.h
diff --git a/chrome/browser/extensions/extension_management.h b/chrome/browser/extensions/extension_management.h
index 58c621f90c22a3010581e938b8b1788e80aa28ca..cee552cf9ca2b1d2cada65ef8a9ff4de81475dde 100644
--- a/chrome/browser/extensions/extension_management.h
+++ b/chrome/browser/extensions/extension_management.h
@@ -23,7 +23,7 @@
#include "extensions/common/manifest.h"
class GURL;
-class PrefService;
+class Profile;
namespace content {
class BrowserContext;
@@ -70,7 +70,7 @@ class ExtensionManagement : public KeyedService {
INSTALLATION_RECOMMENDED,
};
- explicit ExtensionManagement(PrefService* pref_service);
+ explicit ExtensionManagement(Profile* profile);
Devlin 2017/03/03 17:24:48 nit: I think I'd prefer we just pass in a bool is_
achuithb 2017/03/06 15:26:04 Done.
~ExtensionManagement() override;
// KeyedService implementations:
@@ -138,7 +138,7 @@ class ExtensionManagement : public KeyedService {
std::unique_ptr<internal::IndividualSettings>>;
friend class ExtensionManagementServiceTest;
- // Load all extension management preferences from |pref_service|, and
+ // Load all extension management preferences from the pref service, and
// refresh the settings.
void Refresh();
@@ -153,6 +153,14 @@ class ExtensionManagement : public KeyedService {
void OnExtensionPrefChanged();
void NotifyExtensionManagementPrefChanged();
+ // Helper to update |extension_dict| for forced installs.
+ void UpdateForcedExtensions(const base::DictionaryValue* extension_dict);
+
+ // Helper to return an extension install list, in format specified by
+ // ExternalPolicyLoader::AddExtension().
+ std::unique_ptr<base::DictionaryValue> GetInstallListByMode(
+ InstallationMode installation_mode) const;
+
// Helper function to access |settings_by_id_| with |id| as key.
// Adds a new IndividualSettings entry to |settings_by_id_| if none exists for
// |id| yet.
@@ -183,7 +191,7 @@ class ExtensionManagement : public KeyedService {
// Extension settings applicable to all extensions.
std::unique_ptr<internal::GlobalSettings> global_settings_;
- PrefService* pref_service_;
+ Profile* profile_ = nullptr;
base::ObserverList<Observer, true> observer_list_;
PrefChangeRegistrar pref_change_registrar_;
« no previous file with comments | « no previous file | chrome/browser/extensions/extension_management.cc » ('j') | chrome/browser/extensions/extension_management.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698