Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(98)

Side by Side Diff: chrome/common/chrome_paths.cc

Issue 7254: Initial Greasemonkey support (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 12 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/common/chrome_paths.h ('k') | chrome/common/chrome_switches.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <windows.h> 5 #include <windows.h>
6 #include <shellapi.h> 6 #include <shellapi.h>
7 #include <shlobj.h> 7 #include <shlobj.h>
8 8
9 #include "chrome/common/chrome_paths.h" 9 #include "chrome/common/chrome_paths.h"
10 10
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 case chrome::DIR_LOCALES: 122 case chrome::DIR_LOCALES:
123 if (!PathService::Get(chrome::DIR_APP, &cur)) 123 if (!PathService::Get(chrome::DIR_APP, &cur))
124 return false; 124 return false;
125 file_util::AppendToPath(&cur, L"locales"); 125 file_util::AppendToPath(&cur, L"locales");
126 break; 126 break;
127 case chrome::DIR_APP_DICTIONARIES: 127 case chrome::DIR_APP_DICTIONARIES:
128 if (!PathService::Get(base::DIR_EXE, &cur)) 128 if (!PathService::Get(base::DIR_EXE, &cur))
129 return false; 129 return false;
130 file_util::AppendToPath(&cur, L"Dictionaries"); 130 file_util::AppendToPath(&cur, L"Dictionaries");
131 break; 131 break;
132 case chrome::DIR_USER_SCRIPTS:
133 // TODO(aa): Figure out where the script directory should live.
134 cur = L"C:\\SCRIPTS\\";
135 exists = true; // don't trigger directory creation code
136 break;
132 case chrome::FILE_LOCAL_STATE: 137 case chrome::FILE_LOCAL_STATE:
133 if (!PathService::Get(chrome::DIR_USER_DATA, &cur)) 138 if (!PathService::Get(chrome::DIR_USER_DATA, &cur))
134 return false; 139 return false;
135 file_util::AppendToPath(&cur, chrome::kLocalStateFilename); 140 file_util::AppendToPath(&cur, chrome::kLocalStateFilename);
136 exists = true; // don't trigger directory creation code 141 exists = true; // don't trigger directory creation code
137 break; 142 break;
138 case chrome::FILE_RECORDED_SCRIPT: 143 case chrome::FILE_RECORDED_SCRIPT:
139 if (!PathService::Get(chrome::DIR_USER_DATA, &cur)) 144 if (!PathService::Get(chrome::DIR_USER_DATA, &cur))
140 return false; 145 return false;
141 file_util::AppendToPath(&cur, L"script.log"); 146 file_util::AppendToPath(&cur, L"script.log");
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
219 } 224 }
220 225
221 // This cannot be done as a static initializer sadly since Visual Studio will 226 // This cannot be done as a static initializer sadly since Visual Studio will
222 // eliminate this object file if there is no direct entry point into it. 227 // eliminate this object file if there is no direct entry point into it.
223 void RegisterPathProvider() { 228 void RegisterPathProvider() {
224 PathService::RegisterProvider(PathProvider, PATH_START, PATH_END); 229 PathService::RegisterProvider(PathProvider, PATH_START, PATH_END);
225 } 230 }
226 231
227 } // namespace chrome 232 } // namespace chrome
228 233
OLDNEW
« no previous file with comments | « chrome/common/chrome_paths.h ('k') | chrome/common/chrome_switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698