diff options
author | jamesr@chromium.org <jamesr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-08-23 05:33:09 +0000 |
---|---|---|
committer | jamesr@chromium.org <jamesr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-08-23 05:33:09 +0000 |
commit | 5db2b749d3f5d907fc490baa4bd5935dc21737d4 (patch) | |
tree | 3c2c17e4b8acde4c19cecb72cf04519cdb06906b | |
parent | 4aec86591ca558cc64db05a8ab7dbc14dee7aec9 (diff) | |
download | chromium_src-5db2b749d3f5d907fc490baa4bd5935dc21737d4.zip chromium_src-5db2b749d3f5d907fc490baa4bd5935dc21737d4.tar.gz chromium_src-5db2b749d3f5d907fc490baa4bd5935dc21737d4.tar.bz2 |
Remove chrome.pak references, build resources into resources.pak (try 2)
This puts resources that used to be in chrome.pak and/or compiled in to
chrome.dll into resources.pak. resources.pak is already loaded at startup
on all platforms so having some resources in a separate pak file isn't
beneficial.
This previously landed as https://codereview.chromium.org/22339020 and
was reverted due to various scripts/etc still referencing chrome.pak. This
patch still builds chrome.pak, but with only the (tiny) net_resources in
it. After this lands I'll go remove references to chrome.pak and then remove
it completely once all references are gone.
BUG=52609
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=218956
R=phajdan.jr@chromium.org, sky@chromium.org, tony@chromium.org
Review URL: https://codereview.chromium.org/23205023
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@219226 0039d316-1c4b-4281-b951-d872f2087c98
25 files changed, 19 insertions, 64 deletions
diff --git a/ash/ash.gyp b/ash/ash.gyp index 6dc57ea..b95b1ac 100644 --- a/ash/ash.gyp +++ b/ash/ash.gyp @@ -918,7 +918,6 @@ 'shell/cocoa/app-Info.plist', 'shell/cocoa/nibs/MainMenu.xib', 'shell/cocoa/nibs/RootWindow.xib', - '<(SHARED_INTERMEDIATE_DIR)/repack/chrome.pak', '<!@pymod_do_main(repack_locales -o -p <(OS) -g <(grit_out_dir) -s <(SHARED_INTERMEDIATE_DIR) -x <(SHARED_INTERMEDIATE_DIR) <(locales))', ], 'mac_bundle_resources!': [ diff --git a/chrome/android/testshell/java/src/org/chromium/chrome/testshell/ChromiumTestShellApplication.java b/chrome/android/testshell/java/src/org/chromium/chrome/testshell/ChromiumTestShellApplication.java index acbee24..ba09992 100644 --- a/chrome/android/testshell/java/src/org/chromium/chrome/testshell/ChromiumTestShellApplication.java +++ b/chrome/android/testshell/java/src/org/chromium/chrome/testshell/ChromiumTestShellApplication.java @@ -20,7 +20,6 @@ import java.util.ArrayList; public class ChromiumTestShellApplication extends Application { private static final String PRIVATE_DATA_DIRECTORY_SUFFIX = "chromiumtestshell"; private static final String[] CHROME_MANDATORY_PAKS = { - "chrome.pak", "en-US.pak", "resources.pak", "chrome_100_percent.pak", diff --git a/chrome/app/chrome_main_delegate.cc b/chrome/app/chrome_main_delegate.cc index 623b20a..b041077 100644 --- a/chrome/app/chrome_main_delegate.cc +++ b/chrome/app/chrome_main_delegate.cc @@ -667,7 +667,6 @@ void ChromeMainDelegate::PreSandboxStartup() { ResourceBundle::InitSharedInstanceWithPakFile(locale_pak_fd, false); int extra_pak_keys[] = { - kAndroidChromePakDescriptor, kAndroidChrome100PercentPakDescriptor, kAndroidUIResourcesPakDescriptor, }; diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/chrome_content_browser_client.cc index e3e1e69..380aa2a 100644 --- a/chrome/browser/chrome_content_browser_client.cc +++ b/chrome/browser/chrome_content_browser_client.cc @@ -2443,16 +2443,10 @@ void ChromeContentBrowserClient::GetAdditionalMappedFilesForChildProcess( DCHECK(!data_path.empty()); int flags = base::PLATFORM_FILE_OPEN | base::PLATFORM_FILE_READ; - base::FilePath chrome_pak = data_path.AppendASCII("chrome.pak"); - base::PlatformFile f = - base::CreatePlatformFile(chrome_pak, flags, NULL, NULL); - DCHECK(f != base::kInvalidPlatformFileValue); - mappings->push_back(FileDescriptorInfo(kAndroidChromePakDescriptor, - FileDescriptor(f, true))); - base::FilePath chrome_resources_pak = data_path.AppendASCII("chrome_100_percent.pak"); - f = base::CreatePlatformFile(chrome_resources_pak, flags, NULL, NULL); + base::PlatformFile f = + base::CreatePlatformFile(chrome_resources_pak, flags, NULL, NULL); DCHECK(f != base::kInvalidPlatformFileValue); mappings->push_back(FileDescriptorInfo(kAndroidChrome100PercentPakDescriptor, FileDescriptor(f, true))); diff --git a/chrome/browser_tests.isolate b/chrome/browser_tests.isolate index 1842deb..a43a861 100644 --- a/chrome/browser_tests.isolate +++ b/chrome/browser_tests.isolate @@ -14,7 +14,6 @@ ], 'isolate_dependency_tracked': [ '../testing/xvfb.py', - '<(PRODUCT_DIR)/chrome.pak', '<(PRODUCT_DIR)/chrome<(EXECUTABLE_SUFFIX)', '<(PRODUCT_DIR)/libclearkeycdm.so', '<(PRODUCT_DIR)/libclearkeycdmadapter.so', diff --git a/chrome/chrome.isolate b/chrome/chrome.isolate index 86233c4..263a82c 100644 --- a/chrome/chrome.isolate +++ b/chrome/chrome.isolate @@ -6,7 +6,6 @@ ['OS=="linux"', { 'variables': { 'isolate_dependency_tracked': [ - '<(PRODUCT_DIR)/chrome.pak', '<(PRODUCT_DIR)/libclearkeycdm.so', '<(PRODUCT_DIR)/libclearkeycdmadapter.so', '<(PRODUCT_DIR)/libffmpegsumo.so', diff --git a/chrome/chrome_android_paks.gypi b/chrome/chrome_android_paks.gypi index 6a95ee5..7937f2f 100644 --- a/chrome/chrome_android_paks.gypi +++ b/chrome/chrome_android_paks.gypi @@ -5,7 +5,6 @@ 'variables': { 'chrome_android_pak_output_folder': '<@(PRODUCT_DIR)/../assets/<(package_name)', 'chrome_android_pak_input_resources': [ - '<(PRODUCT_DIR)/chrome.pak', '<(PRODUCT_DIR)/resources.pak', '<(PRODUCT_DIR)/chrome_100_percent.pak', '<(PRODUCT_DIR)/locales/am.pak', @@ -54,7 +53,6 @@ '<(PRODUCT_DIR)/locales/zh-TW.pak', ], 'chrome_android_pak_output_resources': [ - '<(chrome_android_pak_output_folder)/chrome.pak', '<(chrome_android_pak_output_folder)/resources.pak', '<(chrome_android_pak_output_folder)/chrome_100_percent.pak', '<(chrome_android_pak_output_folder)/am.pak', diff --git a/chrome/chrome_dll_bundle.gypi b/chrome/chrome_dll_bundle.gypi index 9b8d1af..57bd2b9 100644 --- a/chrome/chrome_dll_bundle.gypi +++ b/chrome/chrome_dll_bundle.gypi @@ -61,7 +61,6 @@ 'app/theme/menu_overflow_down.pdf', 'app/theme/menu_overflow_up.pdf', 'browser/mac/install.sh', - '<(SHARED_INTERMEDIATE_DIR)/repack/chrome.pak', '<(SHARED_INTERMEDIATE_DIR)/repack/chrome_100_percent.pak', '<(SHARED_INTERMEDIATE_DIR)/repack/resources.pak', '<!@pymod_do_main(repack_locales -o -p <(OS) -g <(grit_out_dir) -s <(SHARED_INTERMEDIATE_DIR) -x <(SHARED_INTERMEDIATE_DIR) <(locales))', diff --git a/chrome/chrome_installer.gypi b/chrome/chrome_installer.gypi index f4c5f5d..fd405ce 100644 --- a/chrome/chrome_installer.gypi +++ b/chrome/chrome_installer.gypi @@ -553,7 +553,6 @@ # TODO(mmoss) Any convenient way to get all the relevant build # files? (e.g. all locales, resources, etc.) '<(PRODUCT_DIR)/chrome', - '<(PRODUCT_DIR)/chrome.pak', '<(PRODUCT_DIR)/chrome_sandbox', '<(PRODUCT_DIR)/libffmpegsumo.so', '<(PRODUCT_DIR)/libppGoogleNaClPluginChrome.so', diff --git a/chrome/chrome_ios_bundle_resources.gypi b/chrome/chrome_ios_bundle_resources.gypi index 988654b..efcb5f8 100644 --- a/chrome/chrome_ios_bundle_resources.gypi +++ b/chrome/chrome_ios_bundle_resources.gypi @@ -7,7 +7,6 @@ '<(DEPTH)/chrome/chrome_resources.gyp:packed_extra_resources', ], 'mac_bundle_resources': [ - '<(SHARED_INTERMEDIATE_DIR)/repack/chrome.pak', '<(SHARED_INTERMEDIATE_DIR)/repack/chrome_100_percent.pak', '<(SHARED_INTERMEDIATE_DIR)/repack/chrome_200_percent.pak', '<(SHARED_INTERMEDIATE_DIR)/repack/resources.pak', diff --git a/chrome/chrome_repack_chrome.gypi b/chrome/chrome_repack_chrome.gypi index a895435..f9f2f2d 100644 --- a/chrome/chrome_repack_chrome.gypi +++ b/chrome/chrome_repack_chrome.gypi @@ -5,25 +5,8 @@ 'action_name': 'repack_chrome', 'variables': { 'pak_inputs': [ - '<(grit_out_dir)/browser_resources.pak', - '<(grit_out_dir)/common_resources.pak', - '<(SHARED_INTERMEDIATE_DIR)/chrome/chrome_unscaled_resources.pak', '<(SHARED_INTERMEDIATE_DIR)/net/net_resources.pak', ], - 'conditions': [ - ['OS != "ios"', { - 'pak_inputs': [ - '<(SHARED_INTERMEDIATE_DIR)/content/content_resources.pak', - '<(SHARED_INTERMEDIATE_DIR)/content/browser/tracing/tracing_resources.pak', - '<(SHARED_INTERMEDIATE_DIR)/webkit/blink_resources.pak', - ], - }], - ['enable_extensions==1', { - 'pak_inputs': [ - '<(grit_out_dir)/extensions_api_resources.pak', - ], - }], - ], }, 'inputs': [ '<(repack_path)', diff --git a/chrome/chrome_repack_resources.gypi b/chrome/chrome_repack_resources.gypi index 8519aab..7480c2d 100644 --- a/chrome/chrome_repack_resources.gypi +++ b/chrome/chrome_repack_resources.gypi @@ -5,14 +5,26 @@ 'action_name': 'repack_resources', 'variables': { 'pak_inputs': [ + '<(SHARED_INTERMEDIATE_DIR)/chrome/chrome_unscaled_resources.pak', + '<(SHARED_INTERMEDIATE_DIR)/net/net_resources.pak', + '<(SHARED_INTERMEDIATE_DIR)/ui/ui_resources/webui_resources.pak', + '<(grit_out_dir)/browser_resources.pak', + '<(grit_out_dir)/common_resources.pak', '<(grit_out_dir)/memory_internals_resources.pak', '<(grit_out_dir)/net_internals_resources.pak', '<(grit_out_dir)/signin_internals_resources.pak', '<(grit_out_dir)/sync_internals_resources.pak', '<(grit_out_dir)/translate_internals_resources.pak', - '<(SHARED_INTERMEDIATE_DIR)/ui/ui_resources/webui_resources.pak', ], 'conditions': [ + ['OS != "ios"', { + 'pak_inputs': [ + '<(SHARED_INTERMEDIATE_DIR)/content/browser/tracing/tracing_resources.pak', + '<(SHARED_INTERMEDIATE_DIR)/content/content_resources.pak', + '<(SHARED_INTERMEDIATE_DIR)/webkit/blink_resources.pak', + '<(grit_out_dir)/devtools_discovery_page_resources.pak', + ], + }], ['OS != "ios" and OS != "android"', { # New paks should be added here by default. 'pak_inputs': [ @@ -23,9 +35,9 @@ '<(grit_out_dir)/sync_file_system_internals_resources.pak', ], }], - ['OS != "ios"', { + ['enable_extensions==1', { 'pak_inputs': [ - '<(grit_out_dir)/devtools_discovery_page_resources.pak', + '<(grit_out_dir)/extensions_api_resources.pak', ], }], ], diff --git a/chrome/chrome_resources.gyp b/chrome/chrome_resources.gyp index 3084064..ea6e283 100644 --- a/chrome/chrome_resources.gyp +++ b/chrome/chrome_resources.gyp @@ -278,6 +278,7 @@ }, 'dependencies': [ 'chrome_extra_resources', + 'packed_resources', ], 'actions': [ { diff --git a/chrome/common/descriptors_android.h b/chrome/common/descriptors_android.h index 16886e9..f18a8c6 100644 --- a/chrome/common/descriptors_android.h +++ b/chrome/common/descriptors_android.h @@ -9,8 +9,7 @@ enum { #if defined(OS_ANDROID) - kAndroidChromePakDescriptor = kContentIPCDescriptorMax + 1, - kAndroidLocalePakDescriptor, + kAndroidLocalePakDescriptor = kContentIPCDescriptorMax + 1, kAndroidChrome100PercentPakDescriptor, kAndroidUIResourcesPakDescriptor, kAndroidMinidumpDescriptor, diff --git a/chrome/installer/linux/common/installer.include b/chrome/installer/linux/common/installer.include index c5ec0f6..561b42a 100644 --- a/chrome/installer/linux/common/installer.include +++ b/chrome/installer/linux/common/installer.include @@ -118,7 +118,6 @@ stage_install_common() { rm "${DEBUGFILE}" "${STRIPPEDFILE}" # resources - install -m 644 "${BUILDDIR}/${PROGNAME}.pak" "${STAGEDIR}/${INSTALLDIR}/" install -m 644 "${BUILDDIR}/resources.pak" "${STAGEDIR}/${INSTALLDIR}/" # TODO(mmoss): This has broken a couple times on adding new .pak files. Maybe # we should flag all installer files in FILES.cfg and get them from there, so diff --git a/chrome/interactive_ui_tests.isolate b/chrome/interactive_ui_tests.isolate index 130a810..057e0b9 100644 --- a/chrome/interactive_ui_tests.isolate +++ b/chrome/interactive_ui_tests.isolate @@ -14,7 +14,6 @@ ], 'isolate_dependency_tracked': [ '../testing/xvfb.py', - '<(PRODUCT_DIR)/chrome.pak', '<(PRODUCT_DIR)/libffmpegsumo.so', '<(PRODUCT_DIR)/pyproto/google/__init__.py', '<(PRODUCT_DIR)/xdisplaycheck<(EXECUTABLE_SUFFIX)', diff --git a/chrome/sync_integration_tests.isolate b/chrome/sync_integration_tests.isolate index 99f4b75..5aa2463 100644 --- a/chrome/sync_integration_tests.isolate +++ b/chrome/sync_integration_tests.isolate @@ -14,7 +14,6 @@ 'isolate_dependency_tracked': [ '../testing/test_env.py', '../testing/xvfb.py', - '<(PRODUCT_DIR)/chrome.pak', '<(PRODUCT_DIR)/chrome_100_percent.pak', '<(PRODUCT_DIR)/libffmpegsumo.so', '<(PRODUCT_DIR)/libppGoogleNaClPluginChrome.so', diff --git a/chrome/tools/build/chromeos/FILES.cfg b/chrome/tools/build/chromeos/FILES.cfg index 4bf94e4..97e002a 100644 --- a/chrome/tools/build/chromeos/FILES.cfg +++ b/chrome/tools/build/chromeos/FILES.cfg @@ -33,10 +33,6 @@ FILES = [ 'buildtype': ['dev', 'official'], }, { - 'filename': 'chrome.pak', - 'buildtype': ['dev', 'official'], - }, - { 'filename': 'chrome_100_percent.pak', 'buildtype': ['dev', 'official'], }, diff --git a/chrome/tools/build/linux/FILES.cfg b/chrome/tools/build/linux/FILES.cfg index 93bf017..a0a844e 100644 --- a/chrome/tools/build/linux/FILES.cfg +++ b/chrome/tools/build/linux/FILES.cfg @@ -36,10 +36,6 @@ FILES = [ 'buildtype': ['dev', 'official'], }, { - 'filename': 'chrome.pak', - 'buildtype': ['dev', 'official'], - }, - { 'filename': 'chrome_100_percent.pak', 'buildtype': ['dev', 'official'], }, diff --git a/chrome/unit_tests.isolate b/chrome/unit_tests.isolate index 59c160a..8af8a9b 100644 --- a/chrome/unit_tests.isolate +++ b/chrome/unit_tests.isolate @@ -5,9 +5,6 @@ 'conditions': [ ['OS=="android" or OS=="linux"', { 'variables': { - 'isolate_dependency_tracked': [ - '<(PRODUCT_DIR)/chrome.pak', - ], 'isolate_dependency_untracked': [ '<(PRODUCT_DIR)/test_data/', ], diff --git a/ui/base/resource/resource_bundle_android.cc b/ui/base/resource/resource_bundle_android.cc index c701a291..b194269 100644 --- a/ui/base/resource/resource_bundle_android.cc +++ b/ui/base/resource/resource_bundle_android.cc @@ -19,8 +19,6 @@ namespace ui { void ResourceBundle::LoadCommonResources() { base::FilePath path; PathService::Get(ui::DIR_RESOURCE_PAKS_ANDROID, &path); - AddDataPackFromPath(path.AppendASCII("chrome.pak"), - SCALE_FACTOR_NONE); AddDataPackFromPath(path.AppendASCII("chrome_100_percent.pak"), SCALE_FACTOR_100P); } diff --git a/ui/base/resource/resource_bundle_auralinux.cc b/ui/base/resource/resource_bundle_auralinux.cc index 4bc7ee6..d535717 100644 --- a/ui/base/resource/resource_bundle_auralinux.cc +++ b/ui/base/resource/resource_bundle_auralinux.cc @@ -33,9 +33,6 @@ void ResourceBundle::LoadCommonResources() { // Always load the 1x data pack first as the 2x data pack contains both 1x and // 2x images. The 1x data pack only has 1x images, thus passes in an accurate // scale factor to gfx::ImageSkia::AddRepresentation. - - AddDataPackFromPath(GetResourcesPakFilePath("chrome.pak"), - SCALE_FACTOR_NONE); AddDataPackFromPath(GetResourcesPakFilePath( "chrome_100_percent.pak"), SCALE_FACTOR_100P); diff --git a/ui/base/resource/resource_bundle_gtk.cc b/ui/base/resource/resource_bundle_gtk.cc index 4d16b61..679b85c 100644 --- a/ui/base/resource/resource_bundle_gtk.cc +++ b/ui/base/resource/resource_bundle_gtk.cc @@ -65,8 +65,6 @@ base::FilePath GetResourcesPakFilePath(const std::string& pak_name) { } // namespace void ResourceBundle::LoadCommonResources() { - AddDataPackFromPath(GetResourcesPakFilePath("chrome.pak"), - SCALE_FACTOR_NONE); AddDataPackFromPath(GetResourcesPakFilePath( "chrome_100_percent.pak"), SCALE_FACTOR_100P); diff --git a/ui/base/resource/resource_bundle_mac.mm b/ui/base/resource/resource_bundle_mac.mm index 5de8ecc..56d16d5 100644 --- a/ui/base/resource/resource_bundle_mac.mm +++ b/ui/base/resource/resource_bundle_mac.mm @@ -49,8 +49,6 @@ base::FilePath GetResourcesPakFilePath(NSString* name, NSString* mac_locale) { } // namespace void ResourceBundle::LoadCommonResources() { - AddDataPackFromPath(GetResourcesPakFilePath(@"chrome", nil), - SCALE_FACTOR_NONE); AddDataPackFromPath(GetResourcesPakFilePath(@"chrome_100_percent", nil), SCALE_FACTOR_100P); AddDataPackFromPath(GetResourcesPakFilePath(@"webkit_resources_100_percent", diff --git a/ui/ui_unittests.isolate b/ui/ui_unittests.isolate index 35f732b..55ce04a 100644 --- a/ui/ui_unittests.isolate +++ b/ui/ui_unittests.isolate @@ -7,7 +7,6 @@ 'variables': { 'isolate_dependency_tracked': [ 'base/test/data/data_pack_unittest/truncated-header.pak', - '<(PRODUCT_DIR)/chrome.pak', '<(PRODUCT_DIR)/locales/en-US.pak', ], }, |