Skip to content

Commit

Permalink
Remove chrome.pak references, build resources into resources.pak
Browse files Browse the repository at this point in the history
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.

R=tony
TBR=sky

BUG=52609

Review URL: https://chromiumcodereview.appspot.com/22339020

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@216822 0039d316-1c4b-4281-b951-d872f2087c98
  • Loading branch information
jamesr@chromium.org committed Aug 10, 2013
1 parent bc3d66a commit 3fb8b90
Show file tree
Hide file tree
Showing 24 changed files with 18 additions and 84 deletions.
1 change: 0 additions & 1 deletion ash/ash.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -905,7 +905,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!': [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ public class ChromiumTestShellApplication extends Application {
private static final String TAG = "ChromiumTestShellApplication";
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",
Expand Down
1 change: 0 additions & 1 deletion chrome/app/chrome_main_delegate.cc
Original file line number Diff line number Diff line change
Expand Up @@ -662,7 +662,6 @@ void ChromeMainDelegate::PreSandboxStartup() {
ResourceBundle::InitSharedInstanceWithPakFile(locale_pak_fd, false);

int extra_pak_keys[] = {
kAndroidChromePakDescriptor,
kAndroidChrome100PercentPakDescriptor,
kAndroidUIResourcesPakDescriptor,
};
Expand Down
10 changes: 2 additions & 8 deletions chrome/browser/chrome_content_browser_client.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2465,16 +2465,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)));
Expand Down
1 change: 0 additions & 1 deletion chrome/browser_tests.isolate
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
1 change: 0 additions & 1 deletion chrome/chrome.isolate
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
1 change: 0 additions & 1 deletion chrome/chrome_android_paks.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
1 change: 0 additions & 1 deletion chrome/chrome_dll_bundle.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -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))',
Expand Down
1 change: 0 additions & 1 deletion chrome/chrome_installer.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -552,7 +552,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',
Expand Down
1 change: 0 additions & 1 deletion chrome/chrome_ios_bundle_resources.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
36 changes: 0 additions & 36 deletions chrome/chrome_repack_chrome.gypi

This file was deleted.

18 changes: 15 additions & 3 deletions chrome/chrome_repack_resources.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -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': [
Expand All @@ -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',
],
}],
],
Expand Down
3 changes: 0 additions & 3 deletions chrome/chrome_resources.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -318,9 +318,6 @@
'<(DEPTH)/ui/ui.gyp:ui_resources',
],
'actions': [
{
'includes': ['chrome_repack_chrome.gypi']
},
{
'includes': ['chrome_repack_locales.gypi']
},
Expand Down
3 changes: 1 addition & 2 deletions chrome/common/descriptors_android.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@

enum {
#if defined(OS_ANDROID)
kAndroidChromePakDescriptor = kContentIPCDescriptorMax + 1,
kAndroidLocalePakDescriptor,
kAndroidLocalePakDescriptor = kContentIPCDescriptorMax + 1,
kAndroidChrome100PercentPakDescriptor,
kAndroidUIResourcesPakDescriptor,
kAndroidMinidumpDescriptor,
Expand Down
1 change: 0 additions & 1 deletion chrome/interactive_ui_tests.isolate
Original file line number Diff line number Diff line change
Expand Up @@ -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)',
Expand Down
1 change: 0 additions & 1 deletion chrome/sync_integration_tests.isolate
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
4 changes: 0 additions & 4 deletions chrome/tools/build/chromeos/FILES.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,6 @@ FILES = [
'filename': 'chrome-wrapper',
'buildtype': ['dev', 'official'],
},
{
'filename': 'chrome.pak',
'buildtype': ['dev', 'official'],
},
{
'filename': 'chrome_100_percent.pak',
'buildtype': ['dev', 'official'],
Expand Down
4 changes: 0 additions & 4 deletions chrome/tools/build/linux/FILES.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,6 @@ FILES = [
'filename': 'chrome-wrapper',
'buildtype': ['dev', 'official'],
},
{
'filename': 'chrome.pak',
'buildtype': ['dev', 'official'],
},
{
'filename': 'chrome_100_percent.pak',
'buildtype': ['dev', 'official'],
Expand Down
3 changes: 0 additions & 3 deletions chrome/unit_tests.isolate
Original file line number Diff line number Diff line change
Expand Up @@ -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/',
],
Expand Down
2 changes: 0 additions & 2 deletions ui/base/resource/resource_bundle_android.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
3 changes: 0 additions & 3 deletions ui/base/resource/resource_bundle_auralinux.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
2 changes: 0 additions & 2 deletions ui/base/resource/resource_bundle_gtk.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 0 additions & 2 deletions ui/base/resource/resource_bundle_mac.mm
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,6 @@
} // 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",
Expand Down
1 change: 0 additions & 1 deletion ui/ui_unittests.isolate
Original file line number Diff line number Diff line change
Expand Up @@ -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',
],
},
Expand Down

0 comments on commit 3fb8b90

Please sign in to comment.