0
Commit Graph

14 Commits

Author SHA1 Message Date
Avi Drissman
60039d4d4b Update copyright headers in extensions/
The methodology used to generate this CL is documented in
https://crbug.com/1098010#c34.

No-Try: true
Bug: 1098010
Change-Id: I92587d82572fb164300a4165a153102982a277dc
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3894332
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Avi Drissman <avi@chromium.org>
Owners-Override: Avi Drissman <avi@chromium.org>
Auto-Submit: Avi Drissman <avi@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1046592}
2022-09-13 21:49:05 +00:00
Maria Petrisor
bb5226b93b Adapt ExtensionCleanupHandler for Lacros
This CL makes the
RestrictedManagedGuestSessionExtensionCleanupExemptList policy
available for Lacros and adds the ExtensionCleanupHandler to the Lacros
clean-up handlers.

Additionally, it fixes an issue with the extension reinstall triggered
by the ExtensionCleanupHandler. It used to only work when the extensions
were cached (in Ash). Due to an existing issue of extensions not being
cached on Lacros MGS (https://crbug.com/1300197), we discovered that
they do not reinstall when they only have an update URL. This CL also
adds the fix to make extension reinstallation work with an update URL
(ExternalProviderImpl changes).

Bug: 1324526, b:217155485
Change-Id: I037c78f76807fb493f8dd582574c44e8f3decf65
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3641708
Reviewed-by: Amr Aboelkher <amraboelkher@chromium.org>
Reviewed-by: Devlin Cronin <rdevlin.cronin@chromium.org>
Commit-Queue: Maria Petrisor <mpetrisor@chromium.org>
Reviewed-by: Alexander Hendrich <hendrich@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1010001}
2022-06-02 09:10:51 +00:00
Maria Petrisor
dba7ac457c Enable on-request MGS force-installed extension update/reinstall
ExtensionService::ProvideAllExtensions() triggers a reinstall on all
the known extensions of the external providers.

ExtensionService already has a method with similar functionality:
ExtensionService::CheckForExternalUpdates(), but in the
case of MGS force-installed extensions it doesn't get back to
ExtensionService::OnExternalExtension(File|UpdateUrl)Found() and there
is no way to otherwise trigger a MGS force-installed extension
reinstall.

The update process is not triggered for MGS when calling
CheckForExternalUpdates(), because
DeviceLocalAccountExternalPolicyLoader::StartLoading() only calls
LoadFinished() if there are unconsumed prefs available.

