summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
authormad@google.com <mad@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-05-27 17:07:12 +0000
committermad@google.com <mad@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-05-27 17:07:12 +0000
commit472f099b9df629f13bab2c5dbeff1cdda0a08120 (patch)
tree7945486399188e495a5b7013c56b249ebe74a47d /chrome
parentbba6cce7cad3a76626fc69cd055454e890972cc5 (diff)
downloadchromium_src-472f099b9df629f13bab2c5dbeff1cdda0a08120.zip
chromium_src-472f099b9df629f13bab2c5dbeff1cdda0a08120.tar.gz
chromium_src-472f099b9df629f13bab2c5dbeff1cdda0a08120.tar.bz2
GetEnabledExtensions should also return Loaded Extensions.
We use to not need them since we would simply overinstall them all the time. But now that overinstall is allowed and reset the extension state (e.g., close and reopen the background page), we can't simply install exploded extensions at will anymore, we must first check if it was already installed or not (which means GetEnabledExtensions must return them) and only install them when they are not already there. BUG=0 TEST=none Review URL: http://codereview.chromium.org/2303004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@48400 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r--chrome/browser/automation/automation_provider.cc7
-rw-r--r--chrome/test/automation/automation_messages_internal.h11
2 files changed, 10 insertions, 8 deletions
diff --git a/chrome/browser/automation/automation_provider.cc b/chrome/browser/automation/automation_provider.cc
index eb165e1..dd1a07b 100644
--- a/chrome/browser/automation/automation_provider.cc
+++ b/chrome/browser/automation/automation_provider.cc
@@ -1395,7 +1395,9 @@ void AutomationProvider::GetBookmarkBarVisibility(int handle,
if (browser_tracker_->ContainsHandle(handle)) {
Browser* browser = browser_tracker_->GetResource(handle);
if (browser) {
-#if 0 // defined(TOOLKIT_VIEWS) && defined(OS_LINUX)
+#if 0 // defined(TOOLKIT_VIEWS) && defined(OS_LINUX)
+ // TODO(jrg): Was removed in rev43789 for perf. Need to investigate.
+
// IsBookmarkBarVisible() line looks correct but is not
// consistent across platforms. Specifically, on Mac/Linux, it
// returns false if the bar is hidden in a pref (even if visible
@@ -3300,7 +3302,8 @@ void AutomationProvider::GetEnabledExtensions(
for (size_t i = 0; i < extensions->size(); ++i) {
Extension* extension = (*extensions)[i];
DCHECK(extension);
- if (extension->location() == Extension::INTERNAL) {
+ if (extension->location() == Extension::INTERNAL ||
+ extension->location() == Extension::LOAD) {
result->push_back(extension->path());
}
}
diff --git a/chrome/test/automation/automation_messages_internal.h b/chrome/test/automation/automation_messages_internal.h
index ee725c8..4c0dafa 100644
--- a/chrome/test/automation/automation_messages_internal.h
+++ b/chrome/test/automation/automation_messages_internal.h
@@ -1167,12 +1167,11 @@ IPC_BEGIN_MESSAGES(Automation)
// Retrieves a list of the root directories of all enabled extensions
// that have been installed into Chrome by dropping a .crx file onto
- // Chrome or an equivalent action. Other types of extensions are not
- // included on the list (e.g. "component" extensions, "external"
- // extensions or extensions loaded via --load-extension since the first
- // two are generally not useful for testing (e.g. an external extension
- // could mess with an automated test if it's present on some systems only)
- // and the last would generally be explicitly loaded by tests.
+ // Chrome or an equivalent action (including loaded extensions).
+ // Other types of extensions are not included on the list (e.g. "component"
+ // or "external" extensions) since they are generally not useful for testing
+ // (e.g. an external extension could mess with an automated test if it's
+ // present on some systems only).
IPC_SYNC_MESSAGE_ROUTED0_1(AutomationMsg_GetEnabledExtensions,
std::vector<FilePath>)