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

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

Issue 9374009: Install platform apps into a separate data directory (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix comment Created 8 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
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_EXTENSION_SERVICE_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_
6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_ 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_
7 #pragma once 7 #pragma once
8 8
9 #include <list> 9 #include <list>
10 #include <map> 10 #include <map>
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 static const char* kLocalExtensionSettingsDirectoryName; 152 static const char* kLocalExtensionSettingsDirectoryName;
153 153
154 // The name of the directory inside the profile where per-app synced settings 154 // The name of the directory inside the profile where per-app synced settings
155 // are stored. 155 // are stored.
156 static const char* kSyncAppSettingsDirectoryName; 156 static const char* kSyncAppSettingsDirectoryName;
157 157
158 // The name of the directory inside the profile where per-extension synced 158 // The name of the directory inside the profile where per-extension synced
159 // settings are stored. 159 // settings are stored.
160 static const char* kSyncExtensionSettingsDirectoryName; 160 static const char* kSyncExtensionSettingsDirectoryName;
161 161
162 // Returns true if platform apps should be run in their own user data
163 // directory.
164 static bool PlatformAppRequiresSeparateDataDirectory();
165
162 // Determine if a given extension download should be treated as if it came 166 // Determine if a given extension download should be treated as if it came
163 // from the gallery. Note that this is requires *both* that the download_url 167 // from the gallery. Note that this is requires *both* that the download_url
164 // match and that the download was referred from a gallery page. 168 // match and that the download was referred from a gallery page.
165 bool IsDownloadFromGallery(const GURL& download_url, 169 bool IsDownloadFromGallery(const GURL& download_url,
166 const GURL& referrer_url); 170 const GURL& referrer_url);
167 171
168 // Returns the Extension of hosted or packaged apps, NULL otherwise. 172 // Returns the Extension of hosted or packaged apps, NULL otherwise.
169 const Extension* GetInstalledApp(const GURL& url); 173 const Extension* GetInstalledApp(const GURL& url);
170 174
171 // Returns whether the URL is from either a hosted or packaged app. 175 // Returns whether the URL is from either a hosted or packaged app.
(...skipping 525 matching lines...) Expand 10 before | Expand all | Expand 10 after
697 // Call UpdatePluginListWithNaClModules() after registering or unregistering 701 // Call UpdatePluginListWithNaClModules() after registering or unregistering
698 // a NaCl module to see those changes reflected in the PluginList. 702 // a NaCl module to see those changes reflected in the PluginList.
699 void UpdatePluginListWithNaClModules(); 703 void UpdatePluginListWithNaClModules();
700 704
701 // Start the process of installing an application shortcut. 705 // Start the process of installing an application shortcut.
702 // The process is finished when OnImageLoaded is called. 706 // The process is finished when OnImageLoaded is called.
703 void StartInstallApplicationShortcut(const Extension* extension); 707 void StartInstallApplicationShortcut(const Extension* extension);
704 708
705 NaClModuleInfoList::iterator FindNaClModule(const GURL& url); 709 NaClModuleInfoList::iterator FindNaClModule(const GURL& url);
706 710
711 // Sets up preferences for a newly installed extension.
Robert Sesek 2012/02/09 18:43:59 Document the page_ordinal and initial_enable param
sail 2012/02/10 00:13:18 Done.
712 void SetupExtensionPrefs(ExtensionPrefs* prefs,
713 const Extension* extension,
714 bool from_webstore,
715 const StringOrdinal& page_ordinal,
716 bool initial_enable);
717
718 // Sets up preferences for a newly installed extension in a new data
719 // directory.
720 void SetupExtensionPrefsInSeparateDataDirectory(
721 const Extension* extension,
722 bool from_webstore,
723 const StringOrdinal& page_ordinal);
724
707 // The profile this ExtensionService is part of. 725 // The profile this ExtensionService is part of.
708 Profile* profile_; 726 Profile* profile_;
709 727
710 // Preferences for the owning profile (weak reference). 728 // Preferences for the owning profile (weak reference).
711 ExtensionPrefs* extension_prefs_; 729 ExtensionPrefs* extension_prefs_;
712 730
713 // Settings for the owning profile. 731 // Settings for the owning profile.
714 scoped_ptr<extensions::SettingsFrontend> settings_frontend_; 732 scoped_ptr<extensions::SettingsFrontend> settings_frontend_;
715 733
716 // The current list of installed extensions. 734 // The current list of installed extensions.
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
848 scoped_ptr<ExtensionGlobalError> extension_global_error_; 866 scoped_ptr<ExtensionGlobalError> extension_global_error_;
849 867
850 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, 868 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest,
851 InstallAppsWithUnlimtedStorage); 869 InstallAppsWithUnlimtedStorage);
852 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, 870 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest,
853 InstallAppsAndCheckStorageProtection); 871 InstallAppsAndCheckStorageProtection);
854 DISALLOW_COPY_AND_ASSIGN(ExtensionService); 872 DISALLOW_COPY_AND_ASSIGN(ExtensionService);
855 }; 873 };
856 874
857 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_ 875 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698