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 <string> | 8 #include <string> |
9 | 9 |
10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
(...skipping 23 matching lines...) Expand all Loading... |
34 // |download_location|: extensions originating from update URLs | 34 // |download_location|: extensions originating from update URLs |
35 // If either of the origins is not supported by this provider, then it should | 35 // If either of the origins is not supported by this provider, then it should |
36 // be initialized as Manifest::INVALID_LOCATION. | 36 // be initialized as Manifest::INVALID_LOCATION. |
37 ExternalProviderImpl(VisitorInterface* service, | 37 ExternalProviderImpl(VisitorInterface* service, |
38 const scoped_refptr<ExternalLoader>& loader, | 38 const scoped_refptr<ExternalLoader>& loader, |
39 Profile* profile, | 39 Profile* profile, |
40 Manifest::Location crx_location, | 40 Manifest::Location crx_location, |
41 Manifest::Location download_location, | 41 Manifest::Location download_location, |
42 int creation_flags); | 42 int creation_flags); |
43 | 43 |
44 virtual ~ExternalProviderImpl(); | 44 ~ExternalProviderImpl() override; |
45 | 45 |
46 // Populates a list with providers for all known sources. | 46 // Populates a list with providers for all known sources. |
47 static void CreateExternalProviders( | 47 static void CreateExternalProviders( |
48 VisitorInterface* service, | 48 VisitorInterface* service, |
49 Profile* profile, | 49 Profile* profile, |
50 ProviderCollection* provider_list); | 50 ProviderCollection* provider_list); |
51 | 51 |
52 // Sets underlying prefs and notifies provider. Only to be called by the | 52 // Sets underlying prefs and notifies provider. Only to be called by the |
53 // owned ExternalLoader instance. | 53 // owned ExternalLoader instance. |
54 virtual void SetPrefs(base::DictionaryValue* prefs); | 54 virtual void SetPrefs(base::DictionaryValue* prefs); |
55 | 55 |
56 // ExternalProvider implementation: | 56 // ExternalProvider implementation: |
57 virtual void ServiceShutdown() override; | 57 void ServiceShutdown() override; |
58 virtual void VisitRegisteredExtension() override; | 58 void VisitRegisteredExtension() override; |
59 virtual bool HasExtension(const std::string& id) const override; | 59 bool HasExtension(const std::string& id) const override; |
60 virtual bool GetExtensionDetails( | 60 bool GetExtensionDetails(const std::string& id, |
61 const std::string& id, | 61 Manifest::Location* location, |
62 Manifest::Location* location, | 62 scoped_ptr<base::Version>* version) const override; |
63 scoped_ptr<base::Version>* version) const override; | |
64 | 63 |
65 virtual bool IsReady() const override; | 64 bool IsReady() const override; |
66 | 65 |
67 static const char kExternalCrx[]; | 66 static const char kExternalCrx[]; |
68 static const char kExternalVersion[]; | 67 static const char kExternalVersion[]; |
69 static const char kExternalUpdateUrl[]; | 68 static const char kExternalUpdateUrl[]; |
70 static const char kInstallParam[]; | 69 static const char kInstallParam[]; |
71 static const char kIsBookmarkApp[]; | 70 static const char kIsBookmarkApp[]; |
72 static const char kIsFromWebstore[]; | 71 static const char kIsFromWebstore[]; |
73 static const char kKeepIfPresent[]; | 72 static const char kKeepIfPresent[]; |
74 static const char kSupportedLocales[]; | 73 static const char kSupportedLocales[]; |
75 static const char kWasInstalledByOem[]; | 74 static const char kWasInstalledByOem[]; |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
113 // Whether loaded extensions should be automatically acknowledged, so that | 112 // Whether loaded extensions should be automatically acknowledged, so that |
114 // the user doesn't see an alert about them. | 113 // the user doesn't see an alert about them. |
115 bool auto_acknowledge_; | 114 bool auto_acknowledge_; |
116 | 115 |
117 DISALLOW_COPY_AND_ASSIGN(ExternalProviderImpl); | 116 DISALLOW_COPY_AND_ASSIGN(ExternalProviderImpl); |
118 }; | 117 }; |
119 | 118 |
120 } // namespace extensions | 119 } // namespace extensions |
121 | 120 |
122 #endif // CHROME_BROWSER_EXTENSIONS_EXTERNAL_PROVIDER_IMPL_H_ | 121 #endif // CHROME_BROWSER_EXTENSIONS_EXTERNAL_PROVIDER_IMPL_H_ |
OLD | NEW |