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

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

Issue 12093036: Move Extension Location and Type enums to Manifest, and move InstallWarning to its own file. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 10 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/extensions/crx_installer.cc ('k') | chrome/browser/extensions/default_apps.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_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 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "chrome/browser/extensions/external_provider_impl.h" 9 #include "chrome/browser/extensions/external_provider_impl.h"
10 #include "chrome/common/extensions/manifest.h"
10 11
11 class PrefServiceSyncable; 12 class PrefServiceSyncable;
12 class Profile; 13 class Profile;
13 14
14 namespace extensions {
15 class Extension;
16 }
17
18 namespace base { 15 namespace base {
19 class DictionaryValue; 16 class DictionaryValue;
20 } 17 }
21 18
22 // Functions and types related to installing default apps. 19 // Functions and types related to installing default apps.
23 namespace default_apps { 20 namespace default_apps {
24 21
25 // 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
26 // be changed. 23 // be changed.
27 enum InstallState { 24 enum InstallState {
28 kUnknown, 25 kUnknown,
29 // Now unused, left for backward compatibility. 26 // Now unused, left for backward compatibility.
30 kProvideLegacyDefaultApps, 27 kProvideLegacyDefaultApps,
31 kNeverInstallDefaultApps, 28 kNeverInstallDefaultApps,
32 kAlreadyInstalledDefaultApps 29 kAlreadyInstalledDefaultApps
33 }; 30 };
34 31
35 // Register preference properties used by default apps to maintain 32 // Register preference properties used by default apps to maintain
36 // install state. 33 // install state.
37 void RegisterUserPrefs(PrefServiceSyncable* prefs); 34 void RegisterUserPrefs(PrefServiceSyncable* prefs);
38 35
39 // A specialization of the ExternalProviderImpl that conditionally installs apps 36 // A specialization of the ExternalProviderImpl that conditionally installs apps
40 // from the chrome::DIR_DEFAULT_APPS location based on a preference in the 37 // from the chrome::DIR_DEFAULT_APPS location based on a preference in the
41 // profile. 38 // profile.
42 class Provider : public extensions::ExternalProviderImpl { 39 class Provider : public extensions::ExternalProviderImpl {
43 public: 40 public:
44 Provider(Profile* profile, 41 Provider(Profile* profile,
45 VisitorInterface* service, 42 VisitorInterface* service,
46 extensions::ExternalLoader* loader, 43 extensions::ExternalLoader* loader,
47 extensions::Extension::Location crx_location, 44 extensions::Manifest::Location crx_location,
48 extensions::Extension::Location download_location, 45 extensions::Manifest::Location download_location,
49 int creation_flags); 46 int creation_flags);
50 47
51 bool ShouldInstallInProfile(); 48 bool ShouldInstallInProfile();
52 49
53 // ExternalProviderImpl overrides: 50 // ExternalProviderImpl overrides:
54 virtual void VisitRegisteredExtension() OVERRIDE; 51 virtual void VisitRegisteredExtension() OVERRIDE;
55 virtual void SetPrefs(base::DictionaryValue* prefs) OVERRIDE; 52 virtual void SetPrefs(base::DictionaryValue* prefs) OVERRIDE;
56 53
57 private: 54 private:
58 Profile* profile_; 55 Profile* profile_;
59 bool is_migration_; 56 bool is_migration_;
60 57
61 DISALLOW_COPY_AND_ASSIGN(Provider); 58 DISALLOW_COPY_AND_ASSIGN(Provider);
62 }; 59 };
63 60
64 } // namespace default_apps 61 } // namespace default_apps
65 62
66 #endif // CHROME_BROWSER_EXTENSIONS_DEFAULT_APPS_H_ 63 #endif // CHROME_BROWSER_EXTENSIONS_DEFAULT_APPS_H_
OLDNEW
« no previous file with comments | « chrome/browser/extensions/crx_installer.cc ('k') | chrome/browser/extensions/default_apps.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698