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

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: Get rid of spurious changes in previous patch-set. Created 9 years, 9 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/renderer/render_process_impl.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) 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 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
188 break; 188 break;
189 case chrome::DIR_USER_DATA_TEMP: 189 case chrome::DIR_USER_DATA_TEMP:
190 if (!PathService::Get(chrome::DIR_USER_DATA, &cur)) 190 if (!PathService::Get(chrome::DIR_USER_DATA, &cur))
191 return false; 191 return false;
192 cur = cur.Append(FILE_PATH_LITERAL("Temp")); 192 cur = cur.Append(FILE_PATH_LITERAL("Temp"));
193 break; 193 break;
194 case chrome::DIR_INTERNAL_PLUGINS: 194 case chrome::DIR_INTERNAL_PLUGINS:
195 if (!GetInternalPluginsDirectory(&cur)) 195 if (!GetInternalPluginsDirectory(&cur))
196 return false; 196 return false;
197 break; 197 break;
198 case chrome::DIR_MEDIA_LIBS:
199 #if defined(OS_MACOSX)
200 *result = base::mac::MainAppBundlePath();
201 *result = result->Append("Libraries");
202 return true;
203 #else
204 return PathService::Get(chrome::DIR_APP, result);
205 #endif
198 case chrome::FILE_LOCAL_STATE: 206 case chrome::FILE_LOCAL_STATE:
199 if (!PathService::Get(chrome::DIR_USER_DATA, &cur)) 207 if (!PathService::Get(chrome::DIR_USER_DATA, &cur))
200 return false; 208 return false;
201 cur = cur.Append(chrome::kLocalStateFilename); 209 cur = cur.Append(chrome::kLocalStateFilename);
202 break; 210 break;
203 case chrome::FILE_RECORDED_SCRIPT: 211 case chrome::FILE_RECORDED_SCRIPT:
204 if (!PathService::Get(chrome::DIR_USER_DATA, &cur)) 212 if (!PathService::Get(chrome::DIR_USER_DATA, &cur))
205 return false; 213 return false;
206 cur = cur.Append(FILE_PATH_LITERAL("script.log")); 214 cur = cur.Append(FILE_PATH_LITERAL("script.log"));
207 break; 215 break;
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
312 return true; 320 return true;
313 } 321 }
314 322
315 // This cannot be done as a static initializer sadly since Visual Studio will 323 // This cannot be done as a static initializer sadly since Visual Studio will
316 // eliminate this object file if there is no direct entry point into it. 324 // eliminate this object file if there is no direct entry point into it.
317 void RegisterPathProvider() { 325 void RegisterPathProvider() {
318 PathService::RegisterProvider(PathProvider, PATH_START, PATH_END); 326 PathService::RegisterProvider(PathProvider, PATH_START, PATH_END);
319 } 327 }
320 328
321 } // namespace chrome 329 } // namespace chrome
OLDNEW
« no previous file with comments | « chrome/common/chrome_paths.h ('k') | chrome/renderer/render_process_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698