Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(138)

Side by Side Diff: trunk/src/chrome/app/chrome_main_delegate.cc

Issue 22557005: Revert 216822 "Remove chrome.pak references, build resources int..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/app/chrome_main_delegate.h" 5 #include "chrome/app/chrome_main_delegate.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/files/file_path.h" 8 #include "base/files/file_path.h"
9 #include "base/lazy_instance.h" 9 #include "base/lazy_instance.h"
10 #include "base/message_loop/message_loop.h" 10 #include "base/message_loop/message_loop.h"
(...skipping 644 matching lines...) Expand 10 before | Expand all | Expand 10 after
655 #if defined(OS_ANDROID) 655 #if defined(OS_ANDROID)
656 // The renderer sandbox prevents us from accessing our .pak files directly. 656 // The renderer sandbox prevents us from accessing our .pak files directly.
657 // Therefore file descriptors to the .pak files that we need are passed in 657 // Therefore file descriptors to the .pak files that we need are passed in
658 // at process creation time. 658 // at process creation time.
659 int locale_pak_fd = base::GlobalDescriptors::GetInstance()->MaybeGet( 659 int locale_pak_fd = base::GlobalDescriptors::GetInstance()->MaybeGet(
660 kAndroidLocalePakDescriptor); 660 kAndroidLocalePakDescriptor);
661 CHECK(locale_pak_fd != -1); 661 CHECK(locale_pak_fd != -1);
662 ResourceBundle::InitSharedInstanceWithPakFile(locale_pak_fd, false); 662 ResourceBundle::InitSharedInstanceWithPakFile(locale_pak_fd, false);
663 663
664 int extra_pak_keys[] = { 664 int extra_pak_keys[] = {
665 kAndroidChromePakDescriptor,
665 kAndroidChrome100PercentPakDescriptor, 666 kAndroidChrome100PercentPakDescriptor,
666 kAndroidUIResourcesPakDescriptor, 667 kAndroidUIResourcesPakDescriptor,
667 }; 668 };
668 for (size_t i = 0; i < arraysize(extra_pak_keys); ++i) { 669 for (size_t i = 0; i < arraysize(extra_pak_keys); ++i) {
669 int pak_fd = 670 int pak_fd =
670 base::GlobalDescriptors::GetInstance()->MaybeGet(extra_pak_keys[i]); 671 base::GlobalDescriptors::GetInstance()->MaybeGet(extra_pak_keys[i]);
671 CHECK(pak_fd != -1); 672 CHECK(pak_fd != -1);
672 ResourceBundle::GetSharedInstance().AddDataPackFromFile( 673 ResourceBundle::GetSharedInstance().AddDataPackFromFile(
673 pak_fd, ui::SCALE_FACTOR_100P); 674 pak_fd, ui::SCALE_FACTOR_100P);
674 } 675 }
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
843 } 844 }
844 845
845 content::ContentUtilityClient* 846 content::ContentUtilityClient*
846 ChromeMainDelegate::CreateContentUtilityClient() { 847 ChromeMainDelegate::CreateContentUtilityClient() {
847 #if defined(CHROME_MULTIPLE_DLL_BROWSER) 848 #if defined(CHROME_MULTIPLE_DLL_BROWSER)
848 return NULL; 849 return NULL;
849 #else 850 #else
850 return &g_chrome_content_utility_client.Get(); 851 return &g_chrome_content_utility_client.Get();
851 #endif 852 #endif
852 } 853 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698