summaryrefslogtreecommitdiffstats
path: root/chrome/browser/extensions/extensions_service.h
diff options
context:
space:
mode:
authorakalin@chromium.org <akalin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-06-26 01:28:57 +0000
committerakalin@chromium.org <akalin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-06-26 01:28:57 +0000
commit4416c5a0892d7230203654abe4952794da270308 (patch)
tree2a4f0f1906f9586b715682aaae2d09a5fe8ed7b3 /chrome/browser/extensions/extensions_service.h
parent17c06f51168d87d8c41795260f9915e17ef91f2d (diff)
downloadchromium_src-4416c5a0892d7230203654abe4952794da270308.zip
chromium_src-4416c5a0892d7230203654abe4952794da270308.tar.gz
chromium_src-4416c5a0892d7230203654abe4952794da270308.tar.bz2
Reworked ExtensionsService::AddPendingExtension().
Made it take options for enabled/incognito enabled state to apply on install. BUG=46515 TEST=unittests, manual (newly-synced disabled extensions should stay disabled) Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=50804 Review URL: http://codereview.chromium.org/2819023 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@50918 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/extensions/extensions_service.h')
-rw-r--r--chrome/browser/extensions/extensions_service.h18
1 files changed, 11 insertions, 7 deletions
diff --git a/chrome/browser/extensions/extensions_service.h b/chrome/browser/extensions/extensions_service.h
index a5725ef..5385da5 100644
--- a/chrome/browser/extensions/extensions_service.h
+++ b/chrome/browser/extensions/extensions_service.h
@@ -48,16 +48,18 @@ class Version;
// default one is assumed.
struct PendingExtensionInfo {
PendingExtensionInfo(const GURL& update_url,
- const Version& version,
bool is_theme,
- bool install_silently);
+ bool install_silently,
+ bool enable_on_install,
+ bool enable_incognito_on_install);
PendingExtensionInfo();
GURL update_url;
- Version version;
bool is_theme;
bool install_silently;
+ bool enable_on_install;
+ bool enable_incognito_on_install;
};
// A PendingExtensionMap is a map from IDs of pending extensions to
@@ -206,11 +208,12 @@ class ExtensionsService
// It is an error to call this with an already-installed extension
// (even a disabled one).
//
- // TODO(akalin): Make sure that all the places that check for
- // existing versions also consult the pending extension info.
+ // TODO(akalin): Replace |install_silently| with a list of
+ // pre-enabled permissions.
void AddPendingExtension(
const std::string& id, const GURL& update_url,
- const Version& version, bool is_theme, bool install_silently);
+ bool is_theme, bool install_silently,
+ bool enable_on_install, bool enable_incognito_on_install);
// Reloads the specified extension.
void ReloadExtension(const std::string& extension_id);
@@ -363,7 +366,8 @@ class ExtensionsService
// id is not already installed.
void AddPendingExtensionInternal(
const std::string& id, const GURL& update_url,
- const Version& version, bool is_theme, bool install_silently);
+ bool is_theme, bool install_silently,
+ bool enable_on_install, bool enable_incognito_on_install);
// Handles sending notification that |extension| was loaded.
void NotifyExtensionLoaded(Extension* extension);