summaryrefslogtreecommitdiffstats
path: root/ui/base/resource
diff options
context:
space:
mode:
authoravi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-08-18 14:43:25 +0000
committeravi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-08-18 14:43:25 +0000
commite9c4ac9c2af1e09044920caf4b7a1ca5f1126ea6 (patch)
tree8d27e69cfe1d3286fc9a57a4141498ea72368d62 /ui/base/resource
parent3e0c7ad746fa9b107ead3b2d84e237e27376e6e9 (diff)
downloadchromium_src-e9c4ac9c2af1e09044920caf4b7a1ca5f1126ea6.zip
chromium_src-e9c4ac9c2af1e09044920caf4b7a1ca5f1126ea6.tar.gz
chromium_src-e9c4ac9c2af1e09044920caf4b7a1ca5f1126ea6.tar.bz2
Revert 97304 - Adding BidiChecker tests which run in fake bidi
All the new tests are failing. BUG=NONE TEST=NONE Review URL: http://codereview.chromium.org/7488045 TBR=ofri@google.com Review URL: http://codereview.chromium.org/7669053 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@97310 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/base/resource')
-rw-r--r--ui/base/resource/resource_bundle.cc15
-rw-r--r--ui/base/resource/resource_bundle.h7
-rw-r--r--ui/base/resource/resource_bundle_posix.cc10
3 files changed, 8 insertions, 24 deletions
diff --git a/ui/base/resource/resource_bundle.cc b/ui/base/resource/resource_bundle.cc
index c47b7b9..8322566 100644
--- a/ui/base/resource/resource_bundle.cc
+++ b/ui/base/resource/resource_bundle.cc
@@ -4,7 +4,6 @@
#include "ui/base/resource/resource_bundle.h"
-#include "base/command_line.h"
#include "base/logging.h"
#include "base/stl_util.h"
#include "base/string_piece.h"
@@ -12,7 +11,6 @@
#include "build/build_config.h"
#include "third_party/skia/include/core/SkBitmap.h"
#include "ui/base/resource/data_pack.h"
-#include "ui/base/ui_base_switches.h"
#include "ui/gfx/codec/png_codec.h"
#include "ui/gfx/font.h"
#include "ui/gfx/image/image.h"
@@ -104,14 +102,6 @@ ResourceBundle& ResourceBundle::GetSharedInstance() {
return *g_shared_instance_;
}
-void ResourceBundle::OverrideLocalePak(FilePath pak_path) {
- overridden_pak_path_ = pak_path;
-}
-
-FilePath& ResourceBundle::GetOverriddenPakPath() {
- return overridden_pak_path_;
-}
-
SkBitmap* ResourceBundle::GetBitmapNamed(int resource_id) {
const SkBitmap* bitmap =
static_cast<const SkBitmap*>(GetImageNamed(resource_id));
@@ -206,11 +196,6 @@ ResourceBundle::ResourceBundle()
resources_data_(NULL),
large_icon_resources_data_(NULL),
locale_resources_data_(NULL) {
- CommandLine *command_line = CommandLine::ForCurrentProcess();
- if (command_line->HasSwitch(switches::kLocalePak)) {
- OverrideLocalePak(
- command_line->GetSwitchValuePath(switches::kLocalePak));
- }
}
void ResourceBundle::FreeImages() {
diff --git a/ui/base/resource/resource_bundle.h b/ui/base/resource/resource_bundle.h
index f10af62..37d3ef1 100644
--- a/ui/base/resource/resource_bundle.h
+++ b/ui/base/resource/resource_bundle.h
@@ -142,11 +142,6 @@ class UI_EXPORT ResourceBundle {
// system have changed, for example, when the locale has changed.
void ReloadFonts();
- // Overrides the path to the pak file from which the locale resources will be
- // loaded. Pass an empty path to undo.
- void OverrideLocalePak(FilePath pak_path);
- FilePath& GetOverriddenPakPath();
-
#if defined(OS_WIN)
// NOTE: This needs to be called before initializing the shared instance if
// your resources are not stored in the executable.
@@ -298,8 +293,6 @@ class UI_EXPORT ResourceBundle {
static ResourceBundle* g_shared_instance_;
- FilePath overridden_pak_path_;
-
DISALLOW_COPY_AND_ASSIGN(ResourceBundle);
};
diff --git a/ui/base/resource/resource_bundle_posix.cc b/ui/base/resource/resource_bundle_posix.cc
index df6ff93..d23a5b1 100644
--- a/ui/base/resource/resource_bundle_posix.cc
+++ b/ui/base/resource/resource_bundle_posix.cc
@@ -4,6 +4,7 @@
#include "ui/base/resource/resource_bundle.h"
+#include "base/command_line.h"
#include "base/file_path.h"
#include "base/logging.h"
#include "base/stl_util.h"
@@ -12,6 +13,7 @@
#include "base/synchronization/lock.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/base/resource/data_pack.h"
+#include "ui/base/ui_base_switches.h"
#include "ui/gfx/font.h"
namespace ui {
@@ -113,8 +115,12 @@ std::string ResourceBundle::LoadLocaleResources(
const std::string& pref_locale) {
DCHECK(!locale_resources_data_) << "locale.pak already loaded";
std::string app_locale = l10n_util::GetApplicationLocale(pref_locale);
- FilePath locale_file_path = GetOverriddenPakPath();
- if (locale_file_path.empty()) {
+ FilePath locale_file_path;
+ CommandLine *command_line = CommandLine::ForCurrentProcess();
+ if (command_line->HasSwitch(switches::kLocalePak)) {
+ locale_file_path =
+ command_line->GetSwitchValuePath(switches::kLocalePak);
+ } else {
locale_file_path = GetLocaleFilePath(app_locale);
}
if (locale_file_path.empty()) {