Chromium Code Reviews| OLD | NEW |
|---|---|
| 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_EXTERNAL_PROVIDER_IMPL_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTERNAL_PROVIDER_IMPL_H_ |
| 6 #define CHROME_BROWSER_EXTENSIONS_EXTERNAL_PROVIDER_IMPL_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_EXTERNAL_PROVIDER_IMPL_H_ |
| 7 | 7 |
| 8 #include <set> | 8 #include <set> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 48 // Populates a list with providers for all known sources. | 48 // Populates a list with providers for all known sources. |
| 49 static void CreateExternalProviders( | 49 static void CreateExternalProviders( |
| 50 VisitorInterface* service, | 50 VisitorInterface* service, |
| 51 Profile* profile, | 51 Profile* profile, |
| 52 ProviderCollection* provider_list); | 52 ProviderCollection* provider_list); |
| 53 | 53 |
| 54 // Sets underlying prefs and notifies provider. Only to be called by the | 54 // Sets underlying prefs and notifies provider. Only to be called by the |
| 55 // owned ExternalLoader instance. | 55 // owned ExternalLoader instance. |
| 56 virtual void SetPrefs(base::DictionaryValue* prefs); | 56 virtual void SetPrefs(base::DictionaryValue* prefs); |
| 57 | 57 |
| 58 // Updates the underlying prefs and notifies provider. | |
| 59 // Only to be called by the owned ExternalLoader instance. | |
| 60 void UpdatePrefs(base::DictionaryValue* prefs); | |
| 61 | |
| 58 // ExternalProvider implementation: | 62 // ExternalProvider implementation: |
| 59 void ServiceShutdown() override; | 63 void ServiceShutdown() override; |
| 60 void VisitRegisteredExtension() override; | 64 void VisitRegisteredExtension() override; |
| 61 bool HasExtension(const std::string& id) const override; | 65 bool HasExtension(const std::string& id) const override; |
| 62 bool GetExtensionDetails(const std::string& id, | 66 bool GetExtensionDetails(const std::string& id, |
| 63 Manifest::Location* location, | 67 Manifest::Location* location, |
| 64 scoped_ptr<base::Version>* version) const override; | 68 scoped_ptr<base::Version>* version) const override; |
| 65 | 69 |
| 66 bool IsReady() const override; | 70 bool IsReady() const override; |
| 67 | 71 |
| (...skipping 21 matching lines...) Expand all Loading... | |
| 89 private: | 93 private: |
| 90 bool HandleMinProfileVersion(const base::DictionaryValue* extension, | 94 bool HandleMinProfileVersion(const base::DictionaryValue* extension, |
| 91 const std::string& extension_id, | 95 const std::string& extension_id, |
| 92 std::set<std::string>* unsupported_extensions); | 96 std::set<std::string>* unsupported_extensions); |
| 93 | 97 |
| 94 bool HandleDoNotInstallForEnterprise( | 98 bool HandleDoNotInstallForEnterprise( |
| 95 const base::DictionaryValue* extension, | 99 const base::DictionaryValue* extension, |
| 96 const std::string& extension_id, | 100 const std::string& extension_id, |
| 97 std::set<std::string>* unsupported_extensions); | 101 std::set<std::string>* unsupported_extensions); |
| 98 | 102 |
| 103 void NotifyExtensionsFromPrefs(bool is_initial_load); | |
|
asargent_no_longer_on_chrome
2016/01/20 22:49:00
nit: this could use an overview comment
lazyboy
2016/01/21 21:02:12
Done.
| |
| 104 | |
| 99 // Location for external extensions that are provided by this provider from | 105 // Location for external extensions that are provided by this provider from |
| 100 // local crx files. | 106 // local crx files. |
| 101 const Manifest::Location crx_location_; | 107 const Manifest::Location crx_location_; |
| 102 | 108 |
| 103 // Location for external extensions that are provided by this provider from | 109 // Location for external extensions that are provided by this provider from |
| 104 // update URLs. | 110 // update URLs. |
| 105 const Manifest::Location download_location_; | 111 const Manifest::Location download_location_; |
| 106 | 112 |
| 107 // Weak pointer to the object that consumes the external extensions. | 113 // Weak pointer to the object that consumes the external extensions. |
| 108 // This is zeroed out by: ServiceShutdown() | 114 // This is zeroed out by: ServiceShutdown() |
| (...skipping 23 matching lines...) Expand all Loading... | |
| 132 | 138 |
| 133 // Whether the extensions from this provider should be installed immediately. | 139 // Whether the extensions from this provider should be installed immediately. |
| 134 bool install_immediately_; | 140 bool install_immediately_; |
| 135 | 141 |
| 136 DISALLOW_COPY_AND_ASSIGN(ExternalProviderImpl); | 142 DISALLOW_COPY_AND_ASSIGN(ExternalProviderImpl); |
| 137 }; | 143 }; |
| 138 | 144 |
| 139 } // namespace extensions | 145 } // namespace extensions |
| 140 | 146 |
| 141 #endif // CHROME_BROWSER_EXTENSIONS_EXTERNAL_PROVIDER_IMPL_H_ | 147 #endif // CHROME_BROWSER_EXTENSIONS_EXTERNAL_PROVIDER_IMPL_H_ |
| OLD | NEW |