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

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

Issue 6537022: Move media library path resolution into Chrome path provider. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: And again, this time with working tests... Created 9 years, 10 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
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 190 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 break; 201 break;
202 case chrome::DIR_USER_DATA_TEMP: 202 case chrome::DIR_USER_DATA_TEMP:
203 if (!PathService::Get(chrome::DIR_USER_DATA, &cur)) 203 if (!PathService::Get(chrome::DIR_USER_DATA, &cur))
204 return false; 204 return false;
205 cur = cur.Append(FILE_PATH_LITERAL("Temp")); 205 cur = cur.Append(FILE_PATH_LITERAL("Temp"));
206 break; 206 break;
207 case chrome::DIR_INTERNAL_PLUGINS: 207 case chrome::DIR_INTERNAL_PLUGINS:
208 if (!GetInternalPluginsDirectory(&cur)) 208 if (!GetInternalPluginsDirectory(&cur))
209 return false; 209 return false;
210 break; 210 break;
211 case chrome::DIR_MEDIA_LIBS:
212 #if defined(OS_MACOSX)
213 *result = base::mac::MainAppBundlePath();
214 *result = result->Append("Libraries");
215 #else
216 return PathService::Get(chrome::DIR_APP, result);
217 #endif
211 case chrome::FILE_LOCAL_STATE: 218 case chrome::FILE_LOCAL_STATE:
212 if (!PathService::Get(chrome::DIR_USER_DATA, &cur)) 219 if (!PathService::Get(chrome::DIR_USER_DATA, &cur))
213 return false; 220 return false;
214 cur = cur.Append(chrome::kLocalStateFilename); 221 cur = cur.Append(chrome::kLocalStateFilename);
215 break; 222 break;
216 case chrome::FILE_RECORDED_SCRIPT: 223 case chrome::FILE_RECORDED_SCRIPT:
217 if (!PathService::Get(chrome::DIR_USER_DATA, &cur)) 224 if (!PathService::Get(chrome::DIR_USER_DATA, &cur))
218 return false; 225 return false;
219 cur = cur.Append(FILE_PATH_LITERAL("script.log")); 226 cur = cur.Append(FILE_PATH_LITERAL("script.log"));
220 break; 227 break;
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
348 return true; 355 return true;
349 } 356 }
350 357
351 // This cannot be done as a static initializer sadly since Visual Studio will 358 // This cannot be done as a static initializer sadly since Visual Studio will
352 // eliminate this object file if there is no direct entry point into it. 359 // eliminate this object file if there is no direct entry point into it.
353 void RegisterPathProvider() { 360 void RegisterPathProvider() {
354 PathService::RegisterProvider(PathProvider, PATH_START, PATH_END); 361 PathService::RegisterProvider(PathProvider, PATH_START, PATH_END);
355 } 362 }
356 363
357 } // namespace chrome 364 } // namespace chrome
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698