Bug: b:186737187
Change-Id: Ic157835c5eec416ad318f7708eab6efa5413b075
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3172521
Reviewed-by: Reilly Grant <reillyg@chromium.org>
Commit-Queue: Maria Petrisor <mpetrisor@chromium.org>
Cr-Commit-Position: refs/heads/main@{#928599}
2021-10-06 09:01:30 +00:00
Gyuyoung Kim
2e954c43b8 Replace all uses of Manifest::Location enum with Mojo type (4/n)
As a pre-work to convert ExtensionMsg_Loaded to Mojo, this CL
replaces uses of Manifest::Location enum type with
extensions::mojom::ManifestLocationType progressly because it's
a too huge work to convert them at once.

As the fourth step, this CL converts the native type to
Mojo type in Extension::LoadExtension() method and constructs
of ExternalProviderImpl, and so on.

AX-Relnotes: n/a

Bug: 1146100
Change-Id: I2e2266ee9f8f1e6e145cafc10c757526b7f0d394
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2763945
Reviewed-by: proberge <proberge@chromium.org>
Reviewed-by: James Cook <jamescook@chromium.org>
Reviewed-by: Sergey Volk <servolk@chromium.org>
Reviewed-by: Peter Kasting <pkasting@chromium.org>
Reviewed-by: Dominick Ng <dominickn@chromium.org>
Reviewed-by: Reilly Grant <reillyg@chromium.org>
Reviewed-by: Toni Baržić <tbarzic@chromium.org>
Reviewed-by: Dave Tapuska <dtapuska@chromium.org>
Reviewed-by: Anatoliy Potapchuk <apotapchuk@chromium.org>
Commit-Queue: Gyuyoung Kim <gyuyoung@igalia.com>
Cr-Commit-Position: refs/heads/master@{#864637}
2021-03-19 14:06:29 +00:00
Devlin Cronin
19f70b6a0d [Extensions] Don't store ExternalInstallInfo in vectors of pointers
ExternalInstallInfos are currently stored in
std::vector<std::unique_ptr<T>>s, but they should just be stored in
std::vector<T>s (where T is either ExternalInstallInfoFile or
ExternalInstallInfoUpdateUrl). Once constructed, the vectors
themselves are never passed, so the only time moves are necessary is
during vector resizing, which for the number of external extensions
users should be relatively rare. Additionally, the structs themselves
are fairly cheap to move. Save on dynamic allocations and just store
these in std::vectors.

TBR=stevenjb@chromium.org for customization/customization_document_unittest.cc

Bug: 770007
Change-Id: Ic3e3ea2de8ee09455fc021914eba20e1bdca2df0
Reviewed-on: https://chromium-review.googlesource.com/692975
Commit-Queue: Devlin <rdevlin.cronin@chromium.org>
Reviewed-by: Karan Bhatia <karandeepb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#505501}
2017-10-01 04:14:05 +00:00
jbriance
12c9d49166 extensions: Cleanup class/struct fwd declarations
Remove useless class and struct forward declarations, and add
missing ones in extensions header files.

BUG=662195

Review-Url: https://codereview.chromium.org/2535713004
Cr-Commit-Position: refs/heads/master@{#434749}
2016-11-28 22:49:51 +00:00
lazyboy
4aeef2005e Remove most ScopedVector usage from c/b/extensions.
Replace them with vector<unique_ptr<T>>.

After this CL there will be only 3 places where ScopedVector
would still be around. Since those (language_settings_private_delegate.cc,
web_navigation_apitest.cc and chrome_content_browser_client_extensions_part.cc)
are non-trivial, I will try to remove ScopedVector from them in subsequent CLs.

BUG=556939
Test=None, internal only change.

Review-Url: https://codereview.chromium.org/2310683002
Cr-Commit-Position: refs/heads/master@{#417042}
2016-09-07 21:31:40 +00:00
lazyboy
f33109d5e1 Some linked_ptr -> unique_ptr conversion in extensions/browser.
Change ExtensionService::AddProviderForTesting() to take
unique_ptr instead of raw pointer.

BUG=556939
Test=None, internal only change.

Review-Url: https://codereview.chromium.org/2294653002
Cr-Commit-Position: refs/heads/master@{#415518}
2016-08-31 00:40:35 +00:00
dcheng
f5d2410841 Convert //extensions/browser from scoped_ptr to std::unique_ptr
BUG=554298
R=rockot@chromium.org

Review URL: https://codereview.chromium.org/1909773002

Cr-Commit-Position: refs/heads/master@{#388687}
2016-04-21 03:45:44 +00:00
lazyboy
e8634172cb Observe adding external extensions via windows registry.
Install the extension right away (no chrome restart).

For registry changes, we only look at 32-bit registry values
for extensions, see
https://developer.chrome.com/extensions/external_extensions#registry

A lot of the changes in this CL is to make ExternalProvider-s be
  able to discover new external extensions at times other than
  chrome start up. The added method is
  OnExternalProviderUpdateComplete(), which provides a list of
  a. Extensions that were added via update_url,
  b. Extensions that were added via crx,
  c. Extensions that were removed.

BUG=581756
Test=While chrome is running, add a registry entry for an extension
under HKLM or HKCU as described in
https://developer.chrome.com/extensions/external_extensions#registry

Now observe that external install would appear for that extension
in chrome shortly.

If you had some extension installed this way, removing the registry
entry would cause the extension to be uninstalled too!

Review URL: https://codereview.chromium.org/1495403002

Cr-Commit-Position: refs/heads/master@{#371911}
2016-01-28 00:11:41 +00:00
xiyuan
4d82f7b69b kiosk: Ensure launching latest version.
- Add a install_immediately flag to ExternalProviderImpl;
- Set install_immediately flag to true for kiosk app provider
  so that updated app install is not delayed;
- Set auto acknowledge since kiosk should not show external
  install alert;

BUG=461419

Review URL: https://codereview.chromium.org/974713002

Cr-Commit-Position: refs/heads/master@{#319005}
2015-03-04 02:30:05 +00:00
tommycli@chromium.org
fdd2837d51 Extensions: Move id_util functions to crx_file component.
Consolidates id_util functions of extension/app/component ids in the crx_file component.

It belongs there because these types of ids are not exclusive to extensions, but rather, for anything that comes in a crx file.

BUG=371463
TBR=blundell@chromium.org

Review URL: https://codereview.chromium.org/481433005

Cr-Commit-Position: refs/heads/master@{#290971}
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@290971 0039d316-1c4b-4281-b951-d872f2087c98
2014-08-21 02:28:55 +00:00
vasilii@chromium.org
d8fd0fdd98 Introduce an extension parameter which is used to customize the extension. It's available for external extensions on Windows by using a registry key. The installer can set this parameter per user.
BUG=267510
TBR=nkostylev@chromium.org,estade@chromium.org

Review URL: https://codereview.chromium.org/196663003

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@258919 0039d316-1c4b-4281-b951-d872f2087c98
2014-03-24 13:16:06 +00:00
benwells@chromium.org
301116c6ae Move some dependencies of ExtensionService down to extensions.
These files do not have any dependencies to the rest of chrome so can
move down immediately.

TBR=miket, sky
BUG=298537

Review URL: https://codereview.chromium.org/82773002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@237299 0039d316-1c4b-4281-b951-d872f2087c98
2013-11-26 10:37:45 +00:00