Skip to content

Commit

Permalink
Added per-user external extensions directory on Linux Chromium builds.
Browse files Browse the repository at this point in the history
On Chromium builds on Linux, External Extensions will also be installed from
DIR_USER_EXTERNAL_EXTENSIONS.

BUG=513881

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

Cr-Commit-Position: refs/heads/master@{#341178}
  • Loading branch information
sydli authored and Commit bot committed Jul 30, 2015
1 parent 7a172d9 commit e21e153
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
2 changes: 1 addition & 1 deletion chrome/browser/extensions/external_provider_impl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -611,7 +611,7 @@ void ExternalProviderImpl::CreateExternalProviders(
bundled_extension_creation_flags)));

// Define a per-user source of external extensions.
#if defined(OS_MACOSX)
#if defined(OS_MACOSX) || (defined(OS_LINUX) && defined(CHROMIUM_BUILD))
provider_list->push_back(
linked_ptr<ExternalProviderInterface>(
new ExternalProviderImpl(
Expand Down
3 changes: 2 additions & 1 deletion chrome/common/chrome_paths.cc
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,8 @@ bool PathProvider(int key, base::FilePath* result) {
break;
}
#endif
#if defined(OS_CHROMEOS) || (defined(OS_MACOSX) && !defined(OS_IOS))
#if defined(OS_CHROMEOS) || (defined(OS_LINUX) && defined(CHROMIUM_BUILD)) || \
(defined(OS_MACOSX) && !defined(OS_IOS))
case chrome::DIR_USER_EXTERNAL_EXTENSIONS: {
if (!PathService::Get(chrome::DIR_USER_DATA, &cur))
return false;
Expand Down
10 changes: 6 additions & 4 deletions chrome/common/chrome_paths.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,13 @@ enum {
DIR_USER_APPLICATIONS, // ~/Applications
DIR_USER_LIBRARY, // ~/Library
#endif
#if defined(OS_CHROMEOS) || (defined(OS_MACOSX) && !defined(OS_IOS))
#if defined(OS_CHROMEOS) || (defined(OS_LINUX) && defined(CHROMIUM_BUILD)) || \
(defined(OS_MACOSX) && !defined(OS_IOS))
DIR_USER_EXTERNAL_EXTENSIONS, // Directory for per-user external extensions
// on Chrome Mac. On Chrome OS, this path is
// used for OEM customization.
// Getting this path does not create it.
// on Chrome Mac and Chromium Linux.
// On Chrome OS, this path is used for OEM
// customization. Getting this path does not
// create it.
#endif

#if defined(OS_LINUX)
Expand Down

0 comments on commit e21e153

Please sign in to comment.