Chromium Code Reviews| 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_DEFAULT_APPS_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_DEFAULT_APPS_H_ |
| 6 #define CHROME_BROWSER_EXTENSIONS_DEFAULT_APPS_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_DEFAULT_APPS_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
| 10 #include "chrome/browser/extensions/external_extension_provider_impl.h" | 10 #include "chrome/browser/extensions/external_provider_impl.h" |
| 11 | 11 |
| 12 class PrefService; | 12 class PrefService; |
| 13 class Profile; | 13 class Profile; |
| 14 | 14 |
| 15 namespace extensions { | 15 namespace extensions { |
| 16 class Extension; | 16 class Extension; |
| 17 } | 17 } |
| 18 | 18 |
| 19 // Functions and types related to installing default apps. | 19 // Functions and types related to installing default apps. |
| 20 namespace default_apps { | 20 namespace default_apps { |
| 21 | 21 |
| 22 // These enum values are persisted in the user preferences, so they should not | 22 // These enum values are persisted in the user preferences, so they should not |
| 23 // be changed. | 23 // be changed. |
| 24 enum InstallState { | 24 enum InstallState { |
| 25 kUnknown, | 25 kUnknown, |
| 26 kAlwaysProvideDefaultApps, | 26 kAlwaysProvideDefaultApps, |
| 27 kNeverProvideDefaultApps | 27 kNeverProvideDefaultApps |
| 28 }; | 28 }; |
| 29 | 29 |
| 30 // Register preference properties used by default apps to maintain | 30 // Register preference properties used by default apps to maintain |
| 31 // install state. | 31 // install state. |
| 32 void RegisterUserPrefs(PrefService* prefs); | 32 void RegisterUserPrefs(PrefService* prefs); |
| 33 | 33 |
| 34 | 34 |
| 35 // A specialization of the ExternalExtensionProviderImpl that conditionally | 35 // A specialization of the extensions::ExternalProviderImpl that conditionally |
| 36 // installs apps from the chrome::DIR_DEFAULT_APPS location based on a | 36 // installs apps from the chrome::DIR_DEFAULT_APPS location based on a |
| 37 // preference in the profile. | 37 // preference in the profile. |
| 38 class Provider : public ExternalExtensionProviderImpl { | 38 class Provider : public extensions::ExternalProviderImpl { |
| 39 public: | 39 public: |
| 40 Provider(Profile* profile, | 40 Provider(Profile* profile, |
| 41 VisitorInterface* service, | 41 VisitorInterface* service, |
| 42 ExternalExtensionLoader* loader, | 42 extensions::ExternalLoader* loader, |
| 43 extensions::Extension::Location crx_location, | 43 extensions::Extension::Location crx_location, |
| 44 extensions::Extension::Location download_location, | 44 extensions::Extension::Location download_location, |
| 45 int creation_flags); | 45 int creation_flags); |
| 46 | 46 |
| 47 // ExternalExtensionProviderImpl overrides: | 47 // extensions::ExternalProviderImpl overrides: |
| 48 virtual void VisitRegisteredExtension() OVERRIDE; | 48 virtual void VisitRegisteredExtension() OVERRIDE; |
| 49 | 49 |
| 50 private: | 50 private: |
| 51 Profile* profile_; | 51 Profile* profile_; |
| 52 | 52 |
| 53 DISALLOW_COPY_AND_ASSIGN(Provider); | 53 DISALLOW_COPY_AND_ASSIGN(Provider); |
| 54 }; | 54 }; |
| 55 | 55 |
| 56 | 56 |
|
Joao da Silva
2012/07/13 13:33:42
Nit: remove this extra newline
Devlin
2012/07/13 16:31:17
Done.
| |
| 57 } // namespace default_apps | 57 } // namespace default_apps |
| 58 | 58 |
| 59 #endif // CHROME_BROWSER_EXTENSIONS_DEFAULT_APPS_H_ | 59 #endif // CHROME_BROWSER_EXTENSIONS_DEFAULT_APPS_H_ |
| OLD | NEW |