summaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authorben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-15 22:26:16 +0000
committerben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-15 22:26:16 +0000
commit94060c1fbefd7a6cf3347a42cbad7d9ce66962dc (patch)
tree13957b82d149ddfef22434a7eee30dbbd0b2abd9 /app
parent53df5df9fa0744b496beb0d9112229a81c79b77a (diff)
downloadchromium_src-94060c1fbefd7a6cf3347a42cbad7d9ce66962dc.zip
chromium_src-94060c1fbefd7a6cf3347a42cbad7d9ce66962dc.tar.gz
chromium_src-94060c1fbefd7a6cf3347a42cbad7d9ce66962dc.tar.bz2
Reland this change. Registers paths for the testing exe, too.
Move/Copy paths used by app to app_paths. http://crbug.com/11387 Review URL: http://codereview.chromium.org/115420 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16200 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'app')
-rw-r--r--app/DEPS3
-rw-r--r--app/app.vcproj598
-rw-r--r--app/app_paths.cc70
-rw-r--r--app/app_paths.h30
-rw-r--r--app/gfx/icon_util_unittest.cc4
-rw-r--r--app/l10n_util.cc4
-rw-r--r--app/l10n_util_unittest.cc8
-rw-r--r--app/resource_bundle_linux.cc8
-rw-r--r--app/resource_bundle_win.cc6
-rw-r--r--app/test/data/icon_util/128_X_128_icon.icobin0 -> 67646 bytes
-rw-r--r--app/test/data/icon_util/16_X_16_icon.icobin0 -> 1150 bytes
11 files changed, 418 insertions, 313 deletions
diff --git a/app/DEPS b/app/DEPS
index cffa9e0..da89e8e 100644
--- a/app/DEPS
+++ b/app/DEPS
@@ -4,8 +4,5 @@ include_rules = [
"+grit/locale_settings.h",
"+grit/theme_resources.h",
"+net",
- # TODO(beng): Sever these links once we have extracted all deps from
- # chrome/common.
- "+chrome/common/chrome_paths.h",
"+skia",
]
diff --git a/app/app.vcproj b/app/app.vcproj
index 92b555c..f54461a 100644
--- a/app/app.vcproj
+++ b/app/app.vcproj
@@ -1,295 +1,303 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="8.00"
- Name="app"
- ProjectGUID="{4631946D-7D5F-44BD-A5A8-504C0A7033BE}"
- RootNamespace="app"
- Keyword="Win32Proj"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- ConfigurationType="4"
- InheritedPropertySheets=".\app.vsprops;$(SolutionDir)..\build\debug.vsprops"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLibrarianTool"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|Win32"
- ConfigurationType="4"
- InheritedPropertySheets=".\app.vsprops;$(SolutionDir)..\build\release.vsprops"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLibrarianTool"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="gfx"
- >
- <File
- RelativePath=".\gfx\canvas.cc"
- >
- </File>
- <File
- RelativePath=".\gfx\canvas.h"
- >
- </File>
- <File
- RelativePath=".\gfx\canvas_win.cc"
- >
- </File>
- <File
- RelativePath=".\gfx\color_utils.cc"
- >
- </File>
- <File
- RelativePath=".\gfx\color_utils.h"
- >
- </File>
- <File
- RelativePath=".\gfx\favicon_size.h"
- >
- </File>
- <File
- RelativePath=".\gfx\font.h"
- >
- </File>
- <File
- RelativePath=".\gfx\font_win.cc"
- >
- </File>
- <File
- RelativePath=".\gfx\icon_util.cc"
- >
- </File>
- <File
- RelativePath=".\gfx\icon_util.h"
- >
- </File>
- <File
- RelativePath=".\gfx\insets.h"
- >
- </File>
- <File
- RelativePath=".\gfx\path.h"
- >
- </File>
- <File
- RelativePath=".\gfx\path_win.cc"
- >
- </File>
- <File
- RelativePath=".\gfx\text_elider.cc"
- >
- </File>
- <File
- RelativePath=".\gfx\text_elider.h"
- >
- </File>
- </Filter>
- <File
- RelativePath=".\animation.cc"
- >
- </File>
- <File
- RelativePath=".\animation.h"
- >
- </File>
- <File
- RelativePath=".\app_switches.cc"
- >
- </File>
- <File
- RelativePath=".\app_switches.h"
- >
- </File>
- <File
- RelativePath=".\drag_drop_types.cc"
- >
- </File>
- <File
- RelativePath=".\drag_drop_types.h"
- >
- </File>
- <File
- RelativePath=".\l10n_util.cc"
- >
- </File>
- <File
- RelativePath=".\l10n_util.h"
- >
- </File>
- <File
- RelativePath=".\l10n_util_win.cc"
- >
- </File>
- <File
- RelativePath=".\l10n_util_win.h"
- >
- </File>
- <File
- RelativePath=".\message_box_flags.h"
- >
- </File>
- <File
- RelativePath=".\os_exchange_data.h"
- >
- </File>
- <File
- RelativePath=".\os_exchange_data_win.cc"
- >
- </File>
- <File
- RelativePath=".\resource_bundle.cc"
- >
- </File>
- <File
- RelativePath=".\resource_bundle.h"
- >
- </File>
- <File
- RelativePath=".\resource_bundle_win.cc"
- >
- </File>
- <File
- RelativePath=".\slide_animation.cc"
- >
- </File>
- <File
- RelativePath=".\slide_animation.h"
- >
- </File>
- <File
- RelativePath=".\theme_provider.h"
- >
- </File>
- <File
- RelativePath=".\throb_animation.cc"
- >
- </File>
- <File
- RelativePath=".\throb_animation.h"
- >
- </File>
- <File
- RelativePath=".\tree_model.h"
- >
- </File>
- <File
- RelativePath=".\tree_node_iterator.h"
- >
- </File>
- <File
- RelativePath=".\tree_node_model.h"
- >
- </File>
- <File
- RelativePath=".\win_util.cc"
- >
- </File>
- <File
- RelativePath=".\win_util.h"
- >
- </File>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="8.00"
+ Name="app"
+ ProjectGUID="{4631946D-7D5F-44BD-A5A8-504C0A7033BE}"
+ RootNamespace="app"
+ Keyword="Win32Proj"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ ConfigurationType="4"
+ InheritedPropertySheets=".\app.vsprops;$(SolutionDir)..\build\debug.vsprops"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLibrarianTool"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ ConfigurationType="4"
+ InheritedPropertySheets=".\app.vsprops;$(SolutionDir)..\build\release.vsprops"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLibrarianTool"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="gfx"
+ >
+ <File
+ RelativePath=".\gfx\canvas.cc"
+ >
+ </File>
+ <File
+ RelativePath=".\gfx\canvas.h"
+ >
+ </File>
+ <File
+ RelativePath=".\gfx\canvas_win.cc"
+ >
+ </File>
+ <File
+ RelativePath=".\gfx\color_utils.cc"
+ >
+ </File>
+ <File
+ RelativePath=".\gfx\color_utils.h"
+ >
+ </File>
+ <File
+ RelativePath=".\gfx\favicon_size.h"
+ >
+ </File>
+ <File
+ RelativePath=".\gfx\font.h"
+ >
+ </File>
+ <File
+ RelativePath=".\gfx\font_win.cc"
+ >
+ </File>
+ <File
+ RelativePath=".\gfx\icon_util.cc"
+ >
+ </File>
+ <File
+ RelativePath=".\gfx\icon_util.h"
+ >
+ </File>
+ <File
+ RelativePath=".\gfx\insets.h"
+ >
+ </File>
+ <File
+ RelativePath=".\gfx\path.h"
+ >
+ </File>
+ <File
+ RelativePath=".\gfx\path_win.cc"
+ >
+ </File>
+ <File
+ RelativePath=".\gfx\text_elider.cc"
+ >
+ </File>
+ <File
+ RelativePath=".\gfx\text_elider.h"
+ >
+ </File>
+ </Filter>
+ <File
+ RelativePath=".\animation.cc"
+ >
+ </File>
+ <File
+ RelativePath=".\animation.h"
+ >
+ </File>
+ <File
+ RelativePath=".\app_paths.cc"
+ >
+ </File>
+ <File
+ RelativePath=".\app_paths.h"
+ >
+ </File>
+ <File
+ RelativePath=".\app_switches.cc"
+ >
+ </File>
+ <File
+ RelativePath=".\app_switches.h"
+ >
+ </File>
+ <File
+ RelativePath=".\drag_drop_types.cc"
+ >
+ </File>
+ <File
+ RelativePath=".\drag_drop_types.h"
+ >
+ </File>
+ <File
+ RelativePath=".\l10n_util.cc"
+ >
+ </File>
+ <File
+ RelativePath=".\l10n_util.h"
+ >
+ </File>
+ <File
+ RelativePath=".\l10n_util_win.cc"
+ >
+ </File>
+ <File
+ RelativePath=".\l10n_util_win.h"
+ >
+ </File>
+ <File
+ RelativePath=".\message_box_flags.h"
+ >
+ </File>
+ <File
+ RelativePath=".\os_exchange_data.h"
+ >
+ </File>
+ <File
+ RelativePath=".\os_exchange_data_win.cc"
+ >
+ </File>
+ <File
+ RelativePath=".\resource_bundle.cc"
+ >
+ </File>
+ <File
+ RelativePath=".\resource_bundle.h"
+ >
+ </File>
+ <File
+ RelativePath=".\resource_bundle_win.cc"
+ >
+ </File>
+ <File
+ RelativePath=".\slide_animation.cc"
+ >
+ </File>
+ <File
+ RelativePath=".\slide_animation.h"
+ >
+ </File>
+ <File
+ RelativePath=".\theme_provider.h"
+ >
+ </File>
+ <File
+ RelativePath=".\throb_animation.cc"
+ >
+ </File>
+ <File
+ RelativePath=".\throb_animation.h"
+ >
+ </File>
+ <File
+ RelativePath=".\tree_model.h"
+ >
+ </File>
+ <File
+ RelativePath=".\tree_node_iterator.h"
+ >
+ </File>
+ <File
+ RelativePath=".\tree_node_model.h"
+ >
+ </File>
+ <File
+ RelativePath=".\win_util.cc"
+ >
+ </File>
+ <File
+ RelativePath=".\win_util.h"
+ >
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/app/app_paths.cc b/app/app_paths.cc
new file mode 100644
index 0000000..ab4751c
--- /dev/null
+++ b/app/app_paths.cc
@@ -0,0 +1,70 @@
+// Copyright (c) 2009 The Chromium Authors. All rights reserved. Use of this
+// source code is governed by a BSD-style license that can be found in the
+// LICENSE file.
+
+#include "app/app_paths.h"
+
+#include "base/command_line.h"
+#include "base/file_path.h"
+#include "base/file_util.h"
+#include "base/path_service.h"
+
+namespace app {
+
+bool PathProvider(int key, FilePath* result) {
+ // Assume that we will not need to create the directory if it does not exist.
+ // This flag can be set to true for the cases where we want to create it.
+ bool create_dir = false;
+
+ FilePath cur;
+ switch (key) {
+ case app::DIR_THEMES:
+ if (!PathService::Get(base::DIR_MODULE, &cur))
+ return false;
+ cur = cur.Append(FILE_PATH_LITERAL("themes"));
+ create_dir = true;
+ break;
+ case app::DIR_LOCALES:
+ if (!PathService::Get(base::DIR_MODULE, &cur))
+ return false;
+#if defined(OS_MACOSX)
+ // On Mac, locale files are in Contents/Resources, a sibling of the
+ // App dir.
+ cur = cur.DirName();
+ cur = cur.Append(FILE_PATH_LITERAL("Resources"));
+#else
+ cur = cur.Append(FILE_PATH_LITERAL("locales"));
+#endif
+ create_dir = true;
+ break;
+ // The following are only valid in the development environment, and
+ // will fail if executed from an installed executable (because the
+ // generated path won't exist).
+ case app::DIR_TEST_DATA:
+ if (!PathService::Get(base::DIR_SOURCE_ROOT, &cur))
+ return false;
+ cur = cur.Append(FILE_PATH_LITERAL("app"));
+ cur = cur.Append(FILE_PATH_LITERAL("test"));
+ cur = cur.Append(FILE_PATH_LITERAL("data"));
+ if (!file_util::PathExists(cur)) // we don't want to create this
+ return false;
+ break;
+ default:
+ return false;
+ }
+
+ if (create_dir && !file_util::PathExists(cur) &&
+ !file_util::CreateDirectory(cur))
+ return false;
+
+ *result = cur;
+ return true;
+}
+
+// This cannot be done as a static initializer sadly since Visual Studio will
+// eliminate this object file if there is no direct entry point into it.
+void RegisterPathProvider() {
+ PathService::RegisterProvider(PathProvider, PATH_START, PATH_END);
+}
+
+} // namespace app
diff --git a/app/app_paths.h b/app/app_paths.h
new file mode 100644
index 0000000..36ae9b6
--- /dev/null
+++ b/app/app_paths.h
@@ -0,0 +1,30 @@
+// Copyright (c) 2009 The Chromium Authors. All rights reserved. Use of this
+// source code is governed by a BSD-style license that can be found in the
+// LICENSE file.
+
+#ifndef APP_APP_PATHS_
+#define APP_APP_PATHS_
+
+// This file declares path keys for the app module. These can be used with
+// the PathService to access various special directories and files.
+
+namespace app {
+
+enum {
+ PATH_START = 2000,
+
+ DIR_THEMES, // directory where theme dll files are stored
+ DIR_LOCALES, // directory where locale resources are stored
+
+ // Valid only in development environment; TODO(darin): move these
+ DIR_TEST_DATA, // directory where unit test data resides
+
+ PATH_END
+};
+
+// Call once to register the provider for the path keys defined above.
+void RegisterPathProvider();
+
+} // namespace app
+
+#endif // #ifndef APP_APP_PATHS_
diff --git a/app/gfx/icon_util_unittest.cc b/app/gfx/icon_util_unittest.cc
index ed65ca52..27f749d 100644
--- a/app/gfx/icon_util_unittest.cc
+++ b/app/gfx/icon_util_unittest.cc
@@ -2,12 +2,12 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include "app/app_paths.h"
#include "app/gfx/icon_util.h"
#include "base/gfx/size.h"
#include "base/scoped_ptr.h"
#include "base/file_util.h"
#include "base/path_service.h"
-#include "chrome/common/chrome_paths.h"
#include "third_party/skia/include/core/SkBitmap.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -20,7 +20,7 @@ namespace {
class IconUtilTest : public testing::Test {
public:
IconUtilTest() {
- PathService::Get(chrome::DIR_TEST_DATA, &test_data_directory_);
+ PathService::Get(app::DIR_TEST_DATA, &test_data_directory_);
}
~IconUtilTest() {}
diff --git a/app/l10n_util.cc b/app/l10n_util.cc
index 611c21a..8791024 100644
--- a/app/l10n_util.cc
+++ b/app/l10n_util.cc
@@ -6,6 +6,7 @@
#include "app/l10n_util.h"
+#include "app/app_paths.h"
#include "app/app_switches.h"
#include "app/gfx/canvas.h"
#include "app/resource_bundle.h"
@@ -17,7 +18,6 @@
#include "base/string_piece.h"
#include "base/string_util.h"
#include "base/sys_string_conversions.h"
-#include "chrome/common/chrome_paths.h"
#include "unicode/uscript.h"
// TODO(playmobil): remove this undef once SkPostConfig.h is fixed.
@@ -229,7 +229,7 @@ std::wstring GetApplicationLocale(const std::wstring& pref_locale) {
return L"en";
#else
FilePath locale_path;
- PathService::Get(chrome::DIR_LOCALES, &locale_path);
+ PathService::Get(app::DIR_LOCALES, &locale_path);
std::wstring resolved_locale;
// First, check to see if there's a --lang flag.
diff --git a/app/l10n_util_unittest.cc b/app/l10n_util_unittest.cc
index b1f8c93..3503c096 100644
--- a/app/l10n_util_unittest.cc
+++ b/app/l10n_util_unittest.cc
@@ -4,6 +4,7 @@
#include "build/build_config.h"
+#include "app/app_paths.h"
#include "app/l10n_util.h"
#if !defined(OS_MACOSX)
#include "app/test/data/resource.h"
@@ -16,7 +17,6 @@
#if defined(OS_WIN)
#include "base/win_util.h"
#endif
-#include "chrome/common/chrome_paths.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "testing/platform_test.h"
#include "unicode/locid.h"
@@ -100,12 +100,12 @@ TEST_F(L10nUtilTest, GetAppLocale) {
// Use a temporary locale dir so we don't have to actually build the locale
// dlls for this test.
FilePath orig_locale_dir;
- PathService::Get(chrome::DIR_LOCALES, &orig_locale_dir);
+ PathService::Get(app::DIR_LOCALES, &orig_locale_dir);
FilePath new_locale_dir;
EXPECT_TRUE(file_util::CreateNewTempDirectory(
FILE_PATH_LITERAL("l10n_util_test"),
&new_locale_dir));
- PathService::Override(chrome::DIR_LOCALES, new_locale_dir.ToWStringHack());
+ PathService::Override(app::DIR_LOCALES, new_locale_dir.ToWStringHack());
// Make fake locale files.
std::string filenames[] = {
"en-US",
@@ -204,7 +204,7 @@ TEST_F(L10nUtilTest, GetAppLocale) {
#endif
// Clean up.
- PathService::Override(chrome::DIR_LOCALES, orig_locale_dir.ToWStringHack());
+ PathService::Override(app::DIR_LOCALES, orig_locale_dir.ToWStringHack());
file_util::Delete(new_locale_dir, true);
UErrorCode error_code = U_ZERO_ERROR;
Locale::setDefault(locale, error_code);
diff --git a/app/resource_bundle_linux.cc b/app/resource_bundle_linux.cc
index 6f4b43f..e27c7b6 100644
--- a/app/resource_bundle_linux.cc
+++ b/app/resource_bundle_linux.cc
@@ -6,6 +6,7 @@
#include <gtk/gtk.h>
+#include "app/app_paths.h"
#include "app/gfx/font.h"
#include "app/gfx/gtk_util.h"
#include "app/l10n_util.h"
@@ -18,8 +19,7 @@
#include "base/path_service.h"
#include "base/string_piece.h"
#include "base/string_util.h"
-#include "chrome/common/chrome_paths.h"
-#include "SkBitmap.h"
+#include "third_party/skia/include/core/SkBitmap.h"
namespace {
@@ -94,7 +94,7 @@ void ResourceBundle::LoadResources(const std::wstring& pref_locale) {
FilePath ResourceBundle::GetLocaleFilePath(const std::wstring& pref_locale) {
FilePath locale_path;
- PathService::Get(chrome::DIR_LOCALES, &locale_path);
+ PathService::Get(app::DIR_LOCALES, &locale_path);
const std::wstring app_locale = l10n_util::GetApplicationLocale(pref_locale);
if (app_locale.empty())
@@ -105,7 +105,7 @@ FilePath ResourceBundle::GetLocaleFilePath(const std::wstring& pref_locale) {
void ResourceBundle::LoadThemeResources() {
FilePath theme_data_path;
- PathService::Get(chrome::DIR_THEMES, &theme_data_path);
+ PathService::Get(app::DIR_THEMES, &theme_data_path);
theme_data_path = theme_data_path.Append(FILE_PATH_LITERAL("default.pak"));
theme_data_ = new base::DataPack;
bool success = theme_data_->Load(theme_data_path);
diff --git a/app/resource_bundle_win.cc b/app/resource_bundle_win.cc
index 1d0d28f..82f34b0 100644
--- a/app/resource_bundle_win.cc
+++ b/app/resource_bundle_win.cc
@@ -6,6 +6,7 @@
#include <atlbase.h>
+#include "app/app_paths.h"
#include "app/gfx/font.h"
#include "app/l10n_util.h"
#include "base/file_util.h"
@@ -14,7 +15,6 @@
#include "base/resource_util.h"
#include "base/string_piece.h"
#include "base/win_util.h"
-#include "chrome/common/chrome_paths.h"
namespace {
@@ -63,7 +63,7 @@ void ResourceBundle::LoadResources(const std::wstring& pref_locale) {
FilePath ResourceBundle::GetLocaleFilePath(const std::wstring& pref_locale) {
FilePath locale_path;
- PathService::Get(chrome::DIR_LOCALES, &locale_path);
+ PathService::Get(app::DIR_LOCALES, &locale_path);
const std::wstring app_locale = l10n_util::GetApplicationLocale(pref_locale);
if (app_locale.empty())
@@ -75,7 +75,7 @@ FilePath ResourceBundle::GetLocaleFilePath(const std::wstring& pref_locale) {
void ResourceBundle::LoadThemeResources() {
DCHECK(NULL == theme_data_) << "theme dll already loaded";
std::wstring theme_data_path;
- PathService::Get(chrome::DIR_THEMES, &theme_data_path);
+ PathService::Get(app::DIR_THEMES, &theme_data_path);
file_util::AppendToPath(&theme_data_path, L"default.dll");
// The dll should only have resources, not executable code.
diff --git a/app/test/data/icon_util/128_X_128_icon.ico b/app/test/data/icon_util/128_X_128_icon.ico
new file mode 100644
index 0000000..a5d72fe
--- /dev/null
+++ b/app/test/data/icon_util/128_X_128_icon.ico
Binary files differ
diff --git a/app/test/data/icon_util/16_X_16_icon.ico b/app/test/data/icon_util/16_X_16_icon.ico
new file mode 100644
index 0000000..0e524f1
--- /dev/null
+++ b/app/test/data/icon_util/16_X_16_icon.ico
Binary files differ