summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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.ico (renamed from chrome/test/data/icon_util/128_X_128_icon.ico)bin67646 -> 67646 bytes
-rw-r--r--app/test/data/icon_util/16_X_16_icon.ico (renamed from chrome/test/data/icon_util/16_X_16_icon.ico)bin1150 -> 1150 bytes
-rw-r--r--chrome/app/chrome_dll_main.cc2
-rw-r--r--chrome/chrome.gyp2
-rw-r--r--chrome/common/chrome_paths.cc19
-rw-r--r--chrome/common/chrome_paths.h2
-rw-r--r--chrome/test/unit/chrome_test_suite.h2
-rw-r--r--views/DEPS1
17 files changed, 424 insertions, 335 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/chrome/test/data/icon_util/128_X_128_icon.ico b/app/test/data/icon_util/128_X_128_icon.ico
index a5d72fe..a5d72fe 100644
--- a/chrome/test/data/icon_util/128_X_128_icon.ico
+++ b/app/test/data/icon_util/128_X_128_icon.ico
Binary files differ
diff --git a/chrome/test/data/icon_util/16_X_16_icon.ico b/app/test/data/icon_util/16_X_16_icon.ico
index 0e524f1..0e524f1 100644
--- a/chrome/test/data/icon_util/16_X_16_icon.ico
+++ b/app/test/data/icon_util/16_X_16_icon.ico
Binary files differ
diff --git a/chrome/app/chrome_dll_main.cc b/chrome/app/chrome_dll_main.cc
index 4a8d514..81a5bc8 100644
--- a/chrome/app/chrome_dll_main.cc
+++ b/chrome/app/chrome_dll_main.cc
@@ -29,6 +29,7 @@
#include <string.h>
#endif
+#include "app/app_paths.h"
#include "app/resource_bundle.h"
#include "base/at_exit.h"
#include "base/command_line.h"
@@ -332,6 +333,7 @@ int ChromeMain(int argc, const char** argv) {
SetupCRT(parsed_command_line);
// Initialize the Chrome path provider.
+ app::RegisterPathProvider();
chrome::RegisterPathProvider();
// Initialize the Stats Counters table. With this initialized,
diff --git a/chrome/chrome.gyp b/chrome/chrome.gyp
index 6f948c4..14b4131 100644
--- a/chrome/chrome.gyp
+++ b/chrome/chrome.gyp
@@ -174,6 +174,8 @@
# All .cc, .h, and .mm files under app/ except for tests.
'../app/animation.cc',
'../app/animation.h',
+ '../app/app_paths.h',
+ '../app/app_paths.cc',
'../app/app_switches.h',
'../app/app_switches.cc',
'../app/drag_drop_types.cc',
diff --git a/chrome/common/chrome_paths.cc b/chrome/common/chrome_paths.cc
index c1b4ce6..1c307ed 100644
--- a/chrome/common/chrome_paths.cc
+++ b/chrome/common/chrome_paths.cc
@@ -92,25 +92,6 @@ bool PathProvider(int key, FilePath* result) {
cur = cur.Append(FILE_PATH_LITERAL("resources"));
cur = cur.Append(FILE_PATH_LITERAL("inspector"));
break;
- case chrome::DIR_THEMES:
- if (!PathService::Get(chrome::DIR_APP, &cur))
- return false;
- cur = cur.Append(FILE_PATH_LITERAL("themes"));
- create_dir = true;
- break;
- case chrome::DIR_LOCALES:
- if (!PathService::Get(chrome::DIR_APP, &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;
case chrome::DIR_APP_DICTIONARIES:
#if defined(OS_LINUX)
// We can't write into the EXE dir on Linux, so keep dictionaries
diff --git a/chrome/common/chrome_paths.h b/chrome/common/chrome_paths.h
index fe01807..9f5b3cf 100644
--- a/chrome/common/chrome_paths.h
+++ b/chrome/common/chrome_paths.h
@@ -20,8 +20,6 @@ enum {
DIR_USER_DESKTOP, // directory that correspond to the desktop
DIR_RESOURCES, // directory where application resources are stored
DIR_INSPECTOR, // directory where web inspector is located
- DIR_THEMES, // directory where theme dll files are stored
- DIR_LOCALES, // directory where locale resources are stored
DIR_APP_DICTIONARIES, // directory where the global dictionaries are
DIR_USER_DOCUMENTS, // directory for a user's "My Documents"
DIR_DEFAULT_DOWNLOADS, // directory for a user's "My Documents/Downloads"
diff --git a/chrome/test/unit/chrome_test_suite.h b/chrome/test/unit/chrome_test_suite.h
index ef45ec4..a8d98f3 100644
--- a/chrome/test/unit/chrome_test_suite.h
+++ b/chrome/test/unit/chrome_test_suite.h
@@ -9,6 +9,7 @@
#include <string>
+#include "app/app_paths.h"
#include "app/resource_bundle.h"
#include "base/stats_table.h"
#include "base/file_util.h"
@@ -74,6 +75,7 @@ class ChromeTestSuite : public TestSuite {
scoped_host_mapper_.Init(host_mapper_.get());
chrome::RegisterPathProvider();
+ app::RegisterPathProvider();
g_browser_process = new TestingBrowserProcess;
// Notice a user data override, and otherwise default to using a custom
diff --git a/views/DEPS b/views/DEPS
index 2050eaa..66363ff 100644
--- a/views/DEPS
+++ b/views/DEPS
@@ -4,5 +4,4 @@ include_rules = [
"+grit/generated_resources.h",
"+grit/theme_resources.h",
"+skia/ext",
- "+skia/include",
]