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

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

Issue 1582022: Unpack extensions inside chrome's directory. (Closed)
Patch Set: Final rebase. Created 10 years, 7 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
« no previous file with comments | « chrome/common/chrome_paths.h ('k') | chrome/common/extensions/extension_constants.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-2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2010 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 "chrome/common/chrome_paths.h" 5 #include "chrome/common/chrome_paths.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/file_util.h" 8 #include "base/file_util.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/path_service.h" 10 #include "base/path_service.h"
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 // it to the user data dir there also. 179 // it to the user data dir there also.
180 if (!PathService::Get(chrome::DIR_USER_DATA, &cur)) 180 if (!PathService::Get(chrome::DIR_USER_DATA, &cur))
181 return false; 181 return false;
182 #else 182 #else
183 if (!PathService::Get(base::DIR_EXE, &cur)) 183 if (!PathService::Get(base::DIR_EXE, &cur))
184 return false; 184 return false;
185 #endif 185 #endif
186 cur = cur.Append(FILE_PATH_LITERAL("Dictionaries")); 186 cur = cur.Append(FILE_PATH_LITERAL("Dictionaries"));
187 create_dir = true; 187 create_dir = true;
188 break; 188 break;
189 case chrome::DIR_USER_DATA_TEMP:
190 if (!PathService::Get(chrome::DIR_USER_DATA, &cur))
191 return false;
192 cur = cur.Append(FILE_PATH_LITERAL("Temp"));
193 create_dir = true;
194 break;
189 case chrome::FILE_LOCAL_STATE: 195 case chrome::FILE_LOCAL_STATE:
190 if (!PathService::Get(chrome::DIR_USER_DATA, &cur)) 196 if (!PathService::Get(chrome::DIR_USER_DATA, &cur))
191 return false; 197 return false;
192 cur = cur.Append(chrome::kLocalStateFilename); 198 cur = cur.Append(chrome::kLocalStateFilename);
193 break; 199 break;
194 case chrome::FILE_RECORDED_SCRIPT: 200 case chrome::FILE_RECORDED_SCRIPT:
195 if (!PathService::Get(chrome::DIR_USER_DATA, &cur)) 201 if (!PathService::Get(chrome::DIR_USER_DATA, &cur))
196 return false; 202 return false;
197 cur = cur.Append(FILE_PATH_LITERAL("script.log")); 203 cur = cur.Append(FILE_PATH_LITERAL("script.log"));
198 break; 204 break;
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
281 return true; 287 return true;
282 } 288 }
283 289
284 // This cannot be done as a static initializer sadly since Visual Studio will 290 // This cannot be done as a static initializer sadly since Visual Studio will
285 // eliminate this object file if there is no direct entry point into it. 291 // eliminate this object file if there is no direct entry point into it.
286 void RegisterPathProvider() { 292 void RegisterPathProvider() {
287 PathService::RegisterProvider(PathProvider, PATH_START, PATH_END); 293 PathService::RegisterProvider(PathProvider, PATH_START, PATH_END);
288 } 294 }
289 295
290 } // namespace chrome 296 } // namespace chrome
OLDNEW
« no previous file with comments | « chrome/common/chrome_paths.h ('k') | chrome/common/extensions/extension_constants.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698