summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
authortfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-06-27 21:43:58 +0000
committertfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-06-27 21:43:58 +0000
commit8463c8db63491878163fa0a43b31be61fb8ccf54 (patch)
tree94de537edf13c519cd4b3c0d17d76aca28fa210c /chrome
parent88b460b939077577521fe6119a3682b17992eeae (diff)
downloadchromium_src-8463c8db63491878163fa0a43b31be61fb8ccf54.zip
chromium_src-8463c8db63491878163fa0a43b31be61fb8ccf54.tar.gz
chromium_src-8463c8db63491878163fa0a43b31be61fb8ccf54.tar.bz2
app: Get rid of app_paths.[cc,h] files.
BUG=72317 TEST=None R=rsesek@chromium.org Review URL: http://codereview.chromium.org/7262020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@90651 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r--chrome/app/chrome_main.cc2
-rw-r--r--chrome/browser/diagnostics/diagnostics_main.cc2
-rw-r--r--chrome/browser/extensions/external_extension_provider_impl.cc3
-rw-r--r--chrome/browser/extensions/external_pref_extension_loader.cc1
-rw-r--r--chrome/common/chrome_paths.cc14
-rw-r--r--chrome/common/chrome_paths.h2
-rw-r--r--chrome/test/unit/chrome_test_suite.cc2
-rw-r--r--chrome/tools/profiles/generate_profile.cc2
8 files changed, 16 insertions, 12 deletions
diff --git a/chrome/app/chrome_main.cc b/chrome/app/chrome_main.cc
index 86c0cf5..bc8b594 100644
--- a/chrome/app/chrome_main.cc
+++ b/chrome/app/chrome_main.cc
@@ -4,7 +4,6 @@
#include "chrome/app/chrome_main.h"
-#include "app/app_paths.h"
#include "base/at_exit.h"
#include "base/command_line.h"
#include "base/debug/debugger.h"
@@ -645,7 +644,6 @@ int ChromeMain(int argc, char** argv) {
#endif
// Initialize the Chrome path provider.
- app::RegisterPathProvider();
ui::RegisterPathProvider();
chrome::RegisterPathProvider();
content::RegisterPathProvider();
diff --git a/chrome/browser/diagnostics/diagnostics_main.cc b/chrome/browser/diagnostics/diagnostics_main.cc
index a54bd10..0f850dc 100644
--- a/chrome/browser/diagnostics/diagnostics_main.cc
+++ b/chrome/browser/diagnostics/diagnostics_main.cc
@@ -11,7 +11,6 @@
#include <iostream>
-#include "app/app_paths.h"
#include "base/basictypes.h"
#include "base/command_line.h"
#include "base/i18n/icu_util.h"
@@ -349,7 +348,6 @@ int DiagnosticsMain(const CommandLine& command_line) {
// We need to have the path providers registered. They both
// return void so there is no early error signal that we can use.
- app::RegisterPathProvider();
ui::RegisterPathProvider();
chrome::RegisterPathProvider();
diff --git a/chrome/browser/extensions/external_extension_provider_impl.cc b/chrome/browser/extensions/external_extension_provider_impl.cc
index 10a0e11..f288af0 100644
--- a/chrome/browser/extensions/external_extension_provider_impl.cc
+++ b/chrome/browser/extensions/external_extension_provider_impl.cc
@@ -4,7 +4,6 @@
#include "chrome/browser/extensions/external_extension_provider_impl.h"
-#include "app/app_paths.h"
#include "base/file_path.h"
#include "base/logging.h"
#include "base/memory/linked_ptr.h"
@@ -228,7 +227,7 @@ void ExternalExtensionProviderImpl::CreateExternalProviders(
new ExternalExtensionProviderImpl(
service,
new ExternalPrefExtensionLoader(
- app::DIR_EXTERNAL_EXTENSIONS),
+ chrome::DIR_EXTERNAL_EXTENSIONS),
Extension::EXTERNAL_PREF,
Extension::EXTERNAL_PREF_DOWNLOAD)));
diff --git a/chrome/browser/extensions/external_pref_extension_loader.cc b/chrome/browser/extensions/external_pref_extension_loader.cc
index a0aa3e3..37b7b8f 100644
--- a/chrome/browser/extensions/external_pref_extension_loader.cc
+++ b/chrome/browser/extensions/external_pref_extension_loader.cc
@@ -4,7 +4,6 @@
#include "chrome/browser/extensions/external_pref_extension_loader.h"
-#include "app/app_paths.h"
#include "base/file_path.h"
#include "base/file_util.h"
#include "base/logging.h"
diff --git a/chrome/common/chrome_paths.cc b/chrome/common/chrome_paths.cc
index a8d1dd8..9b817d3 100644
--- a/chrome/common/chrome_paths.cc
+++ b/chrome/common/chrome_paths.cc
@@ -308,6 +308,20 @@ bool PathProvider(int key, FilePath* result) {
break;
}
#endif
+ case chrome::DIR_EXTERNAL_EXTENSIONS:
+ if (!PathService::Get(base::DIR_MODULE, &cur))
+ return false;
+#if defined(OS_MACOSX)
+ // On Mac, built-in extensions are in Contents/Extensions, a sibling of
+ // the App dir. If there are none, it may not exist.
+ cur = cur.DirName();
+ cur = cur.Append(FILE_PATH_LITERAL("Extensions"));
+ create_dir = false;
+#else
+ cur = cur.Append(FILE_PATH_LITERAL("extensions"));
+ create_dir = true;
+#endif
+ break;
default:
return false;
}
diff --git a/chrome/common/chrome_paths.h b/chrome/common/chrome_paths.h
index 8b91c49..918ba41 100644
--- a/chrome/common/chrome_paths.h
+++ b/chrome/common/chrome_paths.h
@@ -56,6 +56,7 @@ enum {
// Getting this path does not create it.
#endif
+ DIR_EXTERNAL_EXTENSIONS, // Directory where installer places .crx files.
FILE_RESOURCE_MODULE, // Full path and filename of the module that
// contains embedded resources (version,
// strings, images, etc.).
@@ -79,7 +80,6 @@ enum {
FILE_CHROMEOS_API, // Full path to chrome os api shared object.
#endif
-
// Valid only in development environment; TODO(darin): move these
DIR_TEST_DATA, // Directory where unit test data resides.
DIR_TEST_TOOLS, // Directory where unit test tools reside.
diff --git a/chrome/test/unit/chrome_test_suite.cc b/chrome/test/unit/chrome_test_suite.cc
index 09e184d..4a68fe1 100644
--- a/chrome/test/unit/chrome_test_suite.cc
+++ b/chrome/test/unit/chrome_test_suite.cc
@@ -4,7 +4,6 @@
#include "chrome/test/unit/chrome_test_suite.h"
-#include "app/app_paths.h"
#include "base/command_line.h"
#include "base/mac/scoped_nsautorelease_pool.h"
#include "base/metrics/stats_table.h"
@@ -109,7 +108,6 @@ void ChromeTestSuite::Initialize() {
scoped_host_resolver_proc_.Init(host_resolver_proc_.get());
chrome::RegisterPathProvider();
- app::RegisterPathProvider();
content::RegisterPathProvider();
ui::RegisterPathProvider();
g_browser_process = new TestingBrowserProcess;
diff --git a/chrome/tools/profiles/generate_profile.cc b/chrome/tools/profiles/generate_profile.cc
index 1da6289..f392137 100644
--- a/chrome/tools/profiles/generate_profile.cc
+++ b/chrome/tools/profiles/generate_profile.cc
@@ -7,7 +7,6 @@
#include "chrome/tools/profiles/thumbnail-inl.h"
-#include "app/app_paths.h"
#include "base/at_exit.h"
#include "base/command_line.h"
#include "base/file_path.h"
@@ -233,7 +232,6 @@ int main(int argc, const char* argv[]) {
icu_util::Initialize();
chrome::RegisterPathProvider();
- app::RegisterPathProvider();
ui::RegisterPathProvider();
ResourceBundle::InitSharedInstance("en-US");
NotificationService notification_service;