summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--chrome/browser/greasemonkey_master.h2
-rw-r--r--chrome/browser/profile.cc7
-rw-r--r--chrome/common/chrome_constants.cc1
-rw-r--r--chrome/common/chrome_constants.h1
-rw-r--r--chrome/common/chrome_paths.cc9
-rw-r--r--chrome/common/chrome_paths.h1
6 files changed, 6 insertions, 15 deletions
diff --git a/chrome/browser/greasemonkey_master.h b/chrome/browser/greasemonkey_master.h
index 9244b80..cc1c92b 100644
--- a/chrome/browser/greasemonkey_master.h
+++ b/chrome/browser/greasemonkey_master.h
@@ -19,7 +19,7 @@ class GreasemonkeyMaster : public base::RefCounted<GreasemonkeyMaster>,
public:
// For testability, the constructor takes the MessageLoop to run the
// script-reloading worker on as well as the path the scripts live in.
- // These are normally the file thread and DIR_USER_SCRIPTS.
+ // These are normally the file thread and a directory inside the profile.
GreasemonkeyMaster(MessageLoop* worker, const FilePath& script_dir);
~GreasemonkeyMaster();
diff --git a/chrome/browser/profile.cc b/chrome/browser/profile.cc
index 9014424..6168275 100644
--- a/chrome/browser/profile.cc
+++ b/chrome/browser/profile.cc
@@ -450,12 +450,11 @@ ExtensionsService* ProfileImpl::GetExtensionsService() {
GreasemonkeyMaster* ProfileImpl::GetGreasemonkeyMaster() {
if (!greasemonkey_master_.get()) {
- std::wstring script_dir_str;
- PathService::Get(chrome::DIR_USER_SCRIPTS, &script_dir_str);
- FilePath script_dir(script_dir_str);
+ std::wstring script_dir = GetPath();
+ file_util::AppendToPath(&script_dir, chrome::kUserScriptsDirname);
greasemonkey_master_ =
new GreasemonkeyMaster(g_browser_process->file_thread()->message_loop(),
- script_dir);
+ FilePath(script_dir));
}
return greasemonkey_master_.get();
diff --git a/chrome/common/chrome_constants.cc b/chrome/common/chrome_constants.cc
index 0bd263e..17c8314 100644
--- a/chrome/common/chrome_constants.cc
+++ b/chrome/common/chrome_constants.cc
@@ -34,6 +34,7 @@ const wchar_t kPreferencesFilename[] = L"Preferences";
const wchar_t kSafeBrowsingFilename[] = L"Safe Browsing";
const wchar_t kThumbnailsFilename[] = L"Thumbnails";
const wchar_t kUserDataDirname[] = L"User Data";
+const wchar_t kUserScriptsDirname[] = L"User Scripts";
const wchar_t kWebDataFilename[] = L"Web Data";
const wchar_t kBookmarksFileName[] = L"Bookmarks";
const wchar_t kHistoryBookmarksFileName[] = L"Bookmarks From History";
diff --git a/chrome/common/chrome_constants.h b/chrome/common/chrome_constants.h
index a838699..5e59578 100644
--- a/chrome/common/chrome_constants.h
+++ b/chrome/common/chrome_constants.h
@@ -31,6 +31,7 @@ extern const wchar_t kPreferencesFilename[];
extern const wchar_t kSafeBrowsingFilename[];
extern const wchar_t kThumbnailsFilename[];
extern const wchar_t kUserDataDirname[];
+extern const wchar_t kUserScriptsDirname[];
extern const wchar_t kWebDataFilename[];
extern const wchar_t kBookmarksFileName[];
extern const wchar_t kHistoryBookmarksFileName[];
diff --git a/chrome/common/chrome_paths.cc b/chrome/common/chrome_paths.cc
index edb0d58..7b2abc5 100644
--- a/chrome/common/chrome_paths.cc
+++ b/chrome/common/chrome_paths.cc
@@ -172,15 +172,6 @@ bool PathProvider(int key, FilePath* result) {
file_util::AppendToPath(&cur, L"Dictionaries");
create_dir = true;
break;
- case chrome::DIR_USER_SCRIPTS:
- // TODO(aa): Figure out where the script directory should live.
-#if defined(OS_WIN)
- cur = L"C:\\SCRIPTS\\";
-#else
- NOTIMPLEMENTED();
- return false;
-#endif
- break;
case chrome::FILE_LOCAL_STATE:
if (!PathService::Get(chrome::DIR_USER_DATA, &cur))
return false;
diff --git a/chrome/common/chrome_paths.h b/chrome/common/chrome_paths.h
index 17c1cd9..9300e99 100644
--- a/chrome/common/chrome_paths.h
+++ b/chrome/common/chrome_paths.h
@@ -25,7 +25,6 @@ enum {
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"
- DIR_USER_SCRIPTS, // directory where Greasemonkey user scripts are stored
FILE_RESOURCE_MODULE, // full path and filename of the module that contains
// embedded resources (version, strings, images, etc.)
FILE_LOCAL_STATE, // path and filename to the file in which machine/