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

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

Issue 1495403002: Observe adding external extensions via windows registry. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address comments from asargent and devlin Created 4 years, 11 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_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
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
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 // Notifies our consumer about the extensions that were found in this
104 // provider.
105 // |is_initial_load| indicates whether or not we are sending the notification
106 // for the first time. Generally, a provider only sends this notification
107 // once, but it can choose to provide further notifications. Provider with
108 // ExternalRegistryLoader is an example of such.
109 void NotifyExtensionsFromPrefs(bool is_initial_load);
110
99 // Location for external extensions that are provided by this provider from 111 // Location for external extensions that are provided by this provider from
100 // local crx files. 112 // local crx files.
101 const Manifest::Location crx_location_; 113 const Manifest::Location crx_location_;
102 114
103 // Location for external extensions that are provided by this provider from 115 // Location for external extensions that are provided by this provider from
104 // update URLs. 116 // update URLs.
105 const Manifest::Location download_location_; 117 const Manifest::Location download_location_;
106 118
107 // Weak pointer to the object that consumes the external extensions. 119 // Weak pointer to the object that consumes the external extensions.
108 // This is zeroed out by: ServiceShutdown() 120 // This is zeroed out by: ServiceShutdown()
(...skipping 23 matching lines...) Expand all
132 144
133 // Whether the extensions from this provider should be installed immediately. 145 // Whether the extensions from this provider should be installed immediately.
134 bool install_immediately_; 146 bool install_immediately_;
135 147
136 DISALLOW_COPY_AND_ASSIGN(ExternalProviderImpl); 148 DISALLOW_COPY_AND_ASSIGN(ExternalProviderImpl);
137 }; 149 };
138 150
139 } // namespace extensions 151 } // namespace extensions
140 152
141 #endif // CHROME_BROWSER_EXTENSIONS_EXTERNAL_PROVIDER_IMPL_H_ 153 #endif // CHROME_BROWSER_EXTENSIONS_EXTERNAL_PROVIDER_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698