| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_EXTENSION_PROVIDER_IMPL_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTERNAL_EXTENSION_PROVIDER_IMPL_H_ |
| 6 #define CHROME_BROWSER_EXTENSIONS_EXTERNAL_EXTENSION_PROVIDER_IMPL_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_EXTERNAL_EXTENSION_PROVIDER_IMPL_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "chrome/browser/extensions/external_extension_provider_interface.h" | 9 #include "chrome/browser/extensions/external_extension_provider_interface.h" |
| 10 | 10 |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 62 | 62 |
| 63 virtual bool IsReady() const; | 63 virtual bool IsReady() const; |
| 64 | 64 |
| 65 static const char kLocation[]; | 65 static const char kLocation[]; |
| 66 static const char kState[]; | 66 static const char kState[]; |
| 67 static const char kExternalCrx[]; | 67 static const char kExternalCrx[]; |
| 68 static const char kExternalVersion[]; | 68 static const char kExternalVersion[]; |
| 69 static const char kExternalUpdateUrl[]; | 69 static const char kExternalUpdateUrl[]; |
| 70 static const char kSupportedLocales[]; | 70 static const char kSupportedLocales[]; |
| 71 | 71 |
| 72 protected: | |
| 73 VisitorInterface* service() const { return service_; } | |
| 74 | |
| 75 private: | 72 private: |
| 76 // Location for external extensions that are provided by this provider from | 73 // Location for external extensions that are provided by this provider from |
| 77 // local crx files. | 74 // local crx files. |
| 78 const Extension::Location crx_location_; | 75 const Extension::Location crx_location_; |
| 79 | 76 |
| 80 // Location for external extensions that are provided by this provider from | 77 // Location for external extensions that are provided by this provider from |
| 81 // update URLs. | 78 // update URLs. |
| 82 const Extension::Location download_location_; | 79 const Extension::Location download_location_; |
| 83 | 80 |
| 84 // Weak pointer to the object that consumes the external extensions. | 81 // Weak pointer to the object that consumes the external extensions. |
| 85 // This is zeroed out by: ServiceShutdown() | 82 // This is zeroed out by: ServiceShutdown() |
| 86 VisitorInterface* service_; // weak | 83 VisitorInterface* service_; // weak |
| 87 | 84 |
| 88 // Dictionary of the external extensions that are provided by this provider. | 85 // Dictionary of the external extensions that are provided by this provider. |
| 89 scoped_ptr<base::DictionaryValue> prefs_; | 86 scoped_ptr<base::DictionaryValue> prefs_; |
| 90 | 87 |
| 91 // Indicates that the extensions provided by this provider are loaded | 88 // Indicates that the extensions provided by this provider are loaded |
| 92 // entirely. | 89 // entirely. |
| 93 bool ready_; | 90 bool ready_; |
| 94 | 91 |
| 95 // The loader that loads the list of external extensions and reports them | 92 // The loader that loads the list of external extensions and reports them |
| 96 // via |SetPrefs|. | 93 // via |SetPrefs|. |
| 97 scoped_refptr<ExternalExtensionLoader> loader_; | 94 scoped_refptr<ExternalExtensionLoader> loader_; |
| 98 | 95 |
| 99 DISALLOW_COPY_AND_ASSIGN(ExternalExtensionProviderImpl); | 96 DISALLOW_COPY_AND_ASSIGN(ExternalExtensionProviderImpl); |
| 100 }; | 97 }; |
| 101 | 98 |
| 102 #endif // CHROME_BROWSER_EXTENSIONS_EXTERNAL_EXTENSION_PROVIDER_IMPL_H_ | 99 #endif // CHROME_BROWSER_EXTENSIONS_EXTERNAL_EXTENSION_PROVIDER_IMPL_H_ |
| OLD | NEW |