diff options
author | skerner@chromium.org <skerner@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-03-30 14:31:44 +0000 |
---|---|---|
committer | skerner@chromium.org <skerner@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-03-30 14:31:44 +0000 |
commit | 48ca4fd1e254ae68e43f9b283756bcdf6ef27d30 (patch) | |
tree | a3aac72aef50506eec45790f03ac8bb4f0ae488f | |
parent | ed179282afe5c8707527ea134591c78052913105 (diff) | |
download | chromium_src-48ca4fd1e254ae68e43f9b283756bcdf6ef27d30.zip chromium_src-48ca4fd1e254ae68e43f9b283756bcdf6ef27d30.tar.gz chromium_src-48ca4fd1e254ae68e43f9b283756bcdf6ef27d30.tar.bz2 |
Remove deprecated extension source on mac.
As discussed on the bug, this will be committed right after a stable release is cut, so that the change is in the dev channel for a full six weeks.
BUG=98675
TEST=none
Review URL: https://chromiumcodereview.appspot.com/9610007
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@129849 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/browser/extensions/external_extension_provider_impl.cc | 15 | ||||
-rw-r--r-- | chrome/browser/extensions/external_pref_extension_loader.cc | 31 | ||||
-rw-r--r-- | chrome/common/chrome_paths.cc | 15 | ||||
-rw-r--r-- | chrome/common/chrome_paths.h | 6 | ||||
-rw-r--r-- | chrome/common/extensions/docs/external_extensions.html | 5 | ||||
-rw-r--r-- | chrome/common/extensions/docs/static/external_extensions.html | 5 |
6 files changed, 6 insertions, 71 deletions
diff --git a/chrome/browser/extensions/external_extension_provider_impl.cc b/chrome/browser/extensions/external_extension_provider_impl.cc index c471ce3..68ffa0b 100644 --- a/chrome/browser/extensions/external_extension_provider_impl.cc +++ b/chrome/browser/extensions/external_extension_provider_impl.cc @@ -317,21 +317,6 @@ void ExternalExtensionProviderImpl::CreateExternalProviders( Extension::EXTERNAL_PREF_DOWNLOAD, Extension::NO_FLAGS))); -#if defined(OS_MACOSX) - // Support old path to external extensions file as we migrate to the - // new one. See crbug/67203. - provider_list->push_back( - linked_ptr<ExternalExtensionProviderInterface>( - new ExternalExtensionProviderImpl( - service, - new ExternalPrefExtensionLoader( - chrome::DIR_DEPRECATED_EXTERNAL_EXTENSIONS, - ExternalPrefExtensionLoader::NONE), - Extension::EXTERNAL_PREF, - Extension::EXTERNAL_PREF_DOWNLOAD, - Extension::NO_FLAGS))); -#endif - #if defined(OS_CHROMEOS) || defined (OS_MACOSX) // Define a per-user source of external extensions. // On Chrome OS, this serves as a source for OEM customization. diff --git a/chrome/browser/extensions/external_pref_extension_loader.cc b/chrome/browser/extensions/external_pref_extension_loader.cc index cf15f29..8e291f1 100644 --- a/chrome/browser/extensions/external_pref_extension_loader.cc +++ b/chrome/browser/extensions/external_pref_extension_loader.cc @@ -101,24 +101,6 @@ DictionaryValue* ExternalPrefExtensionLoader::ReadJsonPrefsFile() { JSONFileValueSerializer serializer(json_file); DictionaryValue* parsed_json_prefs = ExtractPrefs(json_file, &serializer); - -#if defined(OS_MACOSX) - if (base_path_key_ == chrome::DIR_DEPRECATED_EXTERNAL_EXTENSIONS && - parsed_json_prefs->size() > 0) { - LOG(WARNING) << "Deprecated external extension source " << json_file.value() - << " is used to install some CRX files. This source will be " - << "removed in version 19. See http://code.google.com/chrome" - << "/extensions/external_extensions.html#preferences for " - << "documentation of other supported paths."; - - for (DictionaryValue::key_iterator crx_id = parsed_json_prefs->begin_keys(); - crx_id != parsed_json_prefs->end_keys(); ++crx_id) { - LOG(WARNING) << "External CRX install for ID " << *crx_id - << " is from a deprecated source."; - } - } -#endif // defined(OS_MACOSX) - return parsed_json_prefs; } @@ -129,19 +111,6 @@ void ExternalPrefExtensionLoader::LoadOnFileThread() { if (!prefs_.get()) prefs_.reset(new DictionaryValue()); - // We want to deprecate the external extensions file inside the app - // bundle on mac os. Use a histogram to see how many extensions - // are installed using the deprecated path, and how many are installed - // from the supported path. We can use this data to measure the - // effectiveness of asking developers to use the new path, or any - // automatic migration methods we implement. -#if defined(OS_MACOSX) - // The deprecated path only exists on mac for now. - if (base_path_key_ == chrome::DIR_DEPRECATED_EXTERNAL_EXTENSIONS) { - UMA_HISTOGRAM_COUNTS_100("Extensions.DepricatedExternalJsonCount", - prefs_->size()); - } -#endif // defined(OS_MACOSX) if (base_path_key_ == chrome::DIR_EXTERNAL_EXTENSIONS) { UMA_HISTOGRAM_COUNTS_100("Extensions.ExternalJsonCount", prefs_->size()); diff --git a/chrome/common/chrome_paths.cc b/chrome/common/chrome_paths.cc index 3d194c5..6d4849e 100644 --- a/chrome/common/chrome_paths.cc +++ b/chrome/common/chrome_paths.cc @@ -379,21 +379,6 @@ bool PathProvider(int key, FilePath* result) { #endif break; -#if defined(OS_MACOSX) - case DIR_DEPRECATED_EXTERNAL_EXTENSIONS: - // TODO(skerner): Reading external extensions from a file inside the - // app budle causes several problems. Once users have a chance to - // migrate, remove this path. crbug/67203 - if (!PathService::Get(base::DIR_EXE, &cur)) - return false; - - cur = cur.DirName(); - cur = cur.Append(FILE_PATH_LITERAL("Extensions")); - create_dir = false; - - break; -#endif - case chrome::DIR_DEFAULT_APPS: #if defined(OS_MACOSX) cur = base::mac::FrameworkBundlePath(); diff --git a/chrome/common/chrome_paths.h b/chrome/common/chrome_paths.h index 5fc7fcb..09988fc 100644 --- a/chrome/common/chrome_paths.h +++ b/chrome/common/chrome_paths.h @@ -56,12 +56,6 @@ enum { DIR_EXTERNAL_EXTENSIONS, // Directory where installer places .crx files. -#if defined(OS_MACOSX) - DIR_DEPRECATED_EXTERNAL_EXTENSIONS, // Former home of external extensions. - // We read from the old path for now, - // to give users time to migrate. -#endif - DIR_DEFAULT_APPS, // Directory where installer places .crx files // to be installed when chrome is first run. DIR_PEPPER_FLASH_PLUGIN, // Directory to the Pepper Flash plugin, diff --git a/chrome/common/extensions/docs/external_extensions.html b/chrome/common/extensions/docs/external_extensions.html index 1fa29bb..4454898 100644 --- a/chrome/common/extensions/docs/external_extensions.html +++ b/chrome/common/extensions/docs/external_extensions.html @@ -314,8 +314,9 @@ or <code>/home/share/extension.crx</code>.) For all users: <code>/Library/Application Support/Google/Chrome/External Extensions/</code> <p>The external extensions file for all users is read only if every directory in the path is owned by the user <code>root</code>, has the group <code>admin</code> or <code>wheel</code>, and is not world writable. The path must also be free of symbolic links. These restrictions prevent an unprivileged user from causing extensions to be installed for all users. See <a href="#troubleshooting">troubleshooting</a> for details.</p> <p class="note"> - <b>Note:</b> The above path for all users was added in Chrome 16. Prior versions used a different path, which is now deprecated: - <code>/Applications/Google Chrome.app/Contents/Extensions/</code> .</p> + <b>Note:</b> The above path for all users was added in Chrome 16. Prior versions used a different path:<br> + <code>/Applications/Google Chrome.app/Contents/Extensions/</code> + This path was deprecated in version 17. Support was removed in version 20. Use one of the paths above instead.</p> </dd> <dt> Linux: </dt> <dd> <code>/opt/google/chrome/extensions/</code> <br> diff --git a/chrome/common/extensions/docs/static/external_extensions.html b/chrome/common/extensions/docs/static/external_extensions.html index 9273ef9..3e15493 100644 --- a/chrome/common/extensions/docs/static/external_extensions.html +++ b/chrome/common/extensions/docs/static/external_extensions.html @@ -106,8 +106,9 @@ or <code>/home/share/extension.crx</code>.) For all users: <code>/Library/Application Support/Google/Chrome/External Extensions/</code> <p>The external extensions file for all users is read only if every directory in the path is owned by the user <code>root</code>, has the group <code>admin</code> or <code>wheel</code>, and is not world writable. The path must also be free of symbolic links. These restrictions prevent an unprivileged user from causing extensions to be installed for all users. See <a href="#troubleshooting">troubleshooting</a> for details.</p> <p class="note"> - <b>Note:</b> The above path for all users was added in Chrome 16. Prior versions used a different path, which is now deprecated: - <code>/Applications/Google Chrome.app/Contents/Extensions/</code> .</p> + <b>Note:</b> The above path for all users was added in Chrome 16. Prior versions used a different path:<br/> + <code>/Applications/Google Chrome.app/Contents/Extensions/</code> + This path was deprecated in version 17. Support was removed in version 20. Use one of the paths above instead.</p> </dd> <dt> Linux: </dt> |